resource_versions
Creates, updates, deletes or gets a resource_version resource or lists resource_versions in a region
Overview
| Name | resource_versions |
| Type | Resource |
| Description | A resource that has been registered in the CloudFormation Registry. |
| Id | awscc.cloudformation.resource_versions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the type, here the ResourceVersion. This is used to uniquely identify a ResourceVersion resource |
type_arn | string | The Amazon Resource Name (ARN) of the type without the versionID. |
execution_role_arn | string | The Amazon Resource Name (ARN) of the IAM execution role to use to register the type. If your resource type calls AWS APIs in any of its handlers, you must create an IAM execution role that includes the necessary permissions to call those AWS APIs, and provision that execution role in your account. CloudFormation then assumes that execution role to provide your resource type with the appropriate credentials. |
is_default_version | boolean | Indicates if this type version is the current default version |
logging_config | object | Specifies logging configuration information for a type. |
provisioning_type | string | The provisioning behavior of the type. AWS CloudFormation determines the provisioning type during registration, based on the types of handlers in the schema handler package submitted. |
schema_handler_package | string | A url to the S3 bucket containing the schema handler package that contains the schema, event handlers, and associated files for the type you want to register.<br />For information on generating a schema handler package for the type you want to register, see submit in the CloudFormation CLI User Guide. |
type_name | string | The name of the type being registered.<br />We recommend that type names adhere to the following pattern: company_or_organization::service::type. |
version_id | string | The ID of the version of the type represented by this resource instance. |
visibility | string | The scope at which the type is visible and usable in CloudFormation operations.<br />Valid values include:<br />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.<br />PUBLIC: The type is publically visible and usable within any Amazon account. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the type, here the ResourceVersion. This is used to uniquely identify a ResourceVersion resource |
region | string | AWS region. |
For more information, see AWS::CloudFormation::ResourceVersion.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | resource_versions | INSERT | SchemaHandlerPackage, TypeName, region |
delete_resource | resource_versions | DELETE | Identifier, region |
list_resources | resource_versions_list_only | SELECT | region |
get_resource | resource_versions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual resource_version.
SELECT
region,
arn,
type_arn,
execution_role_arn,
is_default_version,
logging_config,
provisioning_type,
schema_handler_package,
type_name,
version_id,
visibility
FROM awscc.cloudformation.resource_versions
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all resource_versions in a region.
SELECT
region,
arn
FROM awscc.cloudformation.resource_versions_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new resource_version resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cloudformation.resource_versions (
SchemaHandlerPackage,
TypeName,
region
)
SELECT
'{{ schema_handler_package }}',
'{{ type_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cloudformation.resource_versions (
ExecutionRoleArn,
LoggingConfig,
SchemaHandlerPackage,
TypeName,
region
)
SELECT
'{{ execution_role_arn }}',
'{{ logging_config }}',
'{{ schema_handler_package }}',
'{{ type_name }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: resource_version
props:
- name: execution_role_arn
value: '{{ execution_role_arn }}'
- name: logging_config
value:
log_group_name: '{{ log_group_name }}'
log_role_arn: '{{ log_role_arn }}'
- name: schema_handler_package
value: '{{ schema_handler_package }}'
- name: type_name
value: '{{ type_name }}'
DELETE example
/*+ delete */
DELETE FROM awscc.cloudformation.resource_versions
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the resource_versions resource, the following permissions are required:
- Create
- Read
- Delete
- List
cloudformation:DescribeTypeRegistration,
cloudformation:RegisterType,
iam:PassRole,
s3:GetObject,
s3:ListBucket,
kms:Decrypt,
cloudformation:ListTypeVersions,
cloudformation:DeregisterType,
cloudformation:DescribeType
cloudformation:DescribeType
cloudformation:DeregisterType,
cloudformation:DescribeType
cloudformation:ListTypes