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
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ advanced_deployment_control
ReservationAdvancedDeploymentControl
Advanced control for cluster management, applicable only to DENSE deployment type reservations.
↳ aggregate_reservation
↳ commitment
string
Output only. [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
↳ confidential_compute_type
string
Check the ConfidentialComputeType enum for the list of possible values.
↳ creation_timestamp
string
Output only. [Output Only] Creation timestamp inRFC3339 text format.
↳ delete_after_duration
Duration
Duration time relative to reservation creation when Compute Engine will automatically delete this resource.
↳ delete_at_time
string
Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text format.
↳ deployment_type
string
Specifies the deployment strategy for this reservation. Check the DeploymentType enum for the list of possible values.
↳ description
string
An optional description of this resource. Provide this property when you create the resource.
↳ early_access_maintenance
string
Indicates the early access maintenance for the reservation. If this field is absent or set to NO_EARLY_ACCESS, the reservation is not enrolled in early access maintenance and the standard notice applies. Check the EarlyAccessMaintenance enum for the list of possible values.
↳ enable_emergent_maintenance
bool
Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
↳ id
int|string
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
↳ kind
string
Output only. [Output Only] Type of the resource. Alwayscompute#reservations for reservations.
↳ linked_commitments
string[]
Output only. [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
↳ 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 withRFC1035. 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.
↳ params
ReservationParams
Input only. Additional params passed with the request, but not persisted as part of resource payload.
↳ protection_tier
string
Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures). Check the ProtectionTier enum for the list of possible values.
↳ reservation_sharing_policy
AllocationReservationSharingPolicy
Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.
↳ resource_policies
array| Google\Protobuf\Internal\MapField
Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
↳ resource_status
↳ satisfies_pzs
bool
Output only. [Output Only] Reserved for future use.
↳ scheduling_type
string
The type of maintenance for the reservation. Check the SchedulingType enum for the list of possible values.
↳ self_link
string
Output only. [Output Only] Server-defined fully-qualified URL for this resource.
↳ share_settings
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
↳ 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. [Output Only] The status of the reservation. - CREATING: Reservation resources are being allocated. - READY: Reservation resources have been allocated, and the reservation is ready for use. - DELETING: Reservation deletion is in progress. - UPDATING: Reservation update is in progress. 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.
getAdvancedDeploymentControl
Advanced control for cluster management, applicable only to DENSE deployment type reservations.
hasAdvancedDeploymentControl
clearAdvancedDeploymentControl
setAdvancedDeploymentControl
Advanced control for cluster management, applicable only to DENSE deployment type reservations.
$this
getAggregateReservation
Reservation for aggregated resources, providing shape flexibility.
hasAggregateReservation
clearAggregateReservation
setAggregateReservation
Reservation for aggregated resources, providing shape flexibility.
$this
getCommitment
Output only. [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
string
hasCommitment
clearCommitment
setCommitment
Output only. [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
var
string
$this
getConfidentialComputeType
Check the ConfidentialComputeType enum for the list of possible values.
string
hasConfidentialComputeType
clearConfidentialComputeType
setConfidentialComputeType
Check the ConfidentialComputeType enum for the list of possible values.
var
string
$this
getCreationTimestamp
Output only. [Output Only] Creation timestamp inRFC3339 text format.
string
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
Output only. [Output Only] Creation timestamp inRFC3339 text format.
var
string
$this
getDeleteAfterDuration
Duration time relative to reservation creation when Compute Engine will automatically delete this resource.
hasDeleteAfterDuration
clearDeleteAfterDuration
setDeleteAfterDuration
Duration time relative to reservation creation when Compute Engine will automatically delete this resource.
$this
getDeleteAtTime
Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text format.
string
hasDeleteAtTime
clearDeleteAtTime
setDeleteAtTime
Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented inRFC3339 text format.
var
string
$this
getDeploymentType
Specifies the deployment strategy for this reservation.
Check the DeploymentType enum for the list of possible values.
string
hasDeploymentType
clearDeploymentType
setDeploymentType
Specifies the deployment strategy for this reservation.
Check the DeploymentType enum for the list of possible values.
var
string
$this
getDescription
An optional description of this resource. Provide this property when you create the resource.
string
hasDescription
clearDescription
setDescription
An optional description of this resource. Provide this property when you create the resource.
var
string
$this
getEarlyAccessMaintenance
Indicates the early access maintenance for the reservation.
If this field is absent or set to NO_EARLY_ACCESS, the reservation is not enrolled in early access maintenance and the standard notice applies. Check the EarlyAccessMaintenance enum for the list of possible values.
string
hasEarlyAccessMaintenance
clearEarlyAccessMaintenance
setEarlyAccessMaintenance
Indicates the early access maintenance for the reservation.
If this field is absent or set to NO_EARLY_ACCESS, the reservation is not enrolled in early access maintenance and the standard notice applies. Check the EarlyAccessMaintenance enum for the list of possible values.
var
string
$this
getEnableEmergentMaintenance
Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
bool
hasEnableEmergentMaintenance
clearEnableEmergentMaintenance
setEnableEmergentMaintenance
Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
var
bool
$this
getId
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
int|string
hasId
clearId
setId
Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
var
int|string
$this
getKind
Output only. [Output Only] Type of the resource. Alwayscompute#reservations for reservations.
string
hasKind
clearKind
setKind
Output only. [Output Only] Type of the resource. Alwayscompute#reservations for reservations.
var
string
$this
getLinkedCommitments
Output only. [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
setLinkedCommitments
Output only. [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
var
string[]
$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 withRFC1035.
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.
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 withRFC1035.
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.
var
string
$this
getParams
Input only. Additional params passed with the request, but not persisted as part of resource payload.
hasParams
clearParams
setParams
Input only. Additional params passed with the request, but not persisted as part of resource payload.
$this
getProtectionTier
Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures).
Check the ProtectionTier enum for the list of possible values.
string
hasProtectionTier
clearProtectionTier
setProtectionTier
Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures).
Check the ProtectionTier enum for the list of possible values.
var
string
$this
getReservationSharingPolicy
Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.
hasReservationSharingPolicy
clearReservationSharingPolicy
setReservationSharingPolicy
Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.
$this
getResourcePolicies
Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
setResourcePolicies
Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.
$this
getResourceStatus
Output only. [Output Only] Status information for Reservation resource.
hasResourceStatus
clearResourceStatus
setResourceStatus
Output only. [Output Only] Status information for Reservation resource.
$this
getSatisfiesPzs
Output only. [Output Only] Reserved for future use.
bool
hasSatisfiesPzs
clearSatisfiesPzs
setSatisfiesPzs
Output only. [Output Only] Reserved for future use.
var
bool
$this
getSchedulingType
The type of maintenance for the reservation.
Check the SchedulingType enum for the list of possible values.
string
hasSchedulingType
clearSchedulingType
setSchedulingType
The type of maintenance for the reservation.
Check the SchedulingType enum for the list of possible values.
var
string
$this
getSelfLink
Output only. [Output Only] Server-defined fully-qualified URL for this resource.
string
hasSelfLink
clearSelfLink
setSelfLink
Output only. [Output Only] Server-defined fully-qualified URL for this resource.
var
string
$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.
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.
$this
getSpecificReservation
Reservation for instances with specific machine shapes.
hasSpecificReservation
clearSpecificReservation
setSpecificReservation
Reservation for instances with specific machine shapes.
$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.
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.
var
bool
$this
getStatus
Output only. [Output Only] The status of the reservation.
- CREATING: Reservation resources are being
allocated.
- READY: Reservation resources have been allocated, and the reservation is ready for use.
- DELETING: Reservation deletion is in progress.
- UPDATING: Reservation update is in progress. Check the Status enum for the list of possible values.
string
hasStatus
clearStatus
setStatus
Output only. [Output Only] The status of the reservation.
- CREATING: Reservation resources are being
allocated.
- READY: Reservation resources have been allocated, and the reservation is ready for use.
- DELETING: Reservation deletion is in progress.
- UPDATING: Reservation update is in progress. Check the Status enum for the list of possible values.
var
string
$this
getZone
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
string
hasZone
clearZone
setZone
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
var
string
$this

