#[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
pub fn new() -> Self
Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
Sets the value of project_id.
Sourcepub fn set_cluster_name<T: Into<String>>(self, v: T) -> Self
pub fn set_cluster_name<T: Into<String>>(self, v: T) -> Self
Sets the value of cluster_name.
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<ClusterConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<ClusterConfig>,
Sets the value of config.
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>,
Sets or clears the value of config.
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.
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.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_status<T>(self, v: T) -> Selfwhere
T: Into<ClusterStatus>,
pub fn set_status<T>(self, v: T) -> Selfwhere
T: Into<ClusterStatus>,
Sets the value of status.
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>,
Sets or clears the value of status.
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.
Sourcepub fn set_cluster_uuid<T: Into<String>>(self, v: T) -> Self
pub fn set_cluster_uuid<T: Into<String>>(self, v: T) -> Self
Sets the value of cluster_uuid.
Sourcepub fn set_metrics<T>(self, v: T) -> Selfwhere
T: Into<ClusterMetrics>,
pub fn set_metrics<T>(self, v: T) -> Selfwhere
T: Into<ClusterMetrics>,
Sets the value of metrics.
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>,
Sets or clears the value of metrics.