clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | aws.memorydb.clusters |
Fields
The following fields are returned by SELECT queries:
- describe_clusters
| Name | Datatype | Description |
|---|---|---|
acl_name | string | The name of the Access Control List associated with this cluster. (pattern: <code>[a-zA-Z][a-zA-Z0-9-]*</code>) |
arn | string | The Amazon Resource Name (ARN) of the cluster. |
auto_minor_version_upgrade | boolean | When set to true, the cluster will automatically receive minor engine version upgrades after launch. |
availability_mode | string | Indicates if the cluster has a Multi-AZ configuration (multiaz) or not (singleaz). (singleaz, multiaz) |
cluster_endpoint | object | The cluster's configuration endpoint |
data_tiering | string | Enables 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) |
description | string | A description of the cluster |
engine | string | The name of the engine used by the cluster. |
engine_patch_version | string | The Redis OSS engine patch version used by the cluster |
engine_version | string | The Redis OSS engine version used by the cluster |
ip_discovery | string | The 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_id | string | The ID of the KMS key used to encrypt the cluster |
maintenance_window | string | Specifies 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_name | string | The name of the multi-Region cluster that this cluster belongs to. |
name | string | The user-supplied name of the cluster. This identifier is a unique key that identifies a cluster. |
network_type | string | The 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_type | string | The cluster's node type |
number_of_shards | integer | The number of shards in the cluster |
parameter_group_name | string | The name of the parameter group used by the cluster |
parameter_group_status | string | The status of the parameter group used by the cluster, for example 'active' or 'applying'. |
pending_updates | object | A group of settings that are currently being applied. |
security_groups | array | A list of security groups used by the cluster |
shards | array | A list of shards that are members of the cluster. |
snapshot_retention_limit | integer | The 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_window | string | The 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_arn | string | The Amazon Resource Name (ARN) of the SNS notification topic |
sns_topic_status | string | The SNS topic must be in Active status to receive notifications |
status | string | The status of the cluster. For example, Available, Updating, Creating. |
subnet_group_name | string | The name of the subnet group used by the cluster |
tls_enabled | boolean | A flag to indicate if In-transit encryption is enabled |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_clusters | select | region | Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cluster if a cluster name is supplied. | |
create_cluster | insert | region, ClusterName, NodeType, ACLName | Creates a cluster. All nodes in the cluster run the same protocol-compliant engine software. | |
update_cluster | update | region, ClusterName | 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. | |
delete_cluster | delete | region | 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. | |
batch_update_cluster | exec | region, ClusterNames | Apply the service update to a list of clusters supplied. For more information on service updates and applying them, see Applying the service updates. | |
failover_shard | exec | region, ClusterName, ShardName | Used 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_clusters
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
- create_cluster
- Manifest
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
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: region
value: "{{ region }}"
description: Required parameter for the clusters resource.
- name: ClusterName
value: "{{ ClusterName }}"
description: |
The name of the cluster. This value must be unique as it also serves as the cluster identifier.
- name: NodeType
value: "{{ NodeType }}"
description: |
The compute and memory capacity of the nodes in the cluster.
- name: MultiRegionClusterName
value: "{{ MultiRegionClusterName }}"
description: |
The name of the multi-Region cluster to be created.
- name: ParameterGroupName
value: "{{ ParameterGroupName }}"
description: |
The name of the parameter group associated with the cluster.
- name: Description
value: "{{ Description }}"
description: |
An optional description of the cluster.
- name: NumShards
value: {{ NumShards }}
description: |
The number of shards the cluster will contain. The default value is 1.
- name: NumReplicasPerShard
value: {{ NumReplicasPerShard }}
description: |
The number of replicas to apply to each shard. The default value is 1. The maximum is 5.
- name: SubnetGroupName
value: "{{ SubnetGroupName }}"
description: |
The name of the subnet group to be used for the cluster.
- name: SecurityGroupIds
value:
- "{{ SecurityGroupIds }}"
description: |
A list of security group names to associate with this cluster.
- name: MaintenanceWindow
value: "{{ MaintenanceWindow }}"
description: |
Specifies 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. Valid values for ddd are: sun mon tue wed thu fri sat Example: sun:23:00-mon:01:30
- name: Port
value: {{ Port }}
description: |
The port number on which each of the nodes accepts connections.
- name: SnsTopicArn
value: "{{ SnsTopicArn }}"
description: |
The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.
- name: TLSEnabled
value: {{ TLSEnabled }}
description: |
A flag to enable in-transit encryption on the cluster.
- name: KmsKeyId
value: "{{ KmsKeyId }}"
description: |
The ID of the KMS key used to encrypt the cluster.
- name: SnapshotArns
value:
- "{{ SnapshotArns }}"
description: |
A list of Amazon Resource Names (ARN) that uniquely identify the RDB snapshot files stored in Amazon S3. The snapshot files are used to populate the new cluster. The Amazon S3 object name in the ARN cannot contain any commas.
- name: SnapshotName
value: "{{ SnapshotName }}"
description: |
The name of a snapshot from which to restore data into the new cluster. The snapshot status changes to restoring while the new cluster is being created.
- name: SnapshotRetentionLimit
value: {{ SnapshotRetentionLimit }}
description: |
The 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.
- name: Tags
description: |
A list of tags to be added to this resource. Tags are comma-separated key,value pairs (e.g. Key=myKey, Value=myKeyValue. You can include multiple tags as shown following: Key=myKey, Value=myKeyValue Key=mySecondKey, Value=mySecondKeyValue.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: SnapshotWindow
value: "{{ SnapshotWindow }}"
description: |
The 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.
- name: ACLName
value: "{{ ACLName }}"
description: |
The name of the Access Control List to associate with the cluster.
- name: Engine
value: "{{ Engine }}"
description: |
The name of the engine to be used for the cluster.
- name: EngineVersion
value: "{{ EngineVersion }}"
description: |
The version number of the Redis OSS engine to be used for the cluster.
- name: AutoMinorVersionUpgrade
value: {{ AutoMinorVersionUpgrade }}
description: |
When set to true, the cluster will automatically receive minor engine version upgrades after launch.
- name: DataTiering
value: {{ DataTiering }}
description: |
Enables 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.
- name: NetworkType
value: "{{ NetworkType }}"
description: |
Specifies the IP address type for the cluster. Valid values are 'ipv4', 'ipv6', or 'dual_stack'. When set to 'ipv4', the cluster will only be accessible via IPv4 addresses. When set to 'ipv6', the cluster will only be accessible via IPv6 addresses. When set to 'dual_stack', the cluster will be accessible via both IPv4 and IPv6 addresses. If not specified, the default is 'ipv4'.
valid_values: ['ipv4', 'ipv6', 'dual_stack']
- name: IpDiscovery
value: "{{ IpDiscovery }}"
description: |
The mechanism for discovering IP addresses for the cluster discovery protocol. Valid values are 'ipv4' or 'ipv6'. When set to 'ipv4', cluster discovery functions such as cluster slots, cluster shards, and cluster nodes return IPv4 addresses for cluster nodes. When set to 'ipv6', the cluster discovery functions return IPv6 addresses for cluster nodes. The value must be compatible with the NetworkType parameter. If not specified, the default is 'ipv4'.
valid_values: ['ipv4', 'ipv6']
UPDATE examples
- update_cluster
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
- delete_cluster
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
- batch_update_cluster
- failover_shard
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 }}"
}'
;
Used 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.
EXEC aws.memorydb.clusters.failover_shard
@region='{{ region }}' --required
@@json=
'{
"ClusterName": "{{ ClusterName }}",
"ShardName": "{{ ShardName }}"
}'
;