license_codes
Creates, updates, deletes, gets or lists a license_codes
resource.
Overview
Name | license_codes |
Type | Resource |
Id | google.compute.license_codes |
Fields
The following fields are returned by SELECT
queries:
- get
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | [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}?) |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 text format. |
description | string | [Output Only] Description of this License Code. |
kind | string | [Output Only] Type of resource. Always compute#licenseCode for licenses. (default: compute#licenseCode) |
licenseAlias | array | [Output Only] URL and description aliases of Licenses with the same License Code. |
selfLink | string | [Output Only] Server-defined URL for the resource. |
state | string | [Output Only] Current state of this License Code. |
transferable | boolean | [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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | project , licenseCode | 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. |
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.
Name | Datatype | Description |
---|---|---|
licenseCode | string | |
project | string |
SELECT
examples
- get
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;