#[non_exhaustive]pub struct Cluster {
pub project_id: String,
pub cluster_name: String,
pub config: Option<ClusterConfig>,
pub virtual_cluster_config: Option<VirtualClusterConfig>,
pub labels: HashMap<String, String>,
pub status: Option<ClusterStatus>,
pub status_history: Vec<ClusterStatus>,
pub cluster_uuid: String,
pub metrics: Option<ClusterMetrics>,
/* private fields */
}Expand description
Describes the identifying information, config, and status of a Dataproc cluster
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.project_id: StringRequired. The Google Cloud Platform project ID that the cluster belongs to.
cluster_name: StringRequired. The cluster name, which must be unique within a project. The name must start with a lowercase letter, and can contain up to 51 lowercase letters, numbers, and hyphens. It cannot end with a hyphen. The name of a deleted cluster can be reused.
config: Option<ClusterConfig>Optional. The cluster config for a cluster of Compute Engine Instances. Note that Dataproc may set default values, and values may change when clusters are updated.
Exactly one of ClusterConfig or VirtualClusterConfig must be specified.
virtual_cluster_config: Option<VirtualClusterConfig>Optional. The virtual cluster config is used when creating a Dataproc cluster that does not directly control the underlying compute resources, for example, when creating a Dataproc-on-GKE cluster. Dataproc may set default values, and values may change when clusters are updated. Exactly one of config or virtual_cluster_config must be specified.
labels: HashMap<String, String>Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035. No more than 32 labels can be associated with a cluster.
status: Option<ClusterStatus>Output only. Cluster status.
status_history: Vec<ClusterStatus>Output only. The previous cluster status.
cluster_uuid: StringOutput only. A cluster UUID (Unique Universal Identifier). Dataproc generates this value when it creates the cluster.
metrics: Option<ClusterMetrics>Output only. Contains cluster daemon metrics such as HDFS and YARN stats.
Beta Feature: This report is available for testing purposes only. It may be changed before final release.
Implementations§
Source§impl Cluster
impl Cluster
Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_cluster_name<T: Into<String>>(self, v: T) -> Self
pub fn set_cluster_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<ClusterConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<ClusterConfig>,
Sourcepub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterConfig>,
pub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterConfig>,
Sourcepub fn set_virtual_cluster_config<T>(self, v: T) -> Selfwhere
T: Into<VirtualClusterConfig>,
pub fn set_virtual_cluster_config<T>(self, v: T) -> Selfwhere
T: Into<VirtualClusterConfig>,
Sets the value of virtual_cluster_config.
§Example
use google_cloud_dataproc_v1::model::VirtualClusterConfig;
let x = Cluster::new().set_virtual_cluster_config(VirtualClusterConfig::default()/* use setters */);Sourcepub fn set_or_clear_virtual_cluster_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<VirtualClusterConfig>,
pub fn set_or_clear_virtual_cluster_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<VirtualClusterConfig>,
Sets or clears the value of virtual_cluster_config.
§Example
use google_cloud_dataproc_v1::model::VirtualClusterConfig;
let x = Cluster::new().set_or_clear_virtual_cluster_config(Some(VirtualClusterConfig::default()/* use setters */));
let x = Cluster::new().set_or_clear_virtual_cluster_config(None::<VirtualClusterConfig>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_status<T>(self, v: T) -> Selfwhere
T: Into<ClusterStatus>,
pub fn set_status<T>(self, v: T) -> Selfwhere
T: Into<ClusterStatus>,
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterStatus>,
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterStatus>,
Sourcepub fn set_status_history<T, V>(self, v: T) -> Self
pub fn set_status_history<T, V>(self, v: T) -> Self
Sets the value of status_history.
§Example
use google_cloud_dataproc_v1::model::ClusterStatus;
let x = Cluster::new()
.set_status_history([
ClusterStatus::default()/* use setters */,
ClusterStatus::default()/* use (different) setters */,
]);Sourcepub fn set_cluster_uuid<T: Into<String>>(self, v: T) -> Self
pub fn set_cluster_uuid<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_metrics<T>(self, v: T) -> Selfwhere
T: Into<ClusterMetrics>,
pub fn set_metrics<T>(self, v: T) -> Selfwhere
T: Into<ClusterMetrics>,
Sourcepub fn set_or_clear_metrics<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterMetrics>,
pub fn set_or_clear_metrics<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterMetrics>,
Trait Implementations§
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnsafeUnpin for Cluster
impl UnwindSafe for Cluster
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request