Method: reservations.get

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

string

Project ID for this request.

zone

string

Name of the zone for this request.

resourceId

string

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

string (fixed64 format)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

zone

string

Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.

description

string

An optional description of this resource. Provide this property when you create the resource.

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 [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.

commitment

string

[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.

specificReservationRequired

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

enum

[Output Only] The status of the reservation.

kind

string

[Output Only] Type of the resource. Always compute#reservations for reservations.

specificReservation

object

Reservation for instances with specific machine shapes.

specificReservation.instanceProperties

object

The instance properties for the reservation.

specificReservation.instanceProperties.machineType

string

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[]

object

Specifies accelerator type and count.

specificReservation.instanceProperties.guestAccelerators[].acceleratorType

string

Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.

specificReservation.instanceProperties.guestAccelerators[].acceleratorCount

number

The number of the guest accelerator cards exposed to this instance.

specificReservation.instanceProperties.minCpuPlatform

string

Minimum cpu platform the reservation.

specificReservation.instanceProperties.localSsds[]

object

Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.

specificReservation.instanceProperties.localSsds[].diskSizeGb

string (int64 format)

Specifies the size of the disk in base-2 GB.

specificReservation.instanceProperties.localSsds[].interface

enum

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.

specificReservation.count

string (int64 format)

Specifies the number of resources that are allocated.

specificReservation.inUseCount

string (int64 format)

[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
هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...

Compute Engine Documentation