Class CfnResiliencyPolicy

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.resiliencehub.CfnResiliencyPolicy
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:32.470Z") @Stability(Stable) public class CfnResiliencyPolicy extends CfnResource implements IInspectable, ITaggable
Defines a resiliency policy.

AWS Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs of your resiliency policy. But, while assessing your application, the lowest possible assessment result is near zero. Hence, if you provide value zero for rtoInSecs and rpoInSecs , the estimated workload RTO and estimated workload RPO result will be near zero and the Compliance status for your application will be set to Policy breached .

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.*;
 CfnResiliencyPolicy cfnResiliencyPolicy = CfnResiliencyPolicy.Builder.create(this, "MyCfnResiliencyPolicy")
         .policy(Map.of(
                 "policyKey", FailurePolicyProperty.builder()
                         .rpoInSecs(123)
                         .rtoInSecs(123)
                         .build()))
         .policyName("policyName")
         .tier("tier")
         // the properties below are optional
         .dataLocationConstraint("dataLocationConstraint")
         .policyDescription("policyDescription")
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnResiliencyPolicy

      protected CfnResiliencyPolicy(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnResiliencyPolicy

      protected CfnResiliencyPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnResiliencyPolicy

      @Stability(Stable) public CfnResiliencyPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnResiliencyPolicyProps 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrPolicyArn

      @Stability(Stable) @NotNull public String getAttrPolicyArn()
      Amazon Resource Name (ARN) of the resiliency policy.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getPolicy

      @Stability(Stable) @NotNull public Object getPolicy()
      The resiliency policy.
    • setPolicy

      @Stability(Stable) public void setPolicy(@NotNull IResolvable value)
      The resiliency policy.
    • setPolicy

      @Stability(Stable) public void setPolicy(@NotNull Map<String,Object> value)
      The resiliency policy.
    • getPolicyName

      @Stability(Stable) @NotNull public String getPolicyName()
      The name of the policy.
    • setPolicyName

      @Stability(Stable) public void setPolicyName(@NotNull String value)
      The name of the policy.
    • getTier

      @Stability(Stable) @NotNull public String getTier()
      The tier for this resiliency policy, ranging from the highest severity ( MissionCritical ) to lowest ( NonCritical ).
    • setTier

      @Stability(Stable) public void setTier(@NotNull String value)
      The tier for this resiliency policy, ranging from the highest severity ( MissionCritical ) to lowest ( NonCritical ).
    • getDataLocationConstraint

      @Stability(Stable) @Nullable public String getDataLocationConstraint()
      Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
    • setDataLocationConstraint

      @Stability(Stable) public void setDataLocationConstraint(@Nullable String value)
      Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
    • getPolicyDescription

      @Stability(Stable) @Nullable public String getPolicyDescription()
      The description for the policy.
    • setPolicyDescription

      @Stability(Stable) public void setPolicyDescription(@Nullable String value)
      The description for the policy.
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
      Tags assigned to the resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)
      Tags assigned to the resource.