Compute V1 Client - Class LocationPolicy (1.8.3)

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

Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).

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

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ locationsarray|Google\Protobuf\Internal\MapField

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

↳ target_shapestring

Strategy for distributing VMs across zones in a region. Check the TargetShape enum for the list of possible values.

getLocations

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLocations

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

Parameter
NameDescription
vararray|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getTargetShape

Strategy for distributing VMs across zones in a region.

Check the TargetShape enum for the list of possible values.

Returns
TypeDescription
string

hasTargetShape

clearTargetShape

setTargetShape

Strategy for distributing VMs across zones in a region.

Check the TargetShape enum for the list of possible values.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this