app_version_resource_mappings
Creates, updates, deletes, gets or lists an app_version_resource_mappings resource.
Overview
| Name | app_version_resource_mappings |
| Type | Resource |
| Id | aws.resiliencehub.app_version_resource_mappings |
Fields
The following fields are returned by SELECT queries:
- list_app_version_resource_mappings
| Name | Datatype | Description |
|---|---|---|
next_token | string | Token for the next set of results, or null if there are no more results. (pattern: <code>^\S{1,2000}$</code>) |
resource_mappings | array | Mappings used to map logical resources from the template to physical resources. You can use the mapping type CFN_STACK if the application template uses a logical stack name. Or you can map individual resources by using the mapping type RESOURCE. We recommend using the mapping type CFN_STACK if the application is backed by a CloudFormation stack. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_app_version_resource_mappings | select | region | Lists how the resources in an application version are mapped/sourced from. Mappings can be physical resource identifiers, CloudFormation stacks, resource-groups, or an application registry app. | |
add_draft_app_version_resource_mappings | update | region, appArn, resourceMappings | Adds the source of resource-maps to the draft version of an application. During assessment, Resilience Hub will use these resource-maps to resolve the latest physical ID for each resource in the application template. For more information about different types of resources supported by Resilience Hub and how to add them in your application, see Step 2: How is your application managed? in the Resilience Hub User Guide. | |
remove_draft_app_version_resource_mappings | update | region, appArn | Removes resource mappings from a draft application version. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_app_version_resource_mappings
Lists how the resources in an application version are mapped/sourced from. Mappings can be physical resource identifiers, CloudFormation stacks, resource-groups, or an application registry app.
SELECT
next_token,
resource_mappings
FROM aws.resiliencehub.app_version_resource_mappings
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- add_draft_app_version_resource_mappings
- remove_draft_app_version_resource_mappings
Adds the source of resource-maps to the draft version of an application. During assessment, Resilience Hub will use these resource-maps to resolve the latest physical ID for each resource in the application template. For more information about different types of resources supported by Resilience Hub and how to add them in your application, see Step 2: How is your application managed? in the Resilience Hub User Guide.
UPDATE aws.resiliencehub.app_version_resource_mappings
SET
appArn = '{{ appArn }}',
resourceMappings = '{{ resourceMappings }}'
WHERE
region = '{{ region }}' --required
AND appArn = '{{ appArn }}' --required
AND resourceMappings = '{{ resourceMappings }}' --required
RETURNING
app_arn,
app_version,
resource_mappings;
Removes resource mappings from a draft application version.
UPDATE aws.resiliencehub.app_version_resource_mappings
SET
appArn = '{{ appArn }}',
appRegistryAppNames = '{{ appRegistryAppNames }}',
eksSourceNames = '{{ eksSourceNames }}',
logicalStackNames = '{{ logicalStackNames }}',
resourceGroupNames = '{{ resourceGroupNames }}',
resourceNames = '{{ resourceNames }}',
terraformSourceNames = '{{ terraformSourceNames }}'
WHERE
region = '{{ region }}' --required
AND appArn = '{{ appArn }}' --required
RETURNING
app_arn,
app_version;