# Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::License (v3.7.0)

3.7.0 (latest) 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.22.0 2.21.1 2.20.0 2.19.1 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.2 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.10.0 1.9.0 1.8.0 1.7.1 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.5.0 Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::License.

Represents a License resource.


<br />

A License represents billing and aggregate usage data forpublic andmarketplace images.
*Caution* This resource is intended for
use only by third-party partners who are creatingCloud Marketplace
images.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allowed_replacement_licenses

    def allowed_replacement_licenses() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.

### #allowed_replacement_licenses=

    def allowed_replacement_licenses=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.
**Returns**

- (::Array\<::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

    def appendable_to_disk() -> ::Boolean

**Returns**

- (::Boolean) --- If true, this license can be appended to an existing disk's set of licenses.

### #appendable_to_disk=

    def appendable_to_disk=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If true, this license can be appended to an existing disk's set of licenses.
**Returns**

- (::Boolean) --- If true, this license can be appended to an existing disk's set of licenses.

### #charges_use_fee

    def charges_use_fee() -> ::Boolean

**Returns**

- (::Boolean) --- \[Output Only\] Deprecated. This field no longer reflects whether a license charges a usage fee.

### #charges_use_fee=

    def charges_use_fee=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- \[Output Only\] Deprecated. This field no longer reflects whether a license charges a usage fee.
**Returns**

- (::Boolean) --- \[Output Only\] Deprecated. This field no longer reflects whether a license charges a usage fee.

### #creation_timestamp

    def creation_timestamp() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Creation timestamp inRFC3339 text format.

### #creation_timestamp=

    def creation_timestamp=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Creation timestamp inRFC3339 text format.
**Returns**

- (::String) --- Output only. \[Output Only\] Creation timestamp inRFC3339 text format.

### #description

    def description() -> ::String

**Returns**

- (::String) --- An optional textual description of the resource; provided by the client when the resource is created.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- An optional textual description of the resource; provided by the client when the resource is created.
**Returns**

- (::String) --- An optional textual description of the resource; provided by the client when the resource is created.

### #id

    def id() -> ::Integer

**Returns**

- (::Integer) --- \[Output Only\] The unique identifier for the resource. This identifier is defined by the server.

### #id=

    def id=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- \[Output Only\] The unique identifier for the resource. This identifier is defined by the server.
**Returns**

- (::Integer) --- \[Output Only\] The unique identifier for the resource. This identifier is defined by the server.

### #incompatible_licenses

    def incompatible_licenses() -> ::Array<::String>

**Returns**

- (::Array\<::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.

### #incompatible_licenses=

    def incompatible_licenses=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::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.
**Returns**

- (::Array\<::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

    def kind() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Type of resource. Always compute#license for licenses.

### #kind=

    def kind=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Type of resource. Always compute#license for licenses.
**Returns**

- (::String) --- Output only. \[Output Only\] Type of resource. Always compute#license for licenses.

### #license_code

    def license_code() -> ::Integer

**Returns**

- (::Integer) --- \[Output Only\] The unique code used to attach this license to images, snapshots, and disks.

### #license_code=

    def license_code=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- \[Output Only\] The unique code used to attach this license to images, snapshots, and disks.
**Returns**

- (::Integer) --- \[Output Only\] The unique code used to attach this license to images, snapshots, and disks.

### #minimum_retention

    def minimum_retention() -> ::Google::Cloud::Compute::V1::Duration

**Returns**

- ([::Google::Cloud::Compute::V1::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-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.

### #minimum_retention=

    def minimum_retention=(value) -> ::Google::Cloud::Compute::V1::Duration

**Parameter**

- **value** ([::Google::Cloud::Compute::V1::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-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.
**Returns**

- ([::Google::Cloud::Compute::V1::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-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

    def multi_tenant_only() -> ::Boolean

**Returns**

- (::Boolean) --- If true, this license can only be used on VMs on multi tenant nodes.

### #multi_tenant_only=

    def multi_tenant_only=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If true, this license can only be used on VMs on multi tenant nodes.
**Returns**

- (::Boolean) --- If true, this license can only be used on VMs on multi tenant nodes.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Name of the resource. The name must be 1-63 characters long and comply withRFC1035.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Name of the resource. The name must be 1-63 characters long and comply withRFC1035.
**Returns**

- (::String) --- Name of the resource. The name must be 1-63 characters long and comply withRFC1035.

### #os_license

    def os_license() -> ::Boolean

**Returns**

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

### #os_license=

    def os_license=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If true, indicates this is an OS license. Only one OS license can be attached to a disk or image at a time.
**Returns**

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

### #params

    def params() -> ::Google::Cloud::Compute::V1::LicenseParams

**Returns**

- ([::Google::Cloud::Compute::V1::LicenseParams](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-LicenseParams)) --- Input only. Additional params passed with the request, but not persisted as part of resource payload.

### #params=

    def params=(value) -> ::Google::Cloud::Compute::V1::LicenseParams

**Parameter**

- **value** ([::Google::Cloud::Compute::V1::LicenseParams](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-LicenseParams)) --- Input only. Additional params passed with the request, but not persisted as part of resource payload.
**Returns**

- ([::Google::Cloud::Compute::V1::LicenseParams](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-LicenseParams)) --- Input only. Additional params passed with the request, but not persisted as part of resource payload.

### #removable_from_disk

    def removable_from_disk() -> ::Boolean

**Returns**

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

### #removable_from_disk=

    def removable_from_disk=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If true, this license can be removed from a disk's set of licenses, with no replacement license needed.
**Returns**

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

### #required_coattached_licenses

    def required_coattached_licenses() -> ::Array<::String>

**Returns**

- (::Array\<::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.

### #required_coattached_licenses=

    def required_coattached_licenses=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::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.
**Returns**

- (::Array\<::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.

### #resource_requirements

    def resource_requirements() -> ::Google::Cloud::Compute::V1::LicenseResourceRequirements

**Returns**

- ([::Google::Cloud::Compute::V1::LicenseResourceRequirements](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-LicenseResourceRequirements)) --- \[Input Only\] Deprecated.

### #resource_requirements=

    def resource_requirements=(value) -> ::Google::Cloud::Compute::V1::LicenseResourceRequirements

**Parameter**

- **value** ([::Google::Cloud::Compute::V1::LicenseResourceRequirements](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-LicenseResourceRequirements)) --- \[Input Only\] Deprecated.
**Returns**

- ([::Google::Cloud::Compute::V1::LicenseResourceRequirements](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-LicenseResourceRequirements)) --- \[Input Only\] Deprecated.

### #self_link

    def self_link() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Server-defined URL for the resource.

### #self_link=

    def self_link=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Server-defined URL for the resource.
**Returns**

- (::String) --- Output only. \[Output Only\] Server-defined URL for the resource.

### #self_link_with_id

    def self_link_with_id() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Server-defined URL for this resource with the resource id.

### #self_link_with_id=

    def self_link_with_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Server-defined URL for this resource with the resource id.
**Returns**

- (::String) --- Output only. \[Output Only\] Server-defined URL for this resource with the resource id.

### #sole_tenant_only

    def sole_tenant_only() -> ::Boolean

**Returns**

- (::Boolean) --- If true, this license can only be used on VMs on sole tenant nodes.

### #sole_tenant_only=

    def sole_tenant_only=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- If true, this license can only be used on VMs on sole tenant nodes.
**Returns**

- (::Boolean) --- If true, this license can only be used on VMs on sole tenant nodes.

### #transferable

    def transferable() -> ::Boolean

**Returns**

- (::Boolean) --- 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.

### #transferable=

    def transferable=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- 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**

- (::Boolean) --- 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

    def update_timestamp() -> ::String

**Returns**

- (::String) --- Output only. \[Output Only\] Last update timestamp inRFC3339 text format.

### #update_timestamp=

    def update_timestamp=(value) -> ::String

**Parameter**

- **value** (::String) --- Output only. \[Output Only\] Last update timestamp inRFC3339 text format.
**Returns**

- (::String) --- Output only. \[Output Only\] Last update timestamp inRFC3339 text format.