Skip to main content

app_version_resources

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

Overview

Nameapp_version_resources
TypeResource
Idaws.resiliencehub.app_version_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
app_arnstringAmazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide. (pattern: <code>^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+.-]{0,1023}$</code>)
app_versionstringResilience Hub application version. (pattern: <code>^\S{1,50}$</code>)
physical_resourceobjectDefines a physical resource. A physical resource is a resource that exists in your account. It can be identified using an Amazon Resource Name (ARN) or a Resilience Hub-native identifier.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_app_version_resourceselectregionDescribes a resource of the Resilience Hub application. This API accepts only one of the following parameters to describe the resource: resourceName logicalResourceId physicalResourceId (Along with physicalResourceId, you can also provide awsAccountId, and awsRegion)
create_app_version_resourceinsertregion, appArn, appComponents, logicalResourceId, physicalResourceId, resourceTypeAdds a resource to the Resilience Hub application and assigns it to the specified Application Components. If you specify a new Application Component, Resilience Hub will automatically create the Application Component. This action has no effect outside Resilience Hub. This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API. To update application version with new physicalResourceID, you must call ResolveAppVersionResources API.
update_app_version_resourceupdateregion, appArnUpdates the resource details in the Resilience Hub application. This action has no effect outside Resilience Hub. This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API. To update application version with new physicalResourceID, you must call ResolveAppVersionResources API.
delete_app_version_resourcedeleteregionDeletes a resource from the Resilience Hub application. You can only delete a manually added resource. To exclude non-manually added resources, use the UpdateAppVersionResource API. This action has no effect outside Resilience Hub. This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API.
list_app_version_resourcesexecregion, appArn, appVersionLists all the resources in an Resilience Hub application.
resolve_app_version_resourcesexecregion, appArn, appVersionResolves the resources for an 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

Describes a resource of the Resilience Hub application. This API accepts only one of the following parameters to describe the resource: resourceName logicalResourceId physicalResourceId (Along with physicalResourceId, you can also provide awsAccountId, and awsRegion)

SELECT
app_arn,
app_version,
physical_resource
FROM aws.resiliencehub.app_version_resources
WHERE region = '{{ region }}' -- required
;

INSERT examples

Adds a resource to the Resilience Hub application and assigns it to the specified Application Components. If you specify a new Application Component, Resilience Hub will automatically create the Application Component. This action has no effect outside Resilience Hub. This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API. To update application version with new physicalResourceID, you must call ResolveAppVersionResources API.

INSERT INTO aws.resiliencehub.app_version_resources (
additionalInfo,
appArn,
appComponents,
awsAccountId,
awsRegion,
clientToken,
logicalResourceId,
physicalResourceId,
resourceName,
resourceType,
region
)
SELECT
'{{ additionalInfo }}',
'{{ appArn }}' /* required */,
'{{ appComponents }}' /* required */,
'{{ awsAccountId }}',
'{{ awsRegion }}',
'{{ clientToken }}',
'{{ logicalResourceId }}' /* required */,
'{{ physicalResourceId }}' /* required */,
'{{ resourceName }}',
'{{ resourceType }}' /* required */,
'{{ region }}'
RETURNING
app_arn,
app_version,
physical_resource
;

UPDATE examples

Updates the resource details in the Resilience Hub application. This action has no effect outside Resilience Hub. This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API. To update application version with new physicalResourceID, you must call ResolveAppVersionResources API.

UPDATE aws.resiliencehub.app_version_resources
SET
additionalInfo = '{{ additionalInfo }}',
appArn = '{{ appArn }}',
appComponents = '{{ appComponents }}',
awsAccountId = '{{ awsAccountId }}',
awsRegion = '{{ awsRegion }}',
excluded = {{ excluded }},
logicalResourceId = '{{ logicalResourceId }}',
physicalResourceId = '{{ physicalResourceId }}',
resourceName = '{{ resourceName }}',
resourceType = '{{ resourceType }}'
WHERE
region = '{{ region }}' --required
AND appArn = '{{ appArn }}' --required
RETURNING
app_arn,
app_version,
physical_resource;

DELETE examples

Deletes a resource from the Resilience Hub application. You can only delete a manually added resource. To exclude non-manually added resources, use the UpdateAppVersionResource API. This action has no effect outside Resilience Hub. This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API.

DELETE FROM aws.resiliencehub.app_version_resources
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Lists all the resources in an Resilience Hub application.

EXEC aws.resiliencehub.app_version_resources.list_app_version_resources
@region='{{ region }}' --required
@@json=
'{
"appArn": "{{ appArn }}",
"appVersion": "{{ appVersion }}",
"maxResults": {{ maxResults }},
"nextToken": "{{ nextToken }}",
"resolutionId": "{{ resolutionId }}"
}'
;