Class CfnApp
- All Implemented Interfaces:
- IConstruct,- IDependable,- IInspectable,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct
AWS::ResilienceHub::App.
 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, AWS 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 .
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).
Example:
 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.resiliencehub.*;
 CfnApp cfnApp = CfnApp.Builder.create(this, "MyCfnApp")
         .appTemplateBody("appTemplateBody")
         .name("name")
         .resourceMappings(List.of(ResourceMappingProperty.builder()
                 .mappingType("mappingType")
                 .physicalResourceId(PhysicalResourceIdProperty.builder()
                         .identifier("identifier")
                         .type("type")
                         // the properties below are optional
                         .awsAccountId("awsAccountId")
                         .awsRegion("awsRegion")
                         .build())
                 // the properties below are optional
                 .eksSourceName("eksSourceName")
                 .logicalStackName("logicalStackName")
                 .resourceName("resourceName")
                 .terraformSourceName("terraformSourceName")
                 .build()))
         // the properties below are optional
         .appAssessmentSchedule("appAssessmentSchedule")
         .description("description")
         .resiliencyPolicyArn("resiliencyPolicyArn")
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 - 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnApp.static interfaceDefines a physical resource identifier.static interfaceDefines a resource mapping.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstructIConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAssessment execution schedule with 'Daily' or 'Disabled' values.A JSON string that provides information about your application structure.The Amazon Resource Name (ARN) of the app.The optional description for an app.getName()The name for the application.The Amazon Resource Name (ARN) of the resiliency policy.An array of ResourceMapping objects.getTags()The tags assigned to the resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAppAssessmentSchedule(String value) Assessment execution schedule with 'Daily' or 'Disabled' values.voidsetAppTemplateBody(String value) A JSON string that provides information about your application structure.voidsetDescription(String value) The optional description for an app.voidThe name for the application.voidsetResiliencyPolicyArn(String value) The Amazon Resource Name (ARN) of the resiliency policy.voidsetResourceMappings(List<Object> value) An array of ResourceMapping objects.voidsetResourceMappings(IResolvable value) An array of ResourceMapping objects.Methods inherited from class software.amazon.awscdk.core.CfnResourceaddDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.core.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.ConstructgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnAppprotected CfnApp(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnAppprotected CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnApp@Stability(Stable) public CfnApp(@NotNull Construct scope, @NotNull String id, @NotNull CfnAppProps props) Create a newAWS::ResilienceHub::App.- Parameters:
- scope-- scope in which this resource is defined.
 
- id-- scoped id of the resource.
 
- props-- resource properties.
 
 
 
- 
- 
Method Details- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin interface- IInspectable
- Parameters:
- inspector-- tree inspector to collect and process attributes.
 
 
- 
renderProperties@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrAppArnThe Amazon Resource Name (ARN) of the app.
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getTagsThe 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. 
- 
getAppTemplateBodyA JSON string that provides information about your application structure.To learn more about the appTemplateBodytemplate, see the sample template provided in the Examples section.The appTemplateBodyJSON 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 resourcesarray item includes the following fields:- logicalResourceId
 The logical identifier of the resource. Type: Object Each logicalResourceIdobject includes the following fields:- identifier
 The identifier of the resource. Type: String - logicalStackName
 The name of the AWS CloudFormation stack this resource belongs to. Type: String - resourceGroupName
 The name of the resource group this resource belongs to. Type: String - terraformSourceName
 The name of the Terraform S3 state file this resource belongs to. Type: String - eksSourceName
 The 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
 The name of the resource. Type: String - additionalInfo
 Additional configuration parameters for an AWS Resilience Hub application. If you want to implement additionalInfothrough the AWS Resilience Hub console rather than using an API call, see Configure the application configuration parameters .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 appComponentsarray item includes the following fields:- name
 The 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 . 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 additionalInfothrough the AWS Resilience Hub console rather than using an API call, see Configure the application configuration parameters .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 excludedResourcesarray 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 logicalResourceIdsobject includes the following fields:- identifier
 The identifier of the resource. Type: String - logicalStackName
 The name of the AWS CloudFormation stack this resource belongs to. Type: String - resourceGroupName
 The name of the resource group this resource belongs to. Type: String - terraformSourceName
 The name of the Terraform S3 state file this resource belongs to. Type: String - eksSourceName
 The 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 additionalInfothrough the AWS Resilience Hub console rather than using an API call, see Configure the application configuration parameters .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>"}]}]"
- 
setAppTemplateBodyA JSON string that provides information about your application structure.To learn more about the appTemplateBodytemplate, see the sample template provided in the Examples section.The appTemplateBodyJSON 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 resourcesarray item includes the following fields:- logicalResourceId
 The logical identifier of the resource. Type: Object Each logicalResourceIdobject includes the following fields:- identifier
 The identifier of the resource. Type: String - logicalStackName
 The name of the AWS CloudFormation stack this resource belongs to. Type: String - resourceGroupName
 The name of the resource group this resource belongs to. Type: String - terraformSourceName
 The name of the Terraform S3 state file this resource belongs to. Type: String - eksSourceName
 The 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
 The name of the resource. Type: String - additionalInfo
 Additional configuration parameters for an AWS Resilience Hub application. If you want to implement additionalInfothrough the AWS Resilience Hub console rather than using an API call, see Configure the application configuration parameters .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 appComponentsarray item includes the following fields:- name
 The 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 . 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 additionalInfothrough the AWS Resilience Hub console rather than using an API call, see Configure the application configuration parameters .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 excludedResourcesarray 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 logicalResourceIdsobject includes the following fields:- identifier
 The identifier of the resource. Type: String - logicalStackName
 The name of the AWS CloudFormation stack this resource belongs to. Type: String - resourceGroupName
 The name of the resource group this resource belongs to. Type: String - terraformSourceName
 The name of the Terraform S3 state file this resource belongs to. Type: String - eksSourceName
 The 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 additionalInfothrough the AWS Resilience Hub console rather than using an API call, see Configure the application configuration parameters .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>"}]}]"
- 
getNameThe name for the application.
- 
setNameThe name for the application.
- 
getResourceMappingsAn array of ResourceMapping objects.
- 
setResourceMappingsAn array of ResourceMapping objects.
- 
setResourceMappingsAn array of ResourceMapping objects.
- 
getAppAssessmentScheduleAssessment execution schedule with 'Daily' or 'Disabled' values.
- 
setAppAssessmentScheduleAssessment execution schedule with 'Daily' or 'Disabled' values.
- 
getDescriptionThe optional description for an app.
- 
setDescriptionThe optional description for an app.
- 
getResiliencyPolicyArnThe Amazon Resource Name (ARN) of the resiliency policy.
- 
setResiliencyPolicyArnThe Amazon Resource Name (ARN) of the resiliency policy.
 
-