Class CfnApp
- All Implemented Interfaces:
IInspectable
,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
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnApp
.static interface
Indicates an event you would like to subscribe and get notification for.static interface
Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.static interface
Defines a physical resource identifier.static interface
Defines a resource mapping.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnApp
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnApp
(software.amazon.jsii.JsiiObjectRef objRef) CfnApp
(software.constructs.Construct scope, String id, CfnAppProps props) -
Method Summary
Modifier 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 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 ofResourceMapping
objects.getTags()
Tag Manager which manages the tags for this resource.Tags assigned to the resource.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAppAssessmentSchedule
(String value) Assessment execution schedule with 'Daily' or 'Disabled' values.void
setAppTemplateBody
(String value) A JSON string that provides information about your application structure.void
setDescription
(String value) Optional description for an application.void
setEventSubscriptions
(List<Object> value) The list of events you would like to subscribe and get notification for.void
setEventSubscriptions
(IResolvable value) The list of events you would like to subscribe and get notification for.void
Name for the application.void
setPermissionModel
(IResolvable value) Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.void
Defines the roles and credentials that AWS Resilience Hub would use while creating the application, importing its resources, and running an assessment.void
setResiliencyPolicyArn
(String value) The Amazon Resource Name (ARN) of the resiliency policy.void
setResourceMappings
(List<Object> value) An array ofResourceMapping
objects.void
setResourceMappings
(IResolvable value) An array ofResourceMapping
objects.void
setTagsRaw
(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, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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) - 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
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
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:
getCfnProperties
in 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 ofResourceMapping
objects. -
setResourceMappings
An array ofResourceMapping
objects. -
setResourceMappings
An array ofResourceMapping
objects. -
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. -
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. -
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.
-