@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:39.519Z") public class CfnApp extends CfnResource implements IInspectable
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–up to five– AWS CloudFormation stacks, and an appropriate resiliency policy.
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 .logicalStackName("logicalStackName") .resourceName("resourceName") .terraformSourceName("terraformSourceName") .build())) // the properties below are optional .appAssessmentSchedule("appAssessmentSchedule") .description("description") .resiliencyPolicyArn("resiliencyPolicyArn") .tags(Map.of( "tagsKey", "tags")) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnApp.Builder
A fluent builder for
CfnApp . |
static interface |
CfnApp.PhysicalResourceIdProperty
Defines a physical resource identifier.
|
static interface |
CfnApp.ResourceMappingProperty
Defines a resource mapping.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnApp(Construct scope,
java.lang.String id,
CfnAppProps props)
Create a new `AWS::ResilienceHub::App`.
|
protected |
CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnApp(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAppAssessmentSchedule()
Assessment execution schedule with 'Daily' or 'Disabled' values.
|
java.lang.String |
getAppTemplateBody()
A string containing a full AWS Resilience Hub app template body.
|
java.lang.String |
getAttrAppArn()
The Amazon Resource Name (ARN) of the app.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDescription()
The optional description for an app.
|
java.lang.String |
getName()
The name for the application.
|
java.lang.String |
getResiliencyPolicyArn()
The Amazon Resource Name (ARN) of the resiliency policy.
|
java.lang.Object |
getResourceMappings()
An array of ResourceMapping objects.
|
TagManager |
getTags()
The tags assigned to the resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAppAssessmentSchedule(java.lang.String value)
Assessment execution schedule with 'Daily' or 'Disabled' values.
|
void |
setAppTemplateBody(java.lang.String value)
A string containing a full AWS Resilience Hub app template body.
|
void |
setDescription(java.lang.String value)
The optional description for an app.
|
void |
setName(java.lang.String value)
The name for the application.
|
void |
setResiliencyPolicyArn(java.lang.String value)
The Amazon Resource Name (ARN) of the resiliency policy.
|
void |
setResourceMappings(IResolvable value)
An array of ResourceMapping objects.
|
void |
setResourceMappings(java.util.List<java.lang.Object> value)
An array of ResourceMapping objects.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnApp(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnApp(Construct scope, java.lang.String id, CfnAppProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrAppArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
A tag is a label that you assign to an AWS resource. Each tag consists of a key/value pair.
public java.lang.String getAppTemplateBody()
public void setAppTemplateBody(java.lang.String value)
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.Object getResourceMappings()
public void setResourceMappings(IResolvable value)
public void setResourceMappings(java.util.List<java.lang.Object> value)
public java.lang.String getAppAssessmentSchedule()
public void setAppAssessmentSchedule(java.lang.String value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getResiliencyPolicyArn()
public void setResiliencyPolicyArn(java.lang.String value)