Class CfnApp
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IAppRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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")
.eventSubscriptions(List.of(EventSubscriptionProperty.builder()
.eventType("eventType")
.name("name")
// the properties below are optional
.snsTopicArn("snsTopicArn")
.build()))
.permissionModel(PermissionModelProperty.builder()
.type("type")
// the properties below are optional
.crossAccountRoleArns(List.of("crossAccountRoleArns"))
.invokerRoleName("invokerRoleName")
.build())
.resiliencyPolicyArn("resiliencyPolicyArn")
.tags(Map.of(
"tagsKey", "tags"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnApp.static interfaceIndicates an event you would like to subscribe and get notification for.static interfaceDefines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.static interfaceDefines a physical resource identifier.static interfaceDefines a resource mapping.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.resiliencehub.IAppRef
IAppRef.Jsii$Default, IAppRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnApp(software.amazon.jsii.JsiiObjectRef objRef) CfnApp(software.constructs.Construct scope, String id, CfnAppProps props) Create a newAWS::ResilienceHub::App. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAssessment execution schedule with 'Daily' or 'Disabled' values.A reference to a App resource.A JSON string that provides information about your application structure.The Amazon Resource Name (ARN) of the applcation.Indicates if compliance drifts (deviations) were detected while running an assessment for your application.Optional description for an application.The list of events you would like to subscribe and get notification for.getName()Name for the application.Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.The Amazon Resource Name (ARN) of the resiliency policy.An array ofResourceMappingobjects.getTags()Tag Manager which manages the tags for this resource.Tags assigned to the resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnApp.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) Optional description for an application.voidsetEventSubscriptions(List<Object> value) The list of events you would like to subscribe and get notification for.voidsetEventSubscriptions(IResolvable value) The list of events you would like to subscribe and get notification for.voidName for the application.voidsetPermissionModel(IResolvable value) Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.voidDefines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.voidsetResiliencyPolicyArn(String value) The Amazon Resource Name (ARN) of the resiliency policy.voidsetResourceMappings(List<Object> value) An array ofResourceMappingobjects.voidsetResourceMappings(IResolvable value) An array ofResourceMappingobjects.voidsetTagsRaw(Map<String, String> value) Tags assigned to the resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnApp
protected CfnApp(software.amazon.jsii.JsiiObjectRef objRef) -
CfnApp
protected CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnApp
@Stability(Stable) public CfnApp(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAppProps props) Create a newAWS::ResilienceHub::App.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForApp
- Parameters:
resource- This parameter is required.
-
isCfnApp
Checks whether the given object is a CfnApp.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAppRef
A reference to a App resource. -
getAttrAppArn
The Amazon Resource Name (ARN) of the applcation. -
getAttrDriftStatus
Indicates if compliance drifts (deviations) were detected while running an assessment for your application. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAppTemplateBody
A JSON string that provides information about your application structure. -
setAppTemplateBody
A JSON string that provides information about your application structure. -
getName
Name for the application. -
setName
Name for the application. -
getResourceMappings
An array ofResourceMappingobjects.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnApp.ResourceMappingProperty> -
setResourceMappings
An array ofResourceMappingobjects. -
setResourceMappings
An array ofResourceMappingobjects. -
getAppAssessmentSchedule
Assessment execution schedule with 'Daily' or 'Disabled' values. -
setAppAssessmentSchedule
Assessment execution schedule with 'Daily' or 'Disabled' values. -
getDescription
Optional description for an application. -
setDescription
Optional description for an application. -
getEventSubscriptions
The list of events you would like to subscribe and get notification for.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnApp.EventSubscriptionProperty> -
setEventSubscriptions
The list of events you would like to subscribe and get notification for. -
setEventSubscriptions
The list of events you would like to subscribe and get notification for. -
getPermissionModel
Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.Returns union: either
IResolvableorCfnApp.PermissionModelProperty -
setPermissionModel
Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment. -
setPermissionModel
Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment. -
getResiliencyPolicyArn
The Amazon Resource Name (ARN) of the resiliency policy. -
setResiliencyPolicyArn
The Amazon Resource Name (ARN) of the resiliency policy. -
getTagsRaw
Tags assigned to the resource. -
setTagsRaw
Tags assigned to the resource.
-