Compute V1 Client - Class LocationPolicy (1.33.0)

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
Name Description
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
Type Description
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
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getTargetShape

Strategy for distributing VMs across zones in a region.

Check the TargetShape enum for the list of possible values.

Returns
Type Description
string

hasTargetShape

clearTargetShape

setTargetShape

Strategy for distributing VMs across zones in a region.

Check the TargetShape enum for the list of possible values.

Parameter
Name Description
var string
Returns
Type Description
$this