Class CfnCacheCluster
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.elasticache.CfnCacheCluster
- All Implemented Interfaces:
- IInspectable,- ITaggable,- ICacheClusterRef,- software.amazon.jsii.JsiiSerializable,- software.constructs.IConstruct,- software.constructs.IDependable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
           date="2025-10-29T11:15:39.649Z")
@Stability(Stable)
public class CfnCacheCluster
extends CfnResource
implements IInspectable, ICacheClusterRef, ITaggable
The 
AWS::ElastiCache::CacheCluster type creates an Amazon ElastiCache cache 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.elasticache.*;
 CfnCacheCluster cfnCacheCluster = CfnCacheCluster.Builder.create(this, "MyCfnCacheCluster")
         .cacheNodeType("cacheNodeType")
         .engine("engine")
         .numCacheNodes(123)
         // the properties below are optional
         .autoMinorVersionUpgrade(false)
         .azMode("azMode")
         .cacheParameterGroupName("cacheParameterGroupName")
         .cacheSecurityGroupNames(List.of("cacheSecurityGroupNames"))
         .cacheSubnetGroupName("cacheSubnetGroupName")
         .clusterName("clusterName")
         .engineVersion("engineVersion")
         .ipDiscovery("ipDiscovery")
         .logDeliveryConfigurations(List.of(LogDeliveryConfigurationRequestProperty.builder()
                 .destinationDetails(DestinationDetailsProperty.builder()
                         .cloudWatchLogsDetails(CloudWatchLogsDestinationDetailsProperty.builder()
                                 .logGroup("logGroup")
                                 .build())
                         .kinesisFirehoseDetails(KinesisFirehoseDestinationDetailsProperty.builder()
                                 .deliveryStream("deliveryStream")
                                 .build())
                         .build())
                 .destinationType("destinationType")
                 .logFormat("logFormat")
                 .logType("logType")
                 .build()))
         .networkType("networkType")
         .notificationTopicArn("notificationTopicArn")
         .port(123)
         .preferredAvailabilityZone("preferredAvailabilityZone")
         .preferredAvailabilityZones(List.of("preferredAvailabilityZones"))
         .preferredMaintenanceWindow("preferredMaintenanceWindow")
         .snapshotArns(List.of("snapshotArns"))
         .snapshotName("snapshotName")
         .snapshotRetentionLimit(123)
         .snapshotWindow("snapshotWindow")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .transitEncryptionEnabled(false)
         .vpcSecurityGroupIds(List.of("vpcSecurityGroupIds"))
         .build();
 - See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnCacheCluster.static interfaceConfiguration details of a CloudWatch Logs destination.static interfaceConfiguration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.static interfaceThe configuration details of the Kinesis Data Firehose destination.static interfaceSpecifies the destination, format and type of the logs.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObjectsoftware.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticache.ICacheClusterRefICacheClusterRef.Jsii$Default, ICacheClusterRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstructsoftware.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectableIInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableITaggable.Jsii$Default, ITaggable.Jsii$Proxy
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCfnCacheCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCacheCluster(software.amazon.jsii.JsiiObjectRef objRef) CfnCacheCluster(software.constructs.Construct scope, String id, CfnCacheClusterProps props) 
- 
Method SummaryModifier and TypeMethodDescriptionThe DNS hostname of the cache node.The port number of the configuration endpoint for the Memcached cache cluster.The resource name.The DNS address of the configuration endpoint for the Valkey or Redis OSS cache cluster.The port number of the configuration endpoint for the Valkey or Redis OSS cache cluster.If you are running Valkey 7.2 or later, or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next minor version upgrade campaign.Specifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.A reference to a CacheCluster resource.The compute and memory capacity of the nodes in the node group (shard).The name of the parameter group to associate with this cluster.A list of security group names to associate with this cluster.The name of the subnet group to be used for the cluster.A name for the cache cluster.The name of the cache engine to be used for this cluster.The version number of the cache engine to be used for this cluster.The network type you choose when modifying a cluster, eitheripv4|ipv6.Specifies the destination, format and type of the logs.Must be eitheripv4|ipv6|dual_stack.The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.The number of cache nodes that the cache cluster should have.getPort()The port number on which each of the cache nodes accepts connections.The EC2 Availability Zone in which the cluster is created.A list of the Availability Zones in which cache nodes are created.Specifies the weekly time range during which maintenance on the cluster is performed.A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3.The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard).The number of days for which ElastiCache retains automatic snapshots before deleting them.The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).getTags()Tag Manager which manages the tags for this resource.A list of tags to be added to this resource.A flag that enables in-transit encryption when set to true.One or more VPC security groups associated with the cluster.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidIf you are running Valkey 7.2 or later, or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next minor version upgrade campaign.voidIf you are running Valkey 7.2 or later, or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next minor version upgrade campaign.voidSpecifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.voidsetCacheNodeType(String value) The compute and memory capacity of the nodes in the node group (shard).voidsetCacheParameterGroupName(String value) The name of the parameter group to associate with this cluster.voidsetCacheSecurityGroupNames(List<String> value) A list of security group names to associate with this cluster.voidsetCacheSubnetGroupName(String value) The name of the subnet group to be used for the cluster.voidsetClusterName(String value) A name for the cache cluster.voidThe name of the cache engine to be used for this cluster.voidsetEngineVersion(String value) The version number of the cache engine to be used for this cluster.voidsetIpDiscovery(String value) The network type you choose when modifying a cluster, eitheripv4|ipv6.voidsetLogDeliveryConfigurations(List<Object> value) Specifies the destination, format and type of the logs.voidSpecifies the destination, format and type of the logs.voidsetNetworkType(String value) Must be eitheripv4|ipv6|dual_stack.voidsetNotificationTopicArn(String value) The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.voidsetNumCacheNodes(Number value) The number of cache nodes that the cache cluster should have.voidThe port number on which each of the cache nodes accepts connections.voidThe EC2 Availability Zone in which the cluster is created.voidsetPreferredAvailabilityZones(List<String> value) A list of the Availability Zones in which cache nodes are created.voidSpecifies the weekly time range during which maintenance on the cluster is performed.voidsetSnapshotArns(List<String> value) A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3.voidsetSnapshotName(String value) The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard).voidsetSnapshotRetentionLimit(Number value) The number of days for which ElastiCache retains automatic snapshots before deleting them.voidsetSnapshotWindow(String value) The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).voidsetTagsRaw(List<CfnTag> value) A list of tags to be added to this resource.voidA flag that enables in-transit encryption when set to true.voidA flag that enables in-transit encryption when set to true.voidsetVpcSecurityGroupIds(List<String> value) One or more VPC security groups associated with the cluster.Methods inherited from class software.amazon.awscdk.CfnResourceaddDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElementgetRefMethods inherited from class software.amazon.awscdk.CfnElementgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.ConstructgetNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObjectjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstructgetNodeMethods inherited from interface software.amazon.jsii.JsiiSerializable$jsii$toJson
- 
Field Details- 
CFN_RESOURCE_TYPE_NAMEThe CloudFormation resource type name for this resource class.
 
- 
- 
Constructor Details- 
CfnCacheClusterprotected CfnCacheCluster(software.amazon.jsii.JsiiObjectRef objRef) 
- 
CfnCacheClusterprotected CfnCacheCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) 
- 
CfnCacheCluster@Stability(Stable) public CfnCacheCluster(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnCacheClusterProps 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- 
inspectExamines the CloudFormation resource and discloses attributes.- Specified by:
- inspectin 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:
- renderPropertiesin class- CfnResource
- Parameters:
- props- This parameter is required.
 
- 
getAttrConfigurationEndpointAddressThe DNS hostname of the cache node.Valkey and Redis OSS (cluster mode disabled) replication groups don't have this attribute. Therefore, Fn::GetAttreturns a value for this attribute only if the replication group is clustered. Otherwise,Fn::GetAttfails.
- 
getAttrConfigurationEndpointPortThe port number of the configuration endpoint for the Memcached cache cluster.Valkey and Redis OSS (cluster mode disabled) replication groups don't have this attribute. Therefore, Fn::GetAttreturns a value for this attribute only if the replication group is clustered. Otherwise,Fn::GetAttfails.
- 
getAttrIdThe resource name.
- 
getAttrRedisEndpointAddressThe DNS address of the configuration endpoint for the Valkey or Redis OSS cache cluster.
- 
getAttrRedisEndpointPortThe port number of the configuration endpoint for the Valkey or Redis OSS cache cluster.
- 
getCacheClusterRefA reference to a CacheCluster resource.- Specified by:
- getCacheClusterRefin interface- ICacheClusterRef
 
- 
getCfnProperties- Overrides:
- getCfnPropertiesin class- CfnResource
 
- 
getTagsTag Manager which manages the tags for this resource.
- 
getCacheNodeTypeThe compute and memory capacity of the nodes in the node group (shard).
- 
setCacheNodeTypeThe compute and memory capacity of the nodes in the node group (shard).
- 
getEngineThe name of the cache engine to be used for this cluster.
- 
setEngineThe name of the cache engine to be used for this cluster.
- 
getNumCacheNodesThe number of cache nodes that the cache cluster should have.
- 
setNumCacheNodesThe number of cache nodes that the cache cluster should have.
- 
getAutoMinorVersionUpgradeIf you are running Valkey 7.2 or later, or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next minor version upgrade campaign. This parameter is disabled for previous versions.Returns union: either BooleanorIResolvable
- 
setAutoMinorVersionUpgradeIf you are running Valkey 7.2 or later, or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next minor version upgrade campaign. This parameter is disabled for previous versions.
- 
setAutoMinorVersionUpgradeIf you are running Valkey 7.2 or later, or Redis OSS engine version 6.0 or later, set this parameter to yes if you want to opt-in to the next minor version upgrade campaign. This parameter is disabled for previous versions.
- 
getAzModeSpecifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.
- 
setAzModeSpecifies whether the nodes in this Memcached cluster are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region.
- 
getCacheParameterGroupNameThe name of the parameter group to associate with this cluster.
- 
setCacheParameterGroupNameThe name of the parameter group to associate with this cluster.
- 
getCacheSecurityGroupNamesA list of security group names to associate with this cluster.
- 
setCacheSecurityGroupNamesA list of security group names to associate with this cluster.
- 
getCacheSubnetGroupNameThe name of the subnet group to be used for the cluster.
- 
setCacheSubnetGroupNameThe name of the subnet group to be used for the cluster.
- 
getClusterNameA name for the cache cluster.
- 
setClusterNameA name for the cache cluster.
- 
getEngineVersionThe version number of the cache engine to be used for this cluster.
- 
setEngineVersionThe version number of the cache engine to be used for this cluster.
- 
getIpDiscoveryThe network type you choose when modifying a cluster, eitheripv4|ipv6.
- 
setIpDiscoveryThe network type you choose when modifying a cluster, eitheripv4|ipv6.
- 
getLogDeliveryConfigurationsSpecifies the destination, format and type of the logs.Returns union: either IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCacheCluster.LogDeliveryConfigurationRequestProperty>
- 
setLogDeliveryConfigurationsSpecifies the destination, format and type of the logs.
- 
setLogDeliveryConfigurationsSpecifies the destination, format and type of the logs.
- 
getNetworkTypeMust be eitheripv4|ipv6|dual_stack.
- 
setNetworkTypeMust be eitheripv4|ipv6|dual_stack.
- 
getNotificationTopicArnThe Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.
- 
setNotificationTopicArnThe Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.
- 
getPortThe port number on which each of the cache nodes accepts connections.
- 
setPortThe port number on which each of the cache nodes accepts connections.
- 
getPreferredAvailabilityZoneThe EC2 Availability Zone in which the cluster is created.
- 
setPreferredAvailabilityZoneThe EC2 Availability Zone in which the cluster is created.
- 
getPreferredAvailabilityZonesA list of the Availability Zones in which cache nodes are created.
- 
setPreferredAvailabilityZonesA list of the Availability Zones in which cache nodes are created.
- 
getPreferredMaintenanceWindowSpecifies the weekly time range during which maintenance on the cluster is performed.
- 
setPreferredMaintenanceWindowSpecifies the weekly time range during which maintenance on the cluster is performed.
- 
getSnapshotArnsA single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3.
- 
setSnapshotArnsA single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Valkey or Redis OSS RDB snapshot file stored in Amazon S3.
- 
getSnapshotNameThe name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard).
- 
setSnapshotNameThe name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard).
- 
getSnapshotRetentionLimitThe number of days for which ElastiCache retains automatic snapshots before deleting them.
- 
setSnapshotRetentionLimitThe number of days for which ElastiCache retains automatic snapshots before deleting them.
- 
getSnapshotWindowThe daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).
- 
setSnapshotWindowThe daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard).
- 
getTagsRawA list of tags to be added to this resource.
- 
setTagsRawA list of tags to be added to this resource.
- 
getTransitEncryptionEnabledA flag that enables in-transit encryption when set to true.Returns union: either BooleanorIResolvable
- 
setTransitEncryptionEnabledA flag that enables in-transit encryption when set to true.
- 
setTransitEncryptionEnabledA flag that enables in-transit encryption when set to true.
- 
getVpcSecurityGroupIdsOne or more VPC security groups associated with the cluster.
- 
setVpcSecurityGroupIdsOne or more VPC security groups associated with the cluster.
 
-