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 Summary
Nested 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.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticache.ICacheClusterRef
ICacheClusterRef.Jsii$Default, ICacheClusterRef.Jsii$ProxyNested 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.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCacheCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCacheCluster(software.amazon.jsii.JsiiObjectRef objRef) CfnCacheCluster(software.constructs.Construct scope, String id, CfnCacheClusterProps props) -
Method Summary
Modifier 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.CfnResource
addDeletionOverride, 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.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods 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
getNodeMethods 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
-
CfnCacheCluster
protected CfnCacheCluster(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCacheCluster
protected 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
-
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.
-
getAttrConfigurationEndpointAddress
The 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. -
getAttrConfigurationEndpointPort
The 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. -
getAttrId
The resource name. -
getAttrRedisEndpointAddress
The DNS address of the configuration endpoint for the Valkey or Redis OSS cache cluster. -
getAttrRedisEndpointPort
The port number of the configuration endpoint for the Valkey or Redis OSS cache cluster. -
getCacheClusterRef
A reference to a CacheCluster resource.- Specified by:
getCacheClusterRefin interfaceICacheClusterRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getCacheNodeType
The compute and memory capacity of the nodes in the node group (shard). -
setCacheNodeType
The compute and memory capacity of the nodes in the node group (shard). -
getEngine
The name of the cache engine to be used for this cluster. -
setEngine
The name of the cache engine to be used for this cluster. -
getNumCacheNodes
The number of cache nodes that the cache cluster should have. -
setNumCacheNodes
The number of cache nodes that the cache cluster should have. -
getAutoMinorVersionUpgrade
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. This parameter is disabled for previous versions.Returns union: either
BooleanorIResolvable -
setAutoMinorVersionUpgrade
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. This parameter is disabled for previous versions. -
setAutoMinorVersionUpgrade
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. This parameter is disabled for previous versions. -
getAzMode
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. -
setAzMode
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. -
getCacheParameterGroupName
The name of the parameter group to associate with this cluster. -
setCacheParameterGroupName
The name of the parameter group to associate with this cluster. -
getCacheSecurityGroupNames
A list of security group names to associate with this cluster. -
setCacheSecurityGroupNames
A list of security group names to associate with this cluster. -
getCacheSubnetGroupName
The name of the subnet group to be used for the cluster. -
setCacheSubnetGroupName
The name of the subnet group to be used for the cluster. -
getClusterName
A name for the cache cluster. -
setClusterName
A name for the cache cluster. -
getEngineVersion
The version number of the cache engine to be used for this cluster. -
setEngineVersion
The version number of the cache engine to be used for this cluster. -
getIpDiscovery
The network type you choose when modifying a cluster, eitheripv4|ipv6. -
setIpDiscovery
The network type you choose when modifying a cluster, eitheripv4|ipv6. -
getLogDeliveryConfigurations
Specifies the destination, format and type of the logs.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnCacheCluster.LogDeliveryConfigurationRequestProperty> -
setLogDeliveryConfigurations
Specifies the destination, format and type of the logs. -
setLogDeliveryConfigurations
Specifies the destination, format and type of the logs. -
getNetworkType
Must be eitheripv4|ipv6|dual_stack. -
setNetworkType
Must be eitheripv4|ipv6|dual_stack. -
getNotificationTopicArn
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. -
setNotificationTopicArn
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. -
getPort
The port number on which each of the cache nodes accepts connections. -
setPort
The port number on which each of the cache nodes accepts connections. -
getPreferredAvailabilityZone
The EC2 Availability Zone in which the cluster is created. -
setPreferredAvailabilityZone
The EC2 Availability Zone in which the cluster is created. -
getPreferredAvailabilityZones
A list of the Availability Zones in which cache nodes are created. -
setPreferredAvailabilityZones
A list of the Availability Zones in which cache nodes are created. -
getPreferredMaintenanceWindow
Specifies the weekly time range during which maintenance on the cluster is performed. -
setPreferredMaintenanceWindow
Specifies the weekly time range during which maintenance on the cluster is performed. -
getSnapshotArns
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. -
setSnapshotArns
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. -
getSnapshotName
The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard). -
setSnapshotName
The name of a Valkey or Redis OSS snapshot from which to restore data into the new node group (shard). -
getSnapshotRetentionLimit
The number of days for which ElastiCache retains automatic snapshots before deleting them. -
setSnapshotRetentionLimit
The number of days for which ElastiCache retains automatic snapshots before deleting them. -
getSnapshotWindow
The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). -
setSnapshotWindow
The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). -
getTagsRaw
A list of tags to be added to this resource. -
setTagsRaw
A list of tags to be added to this resource. -
getTransitEncryptionEnabled
A flag that enables in-transit encryption when set to true.Returns union: either
BooleanorIResolvable -
setTransitEncryptionEnabled
A flag that enables in-transit encryption when set to true. -
setTransitEncryptionEnabled
A flag that enables in-transit encryption when set to true. -
getVpcSecurityGroupIds
One or more VPC security groups associated with the cluster. -
setVpcSecurityGroupIds
One or more VPC security groups associated with the cluster.
-