Class: Google::Apis::ComputeAlpha::VmExtensionPolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

Represents a VM extension policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ VmExtensionPolicy

Returns a new instance of VmExtensionPolicy.



79918
79919
79920
# File 'lib/google/apis/compute_alpha/classes.rb', line 79918

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#creation_timestampString

Output only. [Output Only] Creation timestamp inRFC3339 text format. Corresponds to the JSON property creationTimestamp

Returns:

  • (String)


79824
79825
79826
# File 'lib/google/apis/compute_alpha/classes.rb', line 79824

def creation_timestamp
  @creation_timestamp
end

#descriptionString

An optional description of this resource. Corresponds to the JSON property description

Returns:

  • (String)


79829
79830
79831
# File 'lib/google/apis/compute_alpha/classes.rb', line 79829

def description
  @description
end

#extension_policiesHash<String,Google::Apis::ComputeAlpha::VmExtensionPolicyExtensionPolicy>

Required. A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Corresponds to the JSON property extensionPolicies



79836
79837
79838
# File 'lib/google/apis/compute_alpha/classes.rb', line 79836

def extension_policies
  @extension_policies
end

Optional. Output only. [Output Only] Link to the global policy that manages this zone policy, if applicable. Corresponds to the JSON property globalResourceLink

Returns:

  • (String)


79843
79844
79845
# File 'lib/google/apis/compute_alpha/classes.rb', line 79843

def global_resource_link
  @global_resource_link
end

#idFixnum

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server. Corresponds to the JSON property id

Returns:

  • (Fixnum)


79850
79851
79852
# File 'lib/google/apis/compute_alpha/classes.rb', line 79850

def id
  @id
end

#instance_selectorsArray<Google::Apis::ComputeAlpha::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. Corresponds to the JSON property instanceSelectors



79858
79859
79860
# File 'lib/google/apis/compute_alpha/classes.rb', line 79858

def instance_selectors
  @instance_selectors
end

#kindString

Output only. [Output Only] Type of the resource. Alwayscompute# vmExtensionPolicy. Corresponds to the JSON property kind

Returns:

  • (String)


79864
79865
79866
# File 'lib/google/apis/compute_alpha/classes.rb', line 79864

def kind
  @kind
end

#managed_by_globalBoolean Also known as: managed_by_global?

Optional. Output only. [Output Only] Indicates if this policy is managed by a global policy. Corresponds to the JSON property managedByGlobal

Returns:

  • (Boolean)


79870
79871
79872
# File 'lib/google/apis/compute_alpha/classes.rb', line 79870

def managed_by_global
  @managed_by_global
end

#nameString

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. Corresponds to the JSON property name

Returns:

  • (String)


79882
79883
79884
# File 'lib/google/apis/compute_alpha/classes.rb', line 79882

def name
  @name
end

#priorityFixnum

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. Corresponds to the JSON property priority

Returns:

  • (Fixnum)


79893
79894
79895
# File 'lib/google/apis/compute_alpha/classes.rb', line 79893

def priority
  @priority
end

Output only. [Output Only] Server-defined fully-qualified URL for this resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


79899
79900
79901
# File 'lib/google/apis/compute_alpha/classes.rb', line 79899

def self_link
  @self_link
end

Output only. [Output Only] Server-defined URL for this resource's resource id. Corresponds to the JSON property selfLinkWithId

Returns:

  • (String)


79904
79905
79906
# File 'lib/google/apis/compute_alpha/classes.rb', line 79904

def self_link_with_id
  @self_link_with_id
end

#stateString

Optional. Output only. [Output Only] Current state of the policy: ACTIVE or DELETING. Corresponds to the JSON property state

Returns:

  • (String)


79910
79911
79912
# File 'lib/google/apis/compute_alpha/classes.rb', line 79910

def state
  @state
end

#update_timestampString

Output only. [Output Only] Update timestamp inRFC3339 text format. Corresponds to the JSON property updateTimestamp

Returns:

  • (String)


79916
79917
79918
# File 'lib/google/apis/compute_alpha/classes.rb', line 79916

def update_timestamp
  @update_timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



79923
79924
79925
79926
79927
79928
79929
79930
79931
79932
79933
79934
79935
79936
79937
79938
# File 'lib/google/apis/compute_alpha/classes.rb', line 79923

def update!(**args)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @extension_policies = args[:extension_policies] if args.key?(:extension_policies)
  @global_resource_link = args[:global_resource_link] if args.key?(:global_resource_link)
  @id = args[:id] if args.key?(:id)
  @instance_selectors = args[:instance_selectors] if args.key?(:instance_selectors)
  @kind = args[:kind] if args.key?(:kind)
  @managed_by_global = args[:managed_by_global] if args.key?(:managed_by_global)
  @name = args[:name] if args.key?(:name)
  @priority = args[:priority] if args.key?(:priority)
  @self_link = args[:self_link] if args.key?(:self_link)
  @self_link_with_id = args[:self_link_with_id] if args.key?(:self_link_with_id)
  @state = args[:state] if args.key?(:state)
  @update_timestamp = args[:update_timestamp] if args.key?(:update_timestamp)
end