Skip to main content

clusters

Creates, updates, deletes, gets or lists a clusters resource.

Overview

Nameclusters
TypeResource
Idaws.memorydb.clusters

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
acl_namestringThe name of the Access Control List associated with this cluster. (pattern: <code>[a-zA-Z][a-zA-Z0-9-]*</code>)
arnstringThe Amazon Resource Name (ARN) of the cluster.
auto_minor_version_upgradebooleanWhen set to true, the cluster will automatically receive minor engine version upgrades after launch.
availability_modestringIndicates if the cluster has a Multi-AZ configuration (multiaz) or not (singleaz). (singleaz, multiaz)
cluster_endpointobjectThe cluster's configuration endpoint
data_tieringstringEnables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must be set when using r6gd nodes. For more information, see Data tiering. (true, false)
descriptionstringA description of the cluster
enginestringThe name of the engine used by the cluster.
engine_patch_versionstringThe Redis OSS engine patch version used by the cluster
engine_versionstringThe Redis OSS engine version used by the cluster
ip_discoverystringThe mechanism that the cluster uses to discover IP addresses. Returns 'ipv4' when DNS endpoints resolve to IPv4 addresses, or 'ipv6' when DNS endpoints resolve to IPv6 addresses. (ipv4, ipv6)
kms_key_idstringThe ID of the KMS key used to encrypt the cluster
maintenance_windowstringSpecifies the weekly time range during which maintenance on the cluster is performed. 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.
multi_region_cluster_namestringThe name of the multi-Region cluster that this cluster belongs to.
namestringThe user-supplied name of the cluster. This identifier is a unique key that identifies a cluster.
network_typestringThe IP address type for the cluster. Returns 'ipv4' for IPv4 only, 'ipv6' for IPv6 only, or 'dual-stack' if the cluster supports both IPv4 and IPv6 addressing. (ipv4, ipv6, dual_stack)
node_typestringThe cluster's node type
number_of_shardsintegerThe number of shards in the cluster
parameter_group_namestringThe name of the parameter group used by the cluster
parameter_group_statusstringThe status of the parameter group used by the cluster, for example 'active' or 'applying'.
pending_updatesobjectA group of settings that are currently being applied.
security_groupsarrayA list of security groups used by the cluster
shardsarrayA list of shards that are members of the cluster.
snapshot_retention_limitintegerThe number of days for which MemoryDB retains automatic snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.
snapshot_windowstringThe daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example: 05:00-09:00 If you do not specify this parameter, MemoryDB automatically chooses an appropriate time range.
sns_topic_arnstringThe Amazon Resource Name (ARN) of the SNS notification topic
sns_topic_statusstringThe SNS topic must be in Active status to receive notifications
statusstringThe status of the cluster. For example, Available, Updating, Creating.
subnet_group_namestringThe name of the subnet group used by the cluster
tls_enabledbooleanA flag to indicate if In-transit encryption is enabled

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_clustersselectregionReturns information about all provisioned clusters if no cluster identifier is specified, or about a specific cluster if a cluster name is supplied.
create_clusterinsertregion, ClusterName, NodeType, ACLNameCreates a cluster. All nodes in the cluster run the same protocol-compliant engine software.
update_clusterupdateregion, ClusterNameModifies the settings for a cluster. You can use this operation to change one or more cluster configuration settings by specifying the settings and the new values.
delete_clusterdeleteregionDeletes a cluster. It also deletes all associated nodes and node endpoints. CreateSnapshot permission is required to create a final snapshot. Without this permission, the API call will fail with an Access Denied exception.
batch_update_clusterexecregion, ClusterNamesApply the service update to a list of clusters supplied. For more information on service updates and applying them, see Applying the service updates.
failover_shardexecregion, ClusterName, ShardNameUsed to failover a shard. This API is designed for testing the behavior of your application in case of MemoryDB failover. It is not designed to be used as a production-level tool for initiating a failover to overcome a problem you may have with the cluster. Moreover, in certain conditions such as large scale operational events, Amazon may block this API.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cluster if a cluster name is supplied.

