app_version_resources
Creates, updates, deletes, gets or lists an app_version_resources resource.
Overview
| Name | app_version_resources |
| Type | Resource |
| Id | aws.resiliencehub.app_version_resources |
Fields
The following fields are returned by SELECT queries:
- describe_app_version_resource
| Name | Datatype | Description |
|---|---|---|
app_arn | string | Amazon 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_version | string | Resilience Hub application version. (pattern: <code>^\S{1,50}$</code>) |
physical_resource | object | Defines 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_app_version_resource | select | region | 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) | |
create_app_version_resource | insert | region, appArn, appComponents, logicalResourceId, physicalResourceId, resourceType | 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. | |
update_app_version_resource | update | region, appArn | 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. | |
delete_app_version_resource | delete | region | 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. | |
list_app_version_resources | exec | region, appArn, appVersion | Lists all the resources in an Resilience Hub application. | |
resolve_app_version_resources | exec | region, appArn, appVersion | Resolves 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_app_version_resource
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
- create_app_version_resource
- Manifest
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
;
# Description fields are for documentation purposes
- name: app_version_resources
props:
- name: region
value: "{{ region }}"
description: Required parameter for the app_version_resources resource.
- name: additionalInfo
value: "{{ additionalInfo }}"
- name: appArn
value: "{{ appArn }}"
- name: appComponents
value:
- "{{ appComponents }}"
- name: awsAccountId
value: "{{ awsAccountId }}"
- name: awsRegion
value: "{{ awsRegion }}"
- name: clientToken
value: "{{ clientToken }}"
- name: logicalResourceId
description: |
Defines a logical resource identifier.
value:
eksSourceName: "{{ eksSourceName }}"
identifier: "{{ identifier }}"
logicalStackName: "{{ logicalStackName }}"
resourceGroupName: "{{ resourceGroupName }}"
terraformSourceName: "{{ terraformSourceName }}"
- name: physicalResourceId
value: "{{ physicalResourceId }}"
- name: resourceName
value: "{{ resourceName }}"
- name: resourceType
value: "{{ resourceType }}"
UPDATE examples
- update_app_version_resource
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
- delete_app_version_resource
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
- list_app_version_resources
- resolve_app_version_resources
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 }}"
}'
;
Resolves the resources for an application version.
EXEC aws.resiliencehub.app_version_resources.resolve_app_version_resources
@region='{{ region }}' --required
@@json=
'{
"appArn": "{{ appArn }}",
"appVersion": "{{ appVersion }}"
}'
;