AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ResilienceHub::App

CfnApp

Creates an AWS Resilience Hub application. An AWS Resilience Hub application is a collection of AWS resources structured to prevent and recover AWS application disruptions. To describe a AWS Resilience Hub application, you provide an application name, resources from one or more AWS CloudFormation stacks, Resource Groups , Terraform state files, AppRegistry applications, and an appropriate resiliency policy. In addition, you can also add resources that are located on Amazon Elastic Kubernetes Service (Amazon EKS) clusters as optional resources. For more information about the number of resources supported per application, see [Service quotas](https://docs.aws.amazon.com/general/latest/gr/resiliencehub.html#limits_resiliencehub) . After you create an AWS Resilience Hub application, you publish it so that you can run a resiliency assessment on it. You can then use recommendations from the assessment to improve resiliency by running another assessment, comparing results, and then iterating the process until you achieve your goals for recovery time objective (RTO) and recovery point objective (RPO).

Import

import { CfnApp } from 'aws-cdk-lib/aws-resiliencehub';

Or use the module namespace:

import * as resiliencehub from 'aws-cdk-lib/aws-resiliencehub';
// resiliencehub.CfnApp

Properties

Configuration passed to the constructor as CfnAppProps.

appTemplateBodyRequired
string

A JSON string that provides information about your application structure. To learn more about the `appTemplateBody` template, see the sample template in [Sample appTemplateBody template](https://docs.aws.amazon.com//resilience-hub/latest/APIReference/API_PutDraftAppVersionTemplate.html#API_PutDraftAppVersionTemplate_Examples) . The `appTemplateBody` JSON string has the following structure: - *`resources`* The list of logical resources that needs to be included in the AWS Resilience Hub application. Type: Array > Don't add the resources that you want to exclude. Each `resources` array item includes the following fields: - *`logicalResourceId`* The logical identifier of the resource. Type: Object Each `logicalResourceId` object includes the following fields: - `identifier` Identifier of the resource. Type: String - `logicalStackName` Name of the AWS CloudFormation stack this resource belongs to. Type: String - `resourceGroupName` Name of the resource group this resource belongs to. Type: String - `terraformSourceName` Name of the Terraform S3 state file this resource belongs to. Type: String - `eksSourceName` Name of the Amazon Elastic Kubernetes Service cluster and namespace this resource belongs to. > This parameter accepts values in "eks-cluster/namespace" format. Type: String - *`type`* The type of resource. Type: string - *`name`* Name of the resource. Type: String - `additionalInfo` Additional configuration parameters for an AWS Resilience Hub application. If you want to implement `additionalInfo` through the AWS Resilience Hub console rather than using an API call, see [Configure the application configuration parameters](https://docs.aws.amazon.com//resilience-hub/latest/userguide/app-config-param.html) . > Currently, this parameter accepts a key-value mapping (in a string format) of only one failover region and one associated account. > > Key: `"failover-regions"` > > Value: `"[{"region":"<REGION>", "accounts":[{"id":"<ACCOUNT_ID>"}]}]"` - *`appComponents`* The list of Application Components (AppComponent) that this resource belongs to. If an AppComponent is not part of the AWS Resilience Hub application, it will be added. Type: Array Each `appComponents` array item includes the following fields: - `name` Name of the AppComponent. Type: String - `type` The type of AppComponent. For more information about the types of AppComponent, see [Grouping resources in an AppComponent](https://docs.aws.amazon.com/resilience-hub/latest/userguide/AppComponent.grouping.html) . Type: String - `resourceNames` The list of included resources that are assigned to the AppComponent. Type: Array of strings - `additionalInfo` Additional configuration parameters for an AWS Resilience Hub application. If you want to implement `additionalInfo` through the AWS Resilience Hub console rather than using an API call, see [Configure the application configuration parameters](https://docs.aws.amazon.com//resilience-hub/latest/userguide/app-config-param.html) . > Currently, this parameter accepts a key-value mapping (in a string format) of only one failover region and one associated account. > > Key: `"failover-regions"` > > Value: `"[{"region":"<REGION>", "accounts":[{"id":"<ACCOUNT_ID>"}]}]"` - *`excludedResources`* The list of logical resource identifiers to be excluded from the application. Type: Array > Don't add the resources that you want to include. Each `excludedResources` array item includes the following fields: - *`logicalResourceIds`* The logical identifier of the resource. Type: Object > You can configure only one of the following fields: > > - `logicalStackName` > - `resourceGroupName` > - `terraformSourceName` > - `eksSourceName` Each `logicalResourceIds` object includes the following fields: - `identifier` The identifier of the resource. Type: String - `logicalStackName` Name of the AWS CloudFormation stack this resource belongs to. Type: String - `resourceGroupName` Name of the resource group this resource belongs to. Type: String - `terraformSourceName` Name of the Terraform S3 state file this resource belongs to. Type: String - `eksSourceName` Name of the Amazon Elastic Kubernetes Service cluster and namespace this resource belongs to. > This parameter accepts values in "eks-cluster/namespace" format. Type: String - *`version`* The AWS Resilience Hub application version. - `additionalInfo` Additional configuration parameters for an AWS Resilience Hub application. If you want to implement `additionalInfo` through the AWS Resilience Hub console rather than using an API call, see [Configure the application configuration parameters](https://docs.aws.amazon.com//resilience-hub/latest/userguide/app-config-param.html) . > Currently, this parameter accepts a key-value mapping (in a string format) of only one failover region and one associated account. > > Key: `"failover-regions"` > > Value: `"[{"region":"<REGION>", "accounts":[{"id":"<ACCOUNT_ID>"}]}]"`

nameRequired
string

Name for the application.

resourceMappingsRequired
IResolvable | IResolvable | ResourceMappingProperty[]

An array of `ResourceMapping` objects.

appAssessmentScheduleOptional
string

Assessment execution schedule with 'Daily' or 'Disabled' values.

descriptionOptional
string

Optional description for an application.

eventSubscriptionsOptional
IResolvable | IResolvable | EventSubscriptionProperty[]

The list of events you would like to subscribe and get notification for. Currently, AWS Resilience Hub supports notifications only for *Drift detected* and *Scheduled assessment failure* events.

permissionModelOptional
IResolvable | PermissionModelProperty

Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.

resiliencyPolicyArnOptional
string

The Amazon Resource Name (ARN) of the resiliency policy.

tagsOptional
{ [key: string]: string }

Tags assigned to the resource. A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-resiliencehub
CFN TypeAWS::ResilienceHub::App
Properties9

Related Constructs

External Links