pub struct Cluster {Show 19 fields
pub name: String,
pub create_time: Option<Timestamp>,
pub state: i32,
pub uid: String,
pub replica_count: Option<i32>,
pub authorization_mode: i32,
pub transit_encryption_mode: i32,
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: i32,
pub persistence_config: Option<ClusterPersistenceConfig>,
pub redis_configs: BTreeMap<String, String>,
pub precise_size_gb: Option<f64>,
pub zone_distribution_config: Option<ZoneDistributionConfig>,
pub deletion_protection_enabled: Option<bool>,
}
Expand description
A cluster instance.
Fields§
§name: String
Required. 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: i32
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.
Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.
transit_encryption_mode: i32
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>
Required. Number of shards for the Redis cluster.
psc_configs: Vec<PscConfig>
Required. 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. PSC connections for discovery of the cluster topology and accessing the cluster.
state_info: Option<StateInfo>
Output only. Additional information about the current state of the cluster.
node_type: i32
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: BTreeMap<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.
deletion_protection_enabled: Option<bool>
Optional. The delete operation will fail when the value is set to true.
Implementations§
source§impl Cluster
impl Cluster
sourcepub fn state(&self) -> State
pub fn state(&self) -> State
Returns the enum value of state
, or the default if the field is set to an invalid enum value.
sourcepub fn replica_count(&self) -> i32
pub fn replica_count(&self) -> i32
Returns the value of replica_count
, or the default value if replica_count
is unset.
Returns the enum value of authorization_mode
, or the default if the field is set to an invalid enum value.
Sets authorization_mode
to the provided enum value.
sourcepub fn transit_encryption_mode(&self) -> TransitEncryptionMode
pub fn transit_encryption_mode(&self) -> TransitEncryptionMode
Returns the enum value of transit_encryption_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_transit_encryption_mode(&mut self, value: TransitEncryptionMode)
pub fn set_transit_encryption_mode(&mut self, value: TransitEncryptionMode)
Sets transit_encryption_mode
to the provided enum value.
sourcepub fn size_gb(&self) -> i32
pub fn size_gb(&self) -> i32
Returns the value of size_gb
, or the default value if size_gb
is unset.
sourcepub fn shard_count(&self) -> i32
pub fn shard_count(&self) -> i32
Returns the value of shard_count
, or the default value if shard_count
is unset.
sourcepub fn node_type(&self) -> NodeType
pub fn node_type(&self) -> NodeType
Returns the enum value of node_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_node_type(&mut self, value: NodeType)
pub fn set_node_type(&mut self, value: NodeType)
Sets node_type
to the provided enum value.
sourcepub fn precise_size_gb(&self) -> f64
pub fn precise_size_gb(&self) -> f64
Returns the value of precise_size_gb
, or the default value if precise_size_gb
is unset.
sourcepub fn deletion_protection_enabled(&self) -> bool
pub fn deletion_protection_enabled(&self) -> bool
Returns the value of deletion_protection_enabled
, or the default value if deletion_protection_enabled
is unset.
Trait Implementations§
source§impl Message for Cluster
impl Message for Cluster
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Cluster
impl PartialEq for Cluster
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 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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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