

# AWS CLI를 사용한 MemoryDB 예시
<a name="cli_memorydb_code_examples"></a>

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

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

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

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

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

### `copy-snapshot`
<a name="memorydb_CopySnapshot_cli_topic"></a>

다음 코드 예시에서는 `copy-snapshot`의 사용 방법을 보여줍니다.

**AWS CLI**  
**스냅샷 복사**  
다음 `copy-snapshot` 예시에서는 스냅샷 사본을 생성합니다.  

```
aws memorydb copy-snapshot \
    --source-snapshot-name my-cluster-snapshot \
    --target-snapshot-name my-cluster-snapshot-copy
```
Output  

```
{
    "Snapshot": {
        "Name": "my-cluster-snapshot-copy",
        "Status": "creating",
        "Source": "manual",
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:snapshot/my-cluster-snapshot-copy",
        "ClusterConfiguration": {
            "Name": "my-cluster",
            "Description": " ",
            "NodeType": "db.r6g.large",
            "EngineVersion": "6.2",
            "MaintenanceWindow": "wed:03:00-wed:04:00",
            "Port": 6379,
            "ParameterGroupName": "default.memorydb-redis6",
            "SubnetGroupName": "my-sg",
            "VpcId": "vpc-xx2574fc",
            "SnapshotRetentionLimit": 0,
            "SnapshotWindow": "04:30-05:30",
            "NumShards": 2
        }
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [스냅샷 복사](https://docs.aws.amazon.com/memorydb/latest/devguide/snapshots-copying.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CopySnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/copy-snapshot.html)을 참조하세요.

### `create-acl`
<a name="memorydb_CreateAcl_cli_topic"></a>

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

**AWS CLI**  
**ACL 생성**  
다음 `create-acl` 예시에서는 새 액세스 제어 목록을 생성합니다.  

```
aws memorydb create-acl \
    --acl-name "new-acl-1" \
    --user-names "my-user"
```
출력:  

```
{
    "ACL": {
        "Name": "new-acl-1",
        "Status": "creating",
        "UserNames": [
            "my-user"
        ],
        "MinimumEngineVersion": "6.2",
        "Clusters": [],
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:acl/new-acl-1"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateAcl](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/create-acl.html)을 참조하세요.

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

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

**AWS CLI**  
**클러스터 생성**  
다음 `create-cluster` 예시에서는 새 클러스터를 생성합니다.  

```
aws memorydb create-cluster \
    --cluster-name my-new-cluster \
    --node-type db.r6g.large \
    --acl-name my-acl \
    --subnet-group my-sg
```
출력:  

```
{
    "Cluster": {
        "Name": "my-new-cluster",
        "Status": "creating",
        "NumberOfShards": 1,
        "AvailabilityMode": "MultiAZ",
        "ClusterEndpoint": {
            "Port": 6379
        },
        "NodeType": "db.r6g.large",
        "EngineVersion": "6.2",
        "EnginePatchVersion": "6.2.6",
        "ParameterGroupName": "default.memorydb-redis6",
        "ParameterGroupStatus": "in-sync",
        "SubnetGroupName": "my-sg",
        "TLSEnabled": true,
        "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:cluster/my-new-cluster",
        "SnapshotRetentionLimit": 0,
        "MaintenanceWindow": "sat:10:00-sat:11:00",
        "SnapshotWindow": "07:30-08:30",
        "ACLName": "my-acl",
        "AutoMinorVersionUpgrade": true
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [클러스터 관리](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/create-cluster.html)를 참조하세요.

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

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

**AWS CLI**  
**파라미터 그룹 생성**  
다음 `create-parameter-group` 예시에서는 파라미터 그룹을 생성합니다.  

```
aws memorydb create-parameter-group \
    --parameter-group-name myRedis6x \
    --family memorydb_redis6 \
    --description "my-parameter-group"
```
출력:  

```
{
    "ParameterGroup": {
        "Name": "myredis6x",
        "Family": "memorydb_redis6",
        "Description": "my-parameter-group",
        "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:parametergroup/myredis6x"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [파라미터 그룹 생성](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.creating.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/create-parameter-group.html)을 참조하세요.

### `create-snapshot`
<a name="memorydb_CreateSnapshot_cli_topic"></a>

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

**AWS CLI**  
**스냅샷 생성**  
다음 `create-snapshot` 예시에서는 스냅샷을 생성합니다.  

```
aws memorydb create-snapshot \
    --cluster-name my-cluster \
    --snapshot-name my-cluster-snapshot
```
출력:  

```
{
    "Snapshot": {
        "Name": "my-cluster-snapshot1",
        "Status": "creating",
        "Source": "manual",
        "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:snapshot/my-cluster-snapshot",
        "ClusterConfiguration": {
            "Name": "my-cluster",
            "Description": "",
            "NodeType": "db.r6g.large",
            "EngineVersion": "6.2",
            "MaintenanceWindow": "wed:03:00-wed:04:00",
            "Port": 6379,
            "ParameterGroupName": "default.memorydb-redis6",
            "SubnetGroupName": "my-sg",
            "VpcId": "vpc-862xxxxc",
            "SnapshotRetentionLimit": 0,
            "SnapshotWindow": "04:30-05:30",
            "NumShards": 2
        }
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [수동 스냅샷 생성](https://docs.aws.amazon.com/memorydb/latest/devguide/snapshots-manual.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/create-snapshot.html)을 참조하세요.

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

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

**AWS CLI**  
**서브넷 그룹 생성**  
다음 `create-subnet-group` 예시에서는 서브넷 그룹을 생성합니다.  

```
aws memorydb create-subnet-group \
    --subnet-group-name mysubnetgroup \
    --description "my subnet group" \
    --subnet-ids subnet-5623xxxx
```
출력:  

```
{
    "SubnetGroup": {
        "Name": "mysubnetgroup",
        "Description": "my subnet group",
        "VpcId": "vpc-86257xxx",
        "Subnets": [
            {
                "Identifier": "subnet-5623xxxx",
                "AvailabilityZone": {
                    "Name": "us-east-1a"
                }
            }
        ],
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:subnetgroup/mysubnetgroup"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [서브넷 그룹 생성](https://docs.aws.amazon.com/memorydb/latest/devguide/subnetgroups.creating.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/create-subnet-group.html)을 참조하세요.

### `create-user`
<a name="memorydb_CreateUser_cli_topic"></a>

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

**AWS CLI**  
**사용자 생성**  
다음 `create-user` 예시에서는 새 사용자를 생성합니다.  

```
aws memorydb create-user \
    --user-name user-name-1 \
    --access-string "~objects:* ~items:* ~public:*" \
     --authentication-mode \
         Passwords="enterapasswordhere",Type=password
```
출력:  

```
{
    "User": {
        "Name": "user-name-1",
        "Status": "active",
        "AccessString": "off ~objects:* ~items:* ~public:* resetchannels -@all",
        "ACLNames": [],
        "MinimumEngineVersion": "6.2",
        "Authentication": {
            "Type": "password",
            "PasswordCount": 1
        },
        "ARN": "arn:aws:memorydb:us-west-2:491658xxxxxx:user/user-name-1"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [CreateUser](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/create-user.html)를 참조하세요.

### `delete-acl`
<a name="memorydb_DeleteAcl_cli_topic"></a>

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

**AWS CLI**  
**ACL 삭제**  
다음 `delete-acl` 예시에서는 액세스 제어 목록을 삭제합니다.  

```
aws memorydb delete-acl \
    --acl-name "new-acl-1"
```
출력:  

```
{
    "ACL": {
        "Name": "new-acl-1",
        "Status": "deleting",
        "UserNames": [
            "pat"
        ],
        "MinimumEngineVersion": "6.2",
        "Clusters": [],
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:acl/new-acl-1"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteAcl](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/delete-acl.html)을 참조하세요.

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

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

**AWS CLI**  
**클러스터 삭제**  
다음 `delete-cluster` 예시에서는 클러스터를 삭제합니다.  

```
aws memorydb delete-cluster \
    --cluster-name my-new-cluster
```
출력:  

```
{
    "Cluster": {
        "Name": "my-new-cluster",
        "Status": "deleting",
        "NumberOfShards": 1,
        "ClusterEndpoint": {
            "Address": "clustercfg.my-new-cluster.xxxxx.memorydb.us-east-1.amazonaws.com",
            "Port": 6379
        },
        "NodeType": "db.r6g.large",
        "EngineVersion": "6.2",
        "EnginePatchVersion": "6.2.6",
        "ParameterGroupName": "default.memorydb-redis6",
        "ParameterGroupStatus": "in-sync",
        "SubnetGroupName": "my-sg",
        "TLSEnabled": true,
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:cluster/my-new-cluster",
        "SnapshotRetentionLimit": 0,
        "MaintenanceWindow": "sat:10:00-sat:11:00",
        "SnapshotWindow": "07:30-08:30",
        "AutoMinorVersionUpgrade": true
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [클러스터 삭제](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.delete.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/delete-cluster.html)를 참조하세요.

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

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

**AWS CLI**  
**파라미터 그룹 삭제**  
다음 `delete-parameter-group` 예시에서는 파라미터 그룹을 삭제합니다.  

```
aws memorydb delete-parameter-group \
    --parameter-group-name myRedis6x
```
출력:  

```
{
    "ParameterGroup": {
        "Name": "myredis6x",
        "Family": "memorydb_redis6",
        "Description": "my-parameter-group",
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:parametergroup/myredis6x"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [파라미터 그룹 삭제](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.deleting.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/delete-parameter-group.html)을 참조하세요.

### `delete-snapshot`
<a name="memorydb_DeleteSnapshot_cli_topic"></a>

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

**AWS CLI**  
**스냅샷 삭제**  
다음 `delete-snapshot` 예시에서는 스냅샷을 삭제합니다.  

```
aws memorydb delete-snapshot \
    --snapshot-name my-cluster-snapshot
```
출력:  

```
{
    "Snapshot": {
        "Name": "my-cluster-snapshot",
        "Status": "deleting",
        "Source": "manual",
        "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:snapshot/my-cluster-snapshot",
        "ClusterConfiguration": {
            "Name": "my-cluster",
            "Description": "",
            "NodeType": "db.r6g.large",
            "EngineVersion": "6.2",
            "MaintenanceWindow": "wed:03:00-wed:04:00",
            "Port": 6379,
            "ParameterGroupName": "default.memorydb-redis6",
            "SubnetGroupName": "my-sg",
            "VpcId": "vpc-862xxxxc",
            "SnapshotRetentionLimit": 0,
            "SnapshotWindow": "04:30-05:30",
            "NumShards": 2
        }
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [스냅샷 삭제](https://docs.aws.amazon.com/memorydb/latest/devguide/snapshots-deleting.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/delete-snapshot.html)을 참조하세요.

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

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

**AWS CLI**  
**서브넷 그룹 삭제**  
다음 `delete-subnet-group` 예시에서는 서브넷을 삭제합니다.  

```
aws memorydb delete-subnet-group \
    --subnet-group-name mysubnetgroup
```
출력:  

```
{
    "SubnetGroup": {
        "Name": "mysubnetgroup",
        "Description": "my subnet group",
        "VpcId": "vpc-86xxxx4fc",
        "Subnets": [
            {
                "Identifier": "subnet-56xxx61b",
                "AvailabilityZone": {
                    "Name": "us-east-1a"
                }
            }
        ],
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:subnetgroup/mysubnetgroup"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [서브넷 그룹 삭제](https://docs.aws.amazon.com/memorydb/latest/devguide/subnetgroups.deleting.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/delete-subnet-group.html)을 참조하세요.

### `delete-user`
<a name="memorydb_DeleteUser_cli_topic"></a>

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

**AWS CLI**  
**사용자 삭제**  
다음 `delete-user` 예시에서는 사용자를 삭제합니다.  

```
aws memorydb delete-user \
    --user-name my-user
```
출력:  

```
{
    "User": {
        "Name": "my-user",
        "Status": "deleting",
        "AccessString": "on ~app::* resetchannels -@all +@read",
        "ACLNames": [
            "my-acl"
        ],
        "MinimumEngineVersion": "6.2",
        "Authentication": {
            "Type": "password",
            "PasswordCount": 1
        },
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:user/my-user"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DeleteUser](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/delete-user.html)를 참조하세요.

### `describe-acls`
<a name="memorydb_DescribeAcls_cli_topic"></a>

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

**AWS CLI**  
**ACL 목록 반환**  
다음 describe-acls는 ACL 목록을 반환합니다.  

```
aws memorydb describe-acls
```
출력:  

```
{
    "ACLs": [
        {
            "Name": "open-access",
            "Status": "active",
            "UserNames": [
                "default"
            ],
            "MinimumEngineVersion": "6.2",
            "Clusters": [],
            "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:acl/open-access"
        },
        {
            "Name": my-acl",
            "Status": "active",
            "UserNames": [],
            "MinimumEngineVersion": "6.2",
            "Clusters": [
                "my-cluster"
            ],
            "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxxx:acl/my-acl"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeAcls](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-acls.html)를 참조하세요.

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

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

**AWS CLI**  
**클러스터 목록 반환**  
다음 describe-clusters는 클러스터 목록을 반환합니다.  

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

```
{
    "Clusters": [
        {
                "Name": "my-cluster",
                "Status": "available",
                "NumberOfShards": 2,
                "ClusterEndpoint": {
                    "Address": "clustercfg.my-cluster.llru6f.memorydb.us-east-1.amazonaws.com",
                    "Port": 6379
                },
                "NodeType": "db.r6g.large",
                "EngineVersion": "6.2",
                "EnginePatchVersion": "6.2.6",
                "ParameterGroupName": "default.memorydb-redis6",
                "ParameterGroupStatus": "in-sync",
                "SecurityGroups": [
                    {
                        "SecurityGroupId": "sg-0a1434xxxxxc9fae",
                        "Status": "active"
                    }
                ],
                "SubnetGroupName": "pat-sg",
                "TLSEnabled": true,
                "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:cluster/my-cluster",
                "SnapshotRetentionLimit": 0,
                "MaintenanceWindow": "wed:03:00-wed:04:00",
                "SnapshotWindow": "04:30-05:30",
                "ACLName": "my-acl",
                "AutoMinorVersionUpgrade": true
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [클러스터 관리](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeClusters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-clusters.html)를 참조하세요.

### `describe-engine-versions`
<a name="memorydb_DescribeEngineVersions_cli_topic"></a>

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

**AWS CLI**  
**엔진 버전 목록 반환**  
다음 describe-engine-versions는 엔진 버전 목록을 반환합니다.  

```
aws memorydb describe-engine-versions
```
출력:  

```
{
    "EngineVersions": [
        {
            "EngineVersion": "6.2",
            "EnginePatchVersion": "6.2.6",
            "ParameterGroupFamily": "memorydb_redis6"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [엔진 버전 및 업그레이드](https://docs.aws.amazon.com/memorydb/latest/devguide/engine-versions.htmll)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeEngineVersions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-engine-versions.html)를 참조하세요.

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

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

**AWS CLI**  
**이벤트 목록 반환**  
다음 describe-events는 이벤트 목록을 반환합니다.  

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

```
{
    "Events": [
        {
            "SourceName": "my-cluster",
            "SourceType": "cluster",
            "Message": "Increase replica count started for replication group my-cluster on 2022-07-22T14:09:01.440Z",
            "Date": "2022-07-22T07:09:01.443000-07:00"
        },
        {
            "SourceName": "my-user",
            "SourceType": "user",
            "Message": "Create user my-user operation completed.",
            "Date": "2022-07-22T07:00:02.975000-07:00"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [이벤트 모니터링](https://docs.aws.amazon.com/memorydb/latest/devguide/monitoring-events.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-events.html)를 참조하세요.

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

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

**AWS CLI**  
**파라미터 그룹 목록 반환**  
다음 describe-parameter-groups는 파라미터 그룹 목록을 반환합니다.  

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

```
{
    "ParameterGroups": [
        {
            "Name": "default.memorydb-redis6",
            "Family": "memorydb_redis6",
            "Description": "Default parameter group for memorydb_redis6",
            "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:parametergroup/default.memorydb-redis6"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [파라미터 그룹을 사용하여 엔진 파라미터 구성](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeParameterGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-parameter-groups.html)를 참조하세요.

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

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

**AWS CLI**  
**파라미터 목록 반환**  
다음 describe-parameters는 파라미터 목록을 반환합니다.  

```
aws memorydb describe-parameters
```
출력:  

```
{
    "Parameters": [
        {
            "Name": "acllog-max-len",
            "Value": "128",
            "Description": "The maximum length of the ACL Log",
            "DataType": "integer",
            "AllowedValues": "1-10000",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "activedefrag",
            "Value": "no",
            "Description": "Enabled active memory defragmentation",
            "DataType": "string",
            "AllowedValues": "yes,no",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-defrag-cycle-max",
            "Value": "75",
            "Description": "Maximal effort for defrag in CPU percentage",
            "DataType": "integer",
            "AllowedValues": "1-75",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-defrag-cycle-min",
            "Value": "5",
            "Description": "Minimal effort for defrag in CPU percentage",
            "DataType": "integer",
            "AllowedValues": "1-75",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-defrag-ignore-bytes",
            "Value": "104857600",
            "Description": "Minimum amount of fragmentation waste to start active defrag",
            "DataType": "integer",
            "AllowedValues": "1048576-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-defrag-max-scan-fields",
            "Value": "1000",
            "Description": "Maximum number of set/hash/zset/list fields that will be processed from the main dictionary scan",
            "DataType": "integer",
            "AllowedValues": "1-1000000",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-defrag-threshold-lower",
            "Value": "10",
            "Description": "Minimum percentage of fragmentation to start active defrag",
            "DataType": "integer",
            "AllowedValues": "1-100",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-defrag-threshold-upper",
            "Value": "100",
            "Description": "Maximum percentage of fragmentation at which we use maximum effort",
            "DataType": "integer",
            "AllowedValues": "1-100",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "active-expire-effort",
            "Value": "1",
            "Description": "The amount of effort that redis uses to expire items in the active expiration job",
            "DataType": "integer",
            "AllowedValues": "1-10",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "activerehashing",
            "Value": "yes",
            "Description": "Apply rehashing or not",
            "DataType": "string",
            "AllowedValues": "yes,no",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "client-output-buffer-limit-normal-hard-limit",
            "Value": "0",
            "Description": "Normal client output buffer hard limit in bytes",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "client-output-buffer-limit-normal-soft-limit",
            "Value": "0",
            "Description": "Normal client output buffer soft limit in bytes",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "client-output-buffer-limit-normal-soft-seconds",
            "Value": "0",
            "Description": "Normal client output buffer soft limit in seconds",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "client-output-buffer-limit-pubsub-hard-limit",
            "Value": "33554432",
            "Description": "Pubsub client output buffer hard limit in bytes",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "client-output-buffer-limit-pubsub-soft-limit",
            "Value": "8388608",
            "Description": "Pubsub client output buffer soft limit in bytes",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "client-output-buffer-limit-pubsub-soft-seconds",
            "Value": "60",
            "Description": "Pubsub client output buffer soft limit in seconds",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "hash-max-ziplist-entries",
            "Value": "512",
            "Description": "The maximum number of hash entries in order for the dataset to be compressed",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "hash-max-ziplist-value",
            "Value": "64",
            "Description": "The threshold of biggest hash entries in order for the dataset to be compressed",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "hll-sparse-max-bytes",
            "Value": "3000",
            "Description": "HyperLogLog sparse representation bytes limit",
            "DataType": "integer",
            "AllowedValues": "1-16000",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "lazyfree-lazy-eviction",
            "Value": "no",
            "Description": "Perform an asynchronous delete on evictions",
            "DataType": "string",
            "AllowedValues": "yes,no",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "lazyfree-lazy-expire",
            "Value": "no",
            "Description": "Perform an asynchronous delete on expired keys",
            "DataType": "string",
            "AllowedValues": "yes,no",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "lazyfree-lazy-server-del",
            "Value": "no",
            "Description": "Perform an asynchronous delete on key updates",
            "DataType": "string",
            "AllowedValues": "yes,no",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "lazyfree-lazy-user-del",
            "Value": "no",
            "Description": "Specifies whether the default behavior of DEL command acts the same as UNLINK",
            "DataType": "string",
            "AllowedValues": "yes,no",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "lfu-decay-time",
            "Value": "1",
            "Description": "The amount of time in minutes to decrement the key counter for LFU eviction policyd",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "lfu-log-factor",
            "Value": "10",
            "Description": "The log factor for incrementing key counter for LFU eviction policy",
            "DataType": "integer",
            "AllowedValues": "1-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "list-compress-depth",
            "Value": "0",
            "Description": "Number of quicklist ziplist nodes from each side of the list to exclude from compression. The head and tail of the list are always uncompressed for fast push/pop operations",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "maxmemory-policy",
            "Value": "noeviction",
            "Description": "Max memory policy",
            "DataType": "string",
            "AllowedValues": "volatile-lru,allkeys-lru,volatile-lfu,allkeys-lfu,volatile-random,allkeys-random,volatile-ttl,noeviction",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "maxmemory-samples",
            "Value": "3",
            "Description": "Max memory samples",
            "DataType": "integer",
            "AllowedValues": "1-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "notify-keyspace-events",
            "Description": "The keyspace events for Redis to notify Pub/Sub clients about. By default all notifications are disabled",
            "DataType": "string",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "set-max-intset-entries",
            "Value": "512",
            "Description": "The limit in the size of the set in order for the dataset to be compressed",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "slowlog-log-slower-than",
            "Value": "10000",
            "Description": "The execution time, in microseconds, to exceed in order for the command to get logged. Note that a negative number disables the slow log, while a value of zero forces the logging of every command",
            "DataType": "integer",
            "AllowedValues": "-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "slowlog-max-len",
            "Value": "128",
            "Description": "The length of the slow log. There is no limit to this length. Just be aware that it will consume memory. You can reclaim memory used by the slow log with SLOWLOG RESET.",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "stream-node-max-bytes",
            "Value": "4096",
            "Description": "The maximum size of a single node in a stream in bytes",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "stream-node-max-entries",
            "Value": "100",
            "Description": "The maximum number of items a single node in a stream can contain",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "tcp-keepalive",
            "Value": "300",
            "Description": "If non-zero, send ACKs every given number of seconds",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "timeout",
            "Value": "0",
            "Description": "Close connection if client is idle for a given number of seconds, or never if 0",
            "DataType": "integer",
            "AllowedValues": "0,20-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "tracking-table-max-keys",
            "Value": "1000000",
            "Description": "The maximum number of keys allowed for the tracking table for client side caching",
            "DataType": "integer",
            "AllowedValues": "1-100000000",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "zset-max-ziplist-entries",
            "Value": "128",
            "Description": "The maximum number of sorted set entries in order for the dataset to be compressed",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        },
        {
            "Name": "zset-max-ziplist-value",
            "Value": "64",
            "Description": "The threshold of biggest sorted set entries in order for the dataset to be compressed",
            "DataType": "integer",
            "AllowedValues": "0-",
            "MinimumEngineVersion": "6.2.4"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [파라미터 그룹을 사용하여 엔진 파라미터 구성](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeParameters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-parameters.html)를 참조하세요.

### `describe-snapshots`
<a name="memorydb_DescribeSnapshots_cli_topic"></a>

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

**AWS CLI**  
**스냅샷 목록 반환**  
다음 describe-snapshots는 스냅샷 목록을 반환합니다.  

```
aws memorydb describe-snapshots
```
출력:  

```
{
"Snapshots": [
    {
        "Name": "my-cluster-snapshot",
        "Status": "available",
        "Source": "manual",
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx2:snapshot/my-cluster-snapshot",
        "ClusterConfiguration": {
            "Name": "my-cluster",
            "Description": " ",
            "NodeType": "db.r6g.large",
            "EngineVersion": "6.2",
            "MaintenanceWindow": "wed:03:00-wed:04:00",
            "Port": 6379,
            "ParameterGroupName": "default.memorydb-redis6",
            "SubnetGroupName": "my-sg",
            "VpcId": "vpc-862574fc",
            "SnapshotRetentionLimit": 0,
            "SnapshotWindow": "04:30-05:30",
            "NumShards": 2
        }
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [스냅샷 및 복원](https://docs.aws.amazon.com/memorydb/latest/devguide/snapshots.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeSnapshots](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-snapshots.html)를 참조하세요.

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

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

**AWS CLI**  
**서브넷 그룹 목록 반환**  
다음 describe-subnet-groups는 서브넷 그룹 목록을 반환합니다.  

```
aws memorydb describe-subnet-groups
```
Output  

```
{
    "SubnetGroups": [
        {
            "Name": "my-sg",
            "Description": "pat-sg",
            "VpcId": "vpc-86xxx4fc",
            "Subnets": [
                {
                    "Identifier": "subnet-faxx84a6",
                    "AvailabilityZone": {
                        "Name": "us-east-1b"
                    }
                },
                {
                    "Identifier": "subnet-56xxf61b",
                    "AvailabilityZone": {
                        "Name": "us-east-1a"
                    }
                }
            ],
            "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:subnetgroup/my-sg"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [서브넷 및 서브넷 그룹](https://docs.aws.amazon.com/memorydb/latest/devguide/subnetgroups.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeSubnetGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-subnet-groups.html)를 참조하세요.

### `describe-users`
<a name="memorydb_DescribeUsers_cli_topic"></a>

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

**AWS CLI**  
**사용자 목록 반환**  
다음 describe-users는 사용자 목록을 반환합니다.  

```
aws memorydb describe-users
```
Output  

```
{
    "Users": [
        {
            "Name": "default",
            "Status": "active",
            "AccessString": "on ~* &* +@all",
            "ACLNames": [
                "open-access"
            ],
            "MinimumEngineVersion": "6.0",
            "Authentication": {
                "Type": "no-password"
            },
            "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:user/default"
        },
        {
            "Name": "my-user",
            "Status": "active",
            "AccessString": "off ~objects:* ~items:* ~public:* resetchannels -@all",
            "ACLNames": [],
            "MinimumEngineVersion": "6.2",
            "Authentication": {
                "Type": "password",
                "PasswordCount": 2
            },
            "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:user/my-user"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [DescribeUsers](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/describe-users.html)를 참조하세요.

### `failover-shard`
<a name="memorydb_FailoverShard_cli_topic"></a>

다음 코드 예시에서는 `failover-shard`의 사용 방법을 보여줍니다.

**AWS CLI**  
**샤드 장애 조치**  
다음 failover-shard는 샤드를 장애 조치합니다.  

```
aws memorydb failover-shard \
    --cluster-name my-cluster --shard-name 0001
```
출력:  

```
{
    "Cluster": {
        "Name": "my-cluster",
        "Status": "available",
        "NumberOfShards": 2,
        "ClusterEndpoint": {
            "Address": "clustercfg.my-cluster.xxxxxx.memorydb.us-east-1.amazonaws.com",
            "Port": 6379
        },
        "NodeType": "db.r6g.large",
        "EngineVersion": "6.2",
        "EnginePatchVersion": "6.2.6",
        "ParameterGroupName": "default.memorydb-redis6",
        "ParameterGroupStatus": "in-sync",
        "SecurityGroups": [
            {
                "SecurityGroupId": "sg-0a143xxxx45c9fae",
                "Status": "active"
            }
        ],
        "SubnetGroupName": "my-sg",
        "TLSEnabled": true,
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:cluster/my-cluster",
        "SnapshotRetentionLimit": 0,
        "MaintenanceWindow": "wed:03:00-wed:04:00",
        "SnapshotWindow": "04:30-05:30",
        "AutoMinorVersionUpgrade": true
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [MultiAZ로 가동 중지 시간 최소화](https://docs.aws.amazon.com/memorydb/latest/devguide/autofailover.html)를 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [FailoverShard](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/failover-shard.html)를 참조하세요.

### `list-allowed-node-type-updates`
<a name="memorydb_ListAllowedNodeTypeUpdates_cli_topic"></a>

다음 코드 예시에서는 `list-allowed-node-type-updates`의 사용 방법을 보여줍니다.

**AWS CLI**  
**허용된 노드 유형 업데이트의 목록 반환**  
다음 list-allowed-node-type-updates는 사용 가능한 노드 유형 업데이트 목록을 반환합니다.  

```
aws memorydb list-allowed-node-type-updates
```
출력:  

```
{
    "Cluster": {
        "Name": "my-cluster",
        "Status": "available",
        "NumberOfShards": 2,
        "ClusterEndpoint": {
            "Address": "clustercfg.my-cluster.xxxxxx.memorydb.us-east-1.amazonaws.com",
            "Port": 6379
        },
        "NodeType": "db.r6g.large",
        "EngineVersion": "6.2",
        "EnginePatchVersion": "6.2.6",
        "ParameterGroupName": "default.memorydb-redis6",
        "ParameterGroupStatus": "in-sync",
        "SecurityGroups": [
            {
                "SecurityGroupId": "sg-0a143xxxx45c9fae",
                "Status": "active"
            }
        ],
        "SubnetGroupName": "my-sg",
        "TLSEnabled": true,
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:cluster/my-cluster",
        "SnapshotRetentionLimit": 0,
        "MaintenanceWindow": "wed:03:00-wed:04:00",
        "SnapshotWindow": "04:30-05:30",
        "AutoMinorVersionUpgrade": true
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [스케일링](https://docs.aws.amazon.com/memorydb/latest/devguide/scaling.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListAllowedNodeTypeUpdates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/list-allowed-node-type-updates.html)를 참조하세요.

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

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

**AWS CLI**  
**태그 목록 반환**  
다음 list-tags는 태그 목록을 반환합니다.  

```
aws memorydb list-tags \
    --resource-arn arn:aws:memorydb:us-east-1:491658xxxxxx:cluster/my-cluster
```
출력:  

```
{
    "TagList": [
        {
            "Key": "mytag",
            "Value": "myvalue"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [리소스 태그 지정](https://docs.aws.amazon.com/memorydb/latest/devguide/tagging-resources.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/list-tags.html)를 참조하세요.

### `reset-parameter-group`
<a name="memorydb_ResetParameterGroup_cli_topic"></a>

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

**AWS CLI**  
**파라미터 그룹 재설정**  
다음 reset-parameter-group은 파라미터 그룹을 재설정합니다.  

```
aws memorydb reset-parameter-group \
    --parameter-group-name my-parameter-group \
    --all-parameters
```
출력:  

```
{
    "ParameterGroup": {
        "Name": "my-parameter-group",
        "Family": "memorydb_redis6",
        "Description": "my parameter group",
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:parametergroup/my-parameter-group"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [파라미터 그룹을 사용하여 엔진 파라미터 구성](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ResetParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/reset-parameter-group.html)을 참조하세요.

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

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

**AWS CLI**  
**리소스에 태그 지정**  
다음 tag-resource는 리소스에 태그를 추가합니다.  

```
aws memorydb tag-resource \
    --resource-arn arn:aws:memorydb:us-east-1:491658xxxxxx:cluster/my-cluster \
    --tags Key="mykey",Value="myvalue"
```
출력:  

```
{
    "TagList": [
        {
            "Key": "mytag",
            "Value": "myvalue"
        },
        {
            "Key": "mykey",
            "Value": "myvalue"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [리소스 태그 지정](https://docs.aws.amazon.com/memorydb/latest/devguide/tagging-resources.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/tag-resource.html)를 참조하세요.

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

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

**AWS CLI**  
**ACL 업데이트**  
다음 update-acl은 사용자를 추가하여 ACL을 업데이트합니다.  

```
aws memorydb untag-resource \
    --resource-arn arn:aws:memorydb:us-east-1:491658xxxxx:cluster/my-cluster \
    --tag-keys mykey
```
출력:  

```
{
    "TagList": [
        {
            "Key": "mytag",
            "Value": "myvalue"
        }
    ]
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [리소스 태그 지정](https://docs.aws.amazon.com/memorydb/latest/devguide/tagging-resources.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/untag-resource.html)를 참조하세요.

### `update-cluster`
<a name="memorydb_UpdateCluster_cli_topic"></a>

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

**AWS CLI**  
**클러스터 업데이트**  
다음 update-cluster는 클러스터의 파라미터 그룹을 my-parameter-group으로 업데이트합니다.  

```
aws memorydb update-cluster \
    --cluster-name my-cluster \
    --parameter-group-name my-parameter-group
```
출력:  

```
{
    "Cluster": {
        "Name": "my-cluster",
        "Status": "available",
        "NumberOfShards": 2,
        "AvailabilityMode": "MultiAZ",
        "ClusterEndpoint": {
            "Address": "clustercfg.my-cluster.llru6f.memorydb.us-east-1.amazonaws.com",
            "Port": 6379
        },
        "NodeType": "db.r6g.large",
        "EngineVersion": "6.2",
        "EnginePatchVersion": "6.2.6",
        "ParameterGroupName": "my-parameter-group",
        "ParameterGroupStatus": "in-sync",
        "SecurityGroups": [
            {
                "SecurityGroupId": "sg-0a143xxxxxc9fae",
                "Status": "active"
            }
        ],
        "SubnetGroupName": "pat-sg",
        "TLSEnabled": true,
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:cluster/my-cluster",
        "SnapshotRetentionLimit": 0,
        "MaintenanceWindow": "wed:03:00-wed:04:00",
        "SnapshotWindow": "04:30-05:30",
        "ACLName": "my-acl",
        "AutoMinorVersionUpgrade": true
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [클러스터 수정](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.modify.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/update-cluster.html)를 참조하세요.

### `update-parameter-group`
<a name="memorydb_UpdateParameterGroup_cli_topic"></a>

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

**AWS CLI**  
**파라미터 그룹 업데이트**  
다음 update-parameter-group은 파라미터 그룹을 업데이트합니다.  

```
aws memorydb update-parameter-group \
    --parameter-group-name my-parameter-group \
    --parameter-name-values "ParameterName=activedefrag, ParameterValue=no"
```
출력:  

```
{
    "ParameterGroup": {
        "Name": "my-parameter-group",
        "Family": "memorydb_redis6",
        "Description": "my parameter group",
        "ARN": "arn:aws:memorydb:us-east-1:49165xxxxxx:parametergroup/my-parameter-group"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [파라미터 그룹 수정](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.modifying.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/update-parameter-group.html)을 참조하세요.

### `update-subnet-group`
<a name="memorydb_UpdateSubnetGroup_cli_topic"></a>

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

**AWS CLI**  
**서브넷 그룹 업데이트**  
다음 update-subnet-group은 서브넷 그룹의 서브넷 ID를 업데이트합니다.  

```
aws memorydb update-subnet-group \
    --subnet-group-name my-sg \
    --subnet-ids subnet-01f29d458f3xxxxx
```
출력:  

```
{
    "SubnetGroup": {
        "Name": "my-sg-1",
        "Description": "my-sg",
        "VpcId": "vpc-09d2cfc01xxxxxxx",
        "Subnets": [
            {
                "Identifier": "subnet-01f29d458fxxxxxx",
                "AvailabilityZone": {
                    "Name": "us-east-1a"
                }
            }
        ],
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:subnetgroup/my-sg"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [서브넷 및 서브넷 그룹](https://docs.aws.amazon.com/memorydb/latest/devguide/subnetgroups.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/update-subnet-group.html)을 참조하세요.

### `update-user`
<a name="memorydb_UpdateUser_cli_topic"></a>

다음 코드 예시에서는 `update-user`의 사용 방법을 보여줍니다.

**AWS CLI**  
**사용자 업데이트**  
다음 `update-user`는 사용자의 액세스 문자열을 수정합니다.  

```
aws memorydb update-user \
    --user-name my-user \
    --access-string "off ~objects:* ~items:* ~public:* resetchannels -@all"
```
출력:  

```
{
    "User": {
        "Name": "my-user",
        "Status": "modifying",
        "AccessString": "off ~objects:* ~items:* ~public:* resetchannels -@all",
        "ACLNames": [
            "myt-acl"
        ],
        "MinimumEngineVersion": "6.2",
        "Authentication": {
            "Type": "password",
            "PasswordCount": 2
        },
        "ARN": "arn:aws:memorydb:us-east-1:491658xxxxxx:user/my-user"
    }
}
```
자세한 내용은 *MemoryDB 사용자 안내서*의 [액세스 제어 목록을 사용하여 사용자 인증](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html)을 참조하세요.  
+  API 세부 정보는 *AWS CLI 명령 참조*의 [UpdateUser](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/memorydb/update-user.html)를 참조하세요.