module_versions
Creates, updates, deletes or gets a module_version resource or lists module_versions in a region
Overview
| Name | module_versions |
| Type | Resource |
| Description | A module that has been registered in the CloudFormation registry. |
| Id | awscc.cloudformation.module_versions |
Fields
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the module. |
description | string | The description of the registered module. |
documentation_url | string | The URL of a page providing detailed documentation for this module. |
module_name | string | The name of the module being registered.Recommended module naming pattern: company_or_organization::service::type::MODULE. |
module_package | string | The url to the S3 bucket containing the schema and template fragment for the module you want to register. |
is_default_version | boolean | Indicator of whether this module version is the current default version |
schema | string | The schema defining input parameters to and resources generated by the module. |
time_created | string | The time that the specified module version was registered. |
version_id | string | The version ID of the module represented by this module instance. |
visibility | string | The scope at which the type is visible and usable in CloudFormation operations.The only allowed value at present is:PRIVATE: The type is only visible and usable within the account in which it is registered. Currently, AWS CloudFormation marks any types you register as PRIVATE. |
region | string | AWS region. |
For more information, see AWS::CloudFormation::ModuleVersion.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | ModuleName, ModulePackage, region |
delete_resource | DELETE | Identifier, region |
get_resource | SELECT | Identifier, region |
SELECT examples
Gets all properties from an individual module_version.
SELECT
region,
arn,
description,
documentation_url,
module_name,
module_package,
is_default_version,
schema,
time_created,
version_id,
visibility
FROM awscc.cloudformation.module_versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
INSERT example
Use the following StackQL query and manifest file to create a new module_version resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cloudformation.module_versions (
ModuleName,
ModulePackage,
region
)
SELECT
'{{ module_name }}',
'{{ module_package }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.cloudformation.module_versions (
ModuleName,
ModulePackage,
region
)
SELECT
'{{ module_name }}',
'{{ module_package }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: module_version
props:
- name: module_name
value: '{{ module_name }}'
- name: module_package
value: '{{ module_package }}'
DELETE example
/*+ delete */
DELETE FROM awscc.cloudformation.module_versions
WHERE
Identifier = '{{ 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:
| Parameter | Description |
|---|---|
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 module_versions resource, the following permissions are required:
- Create
- Read
- Delete
cloudformation:DescribeType,
cloudformation:DescribeTypeRegistration,
cloudformation:ListTypeVersions,
cloudformation:RegisterType,
s3:GetObject,
s3:ListBucket
cloudformation:DescribeType
cloudformation:DeregisterType,
cloudformation:DescribeType