#[non_exhaustive]pub struct Instance {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub state: State,
pub labels: HashMap<String, String>,
pub kms_key: String,
/* private fields */
}Expand description
Instance is a container for the rest of API resources. Only resources in the same instance can interact with each other. Child resources inherit the location (data residency) and encryption (CMEK). The location of the provided input and output in requests must match the location of the 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: StringOutput only. The full path to the Instance resource in this API.
format: projects/{project}/locations/{location}/instances/{instance}
create_time: Option<Timestamp>Output only. Timestamp when the Instance was created. Assigned by the server.
update_time: Option<Timestamp>Output only. Timestamp when the Instance was last updated. Assigned by the server.
state: StateOutput only. State of the instance. Assigned by the server.
labels: HashMap<String, String>Labels
kms_key: StringRequired. The KMS key name used for CMEK (encryption-at-rest).
format:
projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
VPC-SC restrictions apply.
Implementations§
Source§impl Instance
impl Instance
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.
§Example
use wkt::Timestamp;
let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Instance::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_update_time(None::<Timestamp>);