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 = '{{ region }}' 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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.resiliencehub.apps
WHERE
Identifier = '{{ app_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

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