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

NameDatatypeDescription
idstring[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.
descriptionstring[Output Only] Description of this License Code.
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
kindstring[Output Only] Type of resource. Always compute#licenseCode for licenses.
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

NameAccessible byRequired ParamsDescription
getSELECTlicenseCode, projectReturn 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 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,
description,
creationTimestamp,
kind,
licenseAlias,
selfLink,
state,
transferable
FROM google.compute.license_codes
WHERE licenseCode = '{{ licenseCode }}'
AND project = '{{ project }}';