Reference documentation and code samples for the Compute V1 Client class InstanceFlexibilityPolicyInstanceSelection.
Specification of machine type to use. Every position inside this message is an alternative.
The count specified in the shape flexibility must not exceed the number of entries in per_instance_properties or the capacity of the name_pattern, if used.
Generated from protobuf message google.cloud.compute.v1.InstanceFlexibilityPolicyInstanceSelection
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ disks |
array<AttachedDisk>
Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties. |
↳ machine_types |
array
Alternative machine types to use for instances that are created from these properties. This field only accepts a machine type names, for example |
↳ rank |
int|string
Rank when prioritizing the shape flexibilities. The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0. |
getDisks
Disks to be attached to the instances created from in this selection.
They override the disks specified in the instance properties.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setDisks
Disks to be attached to the instances created from in this selection.
They override the disks specified in the instance properties.
| Parameter | |
|---|---|
| Name | Description |
var |
array<AttachedDisk>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMachineTypes
Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setMachineTypes
Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRank
Rank when prioritizing the shape flexibilities.
The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
| Returns | |
|---|---|
| Type | Description |
int|string |
|
hasRank
clearRank
setRank
Rank when prioritizing the shape flexibilities.
The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
| Parameter | |
|---|---|
| Name | Description |
var |
int|string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|