#[non_exhaustive]pub struct Cluster {Show 29 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub state: State,
pub uid: String,
pub replica_count: Option<i32>,
pub authorization_mode: AuthorizationMode,
pub transit_encryption_mode: TransitEncryptionMode,
pub size_gb: Option<i32>,
pub shard_count: Option<i32>,
pub psc_configs: Vec<PscConfig>,
pub discovery_endpoints: Vec<DiscoveryEndpoint>,
pub psc_connections: Vec<PscConnection>,
pub state_info: Option<StateInfo>,
pub node_type: NodeType,
pub persistence_config: Option<ClusterPersistenceConfig>,
pub redis_configs: HashMap<String, String>,
pub precise_size_gb: Option<f64>,
pub zone_distribution_config: Option<ZoneDistributionConfig>,
pub cross_cluster_replication_config: Option<CrossClusterReplicationConfig>,
pub deletion_protection_enabled: Option<bool>,
pub maintenance_policy: Option<ClusterMaintenancePolicy>,
pub maintenance_schedule: Option<ClusterMaintenanceSchedule>,
pub psc_service_attachments: Vec<PscServiceAttachment>,
pub cluster_endpoints: Vec<ClusterEndpoint>,
pub backup_collection: Option<String>,
pub kms_key: Option<String>,
pub automated_backup_config: Option<AutomatedBackupConfig>,
pub encryption_info: Option<EncryptionInfo>,
pub import_sources: Option<ImportSources>,
/* private fields */
}Expand description
A cluster instance.
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.name: StringRequired. Identifier. Unique name of the resource in this scope including
project and location using the form:
projects/{project_id}/locations/{location_id}/clusters/{cluster_id}
create_time: Option<Timestamp>Output only. The timestamp associated with the cluster creation request.
state: StateOutput only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED
uid: StringOutput only. System assigned, unique identifier for the cluster.
replica_count: Option<i32>Optional. The number of replica nodes per shard.
Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
transit_encryption_mode: TransitEncryptionModeOptional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.
size_gb: Option<i32>Output only. Redis memory size in GB for the entire cluster rounded up to the next integer.
shard_count: Option<i32>Optional. Number of shards for the Redis cluster.
psc_configs: Vec<PscConfig>Optional. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.
discovery_endpoints: Vec<DiscoveryEndpoint>Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.
psc_connections: Vec<PscConnection>Output only. The list of PSC connections that are auto-created through service connectivity automation.
state_info: Option<StateInfo>Output only. Additional information about the current state of the cluster.
node_type: NodeTypeOptional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.
persistence_config: Option<ClusterPersistenceConfig>Optional. Persistence config (RDB, AOF) for the cluster.
redis_configs: HashMap<String, String>Optional. Key/Value pairs of customer overrides for mutable Redis Configs
precise_size_gb: Option<f64>Output only. Precise value of redis memory size in GB for the entire cluster.
zone_distribution_config: Option<ZoneDistributionConfig>Optional. This config will be used to determine how the customer wants us to distribute cluster resources within the region.
cross_cluster_replication_config: Option<CrossClusterReplicationConfig>Optional. Cross cluster replication config.
deletion_protection_enabled: Option<bool>Optional. The delete operation will fail when the value is set to true.
maintenance_policy: Option<ClusterMaintenancePolicy>Optional. ClusterMaintenancePolicy determines when to allow or deny updates.
maintenance_schedule: Option<ClusterMaintenanceSchedule>Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.
psc_service_attachments: Vec<PscServiceAttachment>Output only. Service attachment details to configure Psc connections
cluster_endpoints: Vec<ClusterEndpoint>Optional. A list of cluster enpoints.
backup_collection: Option<String>Optional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection}
kms_key: Option<String>Optional. The KMS key used to encrypt the at-rest data of the cluster.
automated_backup_config: Option<AutomatedBackupConfig>Optional. The automated backup config for the cluster.
encryption_info: Option<EncryptionInfo>Output only. Encryption information of the data at rest of the cluster.
import_sources: Option<ImportSources>The source to import from.
Implementations§
Source§impl Cluster
impl Cluster
pub fn new() -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_replica_count<T>(self, v: T) -> Self
pub fn set_replica_count<T>(self, v: T) -> Self
Sets the value of replica_count.
Sourcepub fn set_or_clear_replica_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_replica_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of replica_count.
Sets the value of authorization_mode.
Sourcepub fn set_transit_encryption_mode<T: Into<TransitEncryptionMode>>(
self,
v: T,
) -> Self
pub fn set_transit_encryption_mode<T: Into<TransitEncryptionMode>>( self, v: T, ) -> Self
Sets the value of transit_encryption_mode.
Sourcepub fn set_size_gb<T>(self, v: T) -> Self
pub fn set_size_gb<T>(self, v: T) -> Self
Sets the value of size_gb.
Sourcepub fn set_or_clear_size_gb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_size_gb<T>(self, v: Option<T>) -> Self
Sets or clears the value of size_gb.
Sourcepub fn set_shard_count<T>(self, v: T) -> Self
pub fn set_shard_count<T>(self, v: T) -> Self
Sets the value of shard_count.
Sourcepub fn set_or_clear_shard_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_shard_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of shard_count.
Sourcepub fn set_psc_configs<T, V>(self, v: T) -> Self
pub fn set_psc_configs<T, V>(self, v: T) -> Self
Sets the value of psc_configs.
Sourcepub fn set_discovery_endpoints<T, V>(self, v: T) -> Self
pub fn set_discovery_endpoints<T, V>(self, v: T) -> Self
Sets the value of discovery_endpoints.
Sourcepub fn set_psc_connections<T, V>(self, v: T) -> Self
pub fn set_psc_connections<T, V>(self, v: T) -> Self
Sets the value of psc_connections.
Sourcepub fn set_state_info<T>(self, v: T) -> Self
pub fn set_state_info<T>(self, v: T) -> Self
Sets the value of state_info.
Sourcepub fn set_or_clear_state_info<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state_info<T>(self, v: Option<T>) -> Self
Sets or clears the value of state_info.
Sourcepub fn set_node_type<T: Into<NodeType>>(self, v: T) -> Self
pub fn set_node_type<T: Into<NodeType>>(self, v: T) -> Self
Sets the value of node_type.
Sourcepub fn set_persistence_config<T>(self, v: T) -> Selfwhere
T: Into<ClusterPersistenceConfig>,
pub fn set_persistence_config<T>(self, v: T) -> Selfwhere
T: Into<ClusterPersistenceConfig>,
Sets the value of persistence_config.
Sourcepub fn set_or_clear_persistence_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterPersistenceConfig>,
pub fn set_or_clear_persistence_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterPersistenceConfig>,
Sets or clears the value of persistence_config.
Sourcepub fn set_redis_configs<T, K, V>(self, v: T) -> Self
pub fn set_redis_configs<T, K, V>(self, v: T) -> Self
Sets the value of redis_configs.
Sourcepub fn set_precise_size_gb<T>(self, v: T) -> Self
pub fn set_precise_size_gb<T>(self, v: T) -> Self
Sets the value of precise_size_gb.
Sourcepub fn set_or_clear_precise_size_gb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_precise_size_gb<T>(self, v: Option<T>) -> Self
Sets or clears the value of precise_size_gb.
Sourcepub fn set_zone_distribution_config<T>(self, v: T) -> Selfwhere
T: Into<ZoneDistributionConfig>,
pub fn set_zone_distribution_config<T>(self, v: T) -> Selfwhere
T: Into<ZoneDistributionConfig>,
Sets the value of zone_distribution_config.
Sourcepub fn set_or_clear_zone_distribution_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ZoneDistributionConfig>,
pub fn set_or_clear_zone_distribution_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<ZoneDistributionConfig>,
Sets or clears the value of zone_distribution_config.
Sourcepub fn set_cross_cluster_replication_config<T>(self, v: T) -> Selfwhere
T: Into<CrossClusterReplicationConfig>,
pub fn set_cross_cluster_replication_config<T>(self, v: T) -> Selfwhere
T: Into<CrossClusterReplicationConfig>,
Sets the value of cross_cluster_replication_config.
Sourcepub fn set_or_clear_cross_cluster_replication_config<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<CrossClusterReplicationConfig>,
pub fn set_or_clear_cross_cluster_replication_config<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<CrossClusterReplicationConfig>,
Sets or clears the value of cross_cluster_replication_config.
Sourcepub fn set_deletion_protection_enabled<T>(self, v: T) -> Self
pub fn set_deletion_protection_enabled<T>(self, v: T) -> Self
Sets the value of deletion_protection_enabled.
Sourcepub fn set_or_clear_deletion_protection_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_deletion_protection_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of deletion_protection_enabled.
Sourcepub fn set_maintenance_policy<T>(self, v: T) -> Selfwhere
T: Into<ClusterMaintenancePolicy>,
pub fn set_maintenance_policy<T>(self, v: T) -> Selfwhere
T: Into<ClusterMaintenancePolicy>,
Sets the value of maintenance_policy.
Sourcepub fn set_or_clear_maintenance_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterMaintenancePolicy>,
pub fn set_or_clear_maintenance_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterMaintenancePolicy>,
Sets or clears the value of maintenance_policy.
Sourcepub fn set_maintenance_schedule<T>(self, v: T) -> Selfwhere
T: Into<ClusterMaintenanceSchedule>,
pub fn set_maintenance_schedule<T>(self, v: T) -> Selfwhere
T: Into<ClusterMaintenanceSchedule>,
Sets the value of maintenance_schedule.
Sourcepub fn set_or_clear_maintenance_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterMaintenanceSchedule>,
pub fn set_or_clear_maintenance_schedule<T>(self, v: Option<T>) -> Selfwhere
T: Into<ClusterMaintenanceSchedule>,
Sets or clears the value of maintenance_schedule.
Sourcepub fn set_psc_service_attachments<T, V>(self, v: T) -> Self
pub fn set_psc_service_attachments<T, V>(self, v: T) -> Self
Sets the value of psc_service_attachments.
Sourcepub fn set_cluster_endpoints<T, V>(self, v: T) -> Self
pub fn set_cluster_endpoints<T, V>(self, v: T) -> Self
Sets the value of cluster_endpoints.
Sourcepub fn set_backup_collection<T>(self, v: T) -> Self
pub fn set_backup_collection<T>(self, v: T) -> Self
Sets the value of backup_collection.
Sourcepub fn set_or_clear_backup_collection<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_backup_collection<T>(self, v: Option<T>) -> Self
Sets or clears the value of backup_collection.
Sourcepub fn set_kms_key<T>(self, v: T) -> Self
pub fn set_kms_key<T>(self, v: T) -> Self
Sets the value of kms_key.
Sourcepub fn set_or_clear_kms_key<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kms_key<T>(self, v: Option<T>) -> Self
Sets or clears the value of kms_key.
Sourcepub fn set_automated_backup_config<T>(self, v: T) -> Selfwhere
T: Into<AutomatedBackupConfig>,
pub fn set_automated_backup_config<T>(self, v: T) -> Selfwhere
T: Into<AutomatedBackupConfig>,
Sets the value of automated_backup_config.
Sourcepub fn set_or_clear_automated_backup_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutomatedBackupConfig>,
pub fn set_or_clear_automated_backup_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<AutomatedBackupConfig>,
Sets or clears the value of automated_backup_config.
Sourcepub fn set_encryption_info<T>(self, v: T) -> Selfwhere
T: Into<EncryptionInfo>,
pub fn set_encryption_info<T>(self, v: T) -> Selfwhere
T: Into<EncryptionInfo>,
Sets the value of encryption_info.
Sourcepub fn set_or_clear_encryption_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionInfo>,
pub fn set_or_clear_encryption_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionInfo>,
Sets or clears the value of encryption_info.
Sourcepub fn set_import_sources<T: Into<Option<ImportSources>>>(self, v: T) -> Self
pub fn set_import_sources<T: Into<Option<ImportSources>>>(self, v: T) -> Self
Sets the value of import_sources.
Note that all the setters affecting import_sources are mutually
exclusive.
Sourcepub fn gcs_source(&self) -> Option<&Box<GcsBackupSource>>
pub fn gcs_source(&self) -> Option<&Box<GcsBackupSource>>
The value of import_sources
if it holds a GcsSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_source<T: Into<Box<GcsBackupSource>>>(self, v: T) -> Self
pub fn set_gcs_source<T: Into<Box<GcsBackupSource>>>(self, v: T) -> Self
Sets the value of import_sources
to hold a GcsSource.
Note that all the setters affecting import_sources are
mutually exclusive.
Sourcepub fn managed_backup_source(&self) -> Option<&Box<ManagedBackupSource>>
pub fn managed_backup_source(&self) -> Option<&Box<ManagedBackupSource>>
The value of import_sources
if it holds a ManagedBackupSource, None if the field is not set or
holds a different branch.
Sourcepub fn set_managed_backup_source<T: Into<Box<ManagedBackupSource>>>(
self,
v: T,
) -> Self
pub fn set_managed_backup_source<T: Into<Box<ManagedBackupSource>>>( self, v: T, ) -> Self
Sets the value of import_sources
to hold a ManagedBackupSource.
Note that all the setters affecting import_sources are
mutually exclusive.