Compute V1 Client - Class LicenseCode (2.10.0)

Reference documentation and code samples for the Compute V1 Client class LicenseCode.

Represents a License Code resource.

A License Code is a unique identifier used to represent alicense resource. Caution This resource is intended for use only by third-party partners who are creatingCloud Marketplace images.

Generated from protobuf message google.cloud.compute.v1.LicenseCode

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ allowed_replacement_licenses
string[]

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

↳ appendable_to_disk
bool

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

↳ creation_timestamp
string

Output only. [Output Only] Creation timestamp inRFC3339 text format.

↳ description
string

Output only. [Output Only] Description of this License Code.

↳ id
int|string

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

↳ incompatible_licenses
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.

↳ kind
string

Output only. [Output Only] Type of resource. Always compute#licenseCode for licenses.

↳ license_alias
array< LicenseCodeLicenseAlias >

[Output Only] URL and description aliases of Licenses with the same License Code.

↳ minimum_retention
Duration

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

↳ multi_tenant_only
bool

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

↳ 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.

↳ os_license
bool

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

↳ removable_from_disk
bool

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

↳ required_coattached_licenses
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.

↳ self_link
string

Output only. [Output Only] Server-defined URL for the resource.

↳ sole_tenant_only
bool

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. Check the State enum for the list of possible values.

↳ transferable
bool

Output only. [Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

↳ update_timestamp
string

Output only. [Output Only] Last update timestamp inRFC3339 text format.

getAllowedReplacementLicenses

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

Returns
Type
Description

setAllowedReplacementLicenses

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

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

getAppendableToDisk

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

Returns
Type
Description
bool

hasAppendableToDisk

clearAppendableToDisk

setAppendableToDisk

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

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getCreationTimestamp

Output only. [Output Only] Creation timestamp inRFC3339 text format.

Returns
Type
Description
string

hasCreationTimestamp

clearCreationTimestamp

setCreationTimestamp

Output only. [Output Only] Creation timestamp inRFC3339 text format.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getDescription

Output only. [Output Only] Description of this License Code.

Returns
Type
Description
string

hasDescription

clearDescription

setDescription

Output only. [Output Only] Description of this License Code.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getId

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

Returns
Type
Description
int|string

hasId

clearId

setId

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

Parameter
Name
Description
var
int|string
Returns
Type
Description
$this

getIncompatibleLicenses

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.

Returns
Type
Description

setIncompatibleLicenses

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.

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

getKind

Output only. [Output Only] Type of resource. Always compute#licenseCode for licenses.

Returns
Type
Description
string

hasKind

clearKind

setKind

Output only. [Output Only] Type of resource. Always compute#licenseCode for licenses.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getLicenseAlias

[Output Only] URL and description aliases of Licenses with the same License Code.

setLicenseAlias

[Output Only] URL and description aliases of Licenses with the same License Code.

Parameter
Name
Description
Returns
Type
Description
$this

getMinimumRetention

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

Returns
Type
Description
Duration |null

hasMinimumRetention

clearMinimumRetention

setMinimumRetention

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

Parameter
Name
Description
var
Returns
Type
Description
$this

getMultiTenantOnly

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

Returns
Type
Description
bool

hasMultiTenantOnly

clearMultiTenantOnly

setMultiTenantOnly

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

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getName

Output only. [Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

Returns
Type
Description
string

hasName

clearName

setName

Output only. [Output Only] Name of the resource. The name is 1-20 characters long and must be a valid 64 bit integer.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getOsLicense

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

Returns
Type
Description
bool

hasOsLicense

clearOsLicense

setOsLicense

If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getRemovableFromDisk

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

Returns
Type
Description
bool

hasRemovableFromDisk

clearRemovableFromDisk

setRemovableFromDisk

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

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getRequiredCoattachedLicenses

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.

Returns
Type
Description

setRequiredCoattachedLicenses

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.

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

Output only. [Output Only] Server-defined URL for the resource.

Returns
Type
Description
string

Output only. [Output Only] Server-defined URL for the resource.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getSoleTenantOnly

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

Returns
Type
Description
bool

hasSoleTenantOnly

clearSoleTenantOnly

setSoleTenantOnly

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

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getState

Output only. [Output Only] Current state of this License Code.

Check the State enum for the list of possible values.

Returns
Type
Description
string

hasState

clearState

setState

Output only. [Output Only] Current state of this License Code.

Check the State enum for the list of possible values.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getTransferable

Output only. [Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

Returns
Type
Description
bool

hasTransferable

clearTransferable

setTransferable

Output only. [Output Only] If true, the license will remain attached when creating images or snapshots from disks. Otherwise, the license is not transferred.

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getUpdateTimestamp

Output only. [Output Only] Last update timestamp inRFC3339 text format.

Returns
Type
Description
string

hasUpdateTimestamp

clearUpdateTimestamp

setUpdateTimestamp

Output only. [Output Only] Last update timestamp inRFC3339 text format.

Parameter
Name
Description
var
string
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: