CfnCacheCluster L1 construct
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 { aws_elasticache as elasticache } from 'aws-cdk-lib';
const cfnCacheCluster = new elasticache.CfnCacheCluster(this, 'MyCfnCacheCluster', {
cacheNodeType: 'cacheNodeType',
engine: 'engine',
numCacheNodes: 123,
// the properties below are optional
autoMinorVersionUpgrade: false,
azMode: 'azMode',
cacheParameterGroupName: 'cacheParameterGroupName',
cacheSecurityGroupNames: ['cacheSecurityGroupNames'],
cacheSubnetGroupName: 'cacheSubnetGroupName',
clusterName: 'clusterName',
engineVersion: 'engineVersion',
ipDiscovery: 'ipDiscovery',
logDeliveryConfigurations: [{
destinationDetails: {
cloudWatchLogsDetails: {
logGroup: 'logGroup',
},
kinesisFirehoseDetails: {
deliveryStream: 'deliveryStream',
},
},
destinationType: 'destinationType',
logFormat: 'logFormat',
logType: 'logType',
}],
networkType: 'networkType',
notificationTopicArn: 'notificationTopicArn',
port: 123,
preferredAvailabilityZone: 'preferredAvailabilityZone',
preferredAvailabilityZones: ['preferredAvailabilityZones'],
preferredMaintenanceWindow: 'preferredMaintenanceWindow',
snapshotArns: ['snapshotArns'],
snapshotName: 'snapshotName',
snapshotRetentionLimit: 123,
snapshotWindow: 'snapshotWindow',
tags: [{
key: 'key',
value: 'value',
}],
transitEncryptionEnabled: false,
vpcSecurityGroupIds: ['vpcSecurityGroupIds'],
});
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_elasticache as elasticache
cfn_cache_cluster = elasticache.CfnCacheCluster(self, "MyCfnCacheCluster",
cache_node_type="cacheNodeType",
engine="engine",
num_cache_nodes=123,
# the properties below are optional
auto_minor_version_upgrade=False,
az_mode="azMode",
cache_parameter_group_name="cacheParameterGroupName",
cache_security_group_names=["cacheSecurityGroupNames"],
cache_subnet_group_name="cacheSubnetGroupName",
cluster_name="clusterName",
engine_version="engineVersion",
ip_discovery="ipDiscovery",
log_delivery_configurations=[elasticache.CfnCacheCluster.LogDeliveryConfigurationRequestProperty(
destination_details=elasticache.CfnCacheCluster.DestinationDetailsProperty(
cloud_watch_logs_details=elasticache.CfnCacheCluster.CloudWatchLogsDestinationDetailsProperty(
log_group="logGroup"
),
kinesis_firehose_details=elasticache.CfnCacheCluster.KinesisFirehoseDestinationDetailsProperty(
delivery_stream="deliveryStream"
)
),
destination_type="destinationType",
log_format="logFormat",
log_type="logType"
)],
network_type="networkType",
notification_topic_arn="notificationTopicArn",
port=123,
preferred_availability_zone="preferredAvailabilityZone",
preferred_availability_zones=["preferredAvailabilityZones"],
preferred_maintenance_window="preferredMaintenanceWindow",
snapshot_arns=["snapshotArns"],
snapshot_name="snapshotName",
snapshot_retention_limit=123,
snapshot_window="snapshotWindow",
tags=[CfnTag(
key="key",
value="value"
)],
transit_encryption_enabled=False,
vpc_security_group_ids=["vpcSecurityGroupIds"]
)
// 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();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElastiCache;
var cfnCacheCluster = new CfnCacheCluster(this, "MyCfnCacheCluster", new CfnCacheClusterProps {
CacheNodeType = "cacheNodeType",
Engine = "engine",
NumCacheNodes = 123,
// the properties below are optional
AutoMinorVersionUpgrade = false,
AzMode = "azMode",
CacheParameterGroupName = "cacheParameterGroupName",
CacheSecurityGroupNames = new [] { "cacheSecurityGroupNames" },
CacheSubnetGroupName = "cacheSubnetGroupName",
ClusterName = "clusterName",
EngineVersion = "engineVersion",
IpDiscovery = "ipDiscovery",
LogDeliveryConfigurations = new [] { new LogDeliveryConfigurationRequestProperty {
DestinationDetails = new DestinationDetailsProperty {
CloudWatchLogsDetails = new CloudWatchLogsDestinationDetailsProperty {
LogGroup = "logGroup"
},
KinesisFirehoseDetails = new KinesisFirehoseDestinationDetailsProperty {
DeliveryStream = "deliveryStream"
}
},
DestinationType = "destinationType",
LogFormat = "logFormat",
LogType = "logType"
} },
NetworkType = "networkType",
NotificationTopicArn = "notificationTopicArn",
Port = 123,
PreferredAvailabilityZone = "preferredAvailabilityZone",
PreferredAvailabilityZones = new [] { "preferredAvailabilityZones" },
PreferredMaintenanceWindow = "preferredMaintenanceWindow",
SnapshotArns = new [] { "snapshotArns" },
SnapshotName = "snapshotName",
SnapshotRetentionLimit = 123,
SnapshotWindow = "snapshotWindow",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TransitEncryptionEnabled = false,
VpcSecurityGroupIds = new [] { "vpcSecurityGroupIds" }
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnCacheCluster := awscdk.Aws_elasticache.NewCfnCacheCluster(this, jsii.String("MyCfnCacheCluster"), &CfnCacheClusterProps{
CacheNodeType: jsii.String("cacheNodeType"),
Engine: jsii.String("engine"),
NumCacheNodes: jsii.Number(123),
// the properties below are optional
AutoMinorVersionUpgrade: jsii.Boolean(false),
AzMode: jsii.String("azMode"),
CacheParameterGroupName: jsii.String("cacheParameterGroupName"),
CacheSecurityGroupNames: []*string{
jsii.String("cacheSecurityGroupNames"),
},
CacheSubnetGroupName: jsii.String("cacheSubnetGroupName"),
ClusterName: jsii.String("clusterName"),
EngineVersion: jsii.String("engineVersion"),
IpDiscovery: jsii.String("ipDiscovery"),
LogDeliveryConfigurations: []interface{}{
&LogDeliveryConfigurationRequestProperty{
DestinationDetails: &DestinationDetailsProperty{
CloudWatchLogsDetails: &CloudWatchLogsDestinationDetailsProperty{
LogGroup: jsii.String("logGroup"),
},
KinesisFirehoseDetails: &KinesisFirehoseDestinationDetailsProperty{
DeliveryStream: jsii.String("deliveryStream"),
},
},
DestinationType: jsii.String("destinationType"),
LogFormat: jsii.String("logFormat"),
LogType: jsii.String("logType"),
},
},
NetworkType: jsii.String("networkType"),
NotificationTopicArn: jsii.String("notificationTopicArn"),
Port: jsii.Number(123),
PreferredAvailabilityZone: jsii.String("preferredAvailabilityZone"),
PreferredAvailabilityZones: []*string{
jsii.String("preferredAvailabilityZones"),
},
PreferredMaintenanceWindow: jsii.String("preferredMaintenanceWindow"),
SnapshotArns: []*string{
jsii.String("snapshotArns"),
},
SnapshotName: jsii.String("snapshotName"),
SnapshotRetentionLimit: jsii.Number(123),
SnapshotWindow: jsii.String("snapshotWindow"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
TransitEncryptionEnabled: jsii.Boolean(false),
VpcSecurityGroupIds: []*string{
jsii.String("vpcSecurityGroupIds"),
},
})
Initializer
new CfnCacheCluster(scope: Construct, id: string, props: CfnCacheClusterProps)
CfnCacheCluster(scope: Construct, id: str, props: CfnCacheClusterProps)
new CfnCacheCluster(Construct scope, String id, CfnCacheClusterProps props)
new CfnCacheCluster(Construct scope, string id, CfnCacheClusterProps props)
NewCfnCacheCluster(Scope Construct, Id *string, Props CfnCacheClusterProps)
Construct Props
autoMinorVersionUpgradeoptionalboolean | IResolvableauto_minor_version_upgradeoptionaltyping.Union[bool, IResolvable]autoMinorVersionUpgradeoptionalBooleanAutoMinorVersionUpgradeoptionalboolAutoMinorVersionUpgradeoptionalinterface{}#azModeoptionalstringaz_modeoptionalstrazModeoptionalStringAzModeoptionalstringAzModeoptional*string#This parameter is only supported for Memcached clusters.
If the AZMode and PreferredAvailabilityZones are not specified, ElastiCache assumes single-az mode.
cacheNodeTypestringcache_node_typestrcacheNodeTypeStringCacheNodeTypestringCacheNodeType*stringrequired#notes
The following node types are supported by ElastiCache. Generally speaking, the current generation types provide more memory and computational power at lower cost when compared to their equivalent previous generation counterparts. Changing the CacheNodeType of a Memcached instance is currently not supported. If you need to scale using Memcached, we recommend forcing a replacement update by changing the LogicalResourceId of the resource.
General purpose:
Current generation:
M6g node types: cache.m6g.large , cache.m6g.xlarge , cache.m6g.2xlarge , cache.m6g.4xlarge , cache.m6g.8xlarge , cache.m6g.12xlarge , cache.m6g.16xlarge , cache.m6g.24xlarge
M5 node types: cache.m5.large , cache.m5.xlarge , cache.m5.2xlarge , cache.m5.4xlarge , cache.m5.12xlarge , cache.m5.24xlarge
M4 node types: cache.m4.large , cache.m4.xlarge , cache.m4.2xlarge , cache.m4.4xlarge , cache.m4.10xlarge
T4g node types: cache.t4g.micro , cache.t4g.small , cache.t4g.medium
T3 node types: cache.t3.micro , cache.t3.small , cache.t3.medium
T2 node types: cache.t2.micro , cache.t2.small , cache.t2.medium
- Previous generation: (not recommended)
T1 node types: cache.t1.micro
M1 node types: cache.m1.small , cache.m1.medium , cache.m1.large , cache.m1.xlarge
M3 node types: cache.m3.medium , cache.m3.large , cache.m3.xlarge , cache.m3.2xlarge
Compute optimized:
Previous generation: (not recommended)
C1 node types: cache.c1.xlarge
Memory optimized:
Current generation:
R6gd node types: cache.r6gd.xlarge , cache.r6gd.2xlarge , cache.r6gd.4xlarge , cache.r6gd.8xlarge , cache.r6gd.12xlarge , cache.r6gd.16xlarge
The
r6gdfamily is available in the following regions:us-east-2,us-east-1,us-west-2,us-west-1,eu-west-1,eu-central-1,ap-northeast-1,ap-southeast-1,ap-southeast-2.
R6g node types: cache.r6g.large , cache.r6g.xlarge , cache.r6g.2xlarge , cache.r6g.4xlarge , cache.r6g.8xlarge , cache.r6g.12xlarge , cache.r6g.16xlarge , cache.r6g.24xlarge
R5 node types: cache.r5.large , cache.r5.xlarge , cache.r5.2xlarge , cache.r5.4xlarge , cache.r5.12xlarge , cache.r5.24xlarge
R4 node types: cache.r4.large , cache.r4.xlarge , cache.r4.2xlarge , cache.r4.4xlarge , cache.r4.8xlarge , cache.r4.16xlarge
- Previous generation: (not recommended)
M2 node types: cache.m2.xlarge , cache.m2.2xlarge , cache.m2.4xlarge
R3 node types: cache.r3.large , cache.r3.xlarge , cache.r3.2xlarge , cache.r3.4xlarge , cache.r3.8xlarge
For region availability, see Supported Node Types by Region
Additional node type info
- All current generation instance types are created in Amazon VPC by default.
- Valkey and Redis OSS append-only files (AOF) are not supported for T1 or T2 instances.
- Valkey and Redis OSS Multi-AZ with automatic failover is not supported on T1 instances.
- Redis OSS configuration variables
appendonlyandappendfsyncare not supported on Redis OSS version 2.8.22 and later.
cacheParameterGroupNameoptionalstringcache_parameter_group_nameoptionalstrcacheParameterGroupNameoptionalStringCacheParameterGroupNameoptionalstringCacheParameterGroupNameoptional*string#If this argument is omitted, the default parameter group for the specified engine is used. You cannot use any parameter group which has cluster-enabled='yes' when creating a cluster.
cacheSecurityGroupNamesoptionalstring[]cache_security_group_namesoptionaltyping.List[str]cacheSecurityGroupNamesoptionalList<String>CacheSecurityGroupNamesoptionalstring[]CacheSecurityGroupNamesoptional*[]*stringdeprecated#Use this parameter only when you are creating a cluster outside of an Amazon Virtual Private Cloud (Amazon VPC).
cacheSubnetGroupNameoptionalstringcache_subnet_group_nameoptionalstrcacheSubnetGroupNameoptionalStringCacheSubnetGroupNameoptionalstringCacheSubnetGroupNameoptional*string#notes
Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).
If you're going to launch your cluster in an Amazon VPC, you need to create a subnet group before you start creating a cluster. For more information, see
[AWS::ElastiCache::SubnetGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-subnetgroup.html) .
clusterNameoptionalstringcluster_nameoptionalstrclusterNameoptionalStringClusterNameoptionalstringClusterNameoptional*string#notes
If you don't specify a name, CloudFormation generates a unique physical ID and uses that ID for the cache cluster. For more information, see Name Type .
The name must contain 1 to 50 alphanumeric characters or hyphens. The name must start with a letter and cannot end with a hyphen or contain two consecutive hyphens.
Valid values for this parameter are: memcached | valkey | redis
engineVersionoptionalstringengine_versionoptionalstrengineVersionoptionalStringEngineVersionoptionalstringEngineVersionoptional*string#notes
To view the supported cache engine versions, use the DescribeCacheEngineVersions operation.
Important: You can upgrade to a newer engine version (see Selecting a Cache Engine and Version ), but you cannot downgrade to an earlier engine version. If you want to use an earlier engine version, you must delete the existing cluster or replication group and create it anew with the earlier engine version.
ipDiscoveryoptionalstringip_discoveryoptionalstripDiscoveryoptionalStringIpDiscoveryoptionalstringIpDiscoveryoptional*string#IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 and Memcached engine version 1.6.6 and above on all instances built on the Nitro system .
logDeliveryConfigurationsoptionalIResolvable | IResolvable | CfnCacheCluster.LogDeliveryConfigurationRequestProperty[]log_delivery_configurationsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LogDeliveryConfigurationRequestProperty]]]logDeliveryConfigurationsoptionalIResolvableLogDeliveryConfigurationsoptionalIResolvableLogDeliveryConfigurationsoptionalinterface{}#networkTypeoptionalstringnetwork_typeoptionalstrnetworkTypeoptionalStringNetworkTypeoptionalstringNetworkTypeoptional*string#IPv6 is supported for workloads using Valkey 7.2 and above, Redis OSS engine version 6.2 to 7.1 and Memcached engine version 1.6.6 and above on all instances built on the Nitro system .
notificationTopicArnoptionalstringnotification_topic_arnoptionalstrnotificationTopicArnoptionalStringNotificationTopicArnoptionalstringNotificationTopicArnoptional*string#The Amazon SNS topic owner must be the same as the cluster owner.
numCacheNodesnumbernum_cache_nodesint | floatnumCacheNodesNumberNumCacheNodesdoubleNumCacheNodes*float64required#notes
However, if the
PreferredAvailabilityZoneandPreferredAvailabilityZonesproperties were not previously specified and you don't specify any new values, an update requires replacement .
preferredAvailabilityZoneoptionalstringpreferred_availability_zoneoptionalstrpreferredAvailabilityZoneoptionalStringPreferredAvailabilityZoneoptionalstringPreferredAvailabilityZoneoptional*string#All nodes belonging to this cluster are placed in the preferred Availability Zone. If you want to create your nodes across multiple Availability Zones, use PreferredAvailabilityZones .
Default: System chosen Availability Zone.
preferredAvailabilityZonesoptionalstring[]preferred_availability_zonesoptionaltyping.List[str]preferredAvailabilityZonesoptionalList<String>PreferredAvailabilityZonesoptionalstring[]PreferredAvailabilityZonesoptional*[]*string#notes
The order of the zones in the list is not important.
This option is only supported on Memcached.
If you are creating your cluster in an Amazon VPC (recommended) you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group.
The number of Availability Zones listed must equal the value of
NumCacheNodes.
If you want all the nodes in the same Availability Zone, use PreferredAvailabilityZone instead, or repeat the Availability Zone multiple times in the list.
Default: System chosen Availability Zones.
preferredMaintenanceWindowoptionalstringpreferred_maintenance_windowoptionalstrpreferredMaintenanceWindowoptionalStringPreferredMaintenanceWindowoptionalstringPreferredMaintenanceWindowoptional*string#notes
It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.
Valid values for ddd are:
sunmontuewedthufrisat
Example: sun:23:00-mon:01:30
snapshotArnsoptionalstring[]snapshot_arnsoptionaltyping.List[str]snapshotArnsoptionalList<String>SnapshotArnsoptionalstring[]SnapshotArnsoptional*[]*string#notes
The snapshot file is used to populate the node group (shard). The Amazon S3 object name in the ARN cannot contain any commas.
This parameter is only valid if the
Engineparameter isredis.
Example of an Amazon S3 ARN: arn:aws:s3:::my_bucket/snapshot1.rdb
snapshotNameoptionalstringsnapshot_nameoptionalstrsnapshotNameoptionalStringSnapshotNameoptionalstringSnapshotNameoptional*string#The snapshot status changes to restoring while the new node group (shard) is being created.
This parameter is only valid if the
Engineparameter isredis.
snapshotRetentionLimitoptionalnumbersnapshot_retention_limitoptionalint | floatsnapshotRetentionLimitoptionalNumberSnapshotRetentionLimitoptionaldoubleSnapshotRetentionLimitoptional*float64#notes
For example, if you set SnapshotRetentionLimit to 5, a snapshot taken today is retained for 5 days before being deleted.
This parameter is only valid if the
Engineparameter isredis.
Default: 0 (i.e., automatic backups are disabled for this cache cluster).
snapshotWindowoptionalstringsnapshot_windowoptionalstrsnapshotWindowoptionalStringSnapshotWindowoptionalstringSnapshotWindowoptional*string#Example: 05:00-09:00
If you do not specify this parameter, ElastiCache automatically chooses an appropriate time range.
This parameter is only valid if the
Engineparameter isredis.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#transitEncryptionEnabledoptionalboolean | IResolvabletransit_encryption_enabledoptionaltyping.Union[bool, IResolvable]transitEncryptionEnabledoptionalBooleanTransitEncryptionEnabledoptionalboolTransitEncryptionEnabledoptionalinterface{}#vpcSecurityGroupIdsoptionalstring[]vpc_security_group_idsoptionaltyping.List[str]vpcSecurityGroupIdsoptionalList<String>VpcSecurityGroupIdsoptionalstring[]VpcSecurityGroupIdsoptional*[]*string#Use this parameter only when you are creating a cluster in an Amazon Virtual Private Cloud (Amazon VPC).
Properties
attrConfigurationEndpointIResolvableattr_configuration_endpointIResolvableattrConfigurationEndpointIResolvableAttrConfigurationEndpointIResolvableAttrConfigurationEndpointIResolvable#attrConfigurationEndpointAddressstringattr_configuration_endpoint_addressstrattrConfigurationEndpointAddressStringAttrConfigurationEndpointAddressstringAttrConfigurationEndpointAddress*string#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.
attrConfigurationEndpointPortstringattr_configuration_endpoint_portstrattrConfigurationEndpointPortStringAttrConfigurationEndpointPortstringAttrConfigurationEndpointPort*string#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.
attrRedisEndpointIResolvableattr_redis_endpointIResolvableattrRedisEndpointIResolvableAttrRedisEndpointIResolvableAttrRedisEndpointIResolvable#attrRedisEndpointAddressstringattr_redis_endpoint_addressstrattrRedisEndpointAddressStringAttrRedisEndpointAddressstringAttrRedisEndpointAddress*string#attrRedisEndpointPortstringattr_redis_endpoint_portstrattrRedisEndpointPortStringAttrRedisEndpointPortstringAttrRedisEndpointPort*string#autoMinorVersionUpgrademay be undefinedboolean | IResolvableauto_minor_version_upgrademay be undefinedtyping.Union[bool, IResolvable]autoMinorVersionUpgrademay be undefinedBooleanAutoMinorVersionUpgrademay be undefinedboolAutoMinorVersionUpgrademay be undefinedinterface{}#azModemay be undefinedstringaz_modemay be undefinedstrazModemay be undefinedStringAzModemay be undefinedstringAzModemay be undefined*string#cacheClusterRefCacheClusterReferencecache_cluster_refCacheClusterReferencecacheClusterRefCacheClusterReferenceCacheClusterRefCacheClusterReferenceCacheClusterRefCacheClusterReference#cacheParameterGroupNamemay be undefinedstringcache_parameter_group_namemay be undefinedstrcacheParameterGroupNamemay be undefinedStringCacheParameterGroupNamemay be undefinedstringCacheParameterGroupNamemay be undefined*string#cacheSecurityGroupNamesmay be undefinedstring[]cache_security_group_namesmay be undefinedtyping.List[str]cacheSecurityGroupNamesmay be undefinedList<String>CacheSecurityGroupNamesmay be undefinedstring[]CacheSecurityGroupNamesmay be undefined*[]*stringdeprecated#cacheSubnetGroupNamemay be undefinedstringcache_subnet_group_namemay be undefinedstrcacheSubnetGroupNamemay be undefinedStringCacheSubnetGroupNamemay be undefinedstringCacheSubnetGroupNamemay be undefined*string#CFN_RESOURCE_TYPE_NAMEstringcfn_resource_type_namestrCFN_RESOURCE_TYPE_NAMEStringCFN_RESOURCE_TYPE_NAMEstringCFN_RESOURCE_TYPE_NAME*stringstatic#cfnOptionsICfnResourceOptionscfn_optionsICfnResourceOptionscfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptionsCfnOptionsICfnResourceOptions#cfnResourceTypestringcfn_resource_typestrcfnResourceTypeStringCfnResourceTypestringCfnResourceType*string#clusterNamemay be undefinedstringcluster_namemay be undefinedstrclusterNamemay be undefinedStringClusterNamemay be undefinedstringClusterNamemay be undefined*string#creationStackstring[]creation_stacktyping.List[str]creationStackList<String>CreationStackstring[]CreationStack*[]*string#engineVersionmay be undefinedstringengine_versionmay be undefinedstrengineVersionmay be undefinedStringEngineVersionmay be undefinedstringEngineVersionmay be undefined*string#ipDiscoverymay be undefinedstringip_discoverymay be undefinedstripDiscoverymay be undefinedStringIpDiscoverymay be undefinedstringIpDiscoverymay be undefined*string#logDeliveryConfigurationsmay be undefinedIResolvable | IResolvable | CfnCacheCluster.LogDeliveryConfigurationRequestProperty[]log_delivery_configurationsmay be undefinedtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LogDeliveryConfigurationRequestProperty]]]logDeliveryConfigurationsmay be undefinedIResolvableLogDeliveryConfigurationsmay be undefinedIResolvableLogDeliveryConfigurationsmay be undefinedinterface{}#The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId).
networkTypemay be undefinedstringnetwork_typemay be undefinedstrnetworkTypemay be undefinedStringNetworkTypemay be undefinedstringNetworkTypemay be undefined*string#notificationTopicArnmay be undefinedstringnotification_topic_arnmay be undefinedstrnotificationTopicArnmay be undefinedStringNotificationTopicArnmay be undefinedstringNotificationTopicArnmay be undefined*string#numCacheNodesnumbernum_cache_nodesint | floatnumCacheNodesNumberNumCacheNodesdoubleNumCacheNodes*float64#portmay be undefinednumberportmay be undefinedint | floatportmay be undefinedNumberPortmay be undefineddoublePortmay be undefined*float64#preferredAvailabilityZonemay be undefinedstringpreferred_availability_zonemay be undefinedstrpreferredAvailabilityZonemay be undefinedStringPreferredAvailabilityZonemay be undefinedstringPreferredAvailabilityZonemay be undefined*string#preferredAvailabilityZonesmay be undefinedstring[]preferred_availability_zonesmay be undefinedtyping.List[str]preferredAvailabilityZonesmay be undefinedList<String>PreferredAvailabilityZonesmay be undefinedstring[]PreferredAvailabilityZonesmay be undefined*[]*string#preferredMaintenanceWindowmay be undefinedstringpreferred_maintenance_windowmay be undefinedstrpreferredMaintenanceWindowmay be undefinedStringPreferredMaintenanceWindowmay be undefinedstringPreferredMaintenanceWindowmay be undefined*string#If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).
snapshotArnsmay be undefinedstring[]snapshot_arnsmay be undefinedtyping.List[str]snapshotArnsmay be undefinedList<String>SnapshotArnsmay be undefinedstring[]SnapshotArnsmay be undefined*[]*string#snapshotNamemay be undefinedstringsnapshot_namemay be undefinedstrsnapshotNamemay be undefinedStringSnapshotNamemay be undefinedstringSnapshotNamemay be undefined*string#snapshotRetentionLimitmay be undefinednumbersnapshot_retention_limitmay be undefinedint | floatsnapshotRetentionLimitmay be undefinedNumberSnapshotRetentionLimitmay be undefineddoubleSnapshotRetentionLimitmay be undefined*float64#snapshotWindowmay be undefinedstringsnapshot_windowmay be undefinedstrsnapshotWindowmay be undefinedStringSnapshotWindowmay be undefinedstringSnapshotWindowmay be undefined*string#CfnElements must be defined within a stack scope (directly or indirectly).
tagsRawmay be undefinedCfnTag[]tags_rawmay be undefinedtyping.List[CfnTag]tagsRawmay be undefinedList<CfnTag>TagsRawmay be undefinedCfnTag[]TagsRawmay be undefined*[]CfnTag#transitEncryptionEnabledmay be undefinedboolean | IResolvabletransit_encryption_enabledmay be undefinedtyping.Union[bool, IResolvable]transitEncryptionEnabledmay be undefinedBooleanTransitEncryptionEnabledmay be undefinedboolTransitEncryptionEnabledmay be undefinedinterface{}#vpcSecurityGroupIdsmay be undefinedstring[]vpc_security_group_idsmay be undefinedtyping.List[str]vpcSecurityGroupIdsmay be undefinedList<String>VpcSecurityGroupIdsmay be undefinedstring[]VpcSecurityGroupIdsmay be undefined*[]*string#Methods
addDeletionOverride(path: string): voiddef add_deletion_override(self, path: str) -> Nonepublic void addDeletionOverride(String path)public void AddDeletionOverride(string path)func AddDeletionOverride(Path *string)#1 parameter
Parameters
pathpathpathpathPath— The path of the value to delete.
addDependency(target: CfnResource): voiddef add_dependency(self, target: CfnResource) -> Nonepublic void addDependency(CfnResource target)public void AddDependency(CfnResource target)func AddDependency(Target CfnResource)deprecated#This method has been renamed to addResourceDependency to more clearly set it apart from construct.node.addDependency. See the documentation of that function for more details.
addDependsOn(target: CfnResource): voiddef add_depends_on(self, target: CfnResource) -> Nonepublic void addDependsOn(CfnResource target)public void AddDependsOn(CfnResource target)func AddDependsOn(Target CfnResource)deprecated#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method has been renamed to addResourceDependency, which makes it more clear that this method operates at a different level from the construct-level construct.node.addDependency() mechanism.
addMetadata(key: string, value: any): voiddef add_metadata(self, key: str, value: Any) -> Nonepublic void addMetadata(String key, Object value)public void AddMetadata(string key, object value)func AddMetadata(Key *string, Value interface{})#addOverride(path: string, value: any): voiddef add_override(self, path: str, value: Any) -> Nonepublic void addOverride(String path, Object value)public void AddOverride(string path, object value)func AddOverride(Path *string, Value interface{})#notes · 2 parameters
To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).
If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.
For example,
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
would add the overrides
"Properties": {
"GlobalSecondaryIndexes": [
{
"Projection": {
"NonKeyAttributes": [ "myattribute" ]
...
}
...
},
{
"ProjectionType": "INCLUDE"
...
},
]
...
}
The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.
Parameters
pathpathpathpathPath— - The path of the property, you can use dot notation to override values in complex types.valuevaluevaluevalueValue— - The value.
addPropertyDeletionOverride(propertyPath: string): voiddef add_property_deletion_override(self, property_path: str) -> Nonepublic void addPropertyDeletionOverride(String propertyPath)public void AddPropertyDeletionOverride(string propertyPath)func AddPropertyDeletionOverride(PropertyPath *string)#1 parameter
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path to the property.
addPropertyOverride(propertyPath: string, value: any): voiddef add_property_override(self, property_path: str, value: Any) -> Nonepublic void addPropertyOverride(String propertyPath, Object value)public void AddPropertyOverride(string propertyPath, object value)func AddPropertyOverride(PropertyPath *string, Value interface{})#Syntactic sugar for addOverride("Properties.<...>", value).
2 parameters
Parameters
propertyPathproperty_pathpropertyPathpropertyPathPropertyPath— The path of the property.valuevaluevaluevalueValue— The value.
addResourceDependency(target: CfnResource, reason?: string): voiddef add_resource_dependency(self, target: CfnResource, reason: typing.Optional[str] = None) -> Nonepublic void addResourceDependency(CfnResource target, String reason)public void AddResourceDependency(CfnResource target, string? reason = null)func AddResourceDependency(Target CfnResource, Reason *string)#notes
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
This method only adds dependencies between L1 resources. If you are looking for a generic construct-to-construct dependency mechanism that works for all constructs including L2s, use construct.node.addDependency instead.
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#When set, any cross-stack reference to this resource will use the specified strength instead of the global default from the consuming stack's context.
1 parameter
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): voiddef apply_removal_policy(self, policy: typing.Optional[RemovalPolicy] = None, options: typing.Optional[RemovalPolicyOptions] = None) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy, RemovalPolicyOptions options)public void ApplyRemovalPolicy(RemovalPolicy? policy = null, RemovalPolicyOptions? options = null)func ApplyRemovalPolicy(Policy RemovalPolicy, Options RemovalPolicyOptions)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:
cfnPropertyName(cdkPropertyName: string): stringdef cfn_property_name(self, cdk_property_name: str) -> strpublic String cfnPropertyName(String cdkPropertyName)public string CfnPropertyName(string cdkPropertyName)func CfnPropertyName(CdkPropertyName *string) *string#getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Referencedef get_att(self, attribute_name: str, type_hint: typing.Optional[ResolutionTypeHint] = None) -> Referencepublic Reference getAtt(String attributeName, ResolutionTypeHint typeHint)public Reference GetAtt(string attributeName, ResolutionTypeHint? typeHint = null)func GetAtt(AttributeName *string, TypeHint ResolutionTypeHint) Reference#Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.
1 parameter
Parameters
attributeNameattribute_nameattributeNameattributeNameAttributeName— The name of the attribute.
getMetadata(key: string): anydef get_metadata(self, key: str) -> Anypublic Object getMetadata(String key)public object GetMetadata(string key)func GetMetadata(Key *string) interface{}#inspect(inspector: TreeInspector): voiddef inspect(self, inspector: TreeInspector) -> Nonepublic void inspect(TreeInspector inspector)public void Inspect(TreeInspector inspector)func Inspect(Inspector TreeInspector)#1 parameter
Parameters
inspectorinspectorinspectorinspectorInspector— tree inspector to collect and process attributes.
isCfnCacheCluster(x: any): boolean@staticmethod def is_cfn_cache_cluster(x: Any) -> boolpublic static Boolean isCfnCacheCluster(Object x)public static bool IsCfnCacheCluster(object x)func IsCfnCacheCluster(X interface{}) *boolstatic#isCfnElement(x: any): boolean@staticmethod def is_cfn_element(x: Any) -> boolpublic static Boolean isCfnElement(Object x)public static bool IsCfnElement(object x)func IsCfnElement(X interface{}) *boolstatic#Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.
returns
Returns: The construct as a stack element or undefined if it is not a stack element.
isCfnResource(x: any): boolean@staticmethod def is_cfn_resource(x: Any) -> boolpublic static Boolean isCfnResource(Object x)public static bool IsCfnResource(object x)func IsCfnResource(X interface{}) *boolstatic#isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
obtainDependencies(): Stack | CfnResource[]def obtain_dependencies(self, ) -> typing.List[typing.Union[Stack, CfnResource]]public List<Stack> obtainDependencies()public Stack[] ObtainDependencies()func ObtainDependencies() *[]interface{}#For resources depended on directly, returns the CfnResource object. For dependencies on other stacks, returns the Stack object. The order of the array is not guaranteed.
overrideLogicalId(newLogicalId: string): voiddef override_logical_id(self, new_logical_id: str) -> Nonepublic void overrideLogicalId(String newLogicalId)public void OverrideLogicalId(string newLogicalId)func OverrideLogicalId(NewLogicalId *string)#1 parameter
Parameters
newLogicalIdnew_logical_idnewLogicalIdnewLogicalIdNewLogicalId— The new logical ID to use for this stack element.
removeDependency(target: CfnResource): voiddef remove_dependency(self, target: CfnResource) -> Nonepublic void removeDependency(CfnResource target)public void RemoveDependency(CfnResource target)func RemoveDependency(Target CfnResource)deprecated#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
removeResourceDependency(target: CfnResource): voiddef remove_resource_dependency(self, target: CfnResource) -> Nonepublic void removeResourceDependency(CfnResource target)public void RemoveResourceDependency(CfnResource target)func RemoveResourceDependency(Target CfnResource)#This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
replaceDependency(target: CfnResource, newTarget: CfnResource): voiddef replace_dependency(self, target: CfnResource, new_target: CfnResource) -> Nonepublic void replaceDependency(CfnResource target, CfnResource newTarget)public void ReplaceDependency(CfnResource target, CfnResource newTarget)func ReplaceDependency(Target CfnResource, NewTarget CfnResource)#2 parameters
Parameters
targettargettargettargetTarget— The dependency to replace.newTargetnew_targetnewTargetnewTargetNewTarget— The new dependency to add.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#returns
Returns: a string representation of this resource
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.