Reference documentation and code samples for the Compute V1 Client class Reservation.
Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources.
Generated from protobuf message google.cloud.compute.v1.Reservation
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ commitment |
string
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. |
↳ creation_timestamp |
string
[Output Only] Creation timestamp in RFC3339 text format. |
↳ description |
string
An optional description of this resource. Provide this property when you create the resource. |
↳ id |
int|string
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
↳ kind |
string
[Output Only] Type of the resource. Always compute#reservations for reservations. |
↳ name |
string
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
↳ satisfies_pzs |
bool
[Output Only] Reserved for future use. |
↳ self_link |
string
[Output Only] Server-defined fully-qualified URL for this resource. |
↳ share_settings |
Google\Cloud\Compute\V1\ShareSettings
Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation. |
↳ specific_reservation |
Google\Cloud\Compute\V1\AllocationSpecificSKUReservation
Reservation for instances with specific machine shapes. |
↳ specific_reservation_required |
bool
Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. |
↳ status |
string
[Output Only] The status of the reservation. Check the Status enum for the list of possible values. |
↳ zone |
string
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. |
getCommitment
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
Generated from protobuf field optional string commitment = 482134805;
Returns | |
---|---|
Type | Description |
string |
hasCommitment
clearCommitment
setCommitment
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
Generated from protobuf field optional string commitment = 482134805;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
Returns | |
---|---|
Type | Description |
string |
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
Returns | |
---|---|
Type | Description |
string |
hasDescription
clearDescription
setDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Generated from protobuf field optional uint64 id = 3355;
Returns | |
---|---|
Type | Description |
int|string |
hasId
clearId
setId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Generated from protobuf field optional uint64 id = 3355;
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getKind
[Output Only] Type of the resource. Always compute#reservations for reservations.
Generated from protobuf field optional string kind = 3292052;
Returns | |
---|---|
Type | Description |
string |
hasKind
clearKind
setKind
[Output Only] Type of the resource. Always compute#reservations for reservations.
Generated from protobuf field optional string kind = 3292052;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getName
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Generated from protobuf field optional string name = 3373707;
Returns | |
---|---|
Type | Description |
string |
hasName
clearName
setName
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Generated from protobuf field optional string name = 3373707;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSatisfiesPzs
[Output Only] Reserved for future use.
Generated from protobuf field optional bool satisfies_pzs = 480964267;
Returns | |
---|---|
Type | Description |
bool |
hasSatisfiesPzs
clearSatisfiesPzs
setSatisfiesPzs
[Output Only] Reserved for future use.
Generated from protobuf field optional bool satisfies_pzs = 480964267;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getSelfLink
[Output Only] Server-defined fully-qualified URL for this resource.
Generated from protobuf field optional string self_link = 456214797;
Returns | |
---|---|
Type | Description |
string |
hasSelfLink
clearSelfLink
setSelfLink
[Output Only] Server-defined fully-qualified URL for this resource.
Generated from protobuf field optional string self_link = 456214797;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getShareSettings
Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
Generated from protobuf field optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\ShareSettings|null |
hasShareSettings
clearShareSettings
setShareSettings
Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.
Generated from protobuf field optional .google.cloud.compute.v1.ShareSettings share_settings = 266668163;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\ShareSettings
|
Returns | |
---|---|
Type | Description |
$this |
getSpecificReservation
Reservation for instances with specific machine shapes.
Generated from protobuf field optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\AllocationSpecificSKUReservation|null |
hasSpecificReservation
clearSpecificReservation
setSpecificReservation
Reservation for instances with specific machine shapes.
Generated from protobuf field optional .google.cloud.compute.v1.AllocationSpecificSKUReservation specific_reservation = 404901951;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\AllocationSpecificSKUReservation
|
Returns | |
---|---|
Type | Description |
$this |
getSpecificReservationRequired
Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
Generated from protobuf field optional bool specific_reservation_required = 226550687;
Returns | |
---|---|
Type | Description |
bool |
hasSpecificReservationRequired
clearSpecificReservationRequired
setSpecificReservationRequired
Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.
Generated from protobuf field optional bool specific_reservation_required = 226550687;
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |
getStatus
[Output Only] The status of the reservation.
Check the Status enum for the list of possible values.
Generated from protobuf field optional string status = 181260274;
Returns | |
---|---|
Type | Description |
string |
hasStatus
clearStatus
setStatus
[Output Only] The status of the reservation.
Check the Status enum for the list of possible values.
Generated from protobuf field optional string status = 181260274;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getZone
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Generated from protobuf field optional string zone = 3744684;
Returns | |
---|---|
Type | Description |
string |
hasZone
clearZone
setZone
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Generated from protobuf field optional string zone = 3744684;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |