CfnReplicationGroupPropsMixin

class aws_cdk.mixins_preview.aws_elasticache.mixins.CfnReplicationGroupPropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::ElastiCache::ReplicationGroup resource 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticache-replicationgroup.html

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:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

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 x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CloudWatchLogsDestinationDetailsProperty

class CfnReplicationGroupPropsMixin.CloudWatchLogsDestinationDetailsProperty(*, log_group=None)

Bases: object

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.

Parameters:

log_group (Optional[str]) – The name of the CloudWatch Logs log group.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-cloudwatchlogsdestinationdetails.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-cloudwatchlogsdestinationdetails.html#cfn-elasticache-replicationgroup-cloudwatchlogsdestinationdetails-loggroup

DestinationDetailsProperty

class CfnReplicationGroupPropsMixin.DestinationDetailsProperty(*, cloud_watch_logs_details=None, kinesis_firehose_details=None)

Bases: object

Configuration 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-destinationdetails.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-destinationdetails.html#cfn-elasticache-replicationgroup-destinationdetails-cloudwatchlogsdetails

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-destinationdetails.html#cfn-elasticache-replicationgroup-destinationdetails-kinesisfirehosedetails

KinesisFirehoseDestinationDetailsProperty

class CfnReplicationGroupPropsMixin.KinesisFirehoseDestinationDetailsProperty(*, delivery_stream=None)

Bases: object

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.

Parameters:

delivery_stream (Optional[str]) – The name of the Kinesis Data Firehose delivery stream.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-kinesisfirehosedestinationdetails.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-kinesisfirehosedestinationdetails.html#cfn-elasticache-replicationgroup-kinesisfirehosedestinationdetails-deliverystream

LogDeliveryConfigurationRequestProperty

class CfnReplicationGroupPropsMixin.LogDeliveryConfigurationRequestProperty(*, destination_details=None, destination_type=None, log_format=None, log_type=None)

Bases: object

Specifies 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 either cloudwatch-logs or kinesis-firehose .

  • log_format (Optional[str]) – Valid values are either json or text .

  • log_type (Optional[str]) – Valid value is either slow-log , which refers to slow-log or engine-log .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-logdeliveryconfigurationrequest.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-logdeliveryconfigurationrequest.html#cfn-elasticache-replicationgroup-logdeliveryconfigurationrequest-destinationdetails

destination_type

Specify either CloudWatch Logs or Kinesis Data Firehose as the destination type.

Valid values are either cloudwatch-logs or kinesis-firehose .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-logdeliveryconfigurationrequest.html#cfn-elasticache-replicationgroup-logdeliveryconfigurationrequest-destinationtype

log_format

Valid values are either json or text .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-logdeliveryconfigurationrequest.html#cfn-elasticache-replicationgroup-logdeliveryconfigurationrequest-logformat

log_type

Valid value is either slow-log , which refers to slow-log or engine-log .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-logdeliveryconfigurationrequest.html#cfn-elasticache-replicationgroup-logdeliveryconfigurationrequest-logtype

NodeGroupConfigurationProperty

class CfnReplicationGroupPropsMixin.NodeGroupConfigurationProperty(*, node_group_id=None, primary_availability_zone=None, replica_availability_zones=None, replica_count=None, slots=None)

Bases: object

NodeGroupConfiguration is a property of the AWS::ElastiCache::ReplicationGroup resource 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 of ReplicaCount or ReplicasPerNodeGroup if 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 an UseOnlineResharding update 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 the Slots property of each NodeGroupConfiguration from the stack template, as it no longer reflects the actual values in each node group. For more information, see UseOnlineResharding Policy .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-nodegroupconfiguration.html

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-nodegroupconfiguration.html#cfn-elasticache-replicationgroup-nodegroupconfiguration-nodegroupid

primary_availability_zone

The Availability Zone where the primary node of this node group (shard) is launched.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-nodegroupconfiguration.html#cfn-elasticache-replicationgroup-nodegroupconfiguration-primaryavailabilityzone

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 ReplicaCount or ReplicasPerNodeGroup if not specified.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-nodegroupconfiguration.html#cfn-elasticache-replicationgroup-nodegroupconfiguration-replicaavailabilityzones

replica_count

The number of read replica nodes in this node group (shard).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-nodegroupconfiguration.html#cfn-elasticache-replicationgroup-nodegroupconfiguration-replicacount

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 UseOnlineResharding update 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 the Slots property of each NodeGroupConfiguration from the stack template, as it no longer reflects the actual values in each node group. For more information, see UseOnlineResharding Policy .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-replicationgroup-nodegroupconfiguration.html#cfn-elasticache-replicationgroup-nodegroupconfiguration-slots