本文件 AWS CLI 僅適用於 第 1 版。如需 第 2 版的相關文件 AWS CLI,請參閱 第 2 版使用者指南。
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用 的 Amazon Redshift 範例 AWS CLI
下列程式碼範例示範如何使用 AWS Command Line Interface 搭配 Amazon Redshift 執行動作和實作常見案例。
Actions 是大型程式的程式碼摘錄,必須在內容中執行。雖然動作會告訴您如何呼叫個別服務函數,但您可以在其相關情境中查看內容中的動作。
每個範例都包含完整原始程式碼的連結,您可以在其中找到如何在內容中設定和執行程式碼的指示。
主題
動作
以下程式碼範例顯示如何使用 accept-reserved-node-exchange。
- AWS CLI
 - 
             
                    
接受預留節點交換
下列
accept-reserved-node-exchange範例接受 DC1 預留節點的 DC2 預留節點交換。aws redshift accept-reserved-node-exchange/--reserved-node-id12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE/--target-reserved-node-offering-id12345678-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 升級預留節點。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 AcceptReservedNodeExchange
。  
 - 
                    
 
以下程式碼範例顯示如何使用 authorize-cluster-security-group-ingress。
- AWS CLI
 - 
             
                    
授權存取 EC2 安全GroupThis範例授權存取名為 的 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 rangeThis範例授權存取 CIDR 範圍。命令:
aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 AuthorizeClusterSecurityGroupIngress
。  
 - 
                    
 
以下程式碼範例顯示如何使用 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 batch-delete-cluster-snapshots。
- AWS CLI
 - 
             
                    
刪除一組叢集快照
下列
batch-delete-cluster-snapshots範例會刪除一組手動叢集快照。aws redshift batch-delete-cluster-snapshots \ --identifiersSnapshotIdentifier=mycluster-2019-11-06-14-12SnapshotIdentifier=mycluster-2019-11-06-14-20輸出:
{ "Resources": [ "mycluster-2019-11-06-14-12", "mycluster-2019-11-06-14-20" ] }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的 Amazon Redshift 快照。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 BatchDeleteClusterSnapshots
。  
 - 
                    
 
以下程式碼範例顯示如何使用 batch-modify-cluster-snapshots。
- AWS CLI
 - 
             
                    
