- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Retrieves information about the specified reservation.
HTTP request
GET https://compute.googleapis.com/compute/beta/projects/{project}/zones/{zone}/reservations/{reservation}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
zone |
Name of the zone for this request. |
reservation |
Name of the reservation to retrieve. |
Request body
The request body must be empty.
Response body
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.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "kind": string, "id": string, "creationTimestamp": string, "selfLink": string, "zone": string, "description": string, "name": string, "commitment": string, "specificReservationRequired": boolean, "status": enum, "shareSettings": { "shareType": enum, "projects": [ string ], "projectMap": { string: { "projectId": string }, ... } }, "satisfiesPzs": boolean, "resourcePolicies": { string: string, ... }, "resourceStatus": { "specificSkuAllocation": { "sourceInstanceTemplateId": string, "utilizations": { string: string, ... } }, "reservationMaintenance": { "upcomingGroupMaintenance": { "type": enum, "canReschedule": boolean, "windowStartTime": string, "windowEndTime": string, "latestWindowStartTime": string, "maintenanceStatus": enum }, "maintenanceOngoingCount": integer, "maintenancePendingCount": integer, "schedulingType": enum }, "reservationBlockCount": integer }, "reservationSharingPolicy": { "serviceShareType": enum }, "deploymentType": enum, // Union field |
Fields | |
---|---|
kind |
[Output Only] Type of the resource. Always |
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creation |
[Output Only] Creation timestamp in RFC3339 text format. |
self |
[Output Only] Server-defined fully-qualified URL for this resource. |
zone |
Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. |
description |
An optional description of this resource. Provide this property when you create the resource. |
name |
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 |
commitment |
[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. |
specific |
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 |
[Output Only] The status of the reservation.
|
share |
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 |
Type of sharing for this shared-reservation |
share |
A reservations.list of Project names to specify consumer projects for this shared-reservation. This is only valid when shareType's value is SPECIFIC_PROJECTS. |
share |
A map of project id and project config. This is only valid when shareType's value is SPECIFIC_PROJECTS. |
share |
The project ID, should be same as the key of this project config in the parent map. |
satisfies |
[Output Only] Reserved for future use. |
resource |
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 |
[Output Only] Status information for Reservation resource. |
resource |
Allocation Properties of this reservation. |
resource |
ID of the instance template used to populate reservation properties. |
resource |
Per service utilization breakdown. The Key is the Google Cloud managed service name. |
resource |
Maintenance information for this reservation |
resource |
Maintenance information on this group of VMs. |
resource |
Defines the type of maintenance. |
resource |
Indicates if the maintenance can be customer triggered. |
resource |
The current start time of the maintenance window. This timestamp value is in RFC3339 text format. |
resource |
The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format. |
resource |
The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format. |
resource |
|
resource |
Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance. |
resource |
Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have pending maintenance. |
resource |
The type of maintenance for the reservation. |
resource |
The number of reservation blocks associated with this reservation. |
reservation |
Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services. |
reservation |
Sharing config for all Google Cloud services. |
deployment |
Specifies the deployment strategy for this reservation. |
Union field
|
|
specific |
Reservation for instances with specific machine shapes. |
specific |
The instance properties for the reservation. |
specific |
Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. |
specific |
Specifies accelerator type and count. |
specific |
Full or partial URL of the accelerator type resource to attach to this instance. For example: |
specific |
The number of the guest accelerator cards exposed to this instance. |
specific |
Minimum cpu platform the reservation. |
specific |
Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. |
specific |
Specifies the size of the disk in base-2 GB. |
specific |
Specifies the disk interface to use for attaching this disk, which is either |
specific |
Specifies the number of hours after reservation creation where instances using the reservation won't be scheduled for maintenance. |
specific |
An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API. |
specific |
Specifies the frequency of planned maintenance events. The accepted values are: |
specific |
Specifies the number of resources that are allocated. |
specific |
[Output Only] Indicates how many instances are in use. |
specific |
[Output Only] Indicates how many instances are actually usable currently. |
specific |
Specifies the instance template to create the reservation. If you use this field, you must exclude the This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template:
|
aggregate |
Reservation for aggregated resources, providing shape flexibility. |
aggregate |
The VM family that all instances scheduled against this reservation must belong to. |
aggregate |
reservations.list of reserved resources (CPUs, memory, accelerators). |
aggregate |
Properties of accelerator resources in this reservation. |
aggregate |
Number of accelerators of specified type. |
aggregate |
Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" |
aggregate |
[Output only] reservations.list of resources currently in use. |
aggregate |
Properties of accelerator resources in this reservation. |
aggregate |
Number of accelerators of specified type. |
aggregate |
Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" |
aggregate |
The workload type of the instances that will target this reservation. |
Union field
|
|
delete |
Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format. |
delete |
Duration time relative to reservation creation when Compute Engine will automatically delete this resource. |
delete |
Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years |
delete |
Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/compute.readonly
https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
In addition to any permissions specified on the fields above, authorization requires one or more of the following IAM permissions:
compute.reservations.get
To find predefined roles that contain those permissions, see Compute Engine IAM Roles.