SELECT
acl_name,
arn,
auto_minor_version_upgrade,
availability_mode,
cluster_endpoint,
data_tiering,
description,
engine,
engine_patch_version,
engine_version,
ip_discovery,
kms_key_id,
maintenance_window,
multi_region_cluster_name,
name,
network_type,
node_type,
number_of_shards,
parameter_group_name,
parameter_group_status,
pending_updates,
security_groups,
shards,
snapshot_retention_limit,
snapshot_window,
sns_topic_arn,
sns_topic_status,
status,
subnet_group_name,
tls_enabled
FROM aws.memorydb.clusters
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a cluster. All nodes in the cluster run the same protocol-compliant engine software.

INSERT INTO aws.memorydb.clusters (
ClusterName,
NodeType,
MultiRegionClusterName,
ParameterGroupName,
Description,
NumShards,
NumReplicasPerShard,
SubnetGroupName,
SecurityGroupIds,
MaintenanceWindow,
Port,
SnsTopicArn,
TLSEnabled,
KmsKeyId,
SnapshotArns,
SnapshotName,
SnapshotRetentionLimit,
Tags,
SnapshotWindow,
ACLName,
Engine,
EngineVersion,
AutoMinorVersionUpgrade,
DataTiering,
NetworkType,
IpDiscovery,
region
)
SELECT
'{{ ClusterName }}' /* required */,
'{{ NodeType }}' /* required */,
'{{ MultiRegionClusterName }}',
'{{ ParameterGroupName }}',
'{{ Description }}',
{{ NumShards }},
{{ NumReplicasPerShard }},
'{{ SubnetGroupName }}',
'{{ SecurityGroupIds }}',
'{{ MaintenanceWindow }}',
{{ Port }},
'{{ SnsTopicArn }}',
{{ TLSEnabled }},
'{{ KmsKeyId }}',
'{{ SnapshotArns }}',
'{{ SnapshotName }}',
{{ SnapshotRetentionLimit }},
'{{ Tags }}',
'{{ SnapshotWindow }}',
'{{ ACLName }}' /* required */,
'{{ Engine }}',
'{{ EngineVersion }}',
{{ AutoMinorVersionUpgrade }},
{{ DataTiering }},
'{{ NetworkType }}',
'{{ IpDiscovery }}',
'{{ region }}'
RETURNING
cluster
;

UPDATE examples

Modifies the settings for a cluster. You can use this operation to change one or more cluster configuration settings by specifying the settings and the new values.

UPDATE aws.memorydb.clusters
SET
ClusterName = '{{ ClusterName }}',
Description = '{{ Description }}',
SecurityGroupIds = '{{ SecurityGroupIds }}',
MaintenanceWindow = '{{ MaintenanceWindow }}',
SnsTopicArn = '{{ SnsTopicArn }}',
SnsTopicStatus = '{{ SnsTopicStatus }}',
ParameterGroupName = '{{ ParameterGroupName }}',
SnapshotWindow = '{{ SnapshotWindow }}',
SnapshotRetentionLimit = {{ SnapshotRetentionLimit }},
NodeType = '{{ NodeType }}',
Engine = '{{ Engine }}',
EngineVersion = '{{ EngineVersion }}',
ReplicaConfiguration = '{{ ReplicaConfiguration }}',
ShardConfiguration = '{{ ShardConfiguration }}',
ACLName = '{{ ACLName }}',
IpDiscovery = '{{ IpDiscovery }}'
WHERE
region = '{{ region }}' --required
AND ClusterName = '{{ ClusterName }}' --required
RETURNING
cluster;

DELETE examples

Deletes a cluster. It also deletes all associated nodes and node endpoints. CreateSnapshot permission is required to create a final snapshot. Without this permission, the API call will fail with an Access Denied exception.

DELETE FROM aws.memorydb.clusters
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Apply the service update to a list of clusters supplied. For more information on service updates and applying them, see Applying the service updates.

EXEC aws.memorydb.clusters.batch_update_cluster
@region='{{ region }}' --required
@@json=
'{
"ClusterNames": "{{ ClusterNames }}",
"ServiceUpdate": "{{ ServiceUpdate }}"
}'
;