clusters
Creates, updates, deletes or gets a cluster
resource or lists clusters
in a region
Overview
Name | clusters |
Type | Resource |
Description | The AWS::MemoryDB::Cluster resource creates an Amazon MemoryDB Cluster. |
Id | aws.memorydb.clusters |
Fields
Name | Datatype | Description |
---|---|---|
cluster_name | string | The name of the cluster. This value must be unique as it also serves as the cluster identifier. |
description | string | An optional description of the cluster. |
status | string | The status of the cluster. For example, Available, Updating, Creating. |
node_type | string | The compute and memory capacity of the nodes in the cluster. |
num_shards | integer | The number of shards the cluster will contain. |
num_replicas_per_shard | integer | The number of replicas to apply to each shard. The limit is 5. |
subnet_group_name | string | The name of the subnet group to be used for the cluster. |
security_group_ids | array | One or more Amazon VPC security groups associated with this 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. |
parameter_group_name | string | The name of the parameter group associated with the cluster. |
parameter_group_status | string | The status of the parameter group used by the cluster. |
port | integer | The port number on which each member of the cluster accepts connections. |
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 cluster. |
acl_name | string | The name of the Access Control List to associate with the cluster. |
sns_topic_arn | string | The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. |
sns_topic_status | string | The status of the Amazon SNS notification topic. Notifications are sent only if the status is enabled. |
tls_enabled | boolean | A flag that enables in-transit encryption when set to true. You cannot modify the value of TransitEncryptionEnabled after the cluster is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled to true when you create a cluster. |
data_tiering | object | Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must be set when using r6gd nodes. |
kms_key_id | string | The ID of the KMS key used to encrypt the cluster. |
snapshot_arns | array | 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. |
snapshot_name | string | 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. |
final_snapshot_name | string | The user-supplied name of a final cluster snapshot. This is the unique name that identifies the snapshot. MemoryDB creates the snapshot, and then deletes the cluster immediately afterward. |
arn | string | The Amazon Resource Name (ARN) of the cluster. |
engine_version | string | The Redis engine version used by the cluster. |
cluster_endpoint | object | The cluster endpoint. |
auto_minor_version_upgrade | boolean | A flag that enables automatic minor version upgrade when set to true. You cannot modify the value of AutoMinorVersionUpgrade after the cluster is created. To enable AutoMinorVersionUpgrade on a cluster you must set AutoMinorVersionUpgrade to true when you create a cluster. |
tags | array | An array of key-value pairs to apply to this cluster. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ClusterName, NodeType, ACLName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all clusters
in a region.
SELECT
region,
cluster_name,
description,
status,
node_type,
num_shards,
num_replicas_per_shard,
subnet_group_name,
security_group_ids,
maintenance_window,
parameter_group_name,
parameter_group_status,
port,
snapshot_retention_limit,
snapshot_window,
acl_name,
sns_topic_arn,
sns_topic_status,
tls_enabled,
data_tiering,
kms_key_id,
snapshot_arns,
snapshot_name,
final_snapshot_name,
arn,
engine_version,
cluster_endpoint,
auto_minor_version_upgrade,
tags
FROM aws.memorydb.clusters
WHERE region = 'us-east-1';
Gets all properties from an individual cluster
.
SELECT
region,
cluster_name,
description,
status,
node_type,
num_shards,
num_replicas_per_shard,
subnet_group_name,
security_group_ids,
maintenance_window,
parameter_group_name,
parameter_group_status,
port,
snapshot_retention_limit,
snapshot_window,
acl_name,
sns_topic_arn,
sns_topic_status,
tls_enabled,
data_tiering,
kms_key_id,
snapshot_arns,
snapshot_name,
final_snapshot_name,
arn,
engine_version,
cluster_endpoint,
auto_minor_version_upgrade,
tags
FROM aws.memorydb.clusters
WHERE region = 'us-east-1' AND data__Identifier = '<ClusterName>';
INSERT
example
Use the following StackQL query and manifest file to create a new cluster
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.memorydb.clusters (
ClusterName,
NodeType,
ACLName,
region
)
SELECT
'{{ ClusterName }}',
'{{ NodeType }}',
'{{ ACLName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.memorydb.clusters (
ClusterName,
Description,
NodeType,
NumShards,
NumReplicasPerShard,
SubnetGroupName,
SecurityGroupIds,
MaintenanceWindow,
ParameterGroupName,
Port,
SnapshotRetentionLimit,
SnapshotWindow,
ACLName,
SnsTopicArn,
SnsTopicStatus,
TLSEnabled,
DataTiering,
KmsKeyId,
SnapshotArns,
SnapshotName,
FinalSnapshotName,
EngineVersion,
ClusterEndpoint,
AutoMinorVersionUpgrade,
Tags,
region
)
SELECT
'{{ ClusterName }}',
'{{ Description }}',
'{{ NodeType }}',
'{{ NumShards }}',
'{{ NumReplicasPerShard }}',
'{{ SubnetGroupName }}',
'{{ SecurityGroupIds }}',
'{{ MaintenanceWindow }}',
'{{ ParameterGroupName }}',
'{{ Port }}',
'{{ SnapshotRetentionLimit }}',
'{{ SnapshotWindow }}',
'{{ ACLName }}',
'{{ SnsTopicArn }}',
'{{ SnsTopicStatus }}',
'{{ TLSEnabled }}',
'{{ DataTiering }}',
'{{ KmsKeyId }}',
'{{ SnapshotArns }}',
'{{ SnapshotName }}',
'{{ FinalSnapshotName }}',
'{{ EngineVersion }}',
'{{ ClusterEndpoint }}',
'{{ AutoMinorVersionUpgrade }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster
props:
- name: ClusterName
value: '{{ ClusterName }}'
- name: Description
value: '{{ Description }}'
- name: NodeType
value: '{{ NodeType }}'
- name: NumShards
value: '{{ NumShards }}'
- name: NumReplicasPerShard
value: '{{ NumReplicasPerShard }}'
- name: SubnetGroupName
value: '{{ SubnetGroupName }}'
- name: SecurityGroupIds
value:
- '{{ SecurityGroupIds[0] }}'
- name: MaintenanceWindow
value: '{{ MaintenanceWindow }}'
- name: ParameterGroupName
value: '{{ ParameterGroupName }}'
- name: Port
value: '{{ Port }}'
- name: SnapshotRetentionLimit
value: '{{ SnapshotRetentionLimit }}'
- name: SnapshotWindow
value: '{{ SnapshotWindow }}'
- name: ACLName
value: '{{ ACLName }}'
- name: SnsTopicArn
value: '{{ SnsTopicArn }}'
- name: SnsTopicStatus
value: '{{ SnsTopicStatus }}'
- name: TLSEnabled
value: '{{ TLSEnabled }}'
- name: DataTiering
value: '{{ DataTiering }}'
- name: KmsKeyId
value: '{{ KmsKeyId }}'
- name: SnapshotArns
value:
- '{{ SnapshotArns[0] }}'
- name: SnapshotName
value: '{{ SnapshotName }}'
- name: FinalSnapshotName
value: '{{ FinalSnapshotName }}'
- name: EngineVersion
value: '{{ EngineVersion }}'
- name: ClusterEndpoint
value:
Address: '{{ Address }}'
Port: '{{ Port }}'
- name: AutoMinorVersionUpgrade
value: '{{ AutoMinorVersionUpgrade }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.memorydb.clusters
WHERE data__Identifier = '<ClusterName>'
AND region = 'us-east-1';
Permissions
To operate on the clusters
resource, the following permissions are required:
Create
memorydb:CreateCluster,
memorydb:DescribeClusters,
memorydb:ListTags
Read
memorydb:DescribeClusters,
memorydb:ListTags
Update
memorydb:UpdateCluster,
memorydb:DescribeClusters,
memorydb:ListTags,
memorydb:TagResource,
memorydb:UntagResource
Delete
memorydb:DeleteCluster,
memorydb:DescribeClusters
List
memorydb:DescribeClusters