licenses
Creates, updates, deletes or gets a license resource or lists licenses in a region
Overview
| Name | licenses |
| Type | Resource |
| Description | Resource Type definition for AWS::LicenseManager::License |
| Id | awscc.licensemanager.licenses |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
product_sku | string | ProductSKU of the license. |
issuer | object | |
license_name | string | Name for the created license. |
product_name | string | Product name for the created license. |
home_region | string | Home region for the created license. |
validity | object | |
entitlements | array | |
beneficiary | string | Beneficiary of the license. |
consumption_configuration | object | |
license_metadata | array | |
license_arn | string | Amazon Resource Name is a unique name for each resource. |
status | string | |
version | string | The version of the license. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
license_arn | string | Amazon Resource Name is a unique name for each resource. |
region | string | AWS region. |
For more information, see AWS::LicenseManager::License.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | licenses | INSERT | LicenseName, ProductName, Issuer, HomeRegion, Validity, ConsumptionConfiguration, Entitlements, region |
delete_resource | licenses | DELETE | Identifier, region |
update_resource | licenses | UPDATE | Identifier, PatchDocument, region |
list_resources | licenses_list_only | SELECT | region |
get_resource | licenses | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ license_arn }}';
Lists all licenses in a region.
SELECT
region,
license_arn
FROM awscc.licensemanager.licenses_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new license resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ create */
INSERT INTO awscc.licensemanager.licenses (
ProductSKU,
Issuer,
LicenseName,
ProductName,
HomeRegion,
Validity,
Entitlements,
Beneficiary,
ConsumptionConfiguration,
LicenseMetadata,
Status,
region
)
SELECT
'{{ product_sku }}',
'{{ issuer }}',
'{{ license_name }}',
'{{ product_name }}',
'{{ home_region }}',
'{{ validity }}',
'{{ entitlements }}',
'{{ beneficiary }}',
'{{ consumption_configuration }}',
'{{ license_metadata }}',
'{{ status }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: license
props:
- name: product_sku
value: '{{ product_sku }}'
- name: issuer
value:
name: '{{ name }}'
sign_key: '{{ sign_key }}'
- name: license_name
value: '{{ license_name }}'
- name: product_name
value: '{{ product_name }}'
- name: home_region
value: '{{ home_region }}'
- name: validity
value:
begin: '{{ begin }}'
end: '{{ end }}'
- name: entitlements
value:
- name: '{{ name }}'
value: '{{ value }}'
max_count: '{{ max_count }}'
overage: '{{ overage }}'
unit: '{{ unit }}'
allow_check_in: '{{ allow_check_in }}'
- name: beneficiary
value: '{{ beneficiary }}'
- name: consumption_configuration
value:
renew_type: '{{ renew_type }}'
provisional_configuration:
max_time_to_live_in_minutes: '{{ max_time_to_live_in_minutes }}'
borrow_configuration:
max_time_to_live_in_minutes: '{{ max_time_to_live_in_minutes }}'
allow_early_check_in: '{{ allow_early_check_in }}'
- name: license_metadata
value:
- name: '{{ name }}'
value: '{{ value }}'
- name: status
value: '{{ status }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.licensemanager.licenses
WHERE
Identifier = '{{ license_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the licenses resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
license-manager:CreateLicense
license-manager:GetLicense
license-manager:CreateLicenseVersion
license-manager:DeleteLicense
license-manager:ListLicenses