apps
Creates, updates, deletes or gets an app
resource or lists apps
in a region
Overview
Name | apps |
Type | Resource |
Description | Resource Type Definition for AWS::ResilienceHub::App. |
Id | aws.resiliencehub.apps |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Name of the app. |
description | string | App description. |
app_arn | string | Amazon Resource Name (ARN) of the App. |
resiliency_policy_arn | string | Amazon Resource Name (ARN) of the Resiliency Policy. |
tags | object | |
app_template_body | string | A string containing full ResilienceHub app template body. |
resource_mappings | array | An array of ResourceMapping objects. |
app_assessment_schedule | string | Assessment execution schedule. |
permission_model | object | Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment. |
event_subscriptions | array | The list of events you would like to subscribe and get notification for. |
drift_status | string | Indicates if compliance drifts (deviations) were detected while running an assessment for your application. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, AppTemplateBody, ResourceMappings, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.resiliencehub.apps (
Name,
AppTemplateBody,
ResourceMappings,
region
)
SELECT
'{{ Name }}',
'{{ AppTemplateBody }}',
'{{ ResourceMappings }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.resiliencehub.apps (
Name,
Description,
ResiliencyPolicyArn,
Tags,
AppTemplateBody,
ResourceMappings,
AppAssessmentSchedule,
PermissionModel,
EventSubscriptions,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ResiliencyPolicyArn }}',
'{{ Tags }}',
'{{ AppTemplateBody }}',
'{{ ResourceMappings }}',
'{{ AppAssessmentSchedule }}',
'{{ PermissionModel }}',
'{{ EventSubscriptions }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: app
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: ResiliencyPolicyArn
value: '{{ ResiliencyPolicyArn }}'
- name: Tags
value: {}
- name: AppTemplateBody
value: '{{ AppTemplateBody }}'
- name: ResourceMappings
value:
- LogicalStackName: '{{ LogicalStackName }}'
MappingType: '{{ MappingType }}'
ResourceName: '{{ ResourceName }}'
TerraformSourceName: '{{ TerraformSourceName }}'
EksSourceName: '{{ EksSourceName }}'
PhysicalResourceId:
AwsAccountId: '{{ AwsAccountId }}'
AwsRegion: '{{ AwsRegion }}'
Identifier: '{{ Identifier }}'
Type: '{{ Type }}'
- name: AppAssessmentSchedule
value: '{{ AppAssessmentSchedule }}'
- name: PermissionModel
value:
Type: '{{ Type }}'
InvokerRoleName: '{{ InvokerRoleName }}'
CrossAccountRoleArns:
- '{{ CrossAccountRoleArns[0] }}'
- name: EventSubscriptions
value:
- Name: '{{ Name }}'
EventType: '{{ EventType }}'
SnsTopicArn: '{{ SnsTopicArn }}'
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