REST Resource: licenseCodes

Resource: LicenseCodesGetResponse

JSON representation
{
  "resource": {
    object (LicenseCode)
  }
}
Fields
resource

object (LicenseCode)

LicenseCode

Represents a License Code resource.

A License Code is a unique identifier used to represent a license resource.

Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

JSON representation
{
  "kind": string,
  "id": string,
  "name": string,
  "creationTimestamp": string,
  "description": string,
  "selfLink": string,
  "transferable": boolean,
  "state": enum (State),
  "licenseAlias": [
    {
      object (LicenseAlias)
    }
  ],
  "appendableToDisk": boolean,
  "removableFromDisk": boolean,
  "allowedReplacementLicenses": [
    string
  ],
  "osLicense": boolean,
  "incompatibleLicenses": [
    string
  ],
  "requiredCoattachedLicenses": [
    string
  ],
  "soleTenantOnly": boolean,
  "multiTenantOnly": boolean,
  "minimumRetention": {
    object (Duration)
  },
  "updateTimestamp": string
}
Fields
kind

string

Output only. Type of resource. Always

compute#licenseCode

for licenses.

id

string (uint64 format)

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.

creationTimestamp

string

Output only. Creation timestamp in RFC3339 text format.

description

string

Output only. Description 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.

state

enum (State)

Output only. Current state of this License Code.

licenseAlias[]

object (LicenseAlias)

Output only. URL and description aliases of Licenses with the same License Code.

appendableToDisk

boolean

If true, this license can be appended to an existing disk's set of licenses.

Available from 2026-03-01..

removableFromDisk

boolean

If true, this license can be removed from a disk's set of licenses, with no replacement license needed.

Available from 2026-03-01..

allowedReplacementLicenses[]

string

Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removableFromDisk is false.

Available from 2026-03-01..

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.

Available from 2026-03-01..

incompatibleLicenses[]

string

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.

Available from 2026-03-01..

requiredCoattachedLicenses[]

string

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.

Available from 2026-03-01..

soleTenantOnly

boolean

If true, this license can only be used on VMs on sole tenant nodes.

Available from 2026-03-01..

multiTenantOnly

boolean

If true, this license can only be used on VMs on multi tenant nodes.

Available from 2026-03-01..

minimumRetention

object (Duration)

If set, this license will be unable to be removed or replaced once attached to a disk until the minimumRetention period has passed.

Available from 2026-03-01..

updateTimestamp

string

Output only. Last update timestamp in RFC3339 text format.

Available from 2026-03-01..

State

License state reflects how a license and license code can be used, if at all. License state is maintained by GCE Admins. LINT.IfChange

Enums
STATE_UNSPECIFIED
ENABLED Use is allowed for anyone with USE_READ_ONLY access to this License Code.
RESTRICTED Use of this license is limited to a project whitelist.
DISABLED Machines are not allowed to attach boot disks with this License Code. Requests to create new resources with this license will be rejected.
TERMINATED Reserved state.

LicenseAlias

JSON representation
{
  "selfLink": string,
  "description": string
}
Fields
description

string

Output only. Description of this License Code.

Methods

get

Return a specified license code.

getIamPolicy

The method compute.v1.LicenseCodesService.GetPolicy is not available in Cloud de Confiance by S3NS.

setIamPolicy

The method compute.v1.LicenseCodesService.SetPolicy is not available in Cloud de Confiance by S3NS.

testIamPermissions

The method compute.v1.LicenseCodesService.TestPermissions is not available in Cloud de Confiance by S3NS.