修改一組叢集快照
下列
batch-modify-cluster-snapshots範例會修改一組叢集快照的設定。aws redshift batch-modify-cluster-snapshots \ --snapshot-identifier-listmycluster-2019-11-06-16-31mycluster-2019-11-06-16-32\ --manual-snapshot-retention-period30輸出:
{ "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 快照。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 BatchModifyClusterSnapshots
。  
 - 
                    
 
以下程式碼範例顯示如何使用 cancel-resize。
- AWS CLI
 - 
             
                    
取消叢集的大小調整
下列
cancel-resize範例會取消叢集的傳統調整大小操作。aws redshift cancel-resize \ --cluster-identifiermycluster輸出:
{ "TargetNodeType": "dc2.large", "TargetNumberOfNodes": 2, "TargetClusterType": "multi-node", "Status": "CANCELLING", "ResizeType": "ClassicResize", "TargetEncryptionType": "NONE" }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的調整 Amazon Redshift 中的叢集大小。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 CancelResize
。  
 - 
                    
 
以下程式碼範例顯示如何使用 copy-cluster-snapshot。
- AWS CLI
 - 
             
                    
取得所有叢集VersionsThis範例會傳回所有叢集版本的描述。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-cluster-parameter-group。
- AWS CLI
 - 
             
                    
建立叢集參數GroupThis範例會建立新的叢集參數群組。命令:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-cluster-security-group。
- AWS CLI
 - 
             
                    
建立叢集安全GroupThis範例會建立新的叢集安全群組。根據預設,輸出為 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 textoption.Command:option.Command:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-cluster-snapshot。
- AWS CLI
 - 
             
                    
建立叢集SnapshotThis範例會建立新的叢集快照。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-cluster-subnet-group。
- AWS CLI
 - 
             
                    
建立叢集子網路GroupThis範例會建立新的叢集子網路群組。命令:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-cluster。
- AWS CLI
 - 
             
                    
建立具有最小ParametersThis範例會建立具有最小參數集的叢集。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-event-subscription。
- AWS CLI
 - 
             
                    
建立事件的通知訂閱
下列
create-event-subscription範例會建立事件通知訂閱。aws redshift create-event-subscription \ --subscription-namemysubscription\ --sns-topic-arnarn:aws:sns:us-west-2:123456789012:MySNStopic\ --source-typecluster\ --source-idsmycluster輸出:
{ "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 事件通知。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 CreateEventSubscription
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-hsm-client-certificate。
- AWS CLI
 - 
             
                    
建立 HSM 用戶端憑證
下列
create-hsm-client-certificate範例會產生 HSM 用戶端憑證,讓叢集可用來連線至 HSM。aws redshift create-hsm-client-certificate \ --hsm-client-certificate-identifiermyhsmclientcert輸出:
{ "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 許可參考。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 CreateHsmClientCertificate
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-hsm-configuration。
- AWS CLI
 - 
             
                    
建立 HSM 組態
下列
create-hsm-configuration範例會建立指定的 HSM 組態,其中包含叢集在硬體安全模組 (HSM) 中存放和使用資料庫加密金鑰所需的資訊。aws redshift create-hsm-configuration/--hsm-configuration-identifiermyhsmconnection--description"My HSM connection"--hsm-ip-address192.0.2.09--hsm-partition-namemyhsmpartition/--hsm-partition-passwordA1b2c3d4/--hsm-server-public-certificatemyhsmclientcert輸出:
{ "HsmConfiguration": { "HsmConfigurationIdentifier": "myhsmconnection", "Description": "My HSM connection", "HsmIpAddress": "192.0.2.09", "HsmPartitionName": "myhsmpartition", "Tags": [] } }- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 CreateHsmConfiguration
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-snapshot-copy-grant。
- AWS CLI
 - 
             
                    
建立快照複製授予
下列
create-snapshot-copy-grant範例會建立快照複製授予,並加密目的地區域中複製的快照 AWS 。aws redshift create-snapshot-copy-grant \ --snapshot-copy-grant-namemysnapshotcopygrantname輸出:
{ "SnapshotCopyGrant": { "SnapshotCopyGrantName": "mysnapshotcopygrantname", "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY", "Tags": [] } }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的 Amazon Redshift 資料庫加密。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 CreateSnapshotCopyGrant
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-snapshot-schedule。
- AWS CLI
 - 
             
                    
建立快照排程
下列
create-snapshot-schedule範例會使用指定的描述和每 12 小時的速率來建立快照排程。aws redshift create-snapshot-schedule \ --schedule-definitions"rate(12 hours)"\ --schedule-identifiermysnapshotschedule\ --schedule-description"My schedule description"輸出:
{ "ScheduleDefinitions": [ "rate(12 hours)" ], "ScheduleIdentifier": "mysnapshotschedule", "ScheduleDescription": "My schedule description", "Tags": [] }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的自動快照排程。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 CreateSnapshotSchedule
。  
 - 
                    
 
以下程式碼範例顯示如何使用 create-tags。
- AWS CLI
 - 
             
                    
建立叢集的標籤
下列
create-tags範例會將指定的標籤鍵/值對新增至指定的叢集。aws redshift create-tags \ --resource-namearn:aws:redshift:us-west-2:123456789012:cluster:mycluster\ --tags "Key"="mytags","Value"="tag1"此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的在 Amazon Redshift 中標記資源。
- 
                    
如需 API 詳細資訊,請參閱《AWS CLI 命令參考》中的 CreateTags
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-cluster-parameter-group。
- AWS CLI
 - 
             
                    
刪除叢集參數GroupThis範例會刪除叢集參數群組。命令:
aws redshift delete-cluster-parameter-group --parameter-group-name myclusterparametergroup- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteClusterParameterGroup
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-cluster-security-group。
- AWS CLI
 - 
             
                    
刪除叢集安全GroupThis範例會刪除叢集安全群組。命令:
aws redshift delete-cluster-security-group --cluster-security-group-name mysecuritygroup- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteClusterSecurityGroup
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-cluster-snapshot。
- AWS CLI
 - 
             
                    
刪除叢集SnapshotThis範例會刪除叢集快照。命令:
aws redshift delete-cluster-snapshot --snapshot-identifier my-snapshot-id- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteClusterSnapshot
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-cluster-subnet-group。
- AWS CLI
 - 
             
                    
刪除叢集子網路GroupThis範例會刪除叢集子網路群組。命令:
aws redshift delete-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup結果:
{ "ResponseMetadata": { "RequestId": "253fbffd-6993-11e2-bc3a-47431073908a" } }- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteClusterSubnetGroup
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-cluster。
- AWS CLI
 - 
             
                    
刪除沒有最終叢集SnapshotThis範例會刪除叢集,強制刪除資料,因此不會建立最終叢集快照。命令:
aws redshift delete-cluster --cluster-identifier mycluster --skip-final-cluster-snapshot刪除叢集,允許最終叢集SnapshotThis範例會刪除叢集,但會指定最終叢集快照。命令:
aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier myfinalsnapshot- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteCluster
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-event-subscription。
- AWS CLI
 - 
             
                    
刪除事件訂閱
下列
delete-event-subscription範例會刪除指定的事件通知訂閱。aws redshift delete-event-subscription \ --subscription-namemysubscription此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的訂閱 Amazon Redshift 事件通知。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteEventSubscription
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-hsm-client-certificate。
- AWS CLI
 - 
             
                    
刪除 HSM 用戶端憑證
下列
delete-hsm-client-certificate範例會刪除 HSM 用戶端憑證。aws redshift delete-hsm-client-certificate \ --hsm-client-certificate-identifiermyhsmclientcert此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的 Amazon Redshift API 許可參考。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteHsmClientCertificate
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-hsm-configuration。
- AWS CLI
 - 
             
                    
刪除 HSM 組態
下列
delete-hsm-configuration範例會從目前 AWS 帳戶刪除指定的 HSM 組態。aws redshift delete-hsm-configuration/--hsm-configuration-identifiermyhsmconnection此命令不會產生任何輸出。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteHsmConfiguration
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-scheduled-action。
- AWS CLI
 - 
             
                    
刪除排程動作
下列
delete-scheduled-action範例會刪除指定的排程動作。aws redshift delete-scheduled-action \ --scheduled-action-namemyscheduledaction此命令不會產生任何輸出。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteScheduledAction
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-snapshot-copy-grant。
- AWS CLI
 - 
             
                    
刪除快照複製授予
下列
delete-snapshot-copy-grant範例會刪除指定的快照複製授予。aws redshift delete-snapshot-copy-grant \ --snapshot-copy-grant-namemysnapshotcopygrantname此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的 Amazon Redshift 資料庫加密。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteSnapshotCopyGrant
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-snapshot-schedule。
- AWS CLI
 - 
             
                    
刪除快照排程
下列
delete-snapshot-schedule範例會刪除指定的快照排程。您必須先取消叢集的關聯,才能刪除排程。aws redshift delete-snapshot-schedule \ --schedule-identifiermysnapshotschedule此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的自動快照排程。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteSnapshotSchedule
。  
 - 
                    
 
以下程式碼範例顯示如何使用 delete-tags。
- AWS CLI
 - 
             
                    
從叢集刪除標籤
下列
delete-tags範例會從指定的叢集刪除具有指定金鑰名稱的標籤。aws redshift delete-tags \ --resource-namearn:aws:redshift:us-west-2:123456789012:cluster:mycluster\ --tag-keys"clustertagkey""clustertagvalue"此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的在 Amazon Redshift 中標記資源。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DeleteTags
。  
 - 
                    
 
以下程式碼範例顯示如何使用 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-db-revisions。
- AWS CLI
 - 
             
                    
描述叢集的資料庫修訂
下列
describe-cluster-db-revisions範例顯示指定叢集之ClusterDbRevision物件陣列的詳細資訊。aws redshift describe-cluster-db-revisions \ --cluster-identifiermycluster輸出:
{ "ClusterDbRevisions": [ { "ClusterIdentifier": "mycluster", "CurrentDatabaseRevision": "11420", "DatabaseRevisionReleaseDate": "2019-11-22T16:43:49.597Z", "RevisionTargets": [] } ] }- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeClusterDbRevisions
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-parameter-groups。
- AWS CLI
 - 
             
                    
取得所有叢集參數GroupsThis範例會傳回帳戶所有叢集參數群組的描述,其中包含資料欄標頭。根據預設,輸出為 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 textoption.Command:option.Command:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-parameters。
- AWS CLI
 - 
             
                    
擷取指定叢集參數GroupThis範例會擷取具名參數群組的參數。根據預設,輸出為 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 textoption.Command:option.Command:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-security-groups。
- AWS CLI
 - 
             
                    
取得所有叢集安全GroupsThis範例會傳回帳戶所有叢集安全群組的描述。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-snapshots。
- AWS CLI
 - 
             
                    
取得所有叢集SnapshotsThis範例會傳回帳戶所有叢集快照的描述。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-subnet-groups。
- AWS CLI
 - 
             
                    
取得所有叢集子網路GroupsThis範例會傳回所有叢集子網路群組的描述。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-tracks。
- AWS CLI
 - 
             
                    
描述叢集軌道
下列
describe-cluster-tracks範例顯示可用維護軌道的詳細資訊。aws redshift describe-cluster-tracks \ --maintenance-track-namecurrent輸出:
{ "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 叢集管理指南》中的選擇叢集維護軌道。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeClusterTracks
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-cluster-versions。
- AWS CLI
 - 
             
                    
取得所有叢集VersionsThis範例會傳回所有叢集版本的描述。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-clusters。
- AWS CLI
 - 
             
                    
取得所有ClustersThis範例會傳回帳戶所有叢集的描述。根據預設,輸出為 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 textoption.Command:option.Command:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-default-cluster-parameters。
- AWS CLI
 - 
             
                    
取得預設叢集ParametersThis範例會傳回
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-event-categories。
- AWS CLI
 - 
             
                    
描述叢集的事件類別
下列
describe-event-categories範例顯示叢集事件類別的詳細資訊。aws redshift describe-event-categories \ --source-typecluster輸出:
{ "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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-event-subscriptions。
- AWS CLI
 - 
             
                    
描述事件訂閱
下列
describe-event-subscriptions範例顯示指定訂閱的事件通知訂閱。aws redshift describe-event-subscriptions \ --subscription-namemysubscription輸出:
{ "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 事件通知。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeEventSubscriptions
。  
 - 
                    
 
以下程式碼範例顯示如何使用 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 textoption.Command:option.Command:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-hsm-client-certificates。
- AWS CLI
 - 
             
                    
描述 HSM 用戶端憑證
下列
describe-hsm-client-certificates範例顯示指定 HSM 用戶端憑證的詳細資訊。aws redshift describe-hsm-client-certificates \ --hsm-client-certificate-identifiermyhsmclientcert輸出:
{ "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 許可參考。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeHsmClientCertificates
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-hsm-configurations。
- AWS CLI
 - 
             
                    
描述 HSM 組態
下列
describe-hsm-configurations範例顯示呼叫 AWS 帳戶可用 HSM 組態的詳細資訊。aws redshift describe-hsm-configurations/--hsm-configuration-identifiermyhsmconnection輸出:
{ "HsmConfigurations": [ { "HsmConfigurationIdentifier": "myhsmconnection", "Description": "My HSM connection", "HsmIpAddress": "192.0.2.09", "HsmPartitionName": "myhsmpartition", "Tags": [] } ] }- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeHsmConfigurations
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-logging-status。
- AWS CLI
 - 
             
                    
描述叢集的記錄狀態
下列
describe-logging-status範例顯示是否記錄叢集的資訊,例如查詢和連線嘗試。aws redshift describe-logging-status \ --cluster-identifiermycluster輸出:
{ "LoggingEnabled": false }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的資料庫稽核記錄。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeLoggingStatus
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-node-configuration-options。
- AWS CLI
 - 
             
                    
描述節點組態選項
下列
describe-node-configuration-options範例顯示可能節點組態的屬性,例如節點類型、節點數量,以及指定叢集快照的磁碟用量。aws redshift describe-node-configuration-options \ --action-typerestore-cluster\ --snapshot-identifierrs: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 預留節點。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeNodeConfigurationOptions
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-orderable-cluster-options。
- AWS CLI
 - 
             
                    
描述所有可排序叢集OptionsThis範例會傳回所有可排序叢集選項的說明。根據預設,輸出為 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 textoption.Command:option.Command:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-reserved-node-offerings。
- AWS CLI
 - 
             
                    
描述預留節點OfferingsThis範例顯示所有可供購買的預留節點方案。命令:
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" } }如果您想要購買預留節點方案,您可以使用
purchase-reserved-node-offering有效的 ReservedNodeOfferingId 來呼叫 。purchase-reserved-node-offering使用有效的 ReservedNodeOfferingId。使用有效的 ReservedNodeOfferingId。
ReservedNodeOfferingId。
.
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeReservedNodeOfferings
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-reserved-nodes。
- AWS CLI
 - 
             
                    
描述預留NodesThis範例顯示已購買的預留節點方案。命令:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-resize。
- AWS CLI
 - 
             
                    
Describe ResizeThis範例說明叢集的最新調整大小。請求適用於 3 個類型為
dw.hs1.8xlarge.Command 的節點: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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-snapshot-copy-grants。
- AWS CLI
 - 
             
                    
描述快照複製授予
下列
describe-snapshot-copy-grants範例顯示指定叢集快照複製授予的詳細資訊。aws redshift describe-snapshot-copy-grants \ --snapshot-copy-grant-namemysnapshotcopygrantname輸出:
{ "SnapshotCopyGrants": [ { "SnapshotCopyGrantName": "mysnapshotcopygrantname", "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY", "Tags": [] } ] }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的 Amazon Redshift 資料庫加密。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeSnapshotCopyGrants
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-snapshot-schedules。
- AWS CLI
 - 
             
                    
描述快照排程
下列
describe-snapshot-schedules範例顯示指定叢集快照排程的詳細資訊。aws redshift describe-snapshot-schedules \ --cluster-identifiermycluster\ --schedule-identifiermysnapshotschedule輸出:
{ "SnapshotSchedules": [ { "ScheduleDefinitions": [ "rate(12 hours)" ], "ScheduleIdentifier": "mysnapshotschedule", "ScheduleDescription": "My schedule description", "Tags": [], "AssociatedClusterCount": 1, "AssociatedClusters": [ { "ClusterIdentifier": "mycluster", "ScheduleAssociationState": "ACTIVE" } ] } ] }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的自動快照排程。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeSnapshotSchedules
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-storage。
- AWS CLI
 - 
             
                    
描述儲存體
下列
describe-storage範例顯示 帳戶備份儲存體和臨時儲存體大小的詳細資訊。aws redshift describe-storage輸出:
{ "TotalBackupSizeInMegaBytes": 193149.0, "TotalProvisionedStorageInMegaBytes": 655360.0 }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的管理快照儲存。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeStorage
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-table-restore-status。
- AWS CLI
 - 
             
                    
描述來自叢集快照的資料表還原請求狀態
下列
describe-table-restore-status範例顯示對指定叢集提出的資料表還原請求的詳細資訊。aws redshift describe-table-restore-status/--cluster-identifiermycluster輸出:
{ "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 叢集管理指南》中的從快照還原資料表。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeTableRestoreStatus
。  
 - 
                    
 
以下程式碼範例顯示如何使用 describe-tags。
- AWS CLI
 - 
             
                    
描述標籤
下列
describe-tags範例顯示與指定標籤名稱和值相關聯的指定叢集資源。aws redshift describe-tags \ --resource-namearn:aws:redshift:us-west-2:123456789012:cluster:mycluster\ --tag-keysclustertagkey\ --tag-valuesclustertagvalue輸出:
{ "TaggedResources": [ { "Tag": { "Key": "clustertagkey", "Value": "clustertagvalue" }, "ResourceName": "arn:aws:redshift:us-west-2:123456789012:cluster:mycluster", "ResourceType": "cluster" } ] }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的在 Amazon Redshift 中標記資源。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DescribeTags
。  
 - 
                    
 
以下程式碼範例顯示如何使用 disable-snapshot-copy。
- AWS CLI
 - 
             
                    
停用叢集的快照複製
下列
disable-snapshot-copy範例會停用指定叢集快照的自動複製。aws redshift disable-snapshot-copy \ --cluster-identifiermycluster輸出:
{ "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 區域。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 DisableSnapshotCopy
。  
 - 
                    
 
以下程式碼範例顯示如何使用 enable-snapshot-copy。
- AWS CLI
 - 
             
                    
啟用叢集的快照複製
下列
enable-snapshot-copy範例會啟用指定叢集快照的自動複製。aws redshift enable-snapshot-copy \ --cluster-identifiermycluster\ --destination-regionus-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 區域。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 EnableSnapshotCopy
。  
 - 
                    
 
以下程式碼範例顯示如何使用 get-cluster-credentials。
- AWS CLI
 - 
             
                    
取得 AWS 帳戶的叢集登入資料
下列
get-cluster-credentials範例會擷取啟用 Amazon Redshift 資料庫存取權的臨時登入資料。aws redshift get-cluster-credentials \ --db-useradminuser--db-namedev\ --cluster-identifiermycluster輸出:
{ "DbUser": "IAM:adminuser", "DbPassword": "AMAFUyyuros/QjxPTtgzcsuQsqzIasdzJEN04aCtWDzXx1O9d6UmpkBtvEeqFly/EXAMPLE==", "Expiration": "2019-12-10T17:25:05.770Z" }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的使用 Amazon Redshift CLI 或 API 產生 IAM 資料庫登入資料。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 GetClusterCredentials
。  
 - 
                    
 
以下程式碼範例顯示如何使用 get-reserved-node-exchange-offerings。
- AWS CLI
 - 
             
                    
取得預留節點交換方案
下列
get-reserved-node-exchange-offerings範例會擷取DC2ReservedNodeOfferings符合指定DC1預留節點的 陣列。aws redshift get-reserved-node-exchange-offerings \ --reserved-node-id12345678-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 升級預留節點。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 GetReservedNodeExchangeOfferings
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster-iam-roles。
- AWS CLI
 - 
             
                    
修改叢集的 IAM 角色
下列
modify-cluster-iam-roles範例會從指定的叢集移除指定的 AWS IAM 角色。aws redshift modify-cluster-iam-roles \ --cluster-identifiermycluster\ --remove-iam-rolesarn: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 政策)。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifyClusterIamRoles
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster-maintenance。
- AWS CLI
 - 
             
                    
修改叢集維護
下列
modify-cluster-maintenance範例會將指定叢集的維護延遲 30 天。aws redshift modify-cluster-maintenance \ --cluster-identifiermycluster\ --defer-maintenance \ --defer-maintenance-duration30輸出:
{ "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 叢集管理指南》中的叢集維護。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifyClusterMaintenance
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster-parameter-group。
- AWS CLI
 - 
             
                    
修改參數群組中的參數
下列
modify-cluster-parameter-group範例會修改工作負載管理的 wlm_json_configuration 參數。它接受檔案中的參數,其中包含如下所示的 JSON 內容。aws redshift modify-cluster-parameter-group \ --parameter-group-namemyclusterparametergroup\ --parametersfile://modify_pg.jsonmodify_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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster-snapshot-schedule。
- AWS CLI
 - 
             
                    
修改叢集快照排程
下列
modify-cluster-snapshot-schedule範例會從指定的叢集移除指定的快照排程。aws redshift modify-cluster-snapshot-schedule \ --cluster-identifiermycluster\ --schedule-identifiermysnapshotschedule\ --disassociate-schedule此命令不會產生任何輸出。
如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的自動快照排程。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifyClusterSnapshotSchedule
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster-snapshot。
- AWS CLI
 - 
             
                    
修改叢集快照
下列
modify-cluster-snapshot範例會將指定叢集快照的手動保留期間設定設為 10 天的值。aws redshift modify-cluster-snapshot \ --snapshot-identifiermycluster-2019-11-06-16-32\ --manual-snapshot-retention-period10輸出:
{ "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 快照。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifyClusterSnapshot
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster-subnet-group。
- AWS CLI
 - 
             
                    
修改叢集子網路GroupThis範例說明如何修改快取子網路群組中的子網路清單。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-cluster。
- AWS CLI
 - 
             
                    
將安全群組與ClusterThis範例說明如何將叢集安全群組與指定的叢集建立關聯。命令:
aws redshift modify-cluster --cluster-identifier mycluster --cluster-security-groups mysecuritygroup修改ClusterThis說明如何將叢集的每週偏好維護時段變更為從週日下午 11:15 開始,到週一上午 3:15 結束的最短四個小時時段。命令:
aws redshift modify-cluster --cluster-identifier mycluster --preferred-maintenance-window Sun:23:15-Mon:03:15變更 ClusterThis範例說明如何變更叢集的主密碼。命令:
aws redshift modify-cluster --cluster-identifier mycluster --master-user-password A1b2c3d4- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifyCluster
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-event-subscription。
- AWS CLI
 - 
             
                    
修改事件訂閱
下列
modify-event-subscription範例會停用指定的事件通知訂閱。aws redshift modify-event-subscription \ --subscription-namemysubscription\ --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 事件通知。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifyEventSubscription
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-scheduled-action。
- AWS CLI
 - 
             
                    
修改排程動作
下列
modify-scheduled-action範例會將描述新增至指定的現有排程動作。aws redshift modify-scheduled-action \ --scheduled-action-namemyscheduledaction\ --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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-snapshot-copy-retention-period。
- AWS CLI
 - 
             
                    
修改快照複製保留期間
下列
modify-snapshot-copy-retention-period範例會修改從來源 AWS 區域複製快照後,在目的地區域中保留指定叢集快照的天數 AWS 。aws redshift modify-snapshot-copy-retention-period \ --cluster-identifiermycluster\ --retention-period15輸出:
{ "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 叢集管理指南》中的快照排程格式。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifySnapshotCopyRetentionPeriod
。  
 - 
                    
 
以下程式碼範例顯示如何使用 modify-snapshot-schedule。
- AWS CLI
 - 
             
                    
修改快照排程
下列
modify-snapshot-schedule範例會將指定快照排程的速率修改為每 10 小時一次。aws redshift modify-snapshot-schedule \ --schedule-identifiermysnapshotschedule\ --schedule-definitions"rate(10 hours)"輸出:
{ "ScheduleDefinitions": [ "rate(10 hours)" ], "ScheduleIdentifier": "mysnapshotschedule", "ScheduleDescription": "My schedule description", "Tags": [] }如需詳細資訊,請參閱《Amazon Redshift 叢集管理指南》中的快照排程格式。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ModifySnapshotSchedule
。  
 - 
                    
 
以下程式碼範例顯示如何使用 purchase-reserved-node-offering。
- AWS CLI
 - 
             
                    
購買預留NodeThis範例示範如何購買預留節點方案。可透過呼叫
describe-reserved-node-offerings.Command 來reserved-node-offering-id取得: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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 reboot-cluster。
- AWS CLI
 - 
             
                    
重新啟動ClusterThis範例會重新啟動叢集。根據預設,輸出為 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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 reset-cluster-parameter-group。
- AWS CLI
 - 
             
                    
參數GroupThis範例示範如何重設參數群組中的所有參數。命令:
aws redshift reset-cluster-parameter-group --parameter-group-name myclusterparametergroup --reset-all-parameters- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ResetClusterParameterGroup
。  
 - 
                    
 
以下程式碼範例顯示如何使用 resize-cluster。
- AWS CLI
 - 
             
                    
調整叢集大小
下列
resize-cluster範例會調整指定叢集的大小。aws redshift resize-cluster \ --cluster-identifiermycluster\ --cluster-typemulti-node\ --node-typedc2.large\ --number-of-nodes6\ --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 叢集管理指南》中的調整叢集的大小。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 ResizeCluster
。  
 - 
                    
 
以下程式碼範例顯示如何使用 restore-from-cluster-snapshot。
- AWS CLI
 - 
             
                    
從SnapshotThis範例會從快照還原叢集。命令:
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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 restore-table-from-cluster-snapshot。
- AWS CLI
 - 
             
                    
從叢集快照還原資料表
下列
restore-table-from-cluster-snapshot範例會從指定叢集快照中的指定資料表建立新的資料表。aws redshift restore-table-from-cluster-snapshot/--cluster-identifiermycluster/--snapshot-identifiermycluster-2019-11-19-16-17/--source-database-namedev/--source-schema-namepublic/--source-table-namemytable/--target-database-namedev/--target-schema-namepublic/--new-table-namemytable-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 叢集管理指南》中的從快照還原資料表。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 RestoreTableFromClusterSnapshot
。  
 - 
                    
 
以下程式碼範例顯示如何使用 revoke-cluster-security-group-ingress。
- AWS CLI
 - 
             
                    
從 EC2 安全GroupThis範例撤銷對名為 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 rangeThis範例撤銷對 CIDR 範圍的存取權。命令:
aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 RevokeClusterSecurityGroupIngress
。  
 - 
                    
 
以下程式碼範例顯示如何使用 revoke-snapshot-access。
- AWS CLI
 - 
             
                    
撤銷 AWS 帳戶還原SnapshotThis範例會撤銷 AWS 帳戶
444455556666還原快照 的授權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
。  
 - 
                    
 
以下程式碼範例顯示如何使用 rotate-encryption-key。
- AWS CLI
 - 
             
                    
輪換叢集的加密金鑰
下列
rotate-encryption-key範例會輪換指定叢集的加密金鑰。aws redshift rotate-encryption-key \ --cluster-identifiermycluster輸出:
{ "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 資料庫加密。
- 
                    
如需 API 詳細資訊,請參閱《 AWS CLI 命令參考》中的 RotateEncryptionKey
。  
 -