Skip to main content

app_version_resource_mappings

Creates, updates, deletes, gets or lists an app_version_resource_mappings resource.

Overview

Nameapp_version_resource_mappings
TypeResource
Idaws.resiliencehub.app_version_resource_mappings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringToken for the next set of results, or null if there are no more results. (pattern: <code>^\S{1,2000}$</code>)
resource_mappingsarrayMappings 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_app_version_resource_mappingsselectregionLists 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_mappingsupdateregion, appArn, resourceMappingsAdds 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_mappingsupdateregion, appArnRemoves 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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;