#[non_exhaustive]pub struct VmExtensionPolicy {Show 14 fields
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub extension_policies: HashMap<String, VmExtensionPolicyExtensionPolicy>,
pub global_resource_link: Option<String>,
pub id: Option<u64>,
pub instance_selectors: Vec<VmExtensionPolicyInstanceSelector>,
pub kind: Option<String>,
pub managed_by_global: Option<bool>,
pub name: Option<String>,
pub priority: Option<i32>,
pub self_link: Option<String>,
pub self_link_with_id: Option<String>,
pub state: Option<State>,
pub update_timestamp: Option<String>,
/* private fields */
}global-vm-extension-policies or zone-vm-extension-policies only.Expand description
Represents a VM extension policy.
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.creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource.
extension_policies: HashMap<String, VmExtensionPolicyExtensionPolicy>Required. A map of extension names (for example, “ops-agent”) to their corresponding policy configurations.
global_resource_link: Option<String>Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable.
id: Option<u64>Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
instance_selectors: Vec<VmExtensionPolicyInstanceSelector>Optional. Selectors to target VMs for this policy. VMs are selected if they match any of the provided selectors (logical OR). If this list is empty, the policy applies to all VMs.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#vmExtensionPolicy.
managed_by_global: Option<bool>Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy.
name: Option<String>Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all
following characters must be a dash, lowercase letter, or digit, except
the last character, which cannot be a dash.
priority: Option<i32>Optional. Priority of this policy. Used to resolve conflicts when multiple policies apply to the same extension. The policy priority is an integer from 0 to 65535, inclusive. Lower integers indicate higher priorities. If you do not specify a priority when creating a rule, it is assigned a priority of 1000. If priorities are equal, the policy with the most recent creation timestamp takes precedence.
self_link: Option<String>Output only. [Output Only] Server-defined fully-qualified URL for this resource.
self_link_with_id: Option<String>Output only. [Output Only] Server-defined URL for this resource’s resource id.
state: Option<State>Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING.
update_timestamp: Option<String>Output only. [Output Only] Update timestamp inRFC3339 text format.
Implementations§
Source§impl VmExtensionPolicy
impl VmExtensionPolicy
Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = VmExtensionPolicy::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = VmExtensionPolicy::new().set_or_clear_creation_timestamp(Some("example"));
let x = VmExtensionPolicy::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sets the value of description.
§Example
let x = VmExtensionPolicy::new().set_description("example");Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = VmExtensionPolicy::new().set_or_clear_description(Some("example"));
let x = VmExtensionPolicy::new().set_or_clear_description(None::<String>);Sourcepub fn set_extension_policies<T, K, V>(self, v: T) -> Self
pub fn set_extension_policies<T, K, V>(self, v: T) -> Self
Sets the value of extension_policies.
§Example
use google_cloud_compute_v1::model::VmExtensionPolicyExtensionPolicy;
let x = VmExtensionPolicy::new().set_extension_policies([
("key0", VmExtensionPolicyExtensionPolicy::default()/* use setters */),
("key1", VmExtensionPolicyExtensionPolicy::default()/* use (different) setters */),
]);Sourcepub fn set_global_resource_link<T>(self, v: T) -> Self
pub fn set_global_resource_link<T>(self, v: T) -> Self
Sets the value of global_resource_link.
§Example
let x = VmExtensionPolicy::new().set_global_resource_link("example");Sourcepub fn set_or_clear_global_resource_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_global_resource_link<T>(self, v: Option<T>) -> Self
Sets or clears the value of global_resource_link.
§Example
let x = VmExtensionPolicy::new().set_or_clear_global_resource_link(Some("example"));
let x = VmExtensionPolicy::new().set_or_clear_global_resource_link(None::<String>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_instance_selectors<T, V>(self, v: T) -> Self
pub fn set_instance_selectors<T, V>(self, v: T) -> Self
Sets the value of instance_selectors.
§Example
use google_cloud_compute_v1::model::VmExtensionPolicyInstanceSelector;
let x = VmExtensionPolicy::new()
.set_instance_selectors([
VmExtensionPolicyInstanceSelector::default()/* use setters */,
VmExtensionPolicyInstanceSelector::default()/* use (different) setters */,
]);Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_managed_by_global<T>(self, v: T) -> Self
pub fn set_managed_by_global<T>(self, v: T) -> Self
Sets the value of managed_by_global.
§Example
let x = VmExtensionPolicy::new().set_managed_by_global(true);Sourcepub fn set_or_clear_managed_by_global<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_managed_by_global<T>(self, v: Option<T>) -> Self
Sets or clears the value of managed_by_global.
§Example
let x = VmExtensionPolicy::new().set_or_clear_managed_by_global(Some(false));
let x = VmExtensionPolicy::new().set_or_clear_managed_by_global(None::<bool>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_priority<T>(self, v: T) -> Self
pub fn set_priority<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_priority<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_priority<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link_with_id<T>(self, v: T) -> Self
pub fn set_self_link_with_id<T>(self, v: T) -> Self
Sets the value of self_link_with_id.
§Example
let x = VmExtensionPolicy::new().set_self_link_with_id("example");Sourcepub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of self_link_with_id.
§Example
let x = VmExtensionPolicy::new().set_or_clear_self_link_with_id(Some("example"));
let x = VmExtensionPolicy::new().set_or_clear_self_link_with_id(None::<String>);Sourcepub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_state<T>(self, v: Option<T>) -> Self
Sets or clears the value of state.
§Example
use google_cloud_compute_v1::model::vm_extension_policy::State;
let x0 = VmExtensionPolicy::new().set_or_clear_state(Some(State::Deleting));
let x1 = VmExtensionPolicy::new().set_or_clear_state(Some(State::Unspecified));
let x_none = VmExtensionPolicy::new().set_or_clear_state(None::<State>);Sourcepub fn set_update_timestamp<T>(self, v: T) -> Self
pub fn set_update_timestamp<T>(self, v: T) -> Self
Sets the value of update_timestamp.
§Example
let x = VmExtensionPolicy::new().set_update_timestamp("example");Sourcepub fn set_or_clear_update_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_timestamp.
§Example
let x = VmExtensionPolicy::new().set_or_clear_update_timestamp(Some("example"));
let x = VmExtensionPolicy::new().set_or_clear_update_timestamp(None::<String>);Trait Implementations§
Source§impl Clone for VmExtensionPolicy
impl Clone for VmExtensionPolicy
Source§fn clone(&self) -> VmExtensionPolicy
fn clone(&self) -> VmExtensionPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VmExtensionPolicy
impl Debug for VmExtensionPolicy
Source§impl Default for VmExtensionPolicy
impl Default for VmExtensionPolicy
Source§fn default() -> VmExtensionPolicy
fn default() -> VmExtensionPolicy
Source§impl Message for VmExtensionPolicy
impl Message for VmExtensionPolicy
Source§impl PartialEq for VmExtensionPolicy
impl PartialEq for VmExtensionPolicy
Source§fn eq(&self, other: &VmExtensionPolicy) -> bool
fn eq(&self, other: &VmExtensionPolicy) -> bool
self and other values to be equal, and is used by ==.