Compute V1 Client - Class License (1.33.0)

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

Represents a License resource. A License represents billing and aggregate usage data for public and marketplace images. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

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

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ allowed_replacement_licenses
array

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.

↳ charges_use_fee
bool

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

↳ creation_timestamp
string

[Output Only] Creation timestamp in RFC3339 text format.

↳ description
string

An optional textual description of the resource; provided by the client when the resource is created.

↳ id
int|string

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

↳ incompatible_licenses
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] Type of resource. Always compute#license for licenses.

↳ license_code
int|string

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

↳ 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

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

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

↳ resource_requirements
LicenseResourceRequirements

[Input Only] Deprecated.

↳ self_link
string

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

↳ self_link_with_id
string

[Output Only] Server-defined URL for this resource with the resource id.

↳ sole_tenant_only
bool

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

↳ transferable
bool

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

↳ update_timestamp
string

[Output Only] Last update timestamp in RFC3339 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

getChargesUseFee

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

Returns
Type
Description
bool

hasChargesUseFee

clearChargesUseFee

setChargesUseFee

[Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getCreationTimestamp

[Output Only] Creation timestamp in RFC3339 text format.

Returns
Type
Description
string

hasCreationTimestamp

clearCreationTimestamp

setCreationTimestamp

[Output Only] Creation timestamp in RFC3339 text format.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getDescription

An optional textual description of the resource; provided by the client when the resource is created.

Returns
Type
Description
string

hasDescription

clearDescription

setDescription

An optional textual description of the resource; provided by the client when the resource is created.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getId

[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] 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] Type of resource. Always compute#license for licenses.

Returns
Type
Description
string

hasKind

clearKind

setKind

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

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getLicenseCode

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

Returns
Type
Description
int|string

hasLicenseCode

clearLicenseCode

setLicenseCode

[Output Only] The unique code used to attach this license to images, snapshots, and disks.

Parameter
Name
Description
var
int|string
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

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

Returns
Type
Description
string

hasName

clearName

setName

Name of the resource. The name must be 1-63 characters long and comply with RFC1035.

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

getResourceRequirements

[Input Only] Deprecated.

Returns
Type
Description

hasResourceRequirements

clearResourceRequirements

setResourceRequirements

[Input Only] Deprecated.

Parameter
Name
Description
Returns
Type
Description
$this

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

Returns
Type
Description
string

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

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getSelfLinkWithId

[Output Only] Server-defined URL for this resource with the resource id.

Returns
Type
Description
string

hasSelfLinkWithId

clearSelfLinkWithId

setSelfLinkWithId

[Output Only] Server-defined URL for this resource with the resource id.

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

getTransferable

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

Returns
Type
Description
bool

hasTransferable

clearTransferable

setTransferable

If false, licenses will not be copied from the source resource when creating an image from a disk, disk from snapshot, or snapshot from disk.

Parameter
Name
Description
var
bool
Returns
Type
Description
$this

getUpdateTimestamp

[Output Only] Last update timestamp in RFC3339 text format.

Returns
Type
Description
string

hasUpdateTimestamp

clearUpdateTimestamp

setUpdateTimestamp

[Output Only] Last update timestamp in RFC3339 text format.

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