Skip to main content

license_codes

Creates, updates, deletes, gets or lists a license_codes resource.

Overview

Namelicense_codes
TypeResource
Idgoogle.compute.license_codes

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (uint64)[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestring[Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer. (pattern: [0-9]{0,20}?)
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
descriptionstring[Output Only] Description of this License Code.
kindstring[Output Only] Type of resource. Always compute#licenseCode for licenses. (default: compute#licenseCode)
licenseAliasarray[Output Only] URL and description aliases of Licenses with the same License Code.
selfLinkstring[Output Only] Server-defined URL for the resource.
statestring[Output Only] Current state of this License Code.
transferableboolean[Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, licenseCodeReturn a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
licenseCodestring
projectstring

SELECT examples

Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

SELECT
id,
name,
creationTimestamp,
description,
kind,
licenseAlias,
selfLink,
state,
transferable
FROM google.compute.license_codes
WHERE project = '{{ project }}' -- required
AND licenseCode = '{{ licenseCode }}' -- required;