

Doc AWS SDK Examples GitHub リポジトリには、他にも SDK の例があります。 [AWS](https://github.com/awsdocs/aws-doc-sdk-examples)

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# を使用した Amazon Redshift の例 AWS CLI
<a name="cli_2_redshift_code_examples"></a>

次のコード例は、Amazon Redshift AWS Command Line Interface で を使用してアクションを実行し、一般的なシナリオを実装する方法を示しています。

*アクション*はより大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。アクションは個々のサービス機能を呼び出す方法を示していますが、コンテキスト内のアクションは、関連するシナリオで確認できます。

各例には完全なソースコードへのリンクが含まれており、コードの設定方法と実行方法に関する手順を確認できます。

**Topics**
+ [アクション](#actions)

## アクション
<a name="actions"></a>

### `accept-reserved-node-exchange`
<a name="redshift_AcceptReservedNodeExchange_cli_2_topic"></a>

次のコード例は、`accept-reserved-node-exchange` を使用する方法を示しています。

**AWS CLI**  
**リザーブドノード交換を受け入れるには**  
次の `accept-reserved-node-exchange` の例では、DC1 リザーブドノードと DC2 リザーブドノードの交換を受け入れます。  

```
aws redshift accept-reserved-node-exchange /
    --reserved-node-id 12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE /
    --target-reserved-node-offering-id 12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE
```
出力:  

```
{
    "ExchangedReservedNode": {
        "ReservedNodeId": "12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE",
        "ReservedNodeOfferingId": "12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE",
        "NodeType": "dc2.large",
        "StartTime": "2019-12-06T21:17:26Z",
        "Duration": 31536000,
        "FixedPrice": 0.0,
        "UsagePrice": 0.0,
        "CurrencyCode": "USD",
        "NodeCount": 1,
        "State": "exchanging",
        "OfferingType": "All Upfront",
        "RecurringCharges": [
            {
                "RecurringChargeAmount": 0.0,
                "RecurringChargeFrequency": "Hourly"
            }
        ],
        "ReservedNodeOfferingType": "Regular"
    }
}
```
詳細については、*「Amazon Redshift クラスター管理ガイド*[」の AWS 「 CLI を使用したリザーブドノードのアップグレード](https://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-offering-console.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AcceptReservedNodeExchange](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/accept-reserved-node-exchange.html)」を参照してください。

### `authorize-cluster-security-group-ingress`
<a name="redshift_AuthorizeClusterSecurityGroupIngress_cli_2_topic"></a>

次のコード例は、`authorize-cluster-security-group-ingress` を使用する方法を示しています。

**AWS CLI**  
EC2 セキュリティ グループへのアクセスを承認する この例では、名前付き Amazon EC2 セキュリティグループへのアクセスを許可します。コマンド:  

```
aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2-security-group-owner-id 123445677890
```
CIDR 範囲へのアクセスの許可 この例では、CIDR 範囲へのアクセスを許可します。コマンド：  

```
aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AuthorizeClusterSecurityGroupIngress](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/authorize-cluster-security-group-ingress.html)」を参照してください。

### `authorize-snapshot-access`
<a name="redshift_AuthorizeSnapshotAccess_cli_2_topic"></a>

次の例は、`authorize-snapshot-access` を使用する方法を説明しています。

**AWS CLI**  
 AWS アカウントがSnapshotThis、 AWS アカウントがスナップショットを復元`444455556666`することを許可します`my-snapshot-id`。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift authorize-snapshot-access --snapshot-id my-snapshot-id --account-with-restore-access 444455556666
```
結果:  

```
{
   "Snapshot": {
      "Status": "available",
      "SnapshotCreateTime": "2013-07-17T22:04:18.947Z",
      "EstimatedSecondsToCompletion": 0,
      "AvailabilityZone": "us-east-1a",
      "ClusterVersion": "1.0",
      "MasterUsername": "adminuser",
      "Encrypted": false,
      "OwnerAccount": "111122223333",
      "BackupProgressInMegabytes": 11.0,
      "ElapsedTimeInSeconds": 0,
      "DBName": "dev",
      "CurrentBackupRateInMegabytesPerSecond: 0.1534,
      "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
      "ActualIncrementalBackupSizeInMegabytes"; 11.0,
      "SnapshotType": "manual",
      "NodeType": "dw.hs1.xlarge",
      "ClusterIdentifier": "mycluster",
      "TotalBackupSizeInMegabytes": 20.0,
      "Port": 5439,
      "NumberOfNodes": 2,
      "SnapshotIdentifier": "my-snapshot-id"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[AuthorizeSnapshotAccess](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/authorize-snapshot-access.html)」を参照してください。

### `batch-delete-cluster-snapshots`
<a name="redshift_BatchDeleteClusterSnapshots_cli_2_topic"></a>

次のコード例は、`batch-delete-cluster-snapshots` を使用する方法を示しています。

**AWS CLI**  
**一連のクラスタースナップショットを削除するには**  
次の `batch-delete-cluster-snapshots` の例では、手動クラスタースナップショットのセットを削除します。  

```
aws redshift batch-delete-cluster-snapshots \
        --identifiers SnapshotIdentifier=mycluster-2019-11-06-14-12 SnapshotIdentifier=mycluster-2019-11-06-14-20
```
出力:  

```
{
    "Resources": [
        "mycluster-2019-11-06-14-12",
        "mycluster-2019-11-06-14-20"
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift スナップショット](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[BatchDeleteClusterSnapshots](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/batch-delete-cluster-snapshots.html)」を参照してください。

### `batch-modify-cluster-snapshots`
<a name="redshift_BatchModifyClusterSnapshots_cli_2_topic"></a>

次のコード例は、`batch-modify-cluster-snapshots` を使用する方法を示しています。

**AWS CLI**  
**一連のクラスタースナップショットを変更するには**  
次の `batch-modify-cluster-snapshots` の例では、一連のクラスタースナップショットの設定を変更します。  

```
aws redshift batch-modify-cluster-snapshots \
    --snapshot-identifier-list mycluster-2019-11-06-16-31 mycluster-2019-11-06-16-32 \
    --manual-snapshot-retention-period 30
```
出力:  

```
{
    "Resources": [
        "mycluster-2019-11-06-16-31",
        "mycluster-2019-11-06-16-32"
    ],
    "Errors": [],
    "ResponseMetadata": {
        "RequestId": "12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE",
        "HTTPStatusCode": 200,
        "HTTPHeaders": {
                "x-amzn-requestid": "12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE,
                "content-type": "text/xml",
                "content-length": "480",
                "date": "Sat, 07 Dec 2019 00:36:09 GMT",
                "connection": "keep-alive"
        },
        "RetryAttempts": 0
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift スナップショット](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[BatchModifyClusterSnapshots](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/batch-modify-cluster-snapshots.html)」を参照してください。

### `cancel-resize`
<a name="redshift_CancelResize_cli_2_topic"></a>

次のコード例は、`cancel-resize` を使用する方法を示しています。

**AWS CLI**  
**クラスターのサイズ変更をキャンセルするには**  
次の `cancel-resize` の例では、クラスターの従来のサイズ変更オペレーションをキャンセルします。  

```
aws redshift cancel-resize \
    --cluster-identifier mycluster
```
出力:  

```
{
    "TargetNodeType": "dc2.large",
    "TargetNumberOfNodes": 2,
    "TargetClusterType": "multi-node",
    "Status": "CANCELLING",
    "ResizeType": "ClassicResize",
    "TargetEncryptionType": "NONE"
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift クラスターのサイズ調整](https://docs.aws.amazon.com/redshift/latest/mgmt/rs-resize-tutorial.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「CancelResize」を参照してください。[https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/cancel-resize.html](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/cancel-resize.html)

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

次のコード例は、`copy-cluster-snapshot` を使用する方法を示しています。

**AWS CLI**  
すべてのクラスターバージョンの記述を取得する この例は、すべてのクラスターバージョンの記述を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift copy-cluster-snapshot --source-snapshot-identifier cm:examplecluster-2013-01-22-19-27-58 --target-snapshot-identifier my-saved-snapshot-copy
```
結果:  

```
{
   "Snapshot": {
      "Status": "available",
      "SnapshotCreateTime": "2013-01-22T19:27:58.931Z",
      "AvailabilityZone": "us-east-1c",
      "ClusterVersion": "1.0",
      "MasterUsername": "adminuser",
      "DBName": "dev",
      "ClusterCreateTime": "2013-01-22T19:23:59.368Z",
      "SnapshotType": "manual",
      "NodeType": "dw.hs1.xlarge",
      "ClusterIdentifier": "examplecluster",
      "Port": 5439,
      "NumberOfNodes": "2",
      "SnapshotIdentifier": "my-saved-snapshot-copy"
   },
   "ResponseMetadata": {
      "RequestId": "3b279691-64e3-11e2-bec0-17624ad140dd"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CopyClusterSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/copy-cluster-snapshot.html)」を参照してください。

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

次のコード例は、`create-cluster-parameter-group` を使用する方法を示しています。

**AWS CLI**  
クラスターパラメータグループを作成する この例では、新しいクラスターパラメータグループを作成します。コマンド:  

```
aws redshift create-cluster-parameter-group --parameter-group-name myclusterparametergroup --parameter-group-family redshift-1.0 --description "My first cluster parameter group"
```
結果:  

```
{
   "ClusterParameterGroup": {
      "ParameterGroupFamily": "redshift-1.0",
      "Description": "My first cluster parameter group",
      "ParameterGroupName": "myclusterparametergroup"
   },
   "ResponseMetadata": {
      "RequestId": "739448f0-64cc-11e2-8f7d-3b939af52818"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateClusterParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-cluster-parameter-group.html)」を参照してください。

### `create-cluster-security-group`
<a name="redshift_CreateClusterSecurityGroup_cli_2_topic"></a>

次のコード例は、`create-cluster-security-group` を使用する方法を示しています。

**AWS CLI**  
クラスターセキュリティグループの作成 この例では、新しいクラスターセキュリティグループを作成します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift create-cluster-security-group --cluster-security-group-name mysecuritygroup --description "This is my cluster security group"
```
結果:  

```
{
   "create_cluster_security_group_response": {
      "create_cluster_security_group_result": {
         "cluster_security_group": {
            "description": "This is my cluster security group",
            "owner_id": "300454760768",
            "cluster_security_group_name": "mysecuritygroup",
            "ec2_security_groups": \[],
            "ip_ranges": \[]
         }
      },
      "response_metadata": {
         "request_id": "5df486a0-343a-11e2-b0d8-d15d0ef48549"
      }
   }
}
```
`--output text` オプションコマンドを使用して、同じ情報をテキスト形式で取得することもできます。  
`--output text` オプションコマンド:  
 オプションコマンド:  

```
aws redshift create-cluster-security-group --cluster-security-group-name mysecuritygroup --description "This is my cluster security group" --output text
```
結果:  

```
This is my cluster security group   300454760768    mysecuritygroup
a0c0bfab-343a-11e2-95d2-c3dc9fe8ab57
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateClusterSecurityGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-cluster-security-group.html)」を参照してください。

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

次のコード例は、`create-cluster-snapshot` を使用する方法を示しています。

**AWS CLI**  
クラスタースナップショットを作成する この例では、新しいクラスターを作成します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift create-cluster-snapshot --cluster-identifier mycluster --snapshot-identifier my-snapshot-id
```
結果:  

```
{
   "Snapshot": {
      "Status": "creating",
      "SnapshotCreateTime": "2013-01-22T22:20:33.548Z",
      "AvailabilityZone": "us-east-1a",
      "ClusterVersion": "1.0",
      "MasterUsername": "adminuser",
      "DBName": "dev",
      "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
      "SnapshotType": "manual",
      "NodeType": "dw.hs1.xlarge",
      "ClusterIdentifier": "mycluster",
      "Port": 5439,
      "NumberOfNodes": "2",
      "SnapshotIdentifier": "my-snapshot-id"
   },
   "ResponseMetadata": {
      "RequestId": "f024d1a5-64e1-11e2-88c5-53eb05787dfb"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateClusterSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-cluster-snapshot.html)」を参照してください。

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

次のコード例は、`create-cluster-subnet-group` を使用する方法を示しています。

**AWS CLI**  
クラスターサブネットグループを作成する この例では、新しいクラスターサブネットグループを作成します。コマンド:  

```
aws redshift create-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup  --description "My subnet group" --subnet-ids subnet-763fdd1c
```
結果:  

```
{
   "ClusterSubnetGroup": {
      "Subnets": [
         {
            "SubnetStatus": "Active",
            "SubnetIdentifier": "subnet-763fdd1c",
            "SubnetAvailabilityZone": {
               "Name": "us-east-1a"
            }
         } ],
      "VpcId": "vpc-7e3fdd14",
      "SubnetGroupStatus": "Complete",
      "Description": "My subnet group",
      "ClusterSubnetGroupName": "mysubnetgroup"
   },
   "ResponseMetadata": {
      "RequestId": "500b8ce2-698f-11e2-9790-fd67517fb6fd"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateClusterSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-cluster-subnet-group.html)」を参照してください。

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

次のコード例は、`create-cluster` を使用する方法を示しています。

**AWS CLI**  
この例では、最小限のパラメータセットでクラスターを作成します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift create-cluster --node-type dw.hs1.xlarge --number-of-nodes 2 --master-username adminuser --master-user-password TopSecret1 --cluster-identifier mycluster
```
結果:  

```
{
   "Cluster": {
      "NodeType": "dw.hs1.xlarge",
      "ClusterVersion": "1.0",
      "PubliclyAccessible": "true",
      "MasterUsername": "adminuser",
      "ClusterParameterGroups": [
         {
            "ParameterApplyStatus": "in-sync",
            "ParameterGroupName": "default.redshift-1.0"
         } ],
      "ClusterSecurityGroups": [
         {
            "Status": "active",
            "ClusterSecurityGroupName": "default"
         } ],
      "AllowVersionUpgrade": true,
      "VpcSecurityGroups": \[],
      "PreferredMaintenanceWindow": "sat:03:30-sat:04:00",
      "AutomatedSnapshotRetentionPeriod": 1,
      "ClusterStatus": "creating",
      "ClusterIdentifier": "mycluster",
      "DBName": "dev",
      "NumberOfNodes": 2,
      "PendingModifiedValues": {
         "MasterUserPassword": "\****"
      }
   },
   "ResponseMetadata": {
      "RequestId": "7cf4bcfc-64dd-11e2-bea9-49e0ce183f07"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-cluster.html)」を参照してください。

### `create-event-subscription`
<a name="redshift_CreateEventSubscription_cli_2_topic"></a>

次のコード例は、`create-event-subscription` を使用する方法を示しています。

**AWS CLI**  
**イベントの通知サブスクリプションを作成するには**  
次の `create-event-subscription` の例は、イベント通知サブスクリプションを作成します。  

```
aws redshift create-event-subscription \
    --subscription-name mysubscription \
    --sns-topic-arn arn:aws:sns:us-west-2:123456789012:MySNStopic \
    --source-type cluster \
    --source-ids mycluster
```
出力:  

```
{
        "EventSubscription": {
        "CustomerAwsId": "123456789012",
        "CustSubscriptionId": "mysubscription",
        "SnsTopicArn": "arn:aws:sns:us-west-2:123456789012:MySNStopic",
        "Status": "active",
        "SubscriptionCreationTime": "2019-12-09T20:05:19.365Z",
        "SourceType": "cluster",
        "SourceIdsList": [
            "mycluster"
        ],
        "EventCategoriesList": [],
        "Severity": "INFO",
        "Enabled": true,
        "Tags": []
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift イベント通知のサブスクライブ](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateEventSubscription](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-event-subscription.html)」を参照してください。

### `create-hsm-client-certificate`
<a name="redshift_CreateHsmClientCertificate_cli_2_topic"></a>

次のコード例は、`create-hsm-client-certificate` を使用する方法を示しています。

**AWS CLI**  
**HSM クライアント証明書を作成するには**  
次の `create-hsm-client-certificate` の例では、クラスターが HSM への接続に使用できる HSM クライアント証明書を生成します。  

```
aws redshift create-hsm-client-certificate \
    --hsm-client-certificate-identifier myhsmclientcert
```
出力:  

```
{
    "HsmClientCertificate": {
        "HsmClientCertificateIdentifier": "myhsmclientcert",
        "HsmClientCertificatePublicKey": "-----BEGIN CERTIFICATE-----
        MIICiEXAMPLECQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC
        VVMxCzAJBgNVBAgTEXAMPLEwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6
        b24xFDASBgNVBAsTC0lBTSBDb25EXAMPLEIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd
        BgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb2EXAMPLETEwNDI1MjA0NTIxWhcN
        MTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBEXAMPLEMRAwDgYD
        EXAMPLETZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z
        b2xlMRIwEAEXAMPLEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFt
        YXpvbi5jb20wgZ8wDQYJKEXAMPLEAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ
        21uUSfwfEvySWtC2XADZ4nB+BLYgVIk6EXAMPLE3G93vUEIO3IyNoH/f0wYK8m9T
        rDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugEXAMPLEzZswY6786m86gpE
        Ibb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEEXAMPLEEAtCu4
        nUhVVxYUEXAMPLEh8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb
        FFBjvSfpJIlJ00zbhNYS5f6GEXAMPLEl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTb
        NYiytVbZPQUQ5Yaxu2jXnimvw3rEXAMPLE=-----END CERTIFICATE-----\n",
    "Tags": []
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift API アクセス許可のリファレンス](https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-policy-resources.resource-permissions.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateHsmClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-hsm-client-certificate.html)」を参照してください。

### `create-hsm-configuration`
<a name="redshift_CreateHsmConfiguration_cli_2_topic"></a>

次のコード例は、`create-hsm-configuration` を使用する方法を示しています。

**AWS CLI**  
**HSM 設定を作成するには**  
次の `create-hsm-configuration` の例は、クラスターがハードウェアセキュリティモジュール (HSM) においてデータベース暗号化キーを保存または使用する際に必要とする情報を含んだ HSM 設定を作成します。  

```
aws redshift create-hsm-configuration /
    --hsm-configuration-identifier myhsmconnection
    --description "My HSM connection"
    --hsm-ip-address 192.0.2.09
    --hsm-partition-name myhsmpartition /
    --hsm-partition-password A1b2c3d4 /
    --hsm-server-public-certificate myhsmclientcert
```
出力:  

```
{
    "HsmConfiguration": {
        "HsmConfigurationIdentifier": "myhsmconnection",
        "Description": "My HSM connection",
        "HsmIpAddress": "192.0.2.09",
        "HsmPartitionName": "myhsmpartition",
        "Tags": []
    }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateHsmConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-hsm-configuration.html)」を参照してください。

### `create-snapshot-copy-grant`
<a name="redshift_CreateSnapshotCopyGrant_cli_2_topic"></a>

次のコード例は、`create-snapshot-copy-grant` を使用する方法を示しています。

**AWS CLI**  
**スナップショットコピーエージェントを作成するには**  
次の の`create-snapshot-copy-grant`例では、スナップショットコピー許可を作成し、コピー先の AWS リージョンでコピーされたスナップショットを暗号化します。  

```
aws redshift create-snapshot-copy-grant \
    --snapshot-copy-grant-name mysnapshotcopygrantname
```
出力:  

```
{
    "SnapshotCopyGrant": {
        "SnapshotCopyGrantName": "mysnapshotcopygrantname",
        "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY",
        "Tags": []
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift データベースの暗号化](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateSnapshotCopyGrant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-snapshot-copy-grant.html)」を参照してください。

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

次のコード例は、`create-snapshot-schedule` を使用する方法を示しています。

**AWS CLI**  
**スナップショットスケジュールを作成するには**  
次の `create-snapshot-schedule` の例では、指定された説明と 12 時間ごとのレートでスナップショットスケジュールを作成します。  

```
aws redshift create-snapshot-schedule \
    --schedule-definitions "rate(12 hours)" \
    --schedule-identifier mysnapshotschedule \
    --schedule-description "My schedule description"
```
出力:  

```
{
    "ScheduleDefinitions": [
        "rate(12 hours)"
    ],
    "ScheduleIdentifier": "mysnapshotschedule",
    "ScheduleDescription": "My schedule description",
    "Tags": []
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[自動スナップショットのスケジュール](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#automated-snapshot-schedules)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateSnapshotSchedule](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-snapshot-schedule.html)」を参照してください。

### `create-tags`
<a name="redshift_CreateTags_cli_2_topic"></a>

次のコード例は、`create-tags` を使用する方法を示しています。

**AWS CLI**  
**クラスターのタグを作成するには**  
次の `create-tags` の例では、指定されたタグキーと値のペアを指定されたクラスターに追加します。  

```
aws redshift create-tags \
    --resource-name arn:aws:redshift:us-west-2:123456789012:cluster:mycluster \
    --tags "Key"="mytags","Value"="tag1"
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift のリソースへのタグ付け](https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-tagging.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[CreateTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/create-tags.html)」を参照してください。

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

次のコード例は、`delete-cluster-parameter-group` を使用する方法を示しています。

**AWS CLI**  
クラスターパラメータグループを削除する この例では、クラスターパラメータグループを削除します。コマンド:  

```
aws redshift delete-cluster-parameter-group --parameter-group-name myclusterparametergroup
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteClusterParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-cluster-parameter-group.html)」を参照してください。

### `delete-cluster-security-group`
<a name="redshift_DeleteClusterSecurityGroup_cli_2_topic"></a>

次のコード例は、`delete-cluster-security-group` を使用する方法を示しています。

**AWS CLI**  
クラスターセキュリティグループを削除する この例では、クラスターセキュリティグループを削除します。コマンド:  

```
aws redshift delete-cluster-security-group --cluster-security-group-name mysecuritygroup
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteClusterSecurityGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-cluster-security-group.html)」を参照してください。

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

次のコード例は、`delete-cluster-snapshot` を使用する方法を示しています。

**AWS CLI**  
クラスタースナップショットを削除する この例では、クラスタースナップショットを削除します。コマンド:  

```
aws redshift delete-cluster-snapshot --snapshot-identifier my-snapshot-id
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteClusterSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-cluster-snapshot.html)」を参照してください。

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

次のコード例は、`delete-cluster-subnet-group` を使用する方法を示しています。

**AWS CLI**  
クラスターサブネットグループを削除する この例では、クラスターサブネットグループを削除します。コマンド:  

```
aws redshift delete-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup
```
結果:  

```
{
   "ResponseMetadata": {
      "RequestId": "253fbffd-6993-11e2-bc3a-47431073908a"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteClusterSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-cluster-subnet-group.html)」を参照してください。

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

次のコード例は、`delete-cluster` を使用する方法を示しています。

**AWS CLI**  
この例では、クラスターを削除してデータを強制的に削除し、最終的なクラスターのスナップショットは作成されません。コマンドは次のとおりです。  

```
aws redshift delete-cluster --cluster-identifier mycluster --skip-final-cluster-snapshot
```
この例では、クラスターは削除しますが、最終クラスターのスナップショットを指定しています。コマンドは次のとおりです。  

```
aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier myfinalsnapshot
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-cluster.html)」を参照してください。

### `delete-event-subscription`
<a name="redshift_DeleteEventSubscription_cli_2_topic"></a>

次のコード例は、`delete-event-subscription` を使用する方法を示しています。

**AWS CLI**  
**イベントサブスクリプションを削除するには**  
次の `delete-event-subscription` の例では、指定したイベント通知サブスクリプションを削除します。  

```
aws redshift delete-event-subscription \
    --subscription-name mysubscription
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift イベント通知のサブスクライブ](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteEventSubscription](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-event-subscription.html)」を参照してください。

### `delete-hsm-client-certificate`
<a name="redshift_DeleteHsmClientCertificate_cli_2_topic"></a>

次のコード例は、`delete-hsm-client-certificate` を使用する方法を示しています。

**AWS CLI**  
**HSM** クライアント証明書を削除するには  
次の `delete-hsm-client-certificate` の例では、HSM クライアント証明書を削除します。  

```
aws redshift delete-hsm-client-certificate \
    --hsm-client-certificate-identifier myhsmclientcert
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift API アクセス許可のリファレンス](https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-policy-resources.resource-permissions.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteHsmClientCertificate](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-hsm-client-certificate.html)」を参照してください。

### `delete-hsm-configuration`
<a name="redshift_DeleteHsmConfiguration_cli_2_topic"></a>

次のコード例は、`delete-hsm-configuration` を使用する方法を示しています。

**AWS CLI**  
**HSM 設定を削除するには**  
次の の`delete-hsm-configuration`例では、現在の AWS アカウントから指定された HSM 設定を削除します。  

```
aws redshift delete-hsm-configuration /
    --hsm-configuration-identifier myhsmconnection
```
このコマンドでは、出力が生成されません。  
+  API の詳細については、「**AWS CLI コマンドリファレンス」の「[DeleteHsmConfiguration](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-hsm-configuration.html)」を参照してください。

### `delete-scheduled-action`
<a name="redshift_DeleteScheduledAction_cli_2_topic"></a>

次のコード例は、`delete-scheduled-action` を使用する方法を示しています。

**AWS CLI**  
**スケジュールされたアクションを削除するには**  
以下の `delete-scheduled-action` の例では、指定したアクションスケジュールを削除します。  

```
aws redshift delete-scheduled-action \
    --scheduled-action-name myscheduledaction
```
このコマンドでは、出力が生成されません。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteScheduledAction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-scheduled-action.html)」を参照してください。

### `delete-snapshot-copy-grant`
<a name="redshift_DeleteSnapshotCopyGrant_cli_2_topic"></a>

次のコード例は、`delete-snapshot-copy-grant` を使用する方法を示しています。

**AWS CLI**  
**スナップショットコピー権限を削除するには**  
次の `delete-snapshot-copy-grant` の例では、指定したスナップショットコピー権限を削除します。  

```
aws redshift delete-snapshot-copy-grant \
    --snapshot-copy-grant-name mysnapshotcopygrantname
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift データベースの暗号化](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html)」を参照してください。  
+  API の詳細については、「**AWS CLI コマンドリファレンス」の「[DeleteSnapshotCopyGrant](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-snapshot-copy-grant.html)」を参照してください。

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

次のコード例は、`delete-snapshot-schedule` を使用する方法を示しています。

**AWS CLI**  
**スナップショットスケジュールを削除するには**  
次の `delete-snapshot-schedule` の例では、指定したスナップショットスケジュールを削除します。スケジュールを削除する前に、クラスターの関連付けを解除する必要があります。  

```
aws redshift delete-snapshot-schedule \
    --schedule-identifier mysnapshotschedule
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[自動スナップショットのスケジュール](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#automated-snapshot-schedules)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteSnapshotSchedule](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-snapshot-schedule.html)」を参照してください。

### `delete-tags`
<a name="redshift_DeleteTags_cli_2_topic"></a>

次のコード例は、`delete-tags` を使用する方法を示しています。

**AWS CLI**  
**クラスターからタグを削除するには**  
次の `delete-tags` の例では、指定されたキー名を持つタグを指定されたクラスターから削除します。  

```
aws redshift delete-tags \
    --resource-name arn:aws:redshift:us-west-2:123456789012:cluster:mycluster \
    --tag-keys "clustertagkey" "clustertagvalue"
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift のリソースへのタグ付け](https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-tagging.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DeleteTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/delete-tags.html)」を参照してください。

### `describe-account-attributes`
<a name="redshift_DescribeAccountAttributes_cli_2_topic"></a>

次の例は、`describe-account-attributes` を使用する方法を説明しています。

**AWS CLI**  
** AWS アカウントの属性を記述するには**  
次の の`describe-account-attributes`例では、呼び出し元の AWS アカウントにアタッチされた属性を表示します。  

```
aws redshift describe-account-attributes
```
出力:  

```
{
    "AccountAttributes": [
        {
            "AttributeName": "max-defer-maintenance-duration",
            "AttributeValues": [
                {
                    "AttributeValue": "45"
                }
            ]
        }
    ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeAccountAttributes](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-account-attributes.html)」を参照してください。

### `describe-cluster-db-revisions`
<a name="redshift_DescribeClusterDbRevisions_cli_2_topic"></a>

次のコード例は、`describe-cluster-db-revisions` を使用する方法を示しています。

**AWS CLI**  
**クラスターの DB リビジョンを記述するには**  
次の `describe-cluster-db-revisions` の例は、指定されたクラスターの `ClusterDbRevision` オブジェクトの配列の詳細を表示します。  

```
aws redshift describe-cluster-db-revisions \
    --cluster-identifier mycluster
```
出力:  

```
{
    "ClusterDbRevisions": [
        {
            "ClusterIdentifier": "mycluster",
            "CurrentDatabaseRevision": "11420",
            "DatabaseRevisionReleaseDate": "2019-11-22T16:43:49.597Z",
            "RevisionTargets": []
        }
    ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterDbRevisions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-db-revisions.html)」を参照してください。

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

次のコード例は、`describe-cluster-parameter-groups` を使用する方法を示しています。

**AWS CLI**  
すべてのクラスターパラメータグループの記述を取得する この例は、アカウントのすべてのクラスターパラメータグループの説明と列ヘッダーを返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-cluster-parameter-groups
```
結果:  

```
{
   "ParameterGroups": [
      {
         "ParameterGroupFamily": "redshift-1.0",
         "Description": "My first cluster parameter group",
         "ParameterGroupName": "myclusterparametergroup"
      } ],
   "ResponseMetadata": {
      "RequestId": "8ceb8f6f-64cc-11e2-bea9-49e0ce183f07"
   }
}
```
`--output text` オプションコマンドを使用して、同じ情報をテキスト形式で取得することもできます。  
`--output text` オプションコマンド:  
 オプションコマンド:  

```
aws redshift describe-cluster-parameter-groups --output text
```
結果:  

```
redshift-1.0        My first cluster parameter group        myclusterparametergroup
RESPONSEMETADATA    9e665a36-64cc-11e2-8f7d-3b939af52818
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterParameterGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-parameter-groups.html)」を参照してください。

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

次のコード例は、`describe-cluster-parameters` を使用する方法を示しています。

**AWS CLI**  
指定されたクラスターパラメータグループのパラメータを取得する この例では、名前付きパラメータグループのパラメータを取得します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-cluster-parameters --parameter-group-name myclusterparametergroup
```
結果:  

```
{
   "Parameters": [
      {
         "Description": "Sets the display format for date and time values.",
         "DataType": "string",
         "IsModifiable": true,
         "Source": "engine-default",
         "ParameterValue": "ISO, MDY",
         "ParameterName": "datestyle"
      },
      {
         "Description": "Sets the number of digits displayed for floating-point values",
         "DataType": "integer",
         "IsModifiable": true,
         "AllowedValues": "-15-2",
         "Source": "engine-default",
         "ParameterValue": "0",
         "ParameterName": "extra_float_digits"
      },
      (...remaining output omitted...)
   ]
}
```
`--output text` オプションコマンドを使用して、同じ情報をテキスト形式で取得することもできます。  
`--output text` オプションコマンド:  
 オプションコマンド:  

```
aws redshift describe-cluster-parameters --parameter-group-name myclusterparametergroup --output text
```
結果:  

```
RESPONSEMETADATA    cdac40aa-64cc-11e2-9e70-918437dd236d
Sets the display format for date and time values.   string  True    engine-default  ISO, MDY        datestyle
Sets the number of digits displayed for floating-point values       integer True    -15-2   engine-default  0       extra_float_digits
This parameter applies a user-defined label to a group of queries that are run during the same session..    string  True    engine-default  default query_group
require ssl for all databaseconnections     boolean True    true,false      engine-default  false   require_ssl
Sets the schema search order for names that are not schema-qualified.       string  True    engine-default  $user, public   search_path
Aborts any statement that takes over the specified number of milliseconds.  integer True    engine-default  0       statement_timeout
wlm json configuration      string  True    engine-default  \[{"query_concurrency":5}]      wlm_json_configuration
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterParameters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-parameters.html)」を参照してください。

### `describe-cluster-security-groups`
<a name="redshift_DescribeClusterSecurityGroups_cli_2_topic"></a>

次のコード例は、`describe-cluster-security-groups` を使用する方法を示しています。

**AWS CLI**  
すべてのクラスターセキュリティグループの記述を取得する この例は、アカウントのすべてのクラスターセキュリティグループの記述を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-cluster-security-groups
```
結果:  

```
{
   "ClusterSecurityGroups": [
      {
         "OwnerId": "100447751468",
         "Description": "default",
         "ClusterSecurityGroupName": "default",
         "EC2SecurityGroups": \[],
         "IPRanges": [
            {
               "Status": "authorized",
               "CIDRIP": "0.0.0.0/0"
            }
         ]
      },
      {
         "OwnerId": "100447751468",
         "Description": "This is my cluster security group",
         "ClusterSecurityGroupName": "mysecuritygroup",
         "EC2SecurityGroups": \[],
         "IPRanges": \[]
      },
      (...remaining output omitted...)
   ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterSecurityGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-security-groups.html)」を参照してください。

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

次のコード例は、`describe-cluster-snapshots` を使用する方法を示しています。

**AWS CLI**  
すべてのクラスタースナップショットの記述を取得する この例は、アカウントのすべてのクラスタースナップショットの記述を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-cluster-snapshots
```
結果:  

```
{
   "Snapshots": [
      {
         "Status": "available",
         "SnapshotCreateTime": "2013-07-17T22:02:22.852Z",
         "EstimatedSecondsToCompletion": -1,
         "AvailabilityZone": "us-east-1a",
         "ClusterVersion": "1.0",
         "MasterUsername": "adminuser",
         "Encrypted": false,
         "OwnerAccount": "111122223333",
         "BackupProgressInMegabytes": 20.0,
         "ElapsedTimeInSeconds": 0,
         "DBName": "dev",
         "CurrentBackupRateInMegabytesPerSecond: 0.0,
         "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
         "ActualIncrementalBackupSizeInMegabytes"; 20.0
         "SnapshotType": "automated",
         "NodeType": "dw.hs1.xlarge",
         "ClusterIdentifier": "mycluster",
         "Port": 5439,
         "TotalBackupSizeInMegabytes": 20.0,
         "NumberOfNodes": "2",
         "SnapshotIdentifier": "cm:mycluster-2013-01-22-22-04-18"
      },
      {
         "EstimatedSecondsToCompletion": 0,
         "OwnerAccount": "111122223333",
         "CurrentBackupRateInMegabytesPerSecond: 0.1534,
         "ActualIncrementalBackupSizeInMegabytes"; 11.0,
         "NumberOfNodes": "2",
         "Status": "available",
         "ClusterVersion": "1.0",
         "MasterUsername": "adminuser",
         "AccountsWithRestoreAccess": [
            {
               "AccountID": "444455556666"
            } ],
         "TotalBackupSizeInMegabytes": 20.0,
         "DBName": "dev",
         "BackupProgressInMegabytes": 11.0,
         "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
         "ElapsedTimeInSeconds": 0,
         "ClusterIdentifier": "mycluster",
         "SnapshotCreateTime": "2013-07-17T22:04:18.947Z",
         "AvailabilityZone": "us-east-1a",
         "NodeType": "dw.hs1.xlarge",
         "Encrypted": false,
         "SnapshotType": "manual",
         "Port": 5439,
         "SnapshotIdentifier": "my-snapshot-id"
      } ]
   }
   (...remaining output omitted...)
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterSnapshots](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-snapshots.html)」を参照してください。

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

次のコード例は、`describe-cluster-subnet-groups` を使用する方法を示しています。

**AWS CLI**  
すべてのクラスターサブネットグループの記述を取得する この例では、すべてのクラスターサブネットグループの説明を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-cluster-subnet-groups
```
結果:  

```
{
   "ClusterSubnetGroups": [
      {
         "Subnets": [
            {
               "SubnetStatus": "Active",
               "SubnetIdentifier": "subnet-763fdd1c",
               "SubnetAvailabilityZone": {
                  "Name": "us-east-1a"
               }
            }
         ],
         "VpcId": "vpc-7e3fdd14",
         "SubnetGroupStatus": "Complete",
         "Description": "My subnet group",
         "ClusterSubnetGroupName": "mysubnetgroup"
      }
   ],
   "ResponseMetadata": {
      "RequestId": "37fa8c89-6990-11e2-8f75-ab4018764c77"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterSubnetGroups](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-subnet-groups.html)」を参照してください。

### `describe-cluster-tracks`
<a name="redshift_DescribeClusterTracks_cli_2_topic"></a>

次のコード例は、`describe-cluster-tracks` を使用する方法を示しています。

**AWS CLI**  
**クラスタートラックを記述するには**  
次の `describe-cluster-tracks` の例では、使用可能なメンテナンストラックの詳細を表示します。  

```
aws redshift describe-cluster-tracks \
    --maintenance-track-name current
```
出力:  

```
{
    "MaintenanceTracks": [
        {
            "MaintenanceTrackName": "current",
            "DatabaseVersion": "1.0.11420",
            "UpdateTargets": [
                {
                    "MaintenanceTrackName": "preview_features",
                    "DatabaseVersion": "1.0.11746",
                    "SupportedOperations": [
                        {
                            "OperationName": "restore-from-cluster-snapshot"
                        }
                    ]
                },
                {
                    "MaintenanceTrackName": "trailing",
                    "DatabaseVersion": "1.0.11116",
                    "SupportedOperations": [
                        {
                            "OperationName": "restore-from-cluster-snapshot"
                        },
                        {
                            "OperationName": "modify-cluster"
                        }
                    ]
                }
            ]
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[クラスターメンテナンストラックの選択](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-mgmt-maintenance-tracks)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterTracks](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-tracks.html)」を参照してください。

### `describe-cluster-versions`
<a name="redshift_DescribeClusterVersions_cli_2_topic"></a>

次のコード例は、`describe-cluster-versions` を使用する方法を示しています。

**AWS CLI**  
すべてのクラスターバージョンの記述を取得する この例は、すべてのクラスターバージョンの記述を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-cluster-versions
```
結果:  

```
{
   "ClusterVersions": [
      {
      "ClusterVersion": "1.0",
      "Description": "Initial release",
      "ClusterParameterGroupFamily": "redshift-1.0"
      } ],
   "ResponseMetadata": {
      "RequestId": "16a53de3-64cc-11e2-bec0-17624ad140dd"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusterVersions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-cluster-versions.html)」を参照してください。

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

次のコード例は、`describe-clusters` を使用する方法を示しています。

**AWS CLI**  
この例は、アカウントのすべてのクラスターの記述を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-clusters
```
結果:  

```
{
   "Clusters": [
   {
      "NodeType": "dw.hs1.xlarge",
      "Endpoint": {
         "Port": 5439,
         "Address": "mycluster.coqoarplqhsn.us-east-1.redshift.amazonaws.com"
      },
      "ClusterVersion": "1.0",
      "PubliclyAccessible": "true",
      "MasterUsername": "adminuser",
      "ClusterParameterGroups": [
         {
            "ParameterApplyStatus": "in-sync",
            "ParameterGroupName": "default.redshift-1.0"
         } ],
      "ClusterSecurityGroups": [
         {
            "Status": "active",
            "ClusterSecurityGroupName": "default"
         } ],
      "AllowVersionUpgrade": true,
      "VpcSecurityGroups": \[],
      "AvailabilityZone": "us-east-1a",
      "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
      "PreferredMaintenanceWindow": "sat:03:30-sat:04:00",
      "AutomatedSnapshotRetentionPeriod": 1,
      "ClusterStatus": "available",
      "ClusterIdentifier": "mycluster",
      "DBName": "dev",
      "NumberOfNodes": 2,
      "PendingModifiedValues": {}
   } ],
   "ResponseMetadata": {
      "RequestId": "65b71cac-64df-11e2-8f5b-e90bd6c77476"
   }
}
```
`--output text` オプションコマンドを使用して、同じ情報をテキスト形式で取得することもできます。  
`--output text` オプションコマンド:  
 オプションコマンド:  

```
aws redshift describe-clusters --output text
```
結果:  

```
dw.hs1.xlarge       1.0     true    adminuser       True    us-east-1a      2013-01-22T21:59:29.559Z        sat:03:30-sat:04:00     1       available       mycluster       dev     2
ENDPOINT    5439    mycluster.coqoarplqhsn.us-east-1.redshift.amazonaws.com
in-sync     default.redshift-1.0
active      default
PENDINGMODIFIEDVALUES
RESPONSEMETADATA    934281a8-64df-11e2-b07c-f7fbdd006c67
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeClusters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-clusters.html)」を参照してください。

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

次のコード例は、`describe-default-cluster-parameters` を使用する方法を示しています。

**AWS CLI**  
デフォルトクラスターパラメータの記述を取得する この例では、`redshift-1.0` ファミリーのデフォルトクラスターパラメータの説明を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-default-cluster-parameters --parameter-group-family redshift-1.0
```
結果:  

```
{
   "DefaultClusterParameters": {
   "ParameterGroupFamily": "redshift-1.0",
   "Parameters": [
      {
         "Description": "Sets the display format for date and time values.",
         "DataType": "string",
         "IsModifiable": true,
         "Source": "engine-default",
         "ParameterValue": "ISO, MDY",
         "ParameterName": "datestyle"
      },
      {
         "Description": "Sets the number of digits displayed for floating-point values",
         "DataType": "integer",
         "IsModifiable": true,
         "AllowedValues": "-15-2",
         "Source": "engine-default",
         "ParameterValue": "0",
         "ParameterName": "extra_float_digits"
      },
      (...remaining output omitted...)
      ]
   }
}
```
有効なパラメータグループファミリーのリストを表示するには、`describe-cluster-parameter-groups` コマンドを使用します。  
`describe-cluster-parameter-groups` コマンド。  
 コマンド。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeDefaultClusterParameters](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-default-cluster-parameters.html)」を参照してください。

### `describe-event-categories`
<a name="redshift_DescribeEventCategories_cli_2_topic"></a>

次のコード例は、`describe-event-categories` を使用する方法を示しています。

**AWS CLI**  
**クラスターのイベントカテゴリを記述するには**  
次の `describe-event-categories` の例では、クラスターのイベントカテゴリの詳細を表示します。  

```
aws redshift describe-event-categories \
    --source-type cluster
```
出力:  

```
{
    "EventCategoriesMapList": [
        {
            "SourceType": "cluster",
            "Events": [
                {
                    "EventId": "REDSHIFT-EVENT-2000",
                    "EventCategories": [
                        "management"
                    ],
                    "EventDescription": "Cluster <cluster name> created at <time in UTC>.",
                    "Severity": "INFO"
                },
                {
                    "EventId": "REDSHIFT-EVENT-2001",
                    "EventCategories": [
                        "management"
                    ],
                    "EventDescription": "Cluster <cluster name> deleted at <time in UTC>.",
                    "Severity": "INFO"
                },
                {
                    "EventId": "REDSHIFT-EVENT-3625",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "EventDescription": "The cluster <cluster name> can't be resumed with its previous elastic network interface <ENI id>. We will allocate a new elastic network interface and associate it with the cluster node.",
                    "Severity": "INFO"
                }
            ]
        }
    ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeEventCategories](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-event-categories.html)」を参照してください。

### `describe-event-subscriptions`
<a name="redshift_DescribeEventSubscriptions_cli_2_topic"></a>

次のコード例は、`describe-event-subscriptions` を使用する方法を示しています。

**AWS CLI**  
**イベントサブスクリプションについて表示するには**  
次の `describe-event-subscriptions` の例では、指定されたサブスクリプションのイベント通知サブスクリプションを表示します。  

```
aws redshift describe-event-subscriptions \
    --subscription-name mysubscription
```
出力:  

```
{
    "EventSubscriptionsList": [
        {
            "CustomerAwsId": "123456789012",
            "CustSubscriptionId": "mysubscription",
            "SnsTopicArn": "arn:aws:sns:us-west-2:123456789012:MySNStopic",
            "Status": "active",
            "SubscriptionCreationTime": "2019-12-09T21:50:21.332Z",
            "SourceIdsList": [],
            "EventCategoriesList": [
                "management"
            ],
            "Severity": "ERROR",
            "Enabled": true,
            "Tags": []
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift イベント通知のサブスクライブ](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeEventSubscriptions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-event-subscriptions.html)」を参照してください。

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

次のコード例は、`describe-events` を使用する方法を示しています。

**AWS CLI**  
すべてのイベントを記述する この例では、すべてのイベントを返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-events
```
結果:  

```
{
   "Events": [
      {
      "Date": "2013-01-22T19:17:03.640Z",
      "SourceIdentifier": "myclusterparametergroup",
      "Message": "Cluster parameter group myclusterparametergroup has been created.",
      "SourceType": "cluster-parameter-group"
      } ],
   "ResponseMetadata": {
      "RequestId": "9f056111-64c9-11e2-9390-ff04f2c1e638"
   }
}
```
`--output text` オプションコマンドを使用して、同じ情報をテキスト形式で取得することもできます。  
`--output text` オプションコマンド:  
 オプションコマンド:  

```
aws redshift describe-events --output text
```
結果:  

```
2013-01-22T19:17:03.640Z    myclusterparametergroup Cluster parameter group myclusterparametergroup has been created.       cluster-parameter-group
RESPONSEMETADATA    8e5fe765-64c9-11e2-bce3-e56f52c50e17
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeEvents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-events.html)」を参照してください。

### `describe-hsm-client-certificates`
<a name="redshift_DescribeHsmClientCertificates_cli_2_topic"></a>

次のコード例は、`describe-hsm-client-certificates` を使用する方法を示しています。

**AWS CLI**  
**HSM クライアント証明書を記述するには**  
次の `describe-hsm-client-certificates` の例は、指定された HSM クライアント証明書の詳細を表示します。  

```
aws redshift describe-hsm-client-certificates \
    --hsm-client-certificate-identifier myhsmclientcert
```
出力:  

```
{
    "HsmClientCertificates": [
        {
        "HsmClientCertificateIdentifier": "myhsmclientcert",
        "HsmClientCertificatePublicKey": "-----BEGIN CERTIFICATE-----\
        EXAMPLECAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC
        VVMxCzAJBgNVBAEXAMPLERAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6
        b24xFDASBgNVBAsTC0lBTSBDb25zEXAMPLEwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd
        BgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhEXAMPLEDI1MjA0EXAMPLEN
        EXAMPLE0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYD
        VQQHEwdTZWF0dGEXAMPLEQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z
        b2xlMRIwEAYDVQQDEwlUZXN0Q2lsEXAMPLEdBgkqhkiG9w0BCQEWEG5vb25lQGFt
        YXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIEXAMPLEMaK0dn+a4GmWIWJ
        21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9T
        rDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY67EXAMPLEE
        EXAMPLEZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4
        nUhVVxYUntneD9EXAMPLE6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb
        FFBjvSfpJIlJ00zbhNYS5f6GuoEDEXAMPLEBHjJnyp378OD8uTs7fLvjx79LjSTb
        NYiytVbZPQUQ5Yaxu2jXnimvw3rEXAMPLE=-----END CERTIFICATE-----\n",
        "Tags": []
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift API アクセス許可のリファレンス](https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-policy-resources.resource-permissions.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeHsmClientCertificates](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-hsm-client-certificates.html)」を参照してください。

### `describe-hsm-configurations`
<a name="redshift_DescribeHsmConfigurations_cli_2_topic"></a>

次のコード例は、`describe-hsm-configurations` を使用する方法を示しています。

**AWS CLI**  
**HSM 設定を記述するには**  
次の の`describe-hsm-configurations`例では、呼び出し元の AWS アカウントで使用可能な HSM 設定の詳細を表示します。  

```
aws redshift describe-hsm-configurations /
    --hsm-configuration-identifier myhsmconnection
```
出力:  

```
{
    "HsmConfigurations": [
        {
            "HsmConfigurationIdentifier": "myhsmconnection",
            "Description": "My HSM connection",
            "HsmIpAddress": "192.0.2.09",
            "HsmPartitionName": "myhsmpartition",
            "Tags": []
        }
    ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeHsmConfigurations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-hsm-configurations.html)」を参照してください。

### `describe-logging-status`
<a name="redshift_DescribeLoggingStatus_cli_2_topic"></a>

次のコード例は、`describe-logging-status` を使用する方法を示しています。

**AWS CLI**  
**クラスターのログ記録ステータスを記述するには**  
次の `describe-logging-status` の例は、クエリや接続試行などの情報がクラスターに対してログに記録されているかどうかを示しています。  

```
aws redshift describe-logging-status \
    --cluster-identifier mycluster
```
出力:  

```
{
    "LoggingEnabled": false
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[データベース監査ログ記録](https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeLoggingStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-logging-status.html)」を参照してください。

### `describe-node-configuration-options`
<a name="redshift_DescribeNodeConfigurationOptions_cli_2_topic"></a>

次のコード例は、`describe-node-configuration-options` を使用する方法を示しています。

**AWS CLI**  
**ノード設定オプションを記述するには**  
次の `describe-node-configuration-options` の例は、ノードタイプ、ノード数、指定されたクラスタースナップショットのディスク使用量など、可能なノード設定のプロパティを示しています。  

```
aws redshift describe-node-configuration-options \
    --action-type restore-cluster \
    --snapshot-identifier rs:mycluster-2019-12-09-16-42-43
```
出力:  

```
{
    "NodeConfigurationOptionList": [
        {
            "NodeType": "dc2.large",
            "NumberOfNodes": 2,
            "EstimatedDiskUtilizationPercent": 19.61
        },
        {
            "NodeType": "dc2.large",
            "NumberOfNodes": 4,
            "EstimatedDiskUtilizationPercent": 9.96
        },
        {
            "NodeType": "ds2.xlarge",
            "NumberOfNodes": 2,
            "EstimatedDiskUtilizationPercent": 1.53
        },
        {
            "NodeType": "ds2.xlarge",
            "NumberOfNodes": 4,
            "EstimatedDiskUtilizationPercent": 0.78
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift リザーブドノードの購入](https://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-instance.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeNodeConfigurationOptions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-node-configuration-options.html)」を参照してください。

### `describe-orderable-cluster-options`
<a name="redshift_DescribeOrderableClusterOptions_cli_2_topic"></a>

次のコード例は、`describe-orderable-cluster-options` を使用する方法を示しています。

**AWS CLI**  
すべての注文可能なクラスターオプションの記述 この例では、注文可能なすべてのクラスターオプションの説明を返します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift describe-orderable-cluster-options
```
結果:  

```
{
   "OrderableClusterOptions": [
      {
         "NodeType": "dw.hs1.8xlarge",
         "AvailabilityZones": [
            { "Name": "us-east-1a" },
            { "Name": "us-east-1b" },
            { "Name": "us-east-1c" } ],
         "ClusterVersion": "1.0",
         "ClusterType": "multi-node"
      },
      {
         "NodeType": "dw.hs1.xlarge",
         "AvailabilityZones": [
            { "Name": "us-east-1a" },
            { "Name": "us-east-1b" },
            { "Name": "us-east-1c" } ],
         "ClusterVersion": "1.0",
         "ClusterType": "multi-node"
      },
      {
      "NodeType": "dw.hs1.xlarge",
      "AvailabilityZones": [
         { "Name": "us-east-1a" },
         { "Name": "us-east-1b" },
         { "Name": "us-east-1c" } ],
      "ClusterVersion": "1.0",
      "ClusterType": "single-node"
      } ],
   "ResponseMetadata": {
      "RequestId": "f6000035-64cb-11e2-9135-ff82df53a51a"
   }
}
```
`--output text` オプションコマンドを使用して、同じ情報をテキスト形式で取得することもできます。  
`--output text` オプションコマンド:  
 オプションコマンド:  

```
aws redshift describe-orderable-cluster-options --output text
```
結果:  

```
dw.hs1.8xlarge      1.0     multi-node
us-east-1a
us-east-1b
us-east-1c
dw.hs1.xlarge       1.0     multi-node
us-east-1a
us-east-1b
us-east-1c
dw.hs1.xlarge       1.0     single-node
us-east-1a
us-east-1b
us-east-1c
RESPONSEMETADATA    e648696b-64cb-11e2-bec0-17624ad140dd
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeOrderableClusterOptions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-orderable-cluster-options.html)」を参照してください。

### `describe-reserved-node-offerings`
<a name="redshift_DescribeReservedNodeOfferings_cli_2_topic"></a>

次のコード例は、`describe-reserved-node-offerings` を使用する方法を示しています。

**AWS CLI**  
リザーブドノードオファリングを記述する この例は、購入可能なリザーブドノードオファリングをすべて示しています。コマンド:  

```
aws redshift describe-reserved-node-offerings
```
結果:  

```
{
   "ReservedNodeOfferings": [
      {
         "OfferingType": "Heavy Utilization",
         "FixedPrice": "",
         "NodeType": "dw.hs1.xlarge",
         "UsagePrice": "",
         "RecurringCharges": [
            {
               "RecurringChargeAmount": "",
               "RecurringChargeFrequency": "Hourly"
            } ],
         "Duration": 31536000,
         "ReservedNodeOfferingId": "ceb6a579-cf4c-4343-be8b-d832c45ab51c"
      },
      {
         "OfferingType": "Heavy Utilization",
         "FixedPrice": "",
         "NodeType": "dw.hs1.8xlarge",
         "UsagePrice": "",
         "RecurringCharges": [
            {
            "RecurringChargeAmount": "",
            "RecurringChargeFrequency": "Hourly"
            } ],
         "Duration": 31536000,
         "ReservedNodeOfferingId": "e5a2ff3b-352d-4a9c-ad7d-373c4cab5dd2"
      },
      ...remaining output omitted...
   ],
   "ResponseMetadata": {
      "RequestId": "8b1a1a43-75ff-11e2-9666-e142fe91ddd1"
   }
}
```
リザーブドノードオファリングを購入する場合は、有効な *ReservedNodeOfferingId* を使用して `purchase-reserved-node-offering` を呼び出すことができます。  
有効な *ReservedNodeOfferingId* を使用する `purchase-reserved-node-offering`。  
 有効な *ReservedNodeOfferingId* の使用。  
*ReservedNodeOfferingId*。  
.  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeReservedNodeOfferings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-reserved-node-offerings.html)」を参照してください。

### `describe-reserved-nodes`
<a name="redshift_DescribeReservedNodes_cli_2_topic"></a>

次のコード例は、`describe-reserved-nodes` を使用する方法を示しています。

**AWS CLI**  
リザーブドノードを記述する この例は、購入したリザーブドノードオファリングを示しています。コマンド:  

```
aws redshift describe-reserved-nodes
```
結果:  

```
{
   "ResponseMetadata": {
      "RequestId": "bc29ce2e-7600-11e2-9949-4b361e7420b7"
   },
   "ReservedNodes": [
      {
         "OfferingType": "Heavy Utilization",
         "FixedPrice": "",
         "NodeType": "dw.hs1.xlarge",
         "ReservedNodeId": "1ba8e2e3-bc01-4d65-b35d-a4a3e931547e",
         "UsagePrice": "",
         "RecurringCharges": [
            {
               "RecurringChargeAmount": "",
               "RecurringChargeFrequency": "Hourly"
            } ],
         "NodeCount": 1,
         "State": "payment-pending",
         "StartTime": "2013-02-13T17:08:39.051Z",
         "Duration": 31536000,
         "ReservedNodeOfferingId": "ceb6a579-cf4c-4343-be8b-d832c45ab51c"
      }
   ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeReservedNodes](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-reserved-nodes.html)」を参照してください。

### `describe-resize`
<a name="redshift_DescribeResize_cli_2_topic"></a>

次のコード例は、`describe-resize` を使用する方法を示しています。

**AWS CLI**  
サイズ変更を記述する この例では、クラスターの最新のサイズ変更について記述します。リクエストは、タイプ `dw.hs1.8xlarge` の 3 つのノードに対して行われました。コマンド:  

```
aws redshift describe-resize --cluster-identifier mycluster
```
結果:  

```
{
   "Status": "NONE",
   "TargetClusterType": "multi-node",
   "TargetNodeType": "dw.hs1.8xlarge",
   "ResponseMetadata": {
      "RequestId": "9f52b0b4-7733-11e2-aa9b-318b2909bd27"
   },
   "TargetNumberOfNodes": "3"
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeResize](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-resize.html)」を参照してください。

### `describe-scheduled-actions`
<a name="redshift_DescribeScheduledActions_cli_2_topic"></a>

次のコード例は、`describe-scheduled-actions` を使用する方法を示しています。

**AWS CLI**  
**スケジュールされたアクションを記述するには**  
次の `describe-scheduled-actions` の例では、現在スケジュールされているアクションの詳細を表示します。  

```
aws redshift describe-scheduled-actions
```
出力:  

```
{
    "ScheduledActions": [
        {
            "ScheduledActionName": "resizecluster",
            "TargetAction": {
                "ResizeCluster": {
                    "ClusterIdentifier": "mycluster",
                    "NumberOfNodes": 4,
                    "Classic": false
                }
            },
            "Schedule": "at(2019-12-10T00:07:00)",
            "IamRole": "arn:aws:iam::123456789012:role/myRedshiftRole",
            "State": "ACTIVE",
            "NextInvocations": [
                "2019-12-10T00:07:00Z"
            ]
        }
    ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeScheduledActions](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-scheduled-actions.html)」を参照してください。

### `describe-snapshot-copy-grants`
<a name="redshift_DescribeSnapshotCopyGrants_cli_2_topic"></a>

次のコード例は、`describe-snapshot-copy-grants` を使用する方法を示しています。

**AWS CLI**  
**スナップショットコピー権限を記述するには**  
次の `describe-snapshot-copy-grants` の例では、指定したクラスタースナップショットコピー権限を表示します。  

```
aws redshift describe-snapshot-copy-grants \
    --snapshot-copy-grant-name mysnapshotcopygrantname
```
出力:  

```
{
    "SnapshotCopyGrants": [
        {
            "SnapshotCopyGrantName": "mysnapshotcopygrantname",
            "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY",
            "Tags": []
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift データベースの暗号化](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeSnapshotCopyGrants](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-snapshot-copy-grants.html)」を参照してください。

### `describe-snapshot-schedules`
<a name="redshift_DescribeSnapshotSchedules_cli_2_topic"></a>

次のコード例は、`describe-snapshot-schedules` を使用する方法を示しています。

**AWS CLI**  
**スナップショットスケジュールを記述するには**  
次の `describe-snapshot-schedules` の例では、指定されたクラスタースナップショットスケジュールの詳細を表示します。  

```
aws redshift describe-snapshot-schedules \
    --cluster-identifier mycluster \
    --schedule-identifier mysnapshotschedule
```
出力:  

```
{
    "SnapshotSchedules": [
        {
            "ScheduleDefinitions": [
                "rate(12 hours)"
            ],
            "ScheduleIdentifier": "mysnapshotschedule",
            "ScheduleDescription": "My schedule description",
            "Tags": [],
            "AssociatedClusterCount": 1,
            "AssociatedClusters": [
                {
                    "ClusterIdentifier": "mycluster",
                    "ScheduleAssociationState": "ACTIVE"
                }
            ]
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[自動スナップショットのスケジュール](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#automated-snapshot-schedules)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeSnapshotSchedules](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-snapshot-schedules.html)」を参照してください。

### `describe-storage`
<a name="redshift_DescribeStorage_cli_2_topic"></a>

次のコード例は、`describe-storage` を使用する方法を示しています。

**AWS CLI**  
**ストレージを記述するには**  
次の `describe-storage` の例では、アカウントのバックアップストレージとプロビジョナルストレージサイズの詳細を表示します。  

```
aws redshift describe-storage
```
出力:  

```
{
    "TotalBackupSizeInMegaBytes": 193149.0,
    "TotalProvisionedStorageInMegaBytes": 655360.0
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[スナップショットストレージの管理](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#managing-snapshot-storage)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeStorage](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-storage.html)」を参照してください。

### `describe-table-restore-status`
<a name="redshift_DescribeTableRestoreStatus_cli_2_topic"></a>

次のコード例は、`describe-table-restore-status` を使用する方法を示しています。

**AWS CLI**  
**クラスタースナップショットからテーブル復元リクエストのステータスを記述するには**  
次の `describe-table-restore-status` の例では、指定されたクラスターに対して行われたテーブル復元リクエストの詳細を表示します。  

```
aws redshift describe-table-restore-status /
    --cluster-identifier mycluster
```
出力:  

```
{
    "TableRestoreStatusDetails": [
        {
            "TableRestoreRequestId": "z1116630-0e80-46f4-ba86-bd9670411ebd",
            "Status": "IN_PROGRESS",
            "RequestTime": "2019-12-27T18:22:12.257Z",
            "ClusterIdentifier": "mycluster",
            "SnapshotIdentifier": "mysnapshotid",
            "SourceDatabaseName": "dev",
            "SourceSchemaName": "public",
            "SourceTableName": "mytable",
            "TargetDatabaseName": "dev",
            "TargetSchemaName": "public",
            "NewTableName": "mytable-clone"
        }
    ]
}
```
詳細については、「*Amazon Redshift 管理ガイド*」の「[スナップショットからのテーブルの復元](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#working-with-snapshot-restore-table-from-snapshot)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeTableRestoreStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-table-restore-status.html)」を参照してください。

### `describe-tags`
<a name="redshift_DescribeTags_cli_2_topic"></a>

次のコード例は、`describe-tags` を使用する方法を示しています。

**AWS CLI**  
**タグを記述するには**  
次の `describe-tags` の例では、指定されたタグ名と値に関連付けられた、指定されたクラスターのリソースを表示します。  

```
aws redshift describe-tags \
    --resource-name arn:aws:redshift:us-west-2:123456789012:cluster:mycluster \
    --tag-keys clustertagkey \
    --tag-values clustertagvalue
```
出力:  

```
{
    "TaggedResources": [
                    {
            "Tag": {
                "Key": "clustertagkey",
                "Value": "clustertagvalue"
            },
            "ResourceName": "arn:aws:redshift:us-west-2:123456789012:cluster:mycluster",
            "ResourceType": "cluster"
        }
    ]
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift のリソースへのタグ付け](https://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-tagging.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DescribeTags](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/describe-tags.html)」を参照してください。

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

次のコード例は、`disable-snapshot-copy` を使用する方法を示しています。

**AWS CLI**  
**クラスターのスナップショットコピーを無効にするには**  
次の `disable-snapshot-copy` の例では、指定されたクラスターのスナップショットの自動コピーを無効にします。  

```
aws redshift disable-snapshot-copy \
    --cluster-identifier mycluster
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "available",
        "ClusterAvailabilityStatus": "Available",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "AutomatedSnapshotRetentionPeriod": 3,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-i9b431cd",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-b1fel7t9",
        "AvailabilityZone": "us-west-2f",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {
            "NodeType": "dc2.large",
            "NumberOfNodes": 2,
            "ClusterType": "multi-node"
        },
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 4,
        "PubliclyAccessible": false,
        "Encrypted": false,
        "Tags": [
            {
                "Key": "mytags",
                "Value": "tag1"
            }
        ],
        "EnhancedVpcRouting": false,
        "IamRoles": [
            {
                "IamRoleArn": "arn:aws:iam::123456789012:role/myRedshiftRole",
                "ApplyStatus": "in-sync"
            }
        ],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [],
        "ExpectedNextSnapshotScheduleTime": "2019-12-10T04:42:43.390Z",
        "ExpectedNextSnapshotScheduleTimeStatus": "OnTrack",
        "NextMaintenanceWindowStartTime": "2019-12-14T16:00:00Z"
    }
}
```
詳細については、*「Amazon Redshift クラスター管理ガイド*[」の「別の AWS リージョンへのスナップショットのコピー](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#cross-region-snapshot-copy)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[DisableSnapshotCopy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/disable-snapshot-copy.html)」を参照してください。

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

次のコード例は、`enable-snapshot-copy` を使用する方法を示しています。

**AWS CLI**  
**クラスターのスナップショットコピーを有効にするには**  
次の `enable-snapshot-copy` の例では、指定されたクラスターのスナップショットの自動コピーを有効にします。  

```
aws redshift enable-snapshot-copy \
    --cluster-identifier mycluster \
    --destination-region us-west-1
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "available",
        "ClusterAvailabilityStatus": "Available",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "AutomatedSnapshotRetentionPeriod": 3,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-f4c731cd",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-b1ael7t9",
        "AvailabilityZone": "us-west-2f",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {
            "NodeType": "dc2.large",
            "NumberOfNodes": 2,
            "ClusterType": "multi-node"
        },
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 4,
        "PubliclyAccessible": false,
        "Encrypted": false,
        "ClusterSnapshotCopyStatus": {
            "DestinationRegion": "us-west-1",
            "RetentionPeriod": 7,
            "ManualSnapshotRetentionPeriod": -1
        },
        "Tags": [
            {
                "Key": "mytags",
                "Value": "tag1"
            }
        ],
        "EnhancedVpcRouting": false,
        "IamRoles": [
            {
                "IamRoleArn": "arn:aws:iam::123456789012:role/myRedshiftRole",
                "ApplyStatus": "in-sync"
            }
        ],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [],
        "ExpectedNextSnapshotScheduleTime": "2019-12-10T04:42:43.390Z",
        "ExpectedNextSnapshotScheduleTimeStatus": "OnTrack",
        "NextMaintenanceWindowStartTime": "2019-12-14T16:00:00Z"
    }
}
```
詳細については、*「Amazon Redshift クラスター管理ガイド*[」の「別の AWS リージョンへのスナップショットのコピー](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#cross-region-snapshot-copy)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[EnableSnapshotCopy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/enable-snapshot-copy.html)」を参照してください。

### `get-cluster-credentials`
<a name="redshift_GetClusterCredentials_cli_2_topic"></a>

次の例は、`get-cluster-credentials` を使用する方法を説明しています。

**AWS CLI**  
** AWS アカウントのクラスター認証情報を取得するには**  
次の `get-cluster-credentials` の例では、Amazon Redshift データベースへのアクセスを有効にする一時的な認証情報を取得します。  

```
aws redshift get-cluster-credentials \
    --db-user adminuser --db-name dev \
    --cluster-identifier mycluster
```
出力:  

```
{
    "DbUser": "IAM:adminuser",
    "DbPassword": "AMAFUyyuros/QjxPTtgzcsuQsqzIasdzJEN04aCtWDzXx1O9d6UmpkBtvEeqFly/EXAMPLE==",
    "Expiration": "2019-12-10T17:25:05.770Z"
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift CLI または API を使用した IAM データベース認証情報の生成](https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-cli-api.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetClusterCredentials](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/get-cluster-credentials.html)」を参照してください。

### `get-reserved-node-exchange-offerings`
<a name="redshift_GetReservedNodeExchangeOfferings_cli_2_topic"></a>

次のコード例は、`get-reserved-node-exchange-offerings` を使用する方法を示しています。

**AWS CLI**  
**リザーブドノード交換オファリングを取得するには**  
次の `get-reserved-node-exchange-offerings` の例では、指定された `DC1` リザーブドノードに一致する `DC2` `ReservedNodeOfferings` の配列を取得します。  

```
aws redshift get-reserved-node-exchange-offerings \
    --reserved-node-id 12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE
```
出力:  

```
{
    "ReservedNodeOfferings": [
        {
            "ReservedNodeOfferingId": "12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE",
            "NodeType": "dc2.large",
            "Duration": 31536000,
            "FixedPrice": 0.0,
            "UsagePrice": 0.0,
            "CurrencyCode": "USD",
            "OfferingType": "All Upfront",
            "RecurringCharges": [
                {
                    "RecurringChargeAmount": 0.0,
                    "RecurringChargeFrequency": "Hourly"
                }
            ],
            "ReservedNodeOfferingType": "Regular"
        }
    ]
}
```
詳細については、[「Amazon Redshift クラスター管理ガイド」の AWS 「 CLI を使用したリザーブドノードのアップグレード](https://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-offering-console.html)」を参照してください。 **  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[GetReservedNodeExchangeOfferings](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/get-reserved-node-exchange-offerings.html)」を参照してください。

### `modify-cluster-iam-roles`
<a name="redshift_ModifyClusterIamRoles_cli_2_topic"></a>

次のコード例は、`modify-cluster-iam-roles` を使用する方法を示しています。

**AWS CLI**  
**クラスターの IAM ロールを変更するには**  
次の の`modify-cluster-iam-roles`例では、指定されたクラスターから指定された AWS IAM ロールを削除します。  

```
aws redshift modify-cluster-iam-roles \
    --cluster-identifier mycluster \
    --remove-iam-roles arn:aws:iam::123456789012:role/myRedshiftRole
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "available",
        "ClusterAvailabilityStatus": "Available",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "AutomatedSnapshotRetentionPeriod": 3,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-f9b731sd",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-b2fal7t9",
        "AvailabilityZone": "us-west-2f",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {
            "NodeType": "dc2.large",
            "NumberOfNodes": 2,
            "ClusterType": "multi-node"
        },
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 4,
        "PubliclyAccessible": false,
        "Encrypted": false,
        "ClusterSnapshotCopyStatus": {
            "DestinationRegion": "us-west-1",
            "RetentionPeriod": 7,
            "ManualSnapshotRetentionPeriod": -1
        },
        "Tags": [
            {
                "Key": "mytags",
                "Value": "tag1"
            }
        ],
        "EnhancedVpcRouting": false,
        "IamRoles": [],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [],
        "ExpectedNextSnapshotScheduleTime": "2019-12-11T04:42:55.631Z",
        "ExpectedNextSnapshotScheduleTimeStatus": "OnTrack",
        "NextMaintenanceWindowStartTime": "2019-12-14T16:00:00Z"
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift でのアイデンティティベースのポリシー (IAM ポリシー) の使用](https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyClusterIamRoles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster-iam-roles.html)」を参照してください。

### `modify-cluster-maintenance`
<a name="redshift_ModifyClusterMaintenance_cli_2_topic"></a>

次のコード例は、`modify-cluster-maintenance` を使用する方法を示しています。

**AWS CLI**  
**クラスターのメンテナンスを変更するには**  
次の `modify-cluster-maintenance` の例では、指定されたクラスターのメンテナンスを 30 日間延期します。  

```
aws redshift modify-cluster-maintenance \
    --cluster-identifier mycluster \
    --defer-maintenance \
    --defer-maintenance-duration 30
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "available",
        "ClusterAvailabilityStatus": "Available",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "AutomatedSnapshotRetentionPeriod": 3,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-a1a123ab",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-b1ael7t9",
        "AvailabilityZone": "us-west-2f",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {
            "NodeType": "dc2.large",
            "NumberOfNodes": 2,
            "ClusterType": "multi-node"
        },
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 4,
        "PubliclyAccessible": false,
        "Encrypted": false,
        "ClusterSnapshotCopyStatus": {
            "DestinationRegion": "us-west-1",
            "RetentionPeriod": 7,
            "ManualSnapshotRetentionPeriod": -1
        },
        "Tags": [
            {
                "Key": "mytags",
                "Value": "tag1"
            }
        ],
        "EnhancedVpcRouting": false,
        "IamRoles": [],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [
            {
                "DeferMaintenanceIdentifier": "dfm-mUdVIfFcT1B4SGhw6fyF",
                "DeferMaintenanceStartTime": "2019-12-10T18:18:39.354Z",
                "DeferMaintenanceEndTime": "2020-01-09T18:18:39.354Z"
            }
        ],
        "ExpectedNextSnapshotScheduleTime": "2019-12-11T04:42:55.631Z",
        "ExpectedNextSnapshotScheduleTimeStatus": "OnTrack",
        "NextMaintenanceWindowStartTime": "2020-01-11T16:00:00Z"
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[クラスターのメンテナンス](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#rs-cluster-maintenance)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyClusterMaintenance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster-maintenance.html)」を参照してください。

### `modify-cluster-parameter-group`
<a name="redshift_ModifyClusterParameterGroup_cli_2_topic"></a>

次のコード例は、`modify-cluster-parameter-group` を使用する方法を示しています。

**AWS CLI**  
**パラメータグループ内のパラメータを変更する**  
次の `modify-cluster-parameter-group` の例は、*wlm\$1json\$1configuration* パラメータを使用して、ワークロード管理を変更します。以下に示す JSON コンテンツを含むファイルからパラメータを受け入れます。  

```
aws redshift modify-cluster-parameter-group \
    --parameter-group-name myclusterparametergroup \
    --parameters file://modify_pg.json
```
`modify_pg.json` の内容:  

```
[
    {
        "ParameterName": "wlm_json_configuration",
        "ParameterValue": "[{\"user_group\":\"example_user_group1\",\"query_group\": \"example_query_group1\", \"query_concurrency\":7},{\"query_concurrency\":5}]"
    }
]
```
出力:  

```
{
   "ParameterGroupStatus": "Your parameter group has been updated but changes won't get applied until you reboot the associated Clusters.",
   "ParameterGroupName": "myclusterparametergroup",
   "ResponseMetadata": {
      "RequestId": "09974cc0-64cd-11e2-bea9-49e0ce183f07"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyClusterParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster-parameter-group.html)」を参照してください。

### `modify-cluster-snapshot-schedule`
<a name="redshift_ModifyClusterSnapshotSchedule_cli_2_topic"></a>

次のコード例は、`modify-cluster-snapshot-schedule` を使用する方法を示しています。

**AWS CLI**  
**クラスタースナップショットのスケジュールを変更するには**  
次の `modify-cluster-snapshot-schedule` の例では、指定されたクラスターから指定されたスナップショットスケジュールを削除します。  

```
aws redshift modify-cluster-snapshot-schedule \
    --cluster-identifier mycluster \
    --schedule-identifier mysnapshotschedule \
    --disassociate-schedule
```
このコマンドでは、出力が生成されません。  
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[自動スナップショットのスケジュール](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#automated-snapshot-schedules)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyClusterSnapshotSchedule](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster-snapshot-schedule.html)」を参照してください。

### `modify-cluster-snapshot`
<a name="redshift_ModifyClusterSnapshot_cli_2_topic"></a>

次のコード例は、`modify-cluster-snapshot` を使用する方法を示しています。

**AWS CLI**  
**クラスタースナップショットを変更するには**  
次の `modify-cluster-snapshot` の例では、指定されたクラスタースナップショットの手動保持期間設定を 10 日の値に設定します。  

```
aws redshift modify-cluster-snapshot \
    --snapshot-identifier mycluster-2019-11-06-16-32 \
    --manual-snapshot-retention-period 10
```
出力:  

```
{
    "Snapshot": {
        "SnapshotIdentifier": "mycluster-2019-11-06-16-32",
        "ClusterIdentifier": "mycluster",
        "SnapshotCreateTime": "2019-12-07T00:34:05.633Z",
        "Status": "available",
        "Port": 5439,
        "AvailabilityZone": "us-west-2f",
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "MasterUsername": "adminuser",
        "ClusterVersion": "1.0",
        "SnapshotType": "manual",
        "NodeType": "dc2.large",
        "NumberOfNodes": 2,
        "DBName": "dev",
        "VpcId": "vpc-b1cel7t9",
        "Encrypted": false,
        "EncryptedWithHSM": false,
        "OwnerAccount": "123456789012",
        "TotalBackupSizeInMegaBytes": 64384.0,
        "ActualIncrementalBackupSizeInMegaBytes": 24.0,
        "BackupProgressInMegaBytes": 24.0,
        "CurrentBackupRateInMegaBytesPerSecond": 13.0011,
        "EstimatedSecondsToCompletion": 0,
        "ElapsedTimeInSeconds": 1,
        "Tags": [
            {
                "Key": "mytagkey",
                "Value": "mytagvalue"
            }
        ],
        "EnhancedVpcRouting": false,
        "MaintenanceTrackName": "current",
        "ManualSnapshotRetentionPeriod": 10,
        "ManualSnapshotRemainingDays": 6,
        "SnapshotRetentionStartTime": "2019-12-07T00:34:07.479Z"
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift スナップショット](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyClusterSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster-snapshot.html)」を参照してください。

### `modify-cluster-subnet-group`
<a name="redshift_ModifyClusterSubnetGroup_cli_2_topic"></a>

次のコード例は、`modify-cluster-subnet-group` を使用する方法を示しています。

**AWS CLI**  
クラスターサブネットグループのサブネットを変更する この例は、キャッシュサブネットグループ内のサブネットのリストを変更する方法を示しています。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift modify-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup --subnet-ids subnet-763fdd1 subnet-ac830e9
```
結果:  

```
{
   "ClusterSubnetGroup":
   {
      "Subnets": [
         {
            "SubnetStatus": "Active",
            "SubnetIdentifier": "subnet-763fdd1c",
            "SubnetAvailabilityZone":
               { "Name": "us-east-1a" }
         },
         {
            "SubnetStatus": "Active",
            "SubnetIdentifier": "subnet-ac830e9",
            "SubnetAvailabilityZone":
               { "Name": "us-east-1b" }
         } ],
      "VpcId": "vpc-7e3fdd14",
      "SubnetGroupStatus": "Complete",
      "Description": "My subnet group",
      "ClusterSubnetGroupName": "mysubnetgroup"
   },
   "ResponseMetadata": {
      "RequestId": "8da93e89-8372-f936-93a8-873918938197a"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyClusterSubnetGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster-subnet-group.html)」を参照してください。

### `modify-cluster`
<a name="redshift_ModifyCluster_cli_2_topic"></a>

次のコード例は、`modify-cluster` を使用する方法を示しています。

**AWS CLI**  
この例は、クラスターセキュリティグループを指定されたクラスターに関連付ける方法を示しています。コマンドは次のとおりです。  

```
aws redshift modify-cluster --cluster-identifier mycluster --cluster-security-groups mysecuritygroup
```
この例は、各週のクラスターの優先メンテナンスウィンドウを、日曜日の午後 11 時 15 分から月曜日の午前 3 時 15 分までの 4 時間に変更する方法を示しています。コマンドは次のとおりです。  

```
aws redshift modify-cluster --cluster-identifier mycluster --preferred-maintenance-window Sun:23:15-Mon:03:15
```
この例では、クラスターのマスターパスワードを変更する方法を示しています。コマンドは次のとおりです。  

```
aws redshift modify-cluster --cluster-identifier mycluster --master-user-password A1b2c3d4
```
+  API の詳細については、AWS CLI コマンドリファレンス**の「[ModifyCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-cluster.html)」を参照してください。

### `modify-event-subscription`
<a name="redshift_ModifyEventSubscription_cli_2_topic"></a>

次のコード例は、`modify-event-subscription` を使用する方法を示しています。

**AWS CLI**  
**イベントサブスクリプションを変更するには**  
次の `modify-event-subscription` の例では、指定したイベント通知サブスクリプションを無効にします。  

```
aws redshift modify-event-subscription \
    --subscription-name mysubscription \
    --no-enabled
```
出力:  

```
{
    "EventSubscription": {
        "CustomerAwsId": "123456789012",
        "CustSubscriptionId": "mysubscription",
        "SnsTopicArn": "arn:aws:sns:us-west-2:123456789012:MySNStopic",
        "Status": "active",
        "SubscriptionCreationTime": "2019-12-09T21:50:21.332Z",
        "SourceIdsList": [],
        "EventCategoriesList": [
            "management"
        ],
        "Severity": "ERROR",
        "Enabled": false,
        "Tags": []
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift イベント通知のサブスクライブ](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyEventSubscription](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-event-subscription.html)」を参照してください。

### `modify-scheduled-action`
<a name="redshift_ModifyScheduledAction_cli_2_topic"></a>

次のコード例は、`modify-scheduled-action` を使用する方法を示しています。

**AWS CLI**  
**スケジュールされたアクションを編集するには**  
次の `modify-scheduled-action` の例では、指定された既存のスケジュールされたアクションに説明を追加します。  

```
aws redshift modify-scheduled-action \
    --scheduled-action-name myscheduledaction \
    --scheduled-action-description "My scheduled action"
```
出力:  

```
{
    "ScheduledActionName": "myscheduledaction",
    "TargetAction": {
        "ResizeCluster": {
            "ClusterIdentifier": "mycluster",
            "NumberOfNodes": 2,
            "Classic": false
        }
    },
    "Schedule": "at(2019-12-25T00:00:00)",
    "IamRole": "arn:aws:iam::123456789012:role/myRedshiftRole",
    "ScheduledActionDescription": "My scheduled action",
    "State": "ACTIVE",
    "NextInvocations": [
        "2019-12-25T00:00:00Z"
    ]
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifyScheduledAction](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-scheduled-action.html)」を参照してください。

### `modify-snapshot-copy-retention-period`
<a name="redshift_ModifySnapshotCopyRetentionPeriod_cli_2_topic"></a>

次のコード例は、`modify-snapshot-copy-retention-period` を使用する方法を示しています。

**AWS CLI**  
**スナップショットコピー保持期間を変更するには**  
次の の`modify-snapshot-copy-retention-period`例では、コピー元 AWS リージョンからコピーされた後、コピー先 AWS リージョンで指定されたクラスターのスナップショットを保持する日数を変更します。  

```
aws redshift modify-snapshot-copy-retention-period \
    --cluster-identifier mycluster \
    --retention-period 15
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "available",
        "ClusterAvailabilityStatus": "Available",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "AutomatedSnapshotRetentionPeriod": 3,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-a1a123ab",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-b1fet7t9",
        "AvailabilityZone": "us-west-2f",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {
            "NodeType": "dc2.large",
            "NumberOfNodes": 2,
            "ClusterType": "multi-node"
        },
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 4,
        "PubliclyAccessible": false,
        "Encrypted": false,
        "ClusterSnapshotCopyStatus": {
            "DestinationRegion": "us-west-1",
            "RetentionPeriod": 15,
            "ManualSnapshotRetentionPeriod": -1
        },
        "Tags": [
            {
                "Key": "mytags",
                "Value": "tag1"
            }
        ],
        "EnhancedVpcRouting": false,
        "IamRoles": [],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [
            {
                "DeferMaintenanceIdentifier": "dfm-mUdVSfDcT1F4SGhw6fyF",
                "DeferMaintenanceStartTime": "2019-12-10T18:18:39.354Z",
                "DeferMaintenanceEndTime": "2020-01-09T18:18:39.354Z"
            }
        ],
        "NextMaintenanceWindowStartTime": "2020-01-11T16:00:00Z"
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[スナップショットスケジュール形式](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#working-with-snapshot-scheduling)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifySnapshotCopyRetentionPeriod](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-snapshot-copy-retention-period.html)」を参照してください。

### `modify-snapshot-schedule`
<a name="redshift_ModifySnapshotSchedule_cli_2_topic"></a>

次のコード例は、`modify-snapshot-schedule` を使用する方法を示しています。

**AWS CLI**  
**スナップショットのスケジュールを変更するには**  
次の `modify-snapshot-schedule` の例では、指定されたスナップショットスケジュールのレートを 10 時間ごとに変更します。  

```
aws redshift modify-snapshot-schedule \
    --schedule-identifier mysnapshotschedule \
    --schedule-definitions "rate(10 hours)"
```
出力:  

```
{
    "ScheduleDefinitions": [
        "rate(10 hours)"
    ],
    "ScheduleIdentifier": "mysnapshotschedule",
    "ScheduleDescription": "My schedule description",
    "Tags": []
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[スナップショットスケジュール形式](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#working-with-snapshot-scheduling)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ModifySnapshotSchedule](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/modify-snapshot-schedule.html)」を参照してください。

### `purchase-reserved-node-offering`
<a name="redshift_PurchaseReservedNodeOffering_cli_2_topic"></a>

次のコード例は、`purchase-reserved-node-offering` を使用する方法を示しています。

**AWS CLI**  
リザーブドノードを購入する この例は、リザーブドノードオファリングを購入する方法を示しています。`reserved-node-offering-id` は、`describe-reserved-node-offerings` を呼び出すことにより取得します。コマンド:  

```
aws redshift purchase-reserved-node-offering --reserved-node-offering-id ceb6a579-cf4c-4343-be8b-d832c45ab51c
```
結果:  

```
{
   "ReservedNode": {
      "OfferingType": "Heavy Utilization",
      "FixedPrice": "",
      "NodeType": "dw.hs1.xlarge",
      "ReservedNodeId": "1ba8e2e3-bc01-4d65-b35d-a4a3e931547e",
      "UsagePrice": "",
      "RecurringCharges": [
         {
            "RecurringChargeAmount": "",
            "RecurringChargeFrequency": "Hourly"
         }
      ],
      "NodeCount": 1,
      "State": "payment-pending",
      "StartTime": "2013-02-13T17:08:39.051Z",
      "Duration": 31536000,
      "ReservedNodeOfferingId": "ceb6a579-cf4c-4343-be8b-d832c45ab51c"
   },
   "ResponseMetadata": {
      "RequestId": "01bda7bf-7600-11e2-b605-2568d7396e7f"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[PurchaseReservedNodeOffering](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/purchase-reserved-node-offering.html)」を参照してください。

### `reboot-cluster`
<a name="redshift_RebootCluster_cli_2_topic"></a>

次のコード例は、`reboot-cluster` を使用する方法を示しています。

**AWS CLI**  
クラスターを再起動する この例では、クラスターを再起動します。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift reboot-cluster --cluster-identifier mycluster
```
結果:  

```
{
   "Cluster": {
      "NodeType": "dw.hs1.xlarge",
      "Endpoint": {
         "Port": 5439,
         "Address": "mycluster.coqoarplqhsn.us-east-1.redshift.amazonaws.com"
      },
      "ClusterVersion": "1.0",
      "PubliclyAccessible": "true",
      "MasterUsername": "adminuser",
      "ClusterParameterGroups": [
         {
         "ParameterApplyStatus": "in-sync",
         "ParameterGroupName": "default.redshift-1.0"
         }
      ],
      "ClusterSecurityGroups": [
         {
         "Status": "active",
         "ClusterSecurityGroupName": "default"
         }
      ],
      "AllowVersionUpgrade": true,
      "VpcSecurityGroups": \[],
      "AvailabilityZone": "us-east-1a",
      "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
      "PreferredMaintenanceWindow": "sun:23:15-mon:03:15",
      "AutomatedSnapshotRetentionPeriod": 1,
      "ClusterStatus": "rebooting",
      "ClusterIdentifier": "mycluster",
      "DBName": "dev",
      "NumberOfNodes": 2,
      "PendingModifiedValues": {}
   },
   "ResponseMetadata": {
      "RequestId": "61c8b564-64e8-11e2-8f7d-3b939af52818"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[RebootCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/reboot-cluster.html)」を参照してください。

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

次のコード例は、`reset-cluster-parameter-group` を使用する方法を示しています。

**AWS CLI**  
パラメータのパラメータをリセットする この例は、パラメータグループのすべてのパラメータをリセットする方法を示しています。コマンド:  

```
aws redshift reset-cluster-parameter-group --parameter-group-name myclusterparametergroup --reset-all-parameters
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ResetClusterParameterGroup](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/reset-cluster-parameter-group.html)」を参照してください。

### `resize-cluster`
<a name="redshift_ResizeCluster_cli_2_topic"></a>

次のコード例は、`resize-cluster` を使用する方法を示しています。

**AWS CLI**  
**クラスターのサイズを変更するには**  
次の `resize-cluster` の例は、指定したクラスターのサイズを変更します。  

```
aws redshift resize-cluster \
    --cluster-identifier mycluster \
    --cluster-type multi-node \
    --node-type dc2.large \
    --number-of-nodes 6 \
    --classic
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "resizing",
        "ClusterAvailabilityStatus": "Modifying",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-05T18:44:36.991Z",
        "AutomatedSnapshotRetentionPeriod": 3,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-a1a123ab",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-a1abc1a1",
        "AvailabilityZone": "us-west-2f",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {
            "NodeType": "dc2.large",
            "NumberOfNodes": 6,
            "ClusterType": "multi-node"
        },
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 4,
        "PubliclyAccessible": false,
        "Encrypted": false,
        "ClusterSnapshotCopyStatus": {
            "DestinationRegion": "us-west-1",
            "RetentionPeriod": 15,
            "ManualSnapshotRetentionPeriod": -1
        },
        "Tags": [
            {
                "Key": "mytags",
                "Value": "tag1"
            }
        ],
        "EnhancedVpcRouting": false,
        "IamRoles": [],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [
            {
                "DeferMaintenanceIdentifier": "dfm-mUdVCfDcT1B4SGhw6fyF",
                "DeferMaintenanceStartTime": "2019-12-10T18:18:39.354Z",
                "DeferMaintenanceEndTime": "2020-01-09T18:18:39.354Z"
            }
        ],
        "NextMaintenanceWindowStartTime": "2020-01-11T16:00:00Z",
        "ResizeInfo": {
            "ResizeType": "ClassicResize",
            "AllowCancelResize": true
        }
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[クラスターのサイズ調整](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html#cluster-resize-intro)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[ResizeCluster](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/resize-cluster.html)」を参照してください。

### `restore-from-cluster-snapshot`
<a name="redshift_RestoreFromClusterSnapshot_cli_2_topic"></a>

次のコード例は、`restore-from-cluster-snapshot` を使用する方法を示しています。

**AWS CLI**  
スナップショットからクラスターを復元する この例では、スナップショットからクラスターを復元します。コマンド:  

```
aws redshift restore-from-cluster-snapshot --cluster-identifier mycluster-clone --snapshot-identifier my-snapshot-id
```
結果:  

```
{
   "Cluster": {
      "NodeType": "dw.hs1.xlarge",
      "ClusterVersion": "1.0",
      "PubliclyAccessible": "true",
      "MasterUsername": "adminuser",
      "ClusterParameterGroups": [
         {
         "ParameterApplyStatus": "in-sync",
         "ParameterGroupName": "default.redshift-1.0"
         }
      ],
      "ClusterSecurityGroups": [
         {
         "Status": "active",
         "ClusterSecurityGroupName": "default"
         }
      ],
      "AllowVersionUpgrade": true,
      "VpcSecurityGroups": \[],
      "PreferredMaintenanceWindow": "sun:23:15-mon:03:15",
      "AutomatedSnapshotRetentionPeriod": 1,
      "ClusterStatus": "creating",
      "ClusterIdentifier": "mycluster-clone",
      "DBName": "dev",
      "NumberOfNodes": 2,
      "PendingModifiedValues": {}
   },
   "ResponseMetadata": {
      "RequestId": "77fd512b-64e3-11e2-8f5b-e90bd6c77476"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[RestoreFromClusterSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/restore-from-cluster-snapshot.html)」を参照してください。

### `restore-table-from-cluster-snapshot`
<a name="redshift_RestoreTableFromClusterSnapshot_cli_2_topic"></a>

次のコード例は、`restore-table-from-cluster-snapshot` を使用する方法を示しています。

**AWS CLI**  
**スナップショットからテーブルを復元するには**  
次の `restore-table-from-cluster-snapshot` の例では、指定されたクラスタースナップショットの指定されたテーブルから新しいテーブルを作成します。  

```
aws redshift restore-table-from-cluster-snapshot /
    --cluster-identifier mycluster /
    --snapshot-identifier mycluster-2019-11-19-16-17 /
    --source-database-name dev /
    --source-schema-name public /
    --source-table-name mytable /
    --target-database-name dev /
    --target-schema-name public /
    --new-table-name mytable-clone
```
出力:  

```
{
    "TableRestoreStatus": {
        "TableRestoreRequestId": "a123a12b-abc1-1a1a-a123-a1234ab12345",
        "Status": "PENDING",
        "RequestTime": "2019-12-20T00:20:16.402Z",
        "ClusterIdentifier": "mycluster",
        "SnapshotIdentifier": "mycluster-2019-11-19-16-17",
        "SourceDatabaseName": "dev",
        "SourceSchemaName": "public",
        "SourceTableName": "mytable",
        "TargetDatabaseName": "dev",
        "TargetSchemaName": "public",
        "NewTableName": "mytable-clone"
    }
}
```
詳細については、「*Amazon Redshift 管理ガイド*」の「[スナップショットからのテーブルの復元](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-snapshots.html#working-with-snapshot-restore-table-from-snapshot)」を参照してください。  
+  API の詳細については、「AWS CLI コマンドリファレンス」の「[RestoreTableFromClusterSnapshot](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/restore-table-from-cluster-snapshot.html)」を参照してください。

### `revoke-cluster-security-group-ingress`
<a name="redshift_RevokeClusterSecurityGroupIngress_cli_2_topic"></a>

次のコード例は、`revoke-cluster-security-group-ingress` を使用する方法を示しています。

**AWS CLI**  
EC2 セキュリティグループへのアクセスを取り消す この例では、名前付き Amazon EC2 セキュリティグループへのアクセスを取り消します。コマンド:  

```
aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2-security-group-owner-id 123445677890
```
CIDR 範囲へのアクセスを取り消す この例では、CIDR 範囲へのアクセスを取り消します。コマンド:  

```
aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[RevokeClusterSecurityGroupIngress](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/revoke-cluster-security-group-ingress.html)」を参照してください。

### `revoke-snapshot-access`
<a name="redshift_RevokeSnapshotAccess_cli_2_topic"></a>

次の例は、`revoke-snapshot-access` を使用する方法を説明しています。

**AWS CLI**  
スナップショットを復元する AWS アカウントの認可を取り消す SnapshotThis、スナップショットを復元`444455556666`する AWS アカウントの認可を取り消します`my-snapshot-id`。デフォルトの出力は JSON 形式です。コマンドは次のとおりです。  

```
aws redshift revoke-snapshot-access --snapshot-id my-snapshot-id --account-with-restore-access 444455556666
```
結果:  

```
{
   "Snapshot": {
      "Status": "available",
      "SnapshotCreateTime": "2013-07-17T22:04:18.947Z",
      "EstimatedSecondsToCompletion": 0,
      "AvailabilityZone": "us-east-1a",
      "ClusterVersion": "1.0",
      "MasterUsername": "adminuser",
      "Encrypted": false,
      "OwnerAccount": "111122223333",
      "BackupProgressInMegabytes": 11.0,
      "ElapsedTimeInSeconds": 0,
      "DBName": "dev",
      "CurrentBackupRateInMegabytesPerSecond: 0.1534,
      "ClusterCreateTime": "2013-01-22T21:59:29.559Z",
      "ActualIncrementalBackupSizeInMegabytes"; 11.0,
      "SnapshotType": "manual",
      "NodeType": "dw.hs1.xlarge",
      "ClusterIdentifier": "mycluster",
      "TotalBackupSizeInMegabytes": 20.0,
      "Port": 5439,
      "NumberOfNodes": 2,
      "SnapshotIdentifier": "my-snapshot-id"
   }
}
```
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[RevokeSnapshotAccess](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/revoke-snapshot-access.html)」を参照してください。

### `rotate-encryption-key`
<a name="redshift_RotateEncryptionKey_cli_2_topic"></a>

次のコード例は、`rotate-encryption-key` を使用する方法を示しています。

**AWS CLI**  
**クラスターの暗号化キーをローテーションするには**  
次の `rotate-encryption-key` の例では、指定されたクラスターの暗号化キーをローテーションします。  

```
aws redshift rotate-encryption-key \
    --cluster-identifier mycluster
```
出力:  

```
{
    "Cluster": {
        "ClusterIdentifier": "mycluster",
        "NodeType": "dc2.large",
        "ClusterStatus": "rotating-keys",
        "ClusterAvailabilityStatus": "Modifying",
        "MasterUsername": "adminuser",
        "DBName": "dev",
        "Endpoint": {
            "Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
            "Port": 5439
        },
        "ClusterCreateTime": "2019-12-10T19:25:45.886Z",
        "AutomatedSnapshotRetentionPeriod": 30,
        "ManualSnapshotRetentionPeriod": -1,
        "ClusterSecurityGroups": [],
        "VpcSecurityGroups": [
            {
                "VpcSecurityGroupId": "sh-a1a123ab",
                "Status": "active"
            }
        ],
        "ClusterParameterGroups": [
            {
                "ParameterGroupName": "default.redshift-1.0",
                "ParameterApplyStatus": "in-sync"
            }
        ],
        "ClusterSubnetGroupName": "default",
        "VpcId": "vpc-a1abc1a1",
        "AvailabilityZone": "us-west-2a",
        "PreferredMaintenanceWindow": "sat:16:00-sat:16:30",
        "PendingModifiedValues": {},
        "ClusterVersion": "1.0",
        "AllowVersionUpgrade": true,
        "NumberOfNodes": 2,
        "PubliclyAccessible": false,
        "Encrypted": true,
        "Tags": [],
        "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY",
        "EnhancedVpcRouting": false,
        "IamRoles": [
            {
                "IamRoleArn": "arn:aws:iam::123456789012:role/myRedshiftRole",
                "ApplyStatus": "in-sync"
            }
        ],
        "MaintenanceTrackName": "current",
        "DeferredMaintenanceWindows": [],
        "NextMaintenanceWindowStartTime": "2019-12-14T16:00:00Z"
    }
}
```
詳細については、「*Amazon Redshift クラスター管理ガイド*」の「[Amazon Redshift データベースの暗号化](https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html)」を参照してください。  
+  API の詳細については、「*AWS CLI コマンドリファレンス*」の「[RotateEncryptionKey](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/redshift/rotate-encryption-key.html)」を参照してください。