CfnReplicationGroupPropsMixin
- class aws_cdk.mixins_preview.aws_elasticache.mixins.CfnReplicationGroupPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::ElastiCache::ReplicationGroupresource creates an Amazon ElastiCache (Valkey or Redis OSS) replication group.A Valkey or Redis OSS (cluster mode disabled) replication group is a collection of cache clusters, where one of the clusters is a primary read-write cluster and the others are read-only replicas.
A Valkey or Redis OSS (cluster mode enabled) cluster is comprised of from 1 to 90 shards (API/CLI: node groups). Each shard has a primary node and up to 5 read-only replica nodes. The configuration can range from 90 shards and 0 replicas to 15 shards and 5 replicas, which is the maximum number or replicas allowed.
The node or shard limit can be increased to a maximum of 500 per cluster if the engine version is Valkey 7.2 or higher, or Redis OSS 5.0.6 or higher. For example, you can choose to configure a 500 node cluster that ranges between 83 shards (one primary and 5 replicas per shard) and 500 shards (single primary and no replicas). Make sure there are enough available IP addresses to accommodate the increase. Common pitfalls include the subnets in the subnet group have too small a CIDR range or the subnets are shared and heavily used by other clusters. For more information, see Creating a Subnet Group . For versions below 5.0.6, the limit is 250 per cluster.
To request a limit increase, see Amazon Service Limits and choose the limit type Nodes per cluster per instance type .
- See:
- CloudformationResource:
AWS::ElastiCache::ReplicationGroup
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_elasticache import mixins as elasticache_mixins cfn_replication_group_props_mixin = elasticache_mixins.CfnReplicationGroupPropsMixin(elasticache_mixins.CfnReplicationGroupMixinProps( at_rest_encryption_enabled=False, auth_token="authToken", automatic_failover_enabled=False, auto_minor_version_upgrade=False, cache_node_type="cacheNodeType", cache_parameter_group_name="cacheParameterGroupName", cache_security_group_names=["cacheSecurityGroupNames"], cache_subnet_group_name="cacheSubnetGroupName", cluster_mode="clusterMode", data_tiering_enabled=False, engine="engine", engine_version="engineVersion", global_replication_group_id="globalReplicationGroupId", ip_discovery="ipDiscovery", kms_key_id="kmsKeyId", log_delivery_configurations=[elasticache_mixins.CfnReplicationGroupPropsMixin.LogDeliveryConfigurationRequestProperty( destination_details=elasticache_mixins.CfnReplicationGroupPropsMixin.DestinationDetailsProperty( cloud_watch_logs_details=elasticache_mixins.CfnReplicationGroupPropsMixin.CloudWatchLogsDestinationDetailsProperty( log_group="logGroup" ), kinesis_firehose_details=elasticache_mixins.CfnReplicationGroupPropsMixin.KinesisFirehoseDestinationDetailsProperty( delivery_stream="deliveryStream" ) ), destination_type="destinationType", log_format="logFormat", log_type="logType" )], multi_az_enabled=False, network_type="networkType", node_group_configuration=[elasticache_mixins.CfnReplicationGroupPropsMixin.NodeGroupConfigurationProperty( node_group_id="nodeGroupId", primary_availability_zone="primaryAvailabilityZone", replica_availability_zones=["replicaAvailabilityZones"], replica_count=123, slots="slots" )], notification_topic_arn="notificationTopicArn", num_cache_clusters=123, num_node_groups=123, port=123, preferred_cache_cluster_aZs=["preferredCacheClusterAZs"], preferred_maintenance_window="preferredMaintenanceWindow", primary_cluster_id="primaryClusterId", replicas_per_node_group=123, replication_group_description="replicationGroupDescription", replication_group_id="replicationGroupId", security_group_ids=["securityGroupIds"], snapshot_arns=["snapshotArns"], snapshot_name="snapshotName", snapshot_retention_limit=123, snapshotting_cluster_id="snapshottingClusterId", snapshot_window="snapshotWindow", tags=[CfnTag( key="key", value="value" )], transit_encryption_enabled=False, transit_encryption_mode="transitEncryptionMode", user_group_ids=["userGroupIds"] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::ElastiCache::ReplicationGroup.- Parameters:
props (
Union[CfnReplicationGroupMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['atRestEncryptionEnabled', 'authToken', 'automaticFailoverEnabled', 'autoMinorVersionUpgrade', 'cacheNodeType', 'cacheParameterGroupName', 'cacheSecurityGroupNames', 'cacheSubnetGroupName', 'clusterMode', 'dataTieringEnabled', 'engine', 'engineVersion', 'globalReplicationGroupId', 'ipDiscovery', 'kmsKeyId', 'logDeliveryConfigurations', 'multiAzEnabled', 'networkType', 'nodeGroupConfiguration', 'notificationTopicArn', 'numCacheClusters', 'numNodeGroups', 'port', 'preferredCacheClusterAZs', 'preferredMaintenanceWindow', 'primaryClusterId', 'replicasPerNodeGroup', 'replicationGroupDescription', 'replicationGroupId', 'securityGroupIds', 'snapshotArns', 'snapshotName', 'snapshotRetentionLimit', 'snapshottingClusterId', 'snapshotWindow', 'tags', 'transitEncryptionEnabled', 'transitEncryptionMode', 'userGroupIds']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CloudWatchLogsDestinationDetailsProperty
- class CfnReplicationGroupPropsMixin.CloudWatchLogsDestinationDetailsProperty(*, log_group=None)
Bases:
objectThe configuration details of the CloudWatch Logs destination.
Note that this field is marked as required but only if CloudWatch Logs was chosen as the destination.
- Parameters:
log_group (
Optional[str]) – The name of the CloudWatch Logs log group.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_elasticache import mixins as elasticache_mixins cloud_watch_logs_destination_details_property = elasticache_mixins.CfnReplicationGroupPropsMixin.CloudWatchLogsDestinationDetailsProperty( log_group="logGroup" )
Attributes
- log_group
The name of the CloudWatch Logs log group.
DestinationDetailsProperty
- class CfnReplicationGroupPropsMixin.DestinationDetailsProperty(*, cloud_watch_logs_details=None, kinesis_firehose_details=None)
Bases:
objectConfiguration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.
- Parameters:
cloud_watch_logs_details (
Union[IResolvable,CloudWatchLogsDestinationDetailsProperty,Dict[str,Any],None]) – The configuration details of the CloudWatch Logs destination. Note that this field is marked as required but only if CloudWatch Logs was chosen as the destination.kinesis_firehose_details (
Union[IResolvable,KinesisFirehoseDestinationDetailsProperty,Dict[str,Any],None]) – The configuration details of the Kinesis Data Firehose destination. Note that this field is marked as required but only if Kinesis Data Firehose was chosen as the destination.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_elasticache import mixins as elasticache_mixins destination_details_property = elasticache_mixins.CfnReplicationGroupPropsMixin.DestinationDetailsProperty( cloud_watch_logs_details=elasticache_mixins.CfnReplicationGroupPropsMixin.CloudWatchLogsDestinationDetailsProperty( log_group="logGroup" ), kinesis_firehose_details=elasticache_mixins.CfnReplicationGroupPropsMixin.KinesisFirehoseDestinationDetailsProperty( delivery_stream="deliveryStream" ) )
Attributes
- cloud_watch_logs_details
The configuration details of the CloudWatch Logs destination.
Note that this field is marked as required but only if CloudWatch Logs was chosen as the destination.
- kinesis_firehose_details
The configuration details of the Kinesis Data Firehose destination.
Note that this field is marked as required but only if Kinesis Data Firehose was chosen as the destination.
KinesisFirehoseDestinationDetailsProperty
- class CfnReplicationGroupPropsMixin.KinesisFirehoseDestinationDetailsProperty(*, delivery_stream=None)
Bases:
objectThe configuration details of the Kinesis Data Firehose destination.
Note that this field is marked as required but only if Kinesis Data Firehose was chosen as the destination.
- Parameters:
delivery_stream (
Optional[str]) – The name of the Kinesis Data Firehose delivery stream.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_elasticache import mixins as elasticache_mixins kinesis_firehose_destination_details_property = elasticache_mixins.CfnReplicationGroupPropsMixin.KinesisFirehoseDestinationDetailsProperty( delivery_stream="deliveryStream" )
Attributes
- delivery_stream
The name of the Kinesis Data Firehose delivery stream.
LogDeliveryConfigurationRequestProperty
- class CfnReplicationGroupPropsMixin.LogDeliveryConfigurationRequestProperty(*, destination_details=None, destination_type=None, log_format=None, log_type=None)
Bases:
objectSpecifies the destination, format and type of the logs.
- Parameters:
destination_details (
Union[IResolvable,DestinationDetailsProperty,Dict[str,Any],None]) – Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.destination_type (
Optional[str]) – Specify either CloudWatch Logs or Kinesis Data Firehose as the destination type. Valid values are eithercloudwatch-logsorkinesis-firehose.log_format (
Optional[str]) – Valid values are eitherjsonortext.log_type (
Optional[str]) – Valid value is eitherslow-log, which refers to slow-log orengine-log.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_elasticache import mixins as elasticache_mixins log_delivery_configuration_request_property = elasticache_mixins.CfnReplicationGroupPropsMixin.LogDeliveryConfigurationRequestProperty( destination_details=elasticache_mixins.CfnReplicationGroupPropsMixin.DestinationDetailsProperty( cloud_watch_logs_details=elasticache_mixins.CfnReplicationGroupPropsMixin.CloudWatchLogsDestinationDetailsProperty( log_group="logGroup" ), kinesis_firehose_details=elasticache_mixins.CfnReplicationGroupPropsMixin.KinesisFirehoseDestinationDetailsProperty( delivery_stream="deliveryStream" ) ), destination_type="destinationType", log_format="logFormat", log_type="logType" )
Attributes
- destination_details
Configuration details of either a CloudWatch Logs destination or Kinesis Data Firehose destination.
- destination_type
Specify either CloudWatch Logs or Kinesis Data Firehose as the destination type.
Valid values are either
cloudwatch-logsorkinesis-firehose.
- log_format
Valid values are either
jsonortext.
NodeGroupConfigurationProperty
- class CfnReplicationGroupPropsMixin.NodeGroupConfigurationProperty(*, node_group_id=None, primary_availability_zone=None, replica_availability_zones=None, replica_count=None, slots=None)
Bases:
objectNodeGroupConfigurationis a property of theAWS::ElastiCache::ReplicationGroupresource that configures an Amazon ElastiCache (ElastiCache) Valkey or Redis OSS cluster node group.- Parameters:
node_group_id (
Optional[str]) – Either the ElastiCache supplied 4-digit id or a user supplied id for the node group these configuration values apply to.primary_availability_zone (
Optional[str]) – The Availability Zone where the primary node of this node group (shard) is launched.replica_availability_zones (
Optional[Sequence[str]]) – A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value ofReplicaCountorReplicasPerNodeGroupif not specified.replica_count (
Union[int,float,None]) – The number of read replica nodes in this node group (shard).slots (
Optional[str]) – A string of comma-separated values where the first set of values are the slot numbers (zero based), and the second set of values are the keyspaces for each slot. The following example specifies three slots (numbered 0, 1, and 2):0,1,2,0-4999,5000-9999,10000-16,383. If you don’t specify a value, ElastiCache allocates keys equally among each slot. When you use anUseOnlineReshardingupdate policy to update the number of node groups without interruption, ElastiCache evenly distributes the keyspaces between the specified number of slots. This cannot be updated later. Therefore, after updating the number of node groups in this way, you should remove the value specified for theSlotsproperty of eachNodeGroupConfigurationfrom the stack template, as it no longer reflects the actual values in each node group. For more information, see UseOnlineResharding Policy .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_elasticache import mixins as elasticache_mixins node_group_configuration_property = elasticache_mixins.CfnReplicationGroupPropsMixin.NodeGroupConfigurationProperty( node_group_id="nodeGroupId", primary_availability_zone="primaryAvailabilityZone", replica_availability_zones=["replicaAvailabilityZones"], replica_count=123, slots="slots" )
Attributes
- node_group_id
Either the ElastiCache supplied 4-digit id or a user supplied id for the node group these configuration values apply to.
- primary_availability_zone
The Availability Zone where the primary node of this node group (shard) is launched.
- replica_availability_zones
A list of Availability Zones to be used for the read replicas.
The number of Availability Zones in this list must match the value of
ReplicaCountorReplicasPerNodeGroupif not specified.
- replica_count
The number of read replica nodes in this node group (shard).
- slots
A string of comma-separated values where the first set of values are the slot numbers (zero based), and the second set of values are the keyspaces for each slot.
The following example specifies three slots (numbered 0, 1, and 2):
0,1,2,0-4999,5000-9999,10000-16,383.If you don’t specify a value, ElastiCache allocates keys equally among each slot.
When you use an
UseOnlineReshardingupdate policy to update the number of node groups without interruption, ElastiCache evenly distributes the keyspaces between the specified number of slots. This cannot be updated later. Therefore, after updating the number of node groups in this way, you should remove the value specified for theSlotsproperty of eachNodeGroupConfigurationfrom the stack template, as it no longer reflects the actual values in each node group. For more information, see UseOnlineResharding Policy .