clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | aws.dax.clusters |
Fields
The following fields are returned by SELECT queries:
- describe_clusters
| Name | Datatype | Description |
|---|---|---|
active_nodes | integer | The number of nodes in the cluster that are active (i.e., capable of serving requests). |
cluster_arn | string | The Amazon Resource Name (ARN) that uniquely identifies the cluster. |
cluster_discovery_endpoint | object | The endpoint for this DAX cluster, consisting of a DNS name, a port number, and a URL. Applications should use the URL to configure the DAX client to find their cluster. |
cluster_endpoint_encryption_type | string | The type of encryption supported by the cluster's endpoint. Values are: NONE for no encryption TLS for Transport Layer Security (NONE, TLS) |
cluster_name | string | The name of the DAX cluster. |
description | string | The description of the cluster. |
iam_role_arn | string | A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf. |
network_type | string | The IP address type of the cluster. Values are: ipv4 - IPv4 addresses only ipv6 - IPv6 addresses only dual_stack - Both IPv4 and IPv6 addresses (ipv4, ipv6, dual_stack) |
node_ids_to_remove | array | A list of nodes to be removed from the cluster. |
node_type | string | The node type for the nodes in the cluster. (All nodes in a DAX cluster are of the same type.) |
nodes | array | A list of nodes that are currently in the cluster. |
notification_configuration | object | Describes a notification topic and its status. Notification topics are used for publishing DAX events to subscribers using Amazon Simple Notification Service (SNS). |
parameter_group | object | The parameter group being used by nodes in the cluster. |
preferred_maintenance_window | string | A range of time when maintenance of DAX cluster software will be performed. For example: sun:01:00-sun:09:00. Cluster maintenance normally takes less than 30 minutes, and is performed automatically within the maintenance window. |
sse_description | object | The description of the server-side encryption status on the specified DAX cluster. |
security_groups | array | A list of security groups, and the status of each, for the nodes in the cluster. |
status | string | The current status of the cluster. |
subnet_group | string | The subnet group where the DAX cluster is running. |
total_nodes | integer | The total number of nodes in the cluster. |
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 DAX clusters if no cluster identifier is specified, or about a specific DAX cluster if a cluster identifier is supplied. If the cluster is in the CREATING state, only cluster level information will be displayed until all of the nodes are successfully provisioned. If the cluster is in the DELETING state, only cluster level information will be displayed. If nodes are currently being added to the DAX cluster, node endpoint information and creation time for the additional nodes will not be displayed until they are completely provisioned. When the DAX cluster state is available, the cluster is ready for use. If nodes are currently being removed from the DAX cluster, no endpoint information for the removed nodes is displayed. | |
create_cluster | insert | region, ClusterName, NodeType, ReplicationFactor, IamRoleArn | Creates a DAX cluster. All nodes in the cluster run the same DAX caching software. | |
update_cluster | update | region, ClusterName | Modifies the settings for a DAX cluster. You can use this action to change one or more cluster configuration parameters by specifying the parameters and the new values. | |
delete_cluster | delete | region | Deletes a previously provisioned DAX cluster. DeleteCluster deletes all associated nodes, node endpoints and the DAX cluster itself. When you receive a successful response from this action, DAX immediately begins deleting the cluster; you cannot cancel or revert this action. | |
decrease_replication_factor | exec | region, ClusterName, NewReplicationFactor | Removes one or more nodes from a DAX cluster. You cannot use DecreaseReplicationFactor to remove the last node in a DAX cluster. If you need to do this, use DeleteCluster instead. | |
increase_replication_factor | exec | region, ClusterName, NewReplicationFactor | Adds one or more nodes to a DAX cluster. | |
reboot_node | exec | region, ClusterName, NodeId | Reboots a single node of a DAX cluster. The reboot action takes place as soon as possible. During the reboot, the node status is set to REBOOTING. RebootNode restarts the DAX engine process and does not remove the contents of the cache. |
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 DAX clusters if no cluster identifier is specified, or about a specific DAX cluster if a cluster identifier is supplied. If the cluster is in the CREATING state, only cluster level information will be displayed until all of the nodes are successfully provisioned. If the cluster is in the DELETING state, only cluster level information will be displayed. If nodes are currently being added to the DAX cluster, node endpoint information and creation time for the additional nodes will not be displayed until they are completely provisioned. When the DAX cluster state is available, the cluster is ready for use. If nodes are currently being removed from the DAX cluster, no endpoint information for the removed nodes is displayed.
SELECT
active_nodes,
cluster_arn,
cluster_discovery_endpoint,
cluster_endpoint_encryption_type,
cluster_name,
description,
iam_role_arn,
network_type,
node_ids_to_remove,
node_type,
nodes,
notification_configuration,
parameter_group,
preferred_maintenance_window,
sse_description,
security_groups,
status,
subnet_group,
total_nodes
FROM aws.dax.clusters
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_cluster
- Manifest
Creates a DAX cluster. All nodes in the cluster run the same DAX caching software.
INSERT INTO aws.dax.clusters (
ClusterName,
NodeType,
Description,
ReplicationFactor,
AvailabilityZones,
SubnetGroupName,
SecurityGroupIds,
PreferredMaintenanceWindow,
NotificationTopicArn,
IamRoleArn,
ParameterGroupName,
Tags,
SSESpecification,
ClusterEndpointEncryptionType,
NetworkType,
region
)
SELECT
'{{ ClusterName }}' /* required */,
'{{ NodeType }}' /* required */,
'{{ Description }}',
{{ ReplicationFactor }} /* required */,
'{{ AvailabilityZones }}',
'{{ SubnetGroupName }}',
'{{ SecurityGroupIds }}',
'{{ PreferredMaintenanceWindow }}',
'{{ NotificationTopicArn }}',
'{{ IamRoleArn }}' /* required */,
'{{ ParameterGroupName }}',
'{{ Tags }}',
'{{ SSESpecification }}',
'{{ ClusterEndpointEncryptionType }}',
'{{ NetworkType }}',
'{{ 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 cluster identifier. This parameter is stored as a lowercase string. Constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens.
- name: NodeType
value: "{{ NodeType }}"
description: |
The compute and memory capacity of the nodes in the cluster.
- name: Description
value: "{{ Description }}"
description: |
A description of the cluster.
- name: ReplicationFactor
value: {{ ReplicationFactor }}
description: |
The number of nodes in the DAX cluster. A replication factor of 1 will create a single-node cluster, without any read replicas. For additional fault tolerance, you can create a multiple node cluster with one or more read replicas. To do this, set ReplicationFactor to a number between 3 (one primary and two read replicas) and 10 (one primary and nine read replicas). If the AvailabilityZones parameter is provided, its length must equal the ReplicationFactor. Amazon Web Services recommends that you have at least two read replicas per cluster.
- name: AvailabilityZones
value:
- "{{ AvailabilityZones }}"
description: |
The Availability Zones (AZs) in which the cluster nodes will reside after the cluster has been created or updated. If provided, the length of this list must equal the ReplicationFactor parameter. If you omit this parameter, DAX will spread the nodes across Availability Zones for the highest availability.
- name: SubnetGroupName
value: "{{ SubnetGroupName }}"
description: |
The name of the subnet group to be used for the replication group. DAX clusters can only run in an Amazon VPC environment. All of the subnets that you specify in a subnet group must exist in the same VPC.
- name: SecurityGroupIds
value:
- "{{ SecurityGroupIds }}"
description: |
A list of security group IDs to be assigned to each node in the DAX cluster. (Each of the security group ID is system-generated.) If this parameter is not specified, DAX assigns the default VPC security group to each node.
- name: PreferredMaintenanceWindow
value: "{{ PreferredMaintenanceWindow }}"
description: |
Specifies the weekly time range during which maintenance on the DAX 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:05:00-sun:09:00 If you don't specify a preferred maintenance window when you create or modify a cache cluster, DAX assigns a 60-minute maintenance window on a randomly selected day of the week.
- name: NotificationTopicArn
value: "{{ NotificationTopicArn }}"
description: |
The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications will be sent. The Amazon SNS topic owner must be same as the DAX cluster owner.
- name: IamRoleArn
value: "{{ IamRoleArn }}"
description: |
A valid Amazon Resource Name (ARN) that identifies an IAM role. At runtime, DAX will assume this role and use the role's permissions to access DynamoDB on your behalf.
- name: ParameterGroupName
value: "{{ ParameterGroupName }}"
description: |
The parameter group to be associated with the DAX cluster.
- name: Tags
description: |
A set of tags to associate with the DAX cluster.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: SSESpecification
description: |
Represents the settings used to enable server-side encryption on the cluster.
value:
Enabled: {{ Enabled }}
- name: ClusterEndpointEncryptionType
value: "{{ ClusterEndpointEncryptionType }}"
description: |
The type of encryption the cluster's endpoint should support. Values are: NONE for no encryption TLS for Transport Layer Security
valid_values: ['NONE', 'TLS']
- name: NetworkType
value: "{{ NetworkType }}"
description: |
Specifies the IP protocol(s) the cluster uses for network communications. Values are: ipv4 - The cluster is accessible only through IPv4 addresses ipv6 - The cluster is accessible only through IPv6 addresses dual_stack - The cluster is accessible through both IPv4 and IPv6 addresses. If no explicit NetworkType is provided, the network type is derived based on the subnet group's configuration.
valid_values: ['ipv4', 'ipv6', 'dual_stack']
UPDATE examples
- update_cluster
Modifies the settings for a DAX cluster. You can use this action to change one or more cluster configuration parameters by specifying the parameters and the new values.
UPDATE aws.dax.clusters
SET
ClusterName = '{{ ClusterName }}',
Description = '{{ Description }}',
PreferredMaintenanceWindow = '{{ PreferredMaintenanceWindow }}',
NotificationTopicArn = '{{ NotificationTopicArn }}',
NotificationTopicStatus = '{{ NotificationTopicStatus }}',
ParameterGroupName = '{{ ParameterGroupName }}',
SecurityGroupIds = '{{ SecurityGroupIds }}'
WHERE
region = '{{ region }}' --required
AND ClusterName = '{{ ClusterName }}' --required
RETURNING
cluster;
DELETE examples
- delete_cluster
Deletes a previously provisioned DAX cluster. DeleteCluster deletes all associated nodes, node endpoints and the DAX cluster itself. When you receive a successful response from this action, DAX immediately begins deleting the cluster; you cannot cancel or revert this action.
DELETE FROM aws.dax.clusters
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- decrease_replication_factor
- increase_replication_factor
- reboot_node
Removes one or more nodes from a DAX cluster. You cannot use DecreaseReplicationFactor to remove the last node in a DAX cluster. If you need to do this, use DeleteCluster instead.
EXEC aws.dax.clusters.decrease_replication_factor
@region='{{ region }}' --required
@@json=
'{
"ClusterName": "{{ ClusterName }}",
"NewReplicationFactor": {{ NewReplicationFactor }},
"AvailabilityZones": "{{ AvailabilityZones }}",
"NodeIdsToRemove": "{{ NodeIdsToRemove }}"
}'
;
Adds one or more nodes to a DAX cluster.
EXEC aws.dax.clusters.increase_replication_factor
@region='{{ region }}' --required
@@json=
'{
"ClusterName": "{{ ClusterName }}",
"NewReplicationFactor": {{ NewReplicationFactor }},
"AvailabilityZones": "{{ AvailabilityZones }}"
}'
;
Reboots a single node of a DAX cluster. The reboot action takes place as soon as possible. During the reboot, the node status is set to REBOOTING. RebootNode restarts the DAX engine process and does not remove the contents of the cache.
EXEC aws.dax.clusters.reboot_node
@region='{{ region }}' --required
@@json=
'{
"ClusterName": "{{ ClusterName }}",
"NodeId": "{{ NodeId }}"
}'
;