Compute V1 Client - Class LocationPolicy (1.12.1)

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ locations array|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_shape string

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
var array|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
var string
Returns
TypeDescription
$this