

# AWS CLI를 사용한 DAX 예제
<a name="cli_dax_code_examples"></a>

다음 코드 예제에서는 DAX에서 AWS Command Line Interface를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.

*작업*은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 개별 서비스 함수를 직접적으로 호출하는 방법을 보여주며 관련 시나리오의 컨텍스트에 맞는 작업을 볼 수 있습니다.

각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.

**Topics**
+ [작업](#actions)

## 작업
<a name="actions"></a>

### `create-cluster`
<a name="dax_CreateCluster_cli_topic"></a>

다음 코드 예제에서는 `create-cluster`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 클러스터를 생성하려면**  
다음 `create-cluster` 예제에서는 지정된 설정을 사용하여 DAX 클러스터를 생성합니다.  

```
aws dax create-cluster \
    --cluster-name daxcluster \
    --node-type dax.r4.large \
    --replication-factor 3 \
    --iam-role-arn roleARN  \
    --sse-specification Enabled=true
```
출력:  

```
{
    "Cluster": {
        "ClusterName": "daxcluster",
        "ClusterArn": "arn:aws:dax:us-west-2:123456789012:cache/daxcluster",
        "TotalNodes": 3,
        "ActiveNodes": 0,
        "NodeType": "dax.r4.large",
        "Status": "creating",
        "ClusterDiscoveryEndpoint": {
            "Port": 8111
        },
        "PreferredMaintenanceWindow": "thu:13:00-thu:14:00",
        "SubnetGroup": "default",
        "SecurityGroups": [
            {
                "SecurityGroupIdentifier": "sg-1af6e36e",
                "Status": "active"
            }
        ],
        "IamRoleArn": "arn:aws:iam::123456789012:role/DAXServiceRoleForDynamoDBAccess",
        "ParameterGroup": {
            "ParameterGroupName": "default.dax1.0",
            "ParameterApplyStatus": "in-sync",
            "NodeIdsToReboot": []
        },
        "SSEDescription": {
            "Status": "ENABLED"
        }
    }
}
```
자세한 내용은 *Amazon DynamoDB 개발자 안내서*의 [3단계: DAX 클러스터 생성](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.create-cluster.cli.create-cluster.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/create-cluster.html)를 참조하세요.

### `create-parameter-group`
<a name="dax_CreateParameterGroup_cli_topic"></a>

다음 코드 예제에서는 `create-parameter-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**파라미터 그룹을 생성하려면**  
다음 ‘create-parameter-group’ 예제에서는 지정된 설정을 사용하여 파라미터 그룹을 생성합니다.  

```
aws dax create-parameter-group \
    --parameter-group-name daxparametergroup \
    --description "A new parameter group"
```
출력:  

```
{
    "ParameterGroup": {
        "ParameterGroupName": "daxparametergroup",
        "Description": "A new parameter group"
    }
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.cluster-management.custom-settings.ttl)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/create-parameter-group.html)을 참조하세요.

### `create-subnet-group`
<a name="dax_CreateSubnetGroup_cli_topic"></a>

다음 코드 예제에서는 `create-subnet-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 서브넷 그룹을 생성하려면**  
다음 `create-subnet-group` 예제에서는 지정된 설정을 사용하여 서브넷 그룹을 생성합니다.  

```
aws dax create-subnet-group \
    --subnet-group-name daxSubnetGroup \
    --subnet-ids subnet-11111111 subnet-22222222
```
출력:  

```
{
    "SubnetGroup": {
        "SubnetGroupName": "daxSubnetGroup",
        "VpcId": "vpc-05a1fa8e00c325226",
        "Subnets": [
            {
                "SubnetIdentifier": "subnet-11111111",
                "SubnetAvailabilityZone": "us-west-2b"
            },
            {
                "SubnetIdentifier": "subnet-22222222",
                "SubnetAvailabilityZone": "us-west-2c"
            }
        ]
    }
}
```
자세한 내용은 *Amazon DynamoDB 개발자 안내서*의 [2단계: 서브넷 그룹 생성](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.create-cluster.cli.create-subnet-group.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/create-subnet-group.html)을 참조하세요.

### `decrease-replication-factor`
<a name="dax_DecreaseReplicationFactor_cli_topic"></a>

다음 코드 예제에서는 `decrease-replication-factor`의 사용 방법을 보여줍니다.

**AWS CLI**  
**클러스터에서 하나 이상의 노드를 제거하려면**  
다음 `decrease-replication-factor` 예제에서는 지정된 DAX 클러스터의 노드 수를 1개로 줄입니다.  

```
aws dax decrease-replication-factor \
    --cluster-name daxcluster \
    --new-replication-factor 1
