---
title: "POST /projects/{project}/global/licenses"
method: POST
path: "/projects/{project}/global/licenses"
tags: ["licenses"]
---

# POST /projects/{project}/global/licenses

`POST /projects/{project}/global/licenses`

Create a License resource in the specified project.
 *Caution* This resource is intended
for use only by third-party partners who are creatingCloud Marketplace
images.

## Path parameters

- `project` string, required

## Query parameters

- `requestId` string

## Request body

- License — Represents a License resource. 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.
  - `multiTenantOnly` boolean — If true, this license can only be used on VMs on multi tenant nodes.
  - `description` string — An optional textual description of the resource; provided by the client when the resource is created.
  - `resourceRequirements` LicenseResourceRequirements
    - `minGuestCpuCount` integer — [Input Only] Deprecated. This field no longer reflects the minimum number of guest cpus required to use the Instance.
    - `minMemoryMb` integer — [Input Only] Deprecated. This field no longer reflects the minimum memory required to use the Instance.
  - `licenseCode` string, uint64 — [Output Only] The unique code used to attach this license to images, snapshots, and disks.
  - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
  - `removableFromDisk` boolean — If true, this license can be removed from a disk's set of licenses, with no replacement license needed.
  - `kind` string — Output only. [Output Only] Type of resource. Always compute#license for licenses.
  - `name` string — Name of the resource. The name must be 1-63 characters long and comply withRFC1035.
  - `updateTimestamp` string — Output only. [Output Only] Last update timestamp inRFC3339 text format.
  - `chargesUseFee` boolean — [Output Only] Deprecated. This field no longer reflects whether a license charges a usage fee.
  - `transferable` 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.
  - `allowedReplacementLicenses` string[] — Specifies licenseCodes of licenses that can replace this license. Note: such replacements are allowed even if removable_from_disk is false.
  - `soleTenantOnly` boolean — If true, this license can only be used on VMs on sole tenant nodes.
  - `appendableToDisk` boolean — If true, this license can be appended to an existing disk's set of licenses.
  - `params` LicenseParams — Additional license params.
    - `resourceManagerTags` object — Input only. Resource manager tags to be bound to the license. Tag keys and values have the same definition as resource manager tags. Keys and values can be either in numeric format, such as `tagKeys/{tag_key_id}` and `tagValues/{tag_value_id}` or in namespaced format such as `{org_id|project_id}/{tag_key_short_name}` and `{tag_value_short_name}`. The field is ignored (both PUT & PATCH) when empty.
  - `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.
  - `id` string, uint64 — [Output Only] The unique identifier for the resource. This identifier is defined by the server.
  - `minimumRetention` Duration — A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". Range is approximately 10,000 years.
    - `nanos` integer — Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
    - `seconds` string, int64 — Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
  - `selfLinkWithId` string — Output only. [Output Only] Server-defined URL for this resource with the resource id.
  - `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.
  - `selfLink` string — Output only. [Output Only] Server-defined URL for the resource.
  - `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.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/versions/6120ed8969d4/schema)
