Method: licenses.get

Returns the specified License resource.

HTTP request

GET https://www.googleapis.com/compute/v1/projects/{project}/global/licenses/{resourceId}

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
project

string

Project ID for this request.

resourceId

string

Name of the License resource to return.

Request body

The request body must be empty.

Response body

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

A license resource.

JSON representation
{
  "name": string,
  "chargesUseFee": boolean,
  "id": string,
  "licenseCode": string,
  "creationTimestamp": string,
  "description": string,
  "transferable": boolean,
  "selfLink": string,
  "resourceRequirements": {
    "minGuestCpuCount": number,
    "minMemoryMb": number
  },
  "kind": string
}
Fields
name

string

[Output Only] Name of the resource. The name is 1-63 characters long and complies with RFC1035.

chargesUseFee

boolean

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

id

string (fixed64 format)

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

licenseCode

string (fixed64 format)

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

creationTimestamp

string

[Output Only] Creation timestamp in RFC3339 text format.

description

string

An optional textual description of the resource; provided by the client when the resource is created.

transferable

boolean

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

resourceRequirements

object

resourceRequirements.minGuestCpuCount

number

Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.

resourceRequirements.minMemoryMb

number

Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.

kind

string

[Output Only] Type of resource. Always compute#license for licenses.

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

Send feedback about...

Compute Engine