Skip to main content

apps

Creates, updates, deletes or gets an app resource or lists apps in a region

Overview

Nameapps
TypeResource
DescriptionResource Type Definition for AWS::ResilienceHub::App.
Idaws.resiliencehub.apps

Fields

NameDatatypeDescription
namestringName of the app.
descriptionstringApp description.
app_arnstringAmazon Resource Name (ARN) of the App.
resiliency_policy_arnstringAmazon Resource Name (ARN) of the Resiliency Policy.
tagsobject
app_template_bodystringA string containing full ResilienceHub app template body.
resource_mappingsarrayAn array of ResourceMapping objects.
app_assessment_schedulestringAssessment execution schedule.
permission_modelobjectDefines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.
event_subscriptionsarrayThe list of events you would like to subscribe and get notification for.
drift_statusstringIndicates if compliance drifts (deviations) were detected while running an assessment for your application.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, AppTemplateBody, ResourceMappings, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all apps in a region.

SELECT
region,
name,
description,
app_arn,
resiliency_policy_arn,
tags,
app_template_body,
resource_mappings,
app_assessment_schedule,
permission_model,
event_subscriptions,
drift_status
FROM aws.resiliencehub.apps
WHERE region = 'us-east-1';

Gets all properties from an individual app.

SELECT
region,
name,
description,
app_arn,
resiliency_policy_arn,
tags,
app_template_body,
resource_mappings,
app_assessment_schedule,
permission_model,
event_subscriptions,
drift_status
FROM aws.resiliencehub.apps
WHERE region = 'us-east-1' AND data__Identifier = '<AppArn>';

INSERT example

Use the following StackQL query and manifest file to create a new app resource, using stack-deploy.

/*+ create */
INSERT INTO aws.resiliencehub.apps (
Name,
AppTemplateBody,
ResourceMappings,
region
)
SELECT
'{{ Name }}',
'{{ AppTemplateBody }}',
'{{ ResourceMappings }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.resiliencehub.apps
WHERE data__Identifier = '<AppArn>'
AND region = 'us-east-1';

Permissions

To operate on the apps resource, the following permissions are required:

Create

cloudformation:DescribeStacks,
cloudformation:ListStackResources,
s3:GetBucketLocation,
s3:GetObject,
s3:ListAllMyBuckets,
autoscaling:DescribeAutoScalingGroups,
apigateway:GET,
ec2:Describe*,
ecs:DescribeServices,
eks:DescribeCluster,
elasticfilesystem:DescribeFileSystems,
elasticloadbalancing:DescribeLoadBalancers,
lambda:GetFunction*,
rds:Describe*,
dynamodb:Describe*,
sqs:GetQueueAttributes,
sns:GetTopicAttributes,
route53:List*,
iam:PassRole,
resiliencehub:*

Read

resiliencehub:DescribeApp,
resiliencehub:DescribeAppVersionTemplate,
resiliencehub:ListAppVersionResourceMappings,
resiliencehub:ListTagsForResource

Update

cloudformation:DescribeStacks,
cloudformation:ListStackResources,
s3:GetBucketLocation,
s3:GetObject,
s3:ListAllMyBuckets,
autoscaling:DescribeAutoScalingGroups,
apigateway:GET,
ec2:Describe*,
ecs:DescribeServices,
eks:DescribeCluster,
elasticfilesystem:DescribeFileSystems,
elasticloadbalancing:DescribeLoadBalancers,
lambda:GetFunction*,
rds:Describe*,
dynamodb:Describe*,
sqs:GetQueueAttributes,
sns:GetTopicAttributes,
route53:List*,
iam:PassRole,
resiliencehub:*

Delete

resiliencehub:DeleteApp,
resiliencehub:UntagResource,
resiliencehub:ListApps

List

resiliencehub:ListApps