Retrieves information about the specified reservation.
HTTP request
GET https://compute.googleapis.com/compute/v1/projects/{project}/zones/{zone}/reservations/{resourceId}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Project ID for this request. |
zone |
Name of the zone for this request. |
resourceId |
Name of the reservation to retrieve. |
Request body
The request body must be empty.
Response body
If successful, the response body contains data with the following structure:
JSON representation | |
---|---|
{ "id": string, "creationTimestamp": string, "selfLink": string, "zone": string, "description": string, "name": string, "commitment": string, "specificReservationRequired": boolean, "status": enum, "kind": string, "specificReservation": { "instanceProperties": { "machineType": string, "guestAccelerators": [ { "acceleratorType": string, "acceleratorCount": number } ], "minCpuPlatform": string, "localSsds": [ { "diskSizeGb": string, "interface": enum } ] }, "count": string, "inUseCount": string } } |
Fields | |
---|---|
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
selfLink |
[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. |
specificReservationRequired |
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. |
kind |
[Output Only] Type of the resource. Always |
specificReservation |
Reservation for instances with specific machine shapes. |
specificReservation.instanceProperties |
The instance properties for the reservation. |
specificReservation.instanceProperties.machineType |
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. |
specificReservation.instanceProperties.guestAccelerators[] |
Specifies accelerator type and count. |
specificReservation.instanceProperties.guestAccelerators[].acceleratorType |
Full or partial URL of the accelerator type resource to attach to this instance. For example: |
specificReservation.instanceProperties.guestAccelerators[].acceleratorCount |
The number of the guest accelerator cards exposed to this instance. |
specificReservation.instanceProperties.minCpuPlatform |
Minimum cpu platform the reservation. |
specificReservation.instanceProperties.localSsds[] |
Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. |
specificReservation.instanceProperties.localSsds[].diskSizeGb |
Specifies the size of the disk in base-2 GB. |
specificReservation.instanceProperties.localSsds[].interface |
Specifies the disk interface to use for attaching this disk, which is either |
specificReservation.count |
Specifies the number of resources that are allocated. |
specificReservation.inUseCount |
[Output Only] Indicates how many instances are in use. |
Authorization Scopes
Requires one of the following OAuth scopes:
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 Google IAM permissions:
compute.reservations.get