```
출력:  

```
{
    "Cluster": {
        "ClusterName": "daxcluster",
        "ClusterArn": "arn:aws:dax:us-west-2:123456789012:cache/daxcluster",
        "TotalNodes": 3,
        "ActiveNodes": 3,
        "NodeType": "dax.r4.large",
        "Status": "modifying",
        "ClusterDiscoveryEndpoint": {
            "Address": "daxcluster.ey3o9d.clustercfg.dax.usw2.cache.amazonaws.com",
            "Port": 8111
        },
        "Nodes": [
            {
                "NodeId": "daxcluster-a",
                "Endpoint": {
                    "Address": "daxcluster-a.ey3o9d.0001.dax.usw2.cache.amazonaws.com",
                    "Port": 8111
                },
                "NodeCreateTime": 1576625059.509,
                "AvailabilityZone": "us-west-2c",
                "NodeStatus": "available",
                "ParameterGroupStatus": "in-sync"
            },
            {
                "NodeId": "daxcluster-b",
                "Endpoint": {
                    "Address": "daxcluster-b.ey3o9d.0001.dax.usw2.cache.amazonaws.com",
                    "Port": 8111
                },
                "NodeCreateTime": 1576625059.509,
                "AvailabilityZone": "us-west-2a",
                "NodeStatus": "available",
                "ParameterGroupStatus": "in-sync"
            },
            {
                "NodeId": "daxcluster-c",
                "Endpoint": {
                    "Address": "daxcluster-c.ey3o9d.0001.dax.usw2.cache.amazonaws.com",
                    "Port": 8111
                },
                "NodeCreateTime": 1576625059.509,
                "AvailabilityZone": "us-west-2b",
                "NodeStatus": "available",
                "ParameterGroupStatus": "in-sync"
            }
        ],
        "PreferredMaintenanceWindow": "thu:13:00-thu:14:00",
        "SubnetGroup": "default",
        "SecurityGroups": [
            {
                "SecurityGroupIdentifier": "sg-1af6e36e",
                "Status": "active"
            }
        ],
        "IamRoleArn": "arn:aws:iam::123456789012:role/DAXServiceRoleForDynamoDBAccess",
        "ParameterGroup": {
            "ParameterGroupName": "default.dax1.0",
            "ParameterApplyStatus": "in-sync",
            "NodeIdsToReboot": []
        },
        "SSEDescription": {
            "Status": "ENABLED"
        }
    }
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.cluster-management.custom-settings)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DecreaseReplicationFactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/decrease-replication-factor.html)를 참조하세요.

### `delete-cluster`
<a name="dax_DeleteCluster_cli_topic"></a>

다음 코드 예제에서는 `delete-cluster`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 클러스터를 삭제하려면**  
다음 `delete-cluster` 예제에서는 지정된 DAX 클러스터를 삭제합니다.  

```
aws dax delete-cluster \
    --cluster-name daxcluster
```
출력:  

```
{
    "Cluster": {
        "ClusterName": "daxcluster",
        "ClusterArn": "arn:aws:dax:us-west-2:123456789012:cache/daxcluster",
        "TotalNodes": 3,
        "ActiveNodes": 0,
        "NodeType": "dax.r4.large",
        "Status": "deleting",
        "ClusterDiscoveryEndpoint": {
            "Address": "dd.ey3o9d.clustercfg.dax.usw2.cache.amazonaws.com",
            "Port": 8111
        },
        "PreferredMaintenanceWindow": "fri:06:00-fri:07:00",
        "SubnetGroup": "default",
        "SecurityGroups": [
            {
                "SecurityGroupIdentifier": "sg-1af6e36e",
                "Status": "active"
            }
        ],
        "IamRoleArn": "arn:aws:iam::123456789012:role/DAXServiceRoleForDynamoDBAccess",
        "ParameterGroup": {
            "ParameterGroupName": "default.dax1.0",
            "ParameterApplyStatus": "in-sync",
            "NodeIdsToReboot": []
        },
        "SSEDescription": {
            "Status": "ENABLED"
        }
    }
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.cluster-management.deleting)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/delete-cluster.html)를 참조하세요.

### `delete-parameter-group`
<a name="dax_DeleteParameterGroup_cli_topic"></a>

다음 코드 예제에서는 `delete-parameter-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**파라미터 그룹을 삭제하려면**  
다음 `delete-parameter-group` 예제에서는 지정된 DAX 파라미터 그룹을 삭제합니다.  

```
aws dax  delete-parameter-group \
    --parameter-group-name daxparametergroup
```
출력:  

