Method: regionCommitments.get

Returns the specified commitment resource. Gets a list of available commitments by making a list() request.

HTTP request

GET https://www.googleapis.com/compute/beta/projects/{project}/regions/{region}/commitments/{resourceId}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
project

string

Project ID for this request.

region

string

Name of the region for this request.

resourceId

string

Name of the commitment to return.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts. Committed use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts.

JSON representation
{
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "region": string,
  "selfLink": string,
  "status": enum,
  "statusMessage": string,
  "plan": enum,
  "startTimestamp": string,
  "endTimestamp": string,
  "resources": [
    {
      "type": enum,
      "amount": string
    }
  ],
  "kind": 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.

name

string

Name of the resource. Provided by the client when the resource is created. The 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.

description

string

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

region

string

[Output Only] URL of the region where this commitment may be used.

status

enum

[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.

statusMessage

string

[Output Only] An optional, human-readable explanation of the status.

plan

enum

The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).

startTimestamp

string

[Output Only] Commitment start time in RFC3339 text format.

endTimestamp

string

[Output Only] Commitment end time in RFC3339 text format.

resources[]

object

A list of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.

resources[].type

enum

Type of resource for which this commitment applies. Possible values are VCPU and MEMORY

resources[].amount

string (int64 format)

The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.

kind

string

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

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.commitments.get
Was this page helpful? Let us know how we did:

Send feedback about...

Compute Engine