Class CfnCluster

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IClusterRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:05.692Z") @Stability(Stable) public class CfnCluster extends CfnResource implements IInspectable, IClusterRef, ITaggableV2
Creates and manages an AWS CloudHSM cluster.

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.cloudhsm.*;
 CfnCluster cfnCluster = CfnCluster.Builder.create(this, "MyCfnCluster")
         .hsmType("hsmType")
         // the properties below are optional
         .backupRetentionPolicy(BackupRetentionPolicyProperty.builder()
                 .type("type")
                 .value("value")
                 .build())
         .mode("mode")
         .networkType("networkType")
         .subnetIds(List.of("subnetIds"))
         .tags(List.of(TagsItemsProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnCluster

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

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

      @Stability(Stable) public CfnCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnClusterProps props)
      Create a new AWS::CloudHSM::Cluster.

      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

    • arnForCluster

      @Stability(Stable) @NotNull public static String arnForCluster(@NotNull IClusterRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnCluster

      @Stability(Stable) @NotNull public static Boolean isCfnCluster(@NotNull Object x)
      Checks whether the given object is a CfnCluster.

      Parameters:
      x - This parameter is required.
    • 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.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the cluster.
    • getAttrBackupPolicy

      @Stability(Stable) @NotNull public String getAttrBackupPolicy()
      The cluster's backup policy.
    • getAttrClusterId

      @Stability(Stable) @NotNull public String getAttrClusterId()
      The cluster's identifier (ID).
    • getAttrSecurityGroup

      @Stability(Stable) @NotNull public String getAttrSecurityGroup()
      The identifier (ID) of the cluster's security group.
    • getAttrState

      @Stability(Stable) @NotNull public String getAttrState()
      The cluster's state.
    • getAttrSubnetMapping

      @Stability(Stable) @NotNull public IResolvable getAttrSubnetMapping()
      A map from availability zone to the cluster's subnet in that availability zone.
    • getAttrVpcId

      @Stability(Stable) @NotNull public String getAttrVpcId()
      The identifier (ID) of the virtual private cloud (VPC) that contains the cluster.
    • getCdkTagManager

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

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

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getClusterRef

      @Stability(Stable) @NotNull public ClusterReference getClusterRef()
      A reference to a Cluster resource.
      Specified by:
      getClusterRef in interface IClusterRef
    • getHsmType

      @Stability(Stable) @NotNull public String getHsmType()
      The type of HSM to use in the cluster.
    • setHsmType

      @Stability(Stable) public void setHsmType(@NotNull String value)
      The type of HSM to use in the cluster.
    • getBackupRetentionPolicy

      @Stability(Stable) @Nullable public Object getBackupRetentionPolicy()
      A policy that defines how the service retains backups.

      Returns union: either IResolvable or CfnCluster.BackupRetentionPolicyProperty

    • setBackupRetentionPolicy

      @Stability(Stable) public void setBackupRetentionPolicy(@Nullable IResolvable value)
      A policy that defines how the service retains backups.
    • setBackupRetentionPolicy

      @Stability(Stable) public void setBackupRetentionPolicy(@Nullable CfnCluster.BackupRetentionPolicyProperty value)
      A policy that defines how the service retains backups.
    • getMode

      @Stability(Stable) @Nullable public String getMode()
      The mode to use in the cluster.
    • setMode

      @Stability(Stable) public void setMode(@Nullable String value)
      The mode to use in the cluster.
    • getNetworkType

      @Stability(Stable) @Nullable public String getNetworkType()
      The NetworkType to create a cluster with.
    • setNetworkType

      @Stability(Stable) public void setNetworkType(@Nullable String value)
      The NetworkType to create a cluster with.
    • getSubnetIds

      @Stability(Stable) @Nullable public List<String> getSubnetIds()
      The identifiers (IDs) of the subnets where the cluster is created.
    • setSubnetIds

      @Stability(Stable) public void setSubnetIds(@Nullable List<String> value)
      The identifiers (IDs) of the subnets where the cluster is created.
    • getTags

      @Stability(Stable) @Nullable public List<CfnCluster.TagsItemsProperty> getTags()
      Tags to apply to the CloudHSM cluster.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnCluster.TagsItemsProperty> value)
      Tags to apply to the CloudHSM cluster.