Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#advanced_deployment_control
def advanced_deployment_control() -> ::Google::Cloud::Compute::V1::ReservationAdvancedDeploymentControl Returns
- (::Google::Cloud::Compute::V1::ReservationAdvancedDeploymentControl) — Advanced control for cluster management, applicable only to DENSE deployment type reservations.
#advanced_deployment_control=
def advanced_deployment_control=(value) -> ::Google::Cloud::Compute::V1::ReservationAdvancedDeploymentControl Parameter
- value (::Google::Cloud::Compute::V1::ReservationAdvancedDeploymentControl) — Advanced control for cluster management, applicable only to DENSE deployment type reservations.
Returns
- (::Google::Cloud::Compute::V1::ReservationAdvancedDeploymentControl) — Advanced control for cluster management, applicable only to DENSE deployment type reservations.
#aggregate_reservation
def aggregate_reservation() -> ::Google::Cloud::Compute::V1::AllocationAggregateReservation Returns
- (::Google::Cloud::Compute::V1::AllocationAggregateReservation) — Reservation for aggregated resources, providing shape flexibility.
#aggregate_reservation=
def aggregate_reservation=(value) -> ::Google::Cloud::Compute::V1::AllocationAggregateReservation Parameter
- value (::Google::Cloud::Compute::V1::AllocationAggregateReservation) — Reservation for aggregated resources, providing shape flexibility.
Returns
- (::Google::Cloud::Compute::V1::AllocationAggregateReservation) — Reservation for aggregated resources, providing shape flexibility.
#commitment
def commitment() -> ::String Returns
- (::String) — [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
#commitment=
def commitment=(value) -> ::String Parameter
- value (::String) — [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
Returns
- (::String) — [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.
#creation_timestamp
def creation_timestamp() -> ::String Returns
- (::String) — [Output Only] Creation timestamp in RFC3339 text format.
#creation_timestamp=
def creation_timestamp=(value) -> ::String Parameter
- value (::String) — [Output Only] Creation timestamp in RFC3339 text format.
Returns
- (::String) — [Output Only] Creation timestamp in RFC3339 text format.
#delete_after_duration
def delete_after_duration() -> ::Google::Cloud::Compute::V1::Duration Returns
- (::Google::Cloud::Compute::V1::Duration) — Duration time relative to reservation creation when Compute Engine will automatically delete this resource.
#delete_after_duration=
def delete_after_duration=(value) -> ::Google::Cloud::Compute::V1::Duration Parameter
- value (::Google::Cloud::Compute::V1::Duration) — Duration time relative to reservation creation when Compute Engine will automatically delete this resource.
Returns
- (::Google::Cloud::Compute::V1::Duration) — Duration time relative to reservation creation when Compute Engine will automatically delete this resource.
#delete_at_time
def delete_at_time() -> ::String Returns
- (::String) — Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format.
#delete_at_time=
def delete_at_time=(value) -> ::String Parameter
- value (::String) — Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format.
Returns
- (::String) — Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format.
#deployment_type
def deployment_type() -> ::String Returns
- (::String) — Specifies the deployment strategy for this reservation. Check the DeploymentType enum for the list of possible values.
#deployment_type=
def deployment_type=(value) -> ::String Parameter
- value (::String) — Specifies the deployment strategy for this reservation. Check the DeploymentType enum for the list of possible values.
Returns
- (::String) — Specifies the deployment strategy for this reservation. Check the DeploymentType enum for the list of possible values.
#description
def description() -> ::String Returns
- (::String) — An optional description of this resource. Provide this property when you create the resource.
#description=
def description=(value) -> ::String Parameter
- value (::String) — An optional description of this resource. Provide this property when you create the resource.
Returns
- (::String) — An optional description of this resource. Provide this property when you create the resource.
#enable_emergent_maintenance
def enable_emergent_maintenance() -> ::Boolean Returns
- (::Boolean) — Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
#enable_emergent_maintenance=
def enable_emergent_maintenance=(value) -> ::Boolean Parameter
- value (::Boolean) — Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
Returns
- (::Boolean) — Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.
#id
def id() -> ::Integer Returns
- (::Integer) — [Output Only] The unique identifier for the resource. This identifier is defined by the server.
#id=
def id=(value) -> ::Integer Parameter
- value (::Integer) — [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Returns
- (::Integer) — [Output Only] The unique identifier for the resource. This identifier is defined by the server.
#kind
def kind() -> ::String Returns
- (::String) — [Output Only] Type of the resource. Always compute#reservations for reservations.
#kind=
def kind=(value) -> ::String Parameter
- value (::String) — [Output Only] Type of the resource. Always compute#reservations for reservations.
Returns
- (::String) — [Output Only] Type of the resource. Always compute#reservations for reservations.
#linked_commitments
def linked_commitments() -> ::Array<::String> Returns
- (::Array<::String>) — [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
#linked_commitments=
def linked_commitments=(value) -> ::Array<::String> Parameter
- value (::Array<::String>) — [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
Returns
- (::Array<::String>) — [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.
#name
def name() -> ::String Returns
- (::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
[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.
#name=
def name=(value) -> ::String Parameter
- value (::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
[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.
Returns
- (::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
[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.
#reservation_sharing_policy
def reservation_sharing_policy() -> ::Google::Cloud::Compute::V1::AllocationReservationSharingPolicy Returns
- (::Google::Cloud::Compute::V1::AllocationReservationSharingPolicy) — Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.
#reservation_sharing_policy=
def reservation_sharing_policy=(value) -> ::Google::Cloud::Compute::V1::AllocationReservationSharingPolicy Parameter
- value (::Google::Cloud::Compute::V1::AllocationReservationSharingPolicy) — Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.
Returns
- (::Google::Cloud::Compute::V1::AllocationReservationSharingPolicy) — Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.
#resource_policies
def resource_policies() -> ::Google::Protobuf::Map{::String => ::String} Returns
- (::Google::Protobuf::Map{::String => ::String}) — 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_policies=
def resource_policies=(value) -> ::Google::Protobuf::Map{::String => ::String} Parameter
- value (::Google::Protobuf::Map{::String => ::String}) — 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.
Returns
- (::Google::Protobuf::Map{::String => ::String}) — 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
def resource_status() -> ::Google::Cloud::Compute::V1::AllocationResourceStatus Returns
- (::Google::Cloud::Compute::V1::AllocationResourceStatus) — [Output Only] Status information for Reservation resource.
#resource_status=
def resource_status=(value) -> ::Google::Cloud::Compute::V1::AllocationResourceStatus Parameter
- value (::Google::Cloud::Compute::V1::AllocationResourceStatus) — [Output Only] Status information for Reservation resource.
Returns
- (::Google::Cloud::Compute::V1::AllocationResourceStatus) — [Output Only] Status information for Reservation resource.
#satisfies_pzs
def satisfies_pzs() -> ::Boolean Returns
- (::Boolean) — [Output Only] Reserved for future use.
#satisfies_pzs=
def satisfies_pzs=(value) -> ::Boolean Parameter
- value (::Boolean) — [Output Only] Reserved for future use.
Returns
- (::Boolean) — [Output Only] Reserved for future use.
#scheduling_type
def scheduling_type() -> ::String Returns
- (::String) — The type of maintenance for the reservation. Check the SchedulingType enum for the list of possible values.
#scheduling_type=
def scheduling_type=(value) -> ::String Parameter
- value (::String) — The type of maintenance for the reservation. Check the SchedulingType enum for the list of possible values.
Returns
- (::String) — The type of maintenance for the reservation. Check the SchedulingType enum for the list of possible values.
#self_link
def self_link() -> ::String Returns
- (::String) — [Output Only] Server-defined fully-qualified URL for this resource.
#self_link=
def self_link=(value) -> ::String Parameter
- value (::String) — [Output Only] Server-defined fully-qualified URL for this resource.
Returns
- (::String) — [Output Only] Server-defined fully-qualified URL for this resource.
#share_settings
def share_settings() -> ::Google::Cloud::Compute::V1::ShareSettings Returns
- (::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.
#share_settings=
def share_settings=(value) -> ::Google::Cloud::Compute::V1::ShareSettings Parameter
- value (::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.
Returns
- (::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
def specific_reservation() -> ::Google::Cloud::Compute::V1::AllocationSpecificSKUReservation Returns
- (::Google::Cloud::Compute::V1::AllocationSpecificSKUReservation) — Reservation for instances with specific machine shapes.
#specific_reservation=
def specific_reservation=(value) -> ::Google::Cloud::Compute::V1::AllocationSpecificSKUReservation Parameter
- value (::Google::Cloud::Compute::V1::AllocationSpecificSKUReservation) — Reservation for instances with specific machine shapes.
Returns
- (::Google::Cloud::Compute::V1::AllocationSpecificSKUReservation) — Reservation for instances with specific machine shapes.
#specific_reservation_required
def specific_reservation_required() -> ::Boolean Returns
- (::Boolean) — 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.
#specific_reservation_required=
def specific_reservation_required=(value) -> ::Boolean Parameter
- value (::Boolean) — 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.
Returns
- (::Boolean) — 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
def status() -> ::String Returns
- (::String) — [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.
#status=
def status=(value) -> ::String Parameter
- value (::String) — [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.
Returns
- (::String) — [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
def zone() -> ::String Returns
- (::String) — Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
#zone=
def zone=(value) -> ::String Parameter
- value (::String) — Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.
Returns
- (::String) — Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.