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.
Idawscc.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.

For more information, see AWS::ResilienceHub::App.

Methods

NameResourceAccessible byRequired Params
create_resourceappsINSERTName, AppTemplateBody, ResourceMappings, region
delete_resourceappsDELETEIdentifier, region
update_resourceappsUPDATEIdentifier, PatchDocument, region
list_resourcesapps_list_onlySELECTregion
get_resourceappsSELECTIdentifier, region

SELECT examples

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 awscc.resiliencehub.apps
WHERE
region = 'us-east-1' AND
Identifier = '{{ app_arn }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.resiliencehub.apps
SET PatchDocument = string('{{ {
"Description": description,
"ResiliencyPolicyArn": resiliency_policy_arn,
"Tags": tags,
"AppTemplateBody": app_template_body,
"ResourceMappings": resource_mappings,
"AppAssessmentSchedule": app_assessment_schedule,
"PermissionModel": permission_model,
"EventSubscriptions": event_subscriptions
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ app_arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.resiliencehub.apps
WHERE
Identifier = '{{ app_arn }}' AND
region = 'us-east-1';

Permissions

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

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:CreateApp,
resiliencehub:DescribeApp,
resiliencehub:DescribeAppVersionTemplate,
resiliencehub:PutDraftAppVersionTemplate,
resiliencehub:AddDraftAppVersionResourceMappings,
resiliencehub:ListAppVersionResourceMappings,
resiliencehub:ListAppVersions,
resiliencehub:PublishAppVersion,
resiliencehub:ListTagsForResource,
resiliencehub:TagResource,
resiliencehub:UntagResource