Cluster

Struct Cluster 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Required. 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: State

Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED

§uid: String

Output only. System assigned, unique identifier for the cluster.

§replica_count: Option<i32>

Optional. The number of replica nodes per shard.

§authorization_mode: AuthorizationMode

Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.

§transit_encryption_mode: TransitEncryptionMode

Optional. 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: NodeType

Optional. 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

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

Source

pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of create_time.

Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

Source

pub fn set_uid<T: Into<String>>(self, v: T) -> Self

Sets the value of uid.

Source

pub fn set_replica_count<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of replica_count.

Source

pub fn set_or_clear_replica_count<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of replica_count.

Source

pub fn set_authorization_mode<T: Into<AuthorizationMode>>(self, v: T) -> Self

Sets the value of authorization_mode.

Source

pub fn set_transit_encryption_mode<T: Into<TransitEncryptionMode>>( self, v: T, ) -> Self

Sets the value of transit_encryption_mode.

Source

pub fn set_size_gb<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of size_gb.

Source

pub fn set_or_clear_size_gb<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of size_gb.

Source

pub fn set_shard_count<T>(self, v: T) -> Self
where T: Into<i32>,

Sets the value of shard_count.

Source

pub fn set_or_clear_shard_count<T>(self, v: Option<T>) -> Self
where T: Into<i32>,

Sets or clears the value of shard_count.

Source

pub fn set_psc_configs<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<PscConfig>,

Sets the value of psc_configs.

Source

pub fn set_discovery_endpoints<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<DiscoveryEndpoint>,

Sets the value of discovery_endpoints.

Source

pub fn set_psc_connections<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<PscConnection>,

Sets the value of psc_connections.

Source

pub fn set_state_info<T>(self, v: T) -> Self
where T: Into<StateInfo>,

Sets the value of state_info.

Source

pub fn set_or_clear_state_info<T>(self, v: Option<T>) -> Self
where T: Into<StateInfo>,

Sets or clears the value of state_info.

Source

pub fn set_node_type<T: Into<NodeType>>(self, v: T) -> Self

Sets the value of node_type.

Source

pub fn set_persistence_config<T>(self, v: T) -> Self

Sets the value of persistence_config.

Source

pub fn set_or_clear_persistence_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of persistence_config.

Source

pub fn set_redis_configs<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of redis_configs.

Source

pub fn set_precise_size_gb<T>(self, v: T) -> Self
where T: Into<f64>,

Sets the value of precise_size_gb.

Source

pub fn set_or_clear_precise_size_gb<T>(self, v: Option<T>) -> Self
where T: Into<f64>,

Sets or clears the value of precise_size_gb.

Source

pub fn set_zone_distribution_config<T>(self, v: T) -> Self

Sets the value of zone_distribution_config.

Source

pub fn set_or_clear_zone_distribution_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of zone_distribution_config.

Source

pub fn set_cross_cluster_replication_config<T>(self, v: T) -> Self

Source

pub fn set_or_clear_cross_cluster_replication_config<T>( self, v: Option<T>, ) -> Self

Sets or clears the value of cross_cluster_replication_config.

Source

pub fn set_deletion_protection_enabled<T>(self, v: T) -> Self
where T: Into<bool>,

Sets the value of deletion_protection_enabled.

Source

pub fn set_or_clear_deletion_protection_enabled<T>(self, v: Option<T>) -> Self
where T: Into<bool>,

Sets or clears the value of deletion_protection_enabled.

Source

pub fn set_maintenance_policy<T>(self, v: T) -> Self

Sets the value of maintenance_policy.

Source

pub fn set_or_clear_maintenance_policy<T>(self, v: Option<T>) -> Self

Sets or clears the value of maintenance_policy.

Source

pub fn set_maintenance_schedule<T>(self, v: T) -> Self

Sets the value of maintenance_schedule.

Source

pub fn set_or_clear_maintenance_schedule<T>(self, v: Option<T>) -> Self

Sets or clears the value of maintenance_schedule.

Source

pub fn set_psc_service_attachments<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<PscServiceAttachment>,

Sets the value of psc_service_attachments.

Source

pub fn set_cluster_endpoints<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<ClusterEndpoint>,

Sets the value of cluster_endpoints.

Source

pub fn set_backup_collection<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of backup_collection.

Source

pub fn set_or_clear_backup_collection<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of backup_collection.

Source

pub fn set_kms_key<T>(self, v: T) -> Self
where T: Into<String>,

Sets the value of kms_key.

Source

pub fn set_or_clear_kms_key<T>(self, v: Option<T>) -> Self
where T: Into<String>,

Sets or clears the value of kms_key.

Source

pub fn set_automated_backup_config<T>(self, v: T) -> Self

Sets the value of automated_backup_config.

Source

pub fn set_or_clear_automated_backup_config<T>(self, v: Option<T>) -> Self

Sets or clears the value of automated_backup_config.

Source

pub fn set_encryption_info<T>(self, v: T) -> Self
where T: Into<EncryptionInfo>,

Sets the value of encryption_info.

Source

pub fn set_or_clear_encryption_info<T>(self, v: Option<T>) -> Self
where T: Into<EncryptionInfo>,

Sets or clears the value of encryption_info.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for Cluster

Source§

fn clone(&self) -> Cluster

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Cluster

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Cluster

Source§

fn default() -> Cluster

Returns the “default value” for a type. Read more
Source§

impl Message for Cluster

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Cluster

Source§

fn eq(&self, other: &Cluster) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Cluster

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,