Skip to main content

licenses

Creates, updates, deletes or gets a license resource or lists licenses in a region

Overview

Namelicenses
TypeResource
DescriptionResource Type definition for AWS::LicenseManager::License
Idawscc.licensemanager.licenses

Fields

NameDatatypeDescription
product_skustringProductSKU of the license.
issuerobject
license_namestringName for the created license.
product_namestringProduct name for the created license.
home_regionstringHome region for the created license.
validityobject
entitlementsarray
beneficiarystringBeneficiary of the license.
consumption_configurationobject
license_metadataarray
license_arnstringAmazon Resource Name is a unique name for each resource.
statusstring
versionstringThe version of the license.
regionstringAWS region.

For more information, see AWS::LicenseManager::License.

Methods

NameResourceAccessible byRequired Params
create_resourcelicensesINSERTLicenseName, ProductName, Issuer, HomeRegion, Validity, ConsumptionConfiguration, Entitlements, region
delete_resourcelicensesDELETEIdentifier, region
update_resourcelicensesUPDATEIdentifier, PatchDocument, region
list_resourceslicenses_list_onlySELECTregion
get_resourcelicensesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual license.

SELECT
region,
product_sku,
issuer,
license_name,
product_name,
home_region,
validity,
entitlements,
beneficiary,
consumption_configuration,
license_metadata,
license_arn,
status,
version
FROM awscc.licensemanager.licenses
WHERE
region = '{{ region }}' AND
Identifier = '{{ license_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new license resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.licensemanager.licenses (
Issuer,
LicenseName,
ProductName,
HomeRegion,
Validity,
Entitlements,
ConsumptionConfiguration,
region
)
SELECT
'{{ issuer }}',
'{{ license_name }}',
'{{ product_name }}',
'{{ home_region }}',
'{{ validity }}',
'{{ entitlements }}',
'{{ consumption_configuration }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a license resource, using stack-deploy.

/*+ update */
UPDATE awscc.licensemanager.licenses
SET PatchDocument = string('{{ {
"ProductSKU": product_sku,
"Issuer": issuer,
"LicenseName": license_name,
"ProductName": product_name,
"HomeRegion": home_region,
"Validity": validity,
"Entitlements": entitlements,
"Beneficiary": beneficiary,
"ConsumptionConfiguration": consumption_configuration,
"LicenseMetadata": license_metadata,
"Status": status
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ license_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.licensemanager.licenses
WHERE
Identifier = '{{ license_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the licenses resource, the following permissions are required:

license-manager:CreateLicense