```
{
    "DeletionMessage": "Parameter group daxparametergroup has been deleted."
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/delete-parameter-group.html)을 참조하세요.

### `delete-subnet-group`
<a name="dax_DeleteSubnetGroup_cli_topic"></a>

다음 코드 예제에서는 `delete-subnet-group`의 사용 방법을 보여줍니다.

**AWS CLI**  
**서브넷 그룹을 삭제하려면**  
다음 `delete-subnet-group` 예제에서는 지정된 DAX 서브넷 그룹을 삭제합니다.  

```
aws dax delete-subnet-group \
    --subnet-group-name daxSubnetGroup
```
출력:  

```
{
    "DeletionMessage": "Subnet group daxSubnetGroup has been deleted."
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/delete-subnet-group.html)을 참조하세요.

### `describe-clusters`
<a name="dax_DescribeClusters_cli_topic"></a>

다음 코드 예제에서는 `describe-clusters`의 사용 방법을 보여줍니다.

**AWS CLI**  
**프로비저닝된 모든 DAX 클러스터에 대한 정보를 반환하려면**  
다음 `describe-clusters` 예제에서는 프로비저닝된 모든 DAX 클러스터에 대한 세부 정보를 표시합니다.  

```
aws dax describe-clusters
```
출력:  

```
{
    "Clusters": [
        {
            "ClusterName": "daxcluster",
            "ClusterArn": "arn:aws:dax:us-west-2:123456789012:cache/daxcluster",
            "TotalNodes": 1,
            "ActiveNodes": 1,
            "NodeType": "dax.r4.large",
            "Status": "available",
            "ClusterDiscoveryEndpoint": {
                "Address": "daxcluster.ey3o9d.clustercfg.dax.usw2.cache.amazonaws.com",
                "Port": 8111
            },
            "Nodes": [
                {
                    "NodeId": "daxcluster-a",
                    "Endpoint": {
                        "Address": "daxcluster-a.ey3o9d.0001.dax.usw2.cache.amazonaws.com",
                        "Port": 8111
                    },
                    "NodeCreateTime": 1576625059.509,
                    "AvailabilityZone": "us-west-2c",
                    "NodeStatus": "available",
                    "ParameterGroupStatus": "in-sync"
                }
            ],
            "PreferredMaintenanceWindow": "thu:13:00-thu:14:00",
            "SubnetGroup": "default",
            "SecurityGroups": [
                {
                    "SecurityGroupIdentifier": "sg-1af6e36e",
                    "Status": "active"
                }
            ],
            "IamRoleArn": "arn:aws:iam::123456789012:role/DAXServiceRoleForDynamoDBAccess",
            "ParameterGroup": {
                "ParameterGroupName": "default.dax1.0",
                "ParameterApplyStatus": "in-sync",
                "NodeIdsToReboot": []
            },
            "SSEDescription": {
                "Status": "ENABLED"
            }
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeClusters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/describe-clusters.html)를 참조하세요.

### `describe-default-parameters`
<a name="dax_DescribeDefaultParameters_cli_topic"></a>

다음 코드 예제에서는 `describe-default-parameters`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX의 기본 시스템 파라미터 정보를 반환하려면**  
다음 `describe-default-parameters` 예제에서는 DAX에 대한 기본 시스템 파라미터 정보를 표시합니다.  

```
aws dax describe-default-parameters
```
출력:  

```
{
    "Parameters": [
        {
            "ParameterName": "query-ttl-millis",
            "ParameterType": "DEFAULT",
            "ParameterValue": "300000",
            "NodeTypeSpecificValues": [],
            "Description": "Duration in milliseconds for queries to remain cached",
            "Source": "user",
            "DataType": "integer",
            "AllowedValues": "0-",
            "IsModifiable": "TRUE",
            "ChangeType": "IMMEDIATE"
        },
        {
            "ParameterName": "record-ttl-millis",
            "ParameterType": "DEFAULT",
            "ParameterValue": "300000",
            "NodeTypeSpecificValues": [],
            "Description": "Duration in milliseconds for records to remain valid in cache (Default: 0 = infinite)",
            "Source": "user",
            "DataType": "integer",
            "AllowedValues": "0-",
            "IsModifiable": "TRUE",
            "ChangeType": "IMMEDIATE"
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeDefaultParameters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/describe-default-parameters.html)를 참조하세요.

### `describe-events`
<a name="dax_DescribeEvents_cli_topic"></a>

다음 코드 예제에서는 `describe-events`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 클러스터 및 파라미터 그룹과 관련된 모든 이벤트를 반환하려면**  
다음 `describe-events` 예제에서는 DAX 클러스터 및 파라미터 그룹과 관련된 이벤트의 세부 정보를 표시합니다.  

```
aws dax describe-events
```
출력:  

```
{
    "Events": [
        {
            "SourceName": "daxcluster",
            "SourceType": "CLUSTER",
            "Message": "Cluster deleted.",
            "Date": 1576702736.706
        },
        {
            "SourceName": "daxcluster",
            "SourceType": "CLUSTER",
            "Message": "Removed node daxcluster-b.",
            "Date": 1576702691.738
        },
        {
            "SourceName": "daxcluster",
            "SourceType": "CLUSTER",
            "Message": "Removed node daxcluster-a.",
            "Date": 1576702633.498
        },
        {
            "SourceName": "daxcluster",
            "SourceType": "CLUSTER",
            "Message": "Removed node daxcluster-c.",
            "Date": 1576702631.329
        },
        {
            "SourceName": "daxcluster",
            "SourceType": "CLUSTER",
            "Message": "Cluster created.",
            "Date": 1576626560.057
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/describe-events.html)를 참조하세요.

### `describe-parameter-groups`
<a name="dax_DescribeParameterGroups_cli_topic"></a>

다음 코드 예제에서는 `describe-parameter-groups`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX에 정의된 파라미터 그룹을 설명하려면**  
다음 `describe-parameter-groups` 예제에서는 DAX에 정의된 파라미터 그룹에 대한 세부 정보를 검색합니다.  

```
aws dax describe-parameter-groups
```
출력:  

```
{
    "ParameterGroups": [
        {
            "ParameterGroupName": "default.dax1.0",
            "Description": "Default parameter group for dax1.0"
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeParameterGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/describe-parameter-groups.html)를 참조하세요.

### `describe-parameters`
<a name="dax_DescribeParameters_cli_topic"></a>

다음 코드 예제에서는 `describe-parameters`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DB 파라미터 그룹의 파라미터를 설명하려면**  
다음 `describe-parameters` 예제에서는 지정된 DAX 파라미터 그룹에 정의된 파라미터에 대한 세부 정보를 검색합니다.  

```
aws dax describe-parameters \
    --parameter-group-name default.dax1.0
```
출력:  

```
{
    "Parameters": [
        {
            "ParameterName": "query-ttl-millis",
            "ParameterType": "DEFAULT",
            "ParameterValue": "300000",
            "NodeTypeSpecificValues": [],
            "Description": "Duration in milliseconds for queries to remain cached",
            "Source": "user",
            "DataType": "integer",
            "AllowedValues": "0-",
            "IsModifiable": "TRUE",
            "ChangeType": "IMMEDIATE"
        },
        {
            "ParameterName": "record-ttl-millis",
            "ParameterType": "DEFAULT",
            "ParameterValue": "300000",
            "NodeTypeSpecificValues": [],
            "Description": "Duration in milliseconds for records to remain valid in cache (Default: 0 = infinite)",
            "Source": "user",
            "DataType": "integer",
            "AllowedValues": "0-",
            "IsModifiable": "TRUE",
            "ChangeType": "IMMEDIATE"
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeParameters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/describe-parameters.html)를 참조하세요.

### `describe-subnet-groups`
<a name="dax_DescribeSubnetGroups_cli_topic"></a>

다음 코드 예제에서는 `describe-subnet-groups`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX에 정의된 서브넷 그룹을 설명하려면**  
다음 `describe-subnet-groups` 예제에서는 DAX에 정의된 서브넷 그룹에 대한 세부 정보를 검색합니다.  

```
aws dax describe-subnet-groups
```
출력:  

```
{
    "SubnetGroups": [
        {
            "SubnetGroupName": "default",
            "Description": "Default CacheSubnetGroup",
            "VpcId": "vpc-ee70a196",
            "Subnets": [
                {
                    "SubnetIdentifier": "subnet-874953af",
                    "SubnetAvailabilityZone": "us-west-2d"
                },
                {
                    "SubnetIdentifier": "subnet-bd3d1fc4",
                    "SubnetAvailabilityZone": "us-west-2a"
                },
                {
                    "SubnetIdentifier": "subnet-72c2ff28",
                    "SubnetAvailabilityZone": "us-west-2c"
                },
                {
                    "SubnetIdentifier": "subnet-09e6aa42",
                    "SubnetAvailabilityZone": "us-west-2b"
                }
            ]
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.concepts.cluster.html#DAX.concepts.cluster.security)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeSubnetGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/describe-subnet-groups.html)를 참조하세요.

### `increase-replication-factor`
<a name="dax_IncreaseReplicationFactor_cli_topic"></a>

다음 코드 예제에서는 `increase-replication-factor`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 클러스터의 복제 인수를 늘리려면**  
다음 `increase-replication-factor` 예제에서는 지정된 DAX 클러스터의 복제 인수를 3으로 늘립니다.  

```
aws dax increase-replication-factor \
    --cluster-name daxcluster \
    --new-replication-factor 3
```
출력:  

```
{
    "Cluster": {
        "ClusterName": "daxcluster",
        "ClusterArn": "arn:aws:dax:us-west-2:123456789012:cache/daxcluster",
        "TotalNodes": 3,
        "ActiveNodes": 1,
        "NodeType": "dax.r4.large",
        "Status": "modifying",
        "ClusterDiscoveryEndpoint": {
            "Address": "daxcluster.ey3o9d.clustercfg.dax.usw2.cache.amazonaws.com",
            "Port": 8111
        },
        "Nodes": [
            {
                "NodeId": "daxcluster-a",
                "Endpoint": {
                    "Address": "daxcluster-a.ey3o9d.0001.dax.usw2.cache.amazonaws.com",
                    "Port": 8111
                },
                "NodeCreateTime": 1576625059.509,
                "AvailabilityZone": "us-west-2c",
                "NodeStatus": "available",
                "ParameterGroupStatus": "in-sync"
            },
            {
                "NodeId": "daxcluster-b",
                "NodeStatus": "creating"
            },
            {
                "NodeId": "daxcluster-c",
                "NodeStatus": "creating"
            }
        ],
        "PreferredMaintenanceWindow": "thu:13:00-thu:14:00",
        "SubnetGroup": "default",
        "SecurityGroups": [
            {
                "SecurityGroupIdentifier": "sg-1af6e36e",
                "Status": "active"
            }
        ],
        "IamRoleArn": "arn:aws:iam::123456789012:role/DAXServiceRoleForDynamoDBAccess",
        "ParameterGroup": {
            "ParameterGroupName": "default.dax1.0",
            "ParameterApplyStatus": "in-sync",
            "NodeIdsToReboot": []
        },
        "SSEDescription": {
            "Status": "ENABLED"
        }
    }
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.cluster-management.custom-settings)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [IncreaseReplicationFactor](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/increase-replication-factor.html)를 참조하세요.

### `list-tags`
<a name="dax_ListTags_cli_topic"></a>

다음 코드 예제에서는 `list-tags`의 사용 방법을 보여줍니다.

**AWS CLI**  
**리소스의 태그를 나열하려면**  
다음 `list-tags` 예제에서는 지정된 DAX 클러스터에 연결된 태그 키와 값을 나열합니다.  

```
aws dax list-tags \
    --resource-name arn:aws:dax:us-west-2:123456789012:cache/daxcluster
```
출력:  

```
{
    "Tags": [
        {
            "Key": "ClusterUsage",
            "Value": "prod"
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.management.tagging)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/list-tags.html)를 참조하세요.

### `tag-resource`
<a name="dax_TagResource_cli_topic"></a>

다음 코드 예제에서는 `tag-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 리소스에 태그를 지정하려면**  
다음 `tag-resource` 예제에서는 지정된 태그 키 이름과 관련 값을 지정된 DAX 클러스터에 연결하여 클러스터 사용량을 설명합니다.  

```
aws dax tag-resource \
    --resource-name arn:aws:dax:us-west-2:123456789012:cache/daxcluster \
    --tags="Key=ClusterUsage,Value=prod"
```
출력:  

```
{
    "Tags": [
        {
            "Key": "ClusterUsage",
            "Value": "prod"
        }
    ]
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.management.tagging)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/tag-resource.html)를 참조하세요.

### `untag-resource`
<a name="dax_UntagResource_cli_topic"></a>

다음 코드 예제에서는 `untag-resource`의 사용 방법을 보여줍니다.

**AWS CLI**  
**DAX 리소스에서 태그를 제거하려면**  
다음 `untag-resource` 예제에서는 DAX 클러스터에서 키 이름이 지정된 태그를 제거합니다.  

```
aws dax untag-resource  \
    --resource-name arn:aws:dax:us-west-2:123456789012:cache/daxcluster \
    --tag-keys="ClusterUsage"
```
출력:  

```
{
    "Tags": []
}
```
자세한 정보는 *Amazon DynamoDB 개발자 안내서*의 [DAX 클러스터 관리](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DAX.cluster-management.html#DAX.management.tagging)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dax/untag-resource.html)를 참조하세요.