Class CfnPolicy
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.resiliencehubv2.CfnPolicy
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IPolicyRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)",
date="2026-06-16T16:14:31.924Z")
@Stability(Stable)
public class CfnPolicy
extends CfnResource
implements IInspectable, IPolicyRef, ITaggableV2
Creates a resilience policy that defines availability and disaster recovery requirements.
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.resiliencehubv2.*;
CfnPolicy cfnPolicy = CfnPolicy.Builder.create(this, "MyCfnPolicy")
.name("name")
// the properties below are optional
.availabilitySlo(AvailabilitySloProperty.builder()
.target(123)
.build())
.dataRecovery(DataRecoveryTargetsProperty.builder()
.timeBetweenBackupsInMinutes(123)
.build())
.description("description")
.kmsKeyId("kmsKeyId")
.multiAz(MultiAzTargetsProperty.builder()
.disasterRecoveryApproach("disasterRecoveryApproach")
.rpoInMinutes(123)
.rtoInMinutes(123)
.build())
.multiRegion(MultiRegionTargetsProperty.builder()
.disasterRecoveryApproach("disasterRecoveryApproach")
.rpoInMinutes(123)
.rtoInMinutes(123)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceExample:static final classA fluent builder forCfnPolicy.static interfaceExample:static interfaceExample:static interfaceExample:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested 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.interfaces.resiliencehubv2.IPolicyRef
IPolicyRef.Jsii$Default, IPolicyRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnPolicy(software.amazon.jsii.JsiiObjectRef objRef) CfnPolicy(software.constructs.Construct scope, String id, CfnPolicyProps props) Create a newAWS::ResilienceHubV2::Policy. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForPolicy(IPolicyRef resource) The number of services associated with this policy.The timestamp when the policy was created.The ARN of the policy.The timestamp when the policy was last updated.Returns union: eitherIResolvableorCfnPolicy.AvailabilitySloPropertyTag Manager which manages the tags for this resource.Returns union: eitherIResolvableorCfnPolicy.DataRecoveryTargetsPropertyThe description of the policy.The KMS key ID for encrypting policy data.Returns union: eitherIResolvableorCfnPolicy.MultiAzTargetsPropertyReturns union: eitherIResolvableorCfnPolicy.MultiRegionTargetsPropertygetName()The name of the policy.A reference to a Policy resource.getTags()Tags assigned to the policy.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnPolicy.renderProperties(Map<String, Object> props) voidsetAvailabilitySlo(IResolvable value) voidvoidsetDataRecovery(IResolvable value) voidvoidsetDescription(String value) The description of the policy.voidsetKmsKeyId(String value) The KMS key ID for encrypting policy data.voidsetMultiAz(IResolvable value) voidvoidsetMultiRegion(IResolvable value) voidvoidThe name of the policy.voidTags assigned to the policy.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyCrossStackReferenceStrength, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, cfnPropertyName, 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, overrideLogicalId, withMethods 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
getNode, withMethods 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
-
CfnPolicy
protected CfnPolicy(software.amazon.jsii.JsiiObjectRef objRef) -
CfnPolicy
protected CfnPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnPolicy
@Stability(Stable) public CfnPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnPolicyProps props) Create a newAWS::ResilienceHubV2::Policy.- 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
-
arnForPolicy
- Parameters:
resource- This parameter is required.
-
isCfnPolicy
Checks whether the given object is a CfnPolicy.- 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.
-
getAttrAssociatedServiceCount
The number of services associated with this policy. -
getAttrCreatedAt
The timestamp when the policy was created. -
getAttrPolicyArn
The ARN of the policy. -
getAttrUpdatedAt
The timestamp when the policy was last updated. -
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getCfnPropertyNames
- Overrides:
getCfnPropertyNamesin classCfnResource
-
getPolicyRef
A reference to a Policy resource.- Specified by:
getPolicyRefin interfaceIPolicyRef
-
getName
The name of the policy. -
setName
The name of the policy. -
getAvailabilitySlo
Returns union: eitherIResolvableorCfnPolicy.AvailabilitySloProperty -
setAvailabilitySlo
-
setAvailabilitySlo
@Stability(Stable) public void setAvailabilitySlo(@Nullable CfnPolicy.AvailabilitySloProperty value) -
getDataRecovery
Returns union: eitherIResolvableorCfnPolicy.DataRecoveryTargetsProperty -
setDataRecovery
-
setDataRecovery
@Stability(Stable) public void setDataRecovery(@Nullable CfnPolicy.DataRecoveryTargetsProperty value) -
getDescription
The description of the policy. -
setDescription
The description of the policy. -
getKmsKeyId
The KMS key ID for encrypting policy data. -
setKmsKeyId
The KMS key ID for encrypting policy data. -
getMultiAz
Returns union: eitherIResolvableorCfnPolicy.MultiAzTargetsProperty -
setMultiAz
-
setMultiAz
-
getMultiRegion
Returns union: eitherIResolvableorCfnPolicy.MultiRegionTargetsProperty -
setMultiRegion
-
setMultiRegion
-
getTags
Tags assigned to the policy. -
setTags
Tags assigned to the policy.
-