Class: Google::Apis::ComputeAlpha::InstanceGroupManager

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 Managed Instance Group resource. An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. For zonal Managed Instance Group, use the instanceGroupManagers resource. For regional Managed Instance Group, use the regionInstanceGroupManagers resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceGroupManager

Returns a new instance of InstanceGroupManager.



17051
17052
17053
# File 'lib/google/apis/compute_alpha/classes.rb', line 17051

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

Instance Attribute Details

#all_instances_configGoogle::Apis::ComputeAlpha::InstanceGroupManagerAllInstancesConfig

Specifies configuration that overrides the instance template configuration for the group. Corresponds to the JSON property allInstancesConfig



16838
16839
16840
# File 'lib/google/apis/compute_alpha/classes.rb', line 16838

def all_instances_config
  @all_instances_config
end

#auto_healing_policiesArray<Google::Apis::ComputeAlpha::InstanceGroupManagerAutoHealingPolicy>

The autohealing policy for this managed instance group. You can specify only one value. Corresponds to the JSON property autoHealingPolicies



16844
16845
16846
# File 'lib/google/apis/compute_alpha/classes.rb', line 16844

def auto_healing_policies
  @auto_healing_policies
end

#base_instance_nameString

The base instance name to use for instances in this group. The value must be 1- 58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035. Corresponds to the JSON property baseInstanceName

Returns:

  • (String)


16852
16853
16854
# File 'lib/google/apis/compute_alpha/classes.rb', line 16852

def base_instance_name
  @base_instance_name
end

#creation_timestampString

[Output Only] The creation timestamp for this managed instance group in RFC3339 text format. Corresponds to the JSON property creationTimestamp

Returns:

  • (String)


16858
16859
16860
# File 'lib/google/apis/compute_alpha/classes.rb', line 16858

def creation_timestamp
  @creation_timestamp
end

#current_actionsGoogle::Apis::ComputeAlpha::InstanceGroupManagerActionsSummary

[Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. Corresponds to the JSON property currentActions



16864
16865
16866
# File 'lib/google/apis/compute_alpha/classes.rb', line 16864

def current_actions
  @current_actions
end

#descriptionString

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

Returns:

  • (String)


16869
16870
16871
# File 'lib/google/apis/compute_alpha/classes.rb', line 16869

def description
  @description
end

#distribution_policyGoogle::Apis::ComputeAlpha::DistributionPolicy

Policy specifying the intended distribution of managed instances across zones in a regional managed instance group. Corresponds to the JSON property distributionPolicy



16875
16876
16877
# File 'lib/google/apis/compute_alpha/classes.rb', line 16875

def distribution_policy
  @distribution_policy
end

#failover_actionString

The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER. Corresponds to the JSON property failoverAction

Returns:

  • (String)


16881
16882
16883
# File 'lib/google/apis/compute_alpha/classes.rb', line 16881

def failover_action
  @failover_action
end

#fingerprintString

Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager. Corresponds to the JSON property fingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


16891
16892
16893
# File 'lib/google/apis/compute_alpha/classes.rb', line 16891

def fingerprint
  @fingerprint
end

#idFixnum

[Output Only] A unique identifier for this resource type. The server generates this identifier. Corresponds to the JSON property id

Returns:

  • (Fixnum)


16897
16898
16899
# File 'lib/google/apis/compute_alpha/classes.rb', line 16897

def id
  @id
end

#instance_flexibility_policyGoogle::Apis::ComputeAlpha::InstanceGroupManagerInstanceFlexibilityPolicy

Instance flexibility allowing MIG to create VMs from multiple types of machines. Instance flexibility configuration on MIG overrides instance template configuration. Corresponds to the JSON property instanceFlexibilityPolicy



16904
16905
16906
# File 'lib/google/apis/compute_alpha/classes.rb', line 16904

def instance_flexibility_policy
  @instance_flexibility_policy
end

#instance_groupString

[Output Only] The URL of the Instance Group resource. Corresponds to the JSON property instanceGroup

Returns:

  • (String)


16909
16910
16911
# File 'lib/google/apis/compute_alpha/classes.rb', line 16909

def instance_group
  @instance_group
end

#instance_lifecycle_policyGoogle::Apis::ComputeAlpha::InstanceGroupManagerInstanceLifecyclePolicy

The repair policy for this managed instance group. Corresponds to the JSON property instanceLifecyclePolicy



16914
16915
16916
# File 'lib/google/apis/compute_alpha/classes.rb', line 16914

def instance_lifecycle_policy
  @instance_lifecycle_policy
end

#instance_templateString

The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE. Corresponds to the JSON property instanceTemplate

Returns:

  • (String)


16923
16924
16925
# File 'lib/google/apis/compute_alpha/classes.rb', line 16923

def instance_template
  @instance_template
end

#kindString

[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups. Corresponds to the JSON property kind

Returns:

  • (String)


16929
16930
16931
# File 'lib/google/apis/compute_alpha/classes.rb', line 16929

def kind
  @kind
end

#list_managed_instances_resultsString

Pagination behavior of the listManagedInstances API method for this managed instance group. Corresponds to the JSON property listManagedInstancesResults

Returns:

  • (String)


16935
16936
16937
# File 'lib/google/apis/compute_alpha/classes.rb', line 16935

def list_managed_instances_results
  @list_managed_instances_results
end

#nameString

The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. Corresponds to the JSON property name

Returns:

  • (String)


16941
16942
16943
# File 'lib/google/apis/compute_alpha/classes.rb', line 16941

def name
  @name
end

#named_portsArray<Google::Apis::ComputeAlpha::NamedPort>

Named ports configured for the Instance Groups complementary to this Instance Group Manager. Corresponds to the JSON property namedPorts



16947
16948
16949
# File 'lib/google/apis/compute_alpha/classes.rb', line 16947

def named_ports
  @named_ports
end

#paramsGoogle::Apis::ComputeAlpha::InstanceGroupManagerParams

Input only additional params for instance group manager creation. Corresponds to the JSON property params



16952
16953
16954
# File 'lib/google/apis/compute_alpha/classes.rb', line 16952

def params
  @params
end

#regionString

[Output Only] The URL of the region where the managed instance group resides ( for regional resources). Corresponds to the JSON property region

Returns:

  • (String)


16958
16959
16960
# File 'lib/google/apis/compute_alpha/classes.rb', line 16958

def region
  @region
end

[Output Only] The URL for this managed instance group. The server defines this URL. Corresponds to the JSON property selfLink

Returns:

  • (String)


16964
16965
16966
# File 'lib/google/apis/compute_alpha/classes.rb', line 16964

def self_link
  @self_link
end

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

Returns:

  • (String)


16969
16970
16971
# File 'lib/google/apis/compute_alpha/classes.rb', line 16969

def self_link_with_id
  @self_link_with_id
end

#service_accountString

The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account projectNumber@cloudservices.gserviceaccount.com is used. Corresponds to the JSON property serviceAccount

Returns:

  • (String)


16977
16978
16979
# File 'lib/google/apis/compute_alpha/classes.rb', line 16977

def 
  @service_account
end

#standby_policyGoogle::Apis::ComputeAlpha::InstanceGroupManagerStandbyPolicy

Standby policy for stopped and suspended instances. Corresponds to the JSON property standbyPolicy



16982
16983
16984
# File 'lib/google/apis/compute_alpha/classes.rb', line 16982

def standby_policy
  @standby_policy
end

#stateful_policyGoogle::Apis::ComputeAlpha::StatefulPolicy

Stateful configuration for this Instanced Group Manager Corresponds to the JSON property statefulPolicy



16987
16988
16989
# File 'lib/google/apis/compute_alpha/classes.rb', line 16987

def stateful_policy
  @stateful_policy
end

#statusGoogle::Apis::ComputeAlpha::InstanceGroupManagerStatus

[Output Only] The status of this managed instance group. Corresponds to the JSON property status



16992
16993
16994
# File 'lib/google/apis/compute_alpha/classes.rb', line 16992

def status
  @status
end

#target_poolsArray<String>

The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. Corresponds to the JSON property targetPools

Returns:

  • (Array<String>)


16999
17000
17001
# File 'lib/google/apis/compute_alpha/classes.rb', line 16999

def target_pools
  @target_pools
end

#target_sizeFixnum

The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number. Corresponds to the JSON property targetSize

Returns:

  • (Fixnum)


17006
17007
17008
# File 'lib/google/apis/compute_alpha/classes.rb', line 17006

def target_size
  @target_size
end

#target_size_unitString

The unit of measure for the target size. Corresponds to the JSON property targetSizeUnit

Returns:

  • (String)


17011
17012
17013
# File 'lib/google/apis/compute_alpha/classes.rb', line 17011

def target_size_unit
  @target_size_unit
end

#target_stopped_sizeFixnum

The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method. Corresponds to the JSON property targetStoppedSize

Returns:

  • (Fixnum)


17019
17020
17021
# File 'lib/google/apis/compute_alpha/classes.rb', line 17019

def target_stopped_size
  @target_stopped_size
end

#target_suspended_sizeFixnum

The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method. Corresponds to the JSON property targetSuspendedSize

Returns:

  • (Fixnum)


17027
17028
17029
# File 'lib/google/apis/compute_alpha/classes.rb', line 17027

def target_suspended_size
  @target_suspended_size
end

#update_policyGoogle::Apis::ComputeAlpha::InstanceGroupManagerUpdatePolicy

The update policy for this managed instance group. Corresponds to the JSON property updatePolicy



17032
17033
17034
# File 'lib/google/apis/compute_alpha/classes.rb', line 17032

def update_policy
  @update_policy
end

#versionsArray<Google::Apis::ComputeAlpha::InstanceGroupManagerVersion>

Specifies the instance templates used by this managed instance group to create instances. Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates. Corresponds to the JSON property versions



17043
17044
17045
# File 'lib/google/apis/compute_alpha/classes.rb', line 17043

def versions
  @versions
end

#zoneString

[Output Only] The URL of a zone where the managed instance group is located ( for zonal resources). Corresponds to the JSON property zone

Returns:

  • (String)


17049
17050
17051
# File 'lib/google/apis/compute_alpha/classes.rb', line 17049

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
# File 'lib/google/apis/compute_alpha/classes.rb', line 17056

def update!(**args)
  @all_instances_config = args[:all_instances_config] if args.key?(:all_instances_config)
  @auto_healing_policies = args[:auto_healing_policies] if args.key?(:auto_healing_policies)
  @base_instance_name = args[:base_instance_name] if args.key?(:base_instance_name)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @current_actions = args[:current_actions] if args.key?(:current_actions)
  @description = args[:description] if args.key?(:description)
  @distribution_policy = args[:distribution_policy] if args.key?(:distribution_policy)
  @failover_action = args[:failover_action] if args.key?(:failover_action)
  @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
  @id = args[:id] if args.key?(:id)
  @instance_flexibility_policy = args[:instance_flexibility_policy] if args.key?(:instance_flexibility_policy)
  @instance_group = args[:instance_group] if args.key?(:instance_group)
  @instance_lifecycle_policy = args[:instance_lifecycle_policy] if args.key?(:instance_lifecycle_policy)
  @instance_template = args[:instance_template] if args.key?(:instance_template)
  @kind = args[:kind] if args.key?(:kind)
  @list_managed_instances_results = args[:list_managed_instances_results] if args.key?(:list_managed_instances_results)
  @name = args[:name] if args.key?(:name)
  @named_ports = args[:named_ports] if args.key?(:named_ports)
  @params = args[:params] if args.key?(:params)
  @region = args[:region] if args.key?(:region)
  @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)
  @service_account = args[:service_account] if args.key?(:service_account)
  @standby_policy = args[:standby_policy] if args.key?(:standby_policy)
  @stateful_policy = args[:stateful_policy] if args.key?(:stateful_policy)
  @status = args[:status] if args.key?(:status)
  @target_pools = args[:target_pools] if args.key?(:target_pools)
  @target_size = args[:target_size] if args.key?(:target_size)
  @target_size_unit = args[:target_size_unit] if args.key?(:target_size_unit)
  @target_stopped_size = args[:target_stopped_size] if args.key?(:target_stopped_size)
  @target_suspended_size = args[:target_suspended_size] if args.key?(:target_suspended_size)
  @update_policy = args[:update_policy] if args.key?(:update_policy)
  @versions = args[:versions] if args.key?(:versions)
  @zone = args[:zone] if args.key?(:zone)
end