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 | |
---|---|
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.
Generated from protobuf field map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
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.
Generated from protobuf field map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
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.
Generated from protobuf field optional string target_shape = 338621299;
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.
Generated from protobuf field optional string target_shape = 338621299;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |