Struct google_api_proto::google::spanner::admin::instance::v1::InstanceConfig
source · pub struct InstanceConfig {
pub name: String,
pub display_name: String,
pub config_type: i32,
pub replicas: Vec<ReplicaInfo>,
pub optional_replicas: Vec<ReplicaInfo>,
pub base_config: String,
pub labels: BTreeMap<String, String>,
pub etag: String,
pub leader_options: Vec<String>,
pub reconciling: bool,
pub state: i32,
}
Expand description
A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.
Fields§
§name: String
A unique identifier for the instance configuration. Values
are of the form
projects/<project>/instanceConfigs/[a-z][-a-z0-9]*
.
User instance configuration must start with custom-
.
display_name: String
The name of this instance configuration as it appears in UIs.
config_type: i32
Output only. Whether this instance configuration is a Google-managed or user-managed configuration.
replicas: Vec<ReplicaInfo>
The geographic placement of nodes in this instance configuration and their replication properties.
optional_replicas: Vec<ReplicaInfo>
Output only. The available optional replicas to choose from for user managed configurations. Populated for Google managed configurations.
base_config: String
Base configuration name, e.g. projects/<project_name>/instanceConfigs/nam3,
based on which this configuration is created. Only set for user managed
configurations. base_config
must refer to a configuration of type
GOOGLE_MANAGED in the same project as this configuration.
labels: BTreeMap<String, String>
Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer’s organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.).
- Label keys must be between 1 and 63 characters long and must conform to
the following regular expression:
[a-z][a-z0-9_-]{0,62}
. - Label values must be between 0 and 63 characters long and must conform
to the regular expression
\[a-z0-9_-\]{0,63}
. - No more than 64 labels can be associated with a given resource.
See https://goo.gl/xmQnxf for more information on and examples of labels.
If you plan to use labels in your own code, please note that additional characters may be allowed in the future. Therefore, you are advised to use an internal label representation, such as JSON, which doesn’t rely upon specific characters being disallowed. For example, representing labels as the string: name + “” + value would prove problematic if we were to allow “” in a future release.
etag: String
etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance configuration from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance configuration updates in order to avoid race conditions: An etag is returned in the response which contains instance configurations, and systems are expected to put that etag in the request to update instance configuration to ensure that their change is applied to the same version of the instance configuration. If no etag is provided in the call to update the instance configuration, then the existing instance configuration is overwritten blindly.
leader_options: Vec<String>
Allowed values of the “default_leader” schema option for databases in instances that use this instance configuration.
reconciling: bool
Output only. If true, the instance configuration is being created or updated. If false, there are no ongoing operations for the instance configuration.
state: i32
Output only. The current instance configuration state. Applicable only for
USER_MANAGED
configurations.
Implementations§
source§impl InstanceConfig
impl InstanceConfig
sourcepub fn config_type(&self) -> Type
pub fn config_type(&self) -> Type
Returns the enum value of config_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_config_type(&mut self, value: Type)
pub fn set_config_type(&mut self, value: Type)
Sets config_type
to the provided enum value.
Trait Implementations§
source§impl Clone for InstanceConfig
impl Clone for InstanceConfig
source§fn clone(&self) -> InstanceConfig
fn clone(&self) -> InstanceConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InstanceConfig
impl Debug for InstanceConfig
source§impl Default for InstanceConfig
impl Default for InstanceConfig
source§impl Message for InstanceConfig
impl Message for InstanceConfig
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 InstanceConfig
impl PartialEq for InstanceConfig
source§fn eq(&self, other: &InstanceConfig) -> bool
fn eq(&self, other: &InstanceConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InstanceConfig
Auto Trait Implementations§
impl Freeze for InstanceConfig
impl RefUnwindSafe for InstanceConfig
impl Send for InstanceConfig
impl Sync for InstanceConfig
impl Unpin for InstanceConfig
impl UnwindSafe for InstanceConfig
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