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
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
name | string | Output only. [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}?) |
allowedReplacementLicenses | array | Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false. |
appendableToDisk | boolean | If true, this license can be appended to an existing disk's set of licenses. |
creationTimestamp | string | Output only. [Output Only] Creation timestamp inRFC3339 text format. |
description | string | Output only. [Output Only] Description of this License Code. |
incompatibleLicenses | array | Specifies licenseCodes of licenses that are incompatible with this license. If a license is incompatible with this license, it cannot be attached to the same disk or image. |
kind | string | Output only. [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. |
minimumRetention | object | If set, this license will be unable to be removed or replaced once attached to a disk until the minimum_retention period has passed. (id: Duration) |
multiTenantOnly | boolean | If true, this license can only be used on VMs on multi tenant nodes. |
osLicense | boolean | If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time. |
removableFromDisk | boolean | If true, this license can be removed from a disk's set of licenses, with no replacement license needed. |
requiredCoattachedLicenses | array | Specifies the set of permissible coattached licenseCodes of licenses that satisfy the coattachment requirement of this license. At least one license from the set must be attached to the same disk or image as this license. |
selfLink | string | Output only. [Output Only] Server-defined URL for the resource. |
soleTenantOnly | boolean | If true, this license can only be used on VMs on sole tenant nodes. |
state | string | Output only. [Output Only] Current state of this License Code. (DISABLED, ENABLED, RESTRICTED, STATE_UNSPECIFIED, TERMINATED) |
transferable | boolean | Output only. [Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred. |
updateTimestamp | string | Output only. [Output Only] Last update timestamp inRFC3339 text format. |
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 creatingCloud 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 creatingCloud Marketplace
images.
SELECT
id,
name,
allowedReplacementLicenses,
appendableToDisk,
creationTimestamp,
description,
incompatibleLicenses,
kind,
licenseAlias,
minimumRetention,
multiTenantOnly,
osLicense,
removableFromDisk,
requiredCoattachedLicenses,
selfLink,
soleTenantOnly,
state,
transferable,
updateTimestamp
FROM google.compute.license_codes
WHERE project = '{{ project }}' -- required
AND licenseCode = '{{ licenseCode }}' -- required
;