Compute V1 Client - Class InstanceGroupManager (1.5.0)

Reference documentation and code samples for the Compute V1 Client class InstanceGroupManager.

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.

Generated from protobuf message google.cloud.compute.v1.InstanceGroupManager

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ auto_healing_policies array<Google\Cloud\Compute\V1\InstanceGroupManagerAutoHealingPolicy>

The autohealing policy for this managed instance group. You can specify only one value.

↳ base_instance_name string

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.

↳ creation_timestamp string

[Output Only] The creation timestamp for this managed instance group in RFC3339 text format.

↳ current_actions Google\Cloud\Compute\V1\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.

↳ description string

An optional description of this resource.

↳ distribution_policy Google\Cloud\Compute\V1\DistributionPolicy

Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.

↳ fingerprint string

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.

↳ id int|string

[Output Only] A unique identifier for this resource type. The server generates this identifier.

↳ instance_group string

[Output Only] The URL of the Instance Group resource.

↳ instance_template string

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.

↳ kind string

[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.

↳ list_managed_instances_results string

Pagination behavior of the listManagedInstances API method for this managed instance group. Check the ListManagedInstancesResults enum for the list of possible values.

↳ name string

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

↳ named_ports array<Google\Cloud\Compute\V1\NamedPort>

Named ports configured for the Instance Groups complementary to this Instance Group Manager.

↳ region string

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

↳ self_link string

[Output Only] The URL for this managed instance group. The server defines this URL.

↳ stateful_policy Google\Cloud\Compute\V1\StatefulPolicy

Stateful configuration for this Instanced Group Manager

↳ status Google\Cloud\Compute\V1\InstanceGroupManagerStatus

[Output Only] The status of this managed instance group.

↳ target_pools array

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.

↳ target_size int

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.

↳ update_policy Google\Cloud\Compute\V1\InstanceGroupManagerUpdatePolicy

The update policy for this managed instance group.

↳ versions array<Google\Cloud\Compute\V1\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.

↳ zone string

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

getAutoHealingPolicies

The autohealing policy for this managed instance group. You can specify only one value.

Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy auto_healing_policies = 456799109;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAutoHealingPolicies

The autohealing policy for this managed instance group. You can specify only one value.

Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy auto_healing_policies = 456799109;

Parameter
NameDescription
var array<Google\Cloud\Compute\V1\InstanceGroupManagerAutoHealingPolicy>
Returns
TypeDescription
$this

getBaseInstanceName

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.

Generated from protobuf field optional string base_instance_name = 389106439;

Returns
TypeDescription
string

hasBaseInstanceName

clearBaseInstanceName

setBaseInstanceName

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.

Generated from protobuf field optional string base_instance_name = 389106439;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCreationTimestamp

[Output Only] The creation timestamp for this managed instance group in RFC3339 text format.

Generated from protobuf field optional string creation_timestamp = 30525366;

Returns
TypeDescription
string

hasCreationTimestamp

clearCreationTimestamp

setCreationTimestamp

[Output Only] The creation timestamp for this managed instance group in RFC3339 text format.

Generated from protobuf field optional string creation_timestamp = 30525366;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCurrentActions

[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.

Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerActionsSummary current_actions = 164045879;

Returns
TypeDescription
Google\Cloud\Compute\V1\InstanceGroupManagerActionsSummary|null

hasCurrentActions

clearCurrentActions

setCurrentActions

[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.

Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerActionsSummary current_actions = 164045879;

Parameter
NameDescription
var Google\Cloud\Compute\V1\InstanceGroupManagerActionsSummary
Returns
TypeDescription
$this

getDescription

An optional description of this resource.

Generated from protobuf field optional string description = 422937596;

Returns
TypeDescription
string

hasDescription

clearDescription

setDescription

An optional description of this resource.

Generated from protobuf field optional string description = 422937596;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDistributionPolicy

Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.

Generated from protobuf field optional .google.cloud.compute.v1.DistributionPolicy distribution_policy = 534558541;

Returns
TypeDescription
Google\Cloud\Compute\V1\DistributionPolicy|null

hasDistributionPolicy

clearDistributionPolicy

setDistributionPolicy

Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.

Generated from protobuf field optional .google.cloud.compute.v1.DistributionPolicy distribution_policy = 534558541;

Parameter
NameDescription
var Google\Cloud\Compute\V1\DistributionPolicy
Returns
TypeDescription
$this

getFingerprint

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.

Generated from protobuf field optional string fingerprint = 234678500;

Returns
TypeDescription
string

hasFingerprint

clearFingerprint

setFingerprint

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.

Generated from protobuf field optional string fingerprint = 234678500;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getId

[Output Only] A unique identifier for this resource type. The server generates this identifier.

Generated from protobuf field optional uint64 id = 3355;

Returns
TypeDescription
int|string

hasId

clearId

setId

[Output Only] A unique identifier for this resource type. The server generates this identifier.

Generated from protobuf field optional uint64 id = 3355;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getInstanceGroup

[Output Only] The URL of the Instance Group resource.

Generated from protobuf field optional string instance_group = 81095253;

Returns
TypeDescription
string

hasInstanceGroup

clearInstanceGroup

setInstanceGroup

[Output Only] The URL of the Instance Group resource.

Generated from protobuf field optional string instance_group = 81095253;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInstanceTemplate

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.

Generated from protobuf field optional string instance_template = 309248228;

Returns
TypeDescription
string

hasInstanceTemplate

clearInstanceTemplate

setInstanceTemplate

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.

Generated from protobuf field optional string instance_template = 309248228;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getKind

[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.

Generated from protobuf field optional string kind = 3292052;

Returns
TypeDescription
string

hasKind

clearKind

setKind

[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.

Generated from protobuf field optional string kind = 3292052;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getListManagedInstancesResults

Pagination behavior of the listManagedInstances API method for this managed instance group.

Check the ListManagedInstancesResults enum for the list of possible values.

Generated from protobuf field optional string list_managed_instances_results = 296047156;

Returns
TypeDescription
string

hasListManagedInstancesResults

clearListManagedInstancesResults

setListManagedInstancesResults

Pagination behavior of the listManagedInstances API method for this managed instance group.

Check the ListManagedInstancesResults enum for the list of possible values.

Generated from protobuf field optional string list_managed_instances_results = 296047156;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getName

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

Generated from protobuf field optional string name = 3373707;

Returns
TypeDescription
string

hasName

clearName

setName

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

Generated from protobuf field optional string name = 3373707;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getNamedPorts

Named ports configured for the Instance Groups complementary to this Instance Group Manager.

Generated from protobuf field repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setNamedPorts

Named ports configured for the Instance Groups complementary to this Instance Group Manager.

Generated from protobuf field repeated .google.cloud.compute.v1.NamedPort named_ports = 427598732;

Parameter
NameDescription
var array<Google\Cloud\Compute\V1\NamedPort>
Returns
TypeDescription
$this

getRegion

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

Generated from protobuf field optional string region = 138946292;

Returns
TypeDescription
string

hasRegion

clearRegion

setRegion

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

Generated from protobuf field optional string region = 138946292;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

[Output Only] The URL for this managed instance group. The server defines this URL.

Generated from protobuf field optional string self_link = 456214797;

Returns
TypeDescription
string

[Output Only] The URL for this managed instance group. The server defines this URL.

Generated from protobuf field optional string self_link = 456214797;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getStatefulPolicy

Stateful configuration for this Instanced Group Manager

Generated from protobuf field optional .google.cloud.compute.v1.StatefulPolicy stateful_policy = 47538565;

Returns
TypeDescription
Google\Cloud\Compute\V1\StatefulPolicy|null

hasStatefulPolicy

clearStatefulPolicy

setStatefulPolicy

Stateful configuration for this Instanced Group Manager

Generated from protobuf field optional .google.cloud.compute.v1.StatefulPolicy stateful_policy = 47538565;

Parameter
NameDescription
var Google\Cloud\Compute\V1\StatefulPolicy
Returns
TypeDescription
$this

getStatus

[Output Only] The status of this managed instance group.

Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerStatus status = 181260274;

Returns
TypeDescription
Google\Cloud\Compute\V1\InstanceGroupManagerStatus|null

hasStatus

clearStatus

setStatus

[Output Only] The status of this managed instance group.

Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerStatus status = 181260274;

Parameter
NameDescription
var Google\Cloud\Compute\V1\InstanceGroupManagerStatus
Returns
TypeDescription
$this

getTargetPools

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.

Generated from protobuf field repeated string target_pools = 336072617;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTargetPools

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.

Generated from protobuf field repeated string target_pools = 336072617;

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getTargetSize

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.

Generated from protobuf field optional int32 target_size = 62880239;

Returns
TypeDescription
int

hasTargetSize

clearTargetSize

setTargetSize

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.

Generated from protobuf field optional int32 target_size = 62880239;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getUpdatePolicy

The update policy for this managed instance group.

Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerUpdatePolicy update_policy = 175809896;

Returns
TypeDescription
Google\Cloud\Compute\V1\InstanceGroupManagerUpdatePolicy|null

hasUpdatePolicy

clearUpdatePolicy

setUpdatePolicy

The update policy for this managed instance group.

Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerUpdatePolicy update_policy = 175809896;

Parameter
NameDescription
var Google\Cloud\Compute\V1\InstanceGroupManagerUpdatePolicy
Returns
TypeDescription
$this

getVersions

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.

Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerVersion versions = 162430619;

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setVersions

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.

Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerVersion versions = 162430619;

Parameter
NameDescription
var array<Google\Cloud\Compute\V1\InstanceGroupManagerVersion>
Returns
TypeDescription
$this

getZone

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

Generated from protobuf field optional string zone = 3744684;

Returns
TypeDescription
string

hasZone

clearZone

setZone

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

Generated from protobuf field optional string zone = 3744684;

Parameter
NameDescription
var string
Returns
TypeDescription
$this