Compute V1 Client - Class ResourcePolicyGroupPlacementPolicy (1.18.1)

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

A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ availability_domain_count int

The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network.

↳ collocation string

Specifies network collocation Check the Collocation enum for the list of possible values.

↳ vm_count int

Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

getAvailabilityDomainCount

The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network.

Returns
Type Description
int

hasAvailabilityDomainCount

clearAvailabilityDomainCount

setAvailabilityDomainCount

The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network.

Parameter
Name Description
var int
Returns
Type Description
$this

getCollocation

Specifies network collocation Check the Collocation enum for the list of possible values.

Returns
Type Description
string

hasCollocation

clearCollocation

setCollocation

Specifies network collocation Check the Collocation enum for the list of possible values.

Parameter
Name Description
var string
Returns
Type Description
$this

getVmCount

Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

Returns
Type Description
int

hasVmCount

clearVmCount

setVmCount

Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.

Parameter
Name Description
var int
Returns
Type Description
$this