Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.
Esempi di utilizzo di Amazon Redshift AWS CLI
I seguenti esempi di codice mostrano come eseguire azioni e implementare scenari comuni utilizzando Amazon Redshift. AWS Command Line Interface
Le azioni sono estratti di codice da programmi più grandi e devono essere eseguite nel contesto. Sebbene le azioni mostrino come richiamare le singole funzioni del servizio, è possibile visualizzarle contestualizzate negli scenari correlati.
Ogni esempio include un link al codice sorgente completo, in cui vengono fornite le istruzioni su come configurare ed eseguire il codice nel contesto.
Argomenti
Azioni
Il seguente esempio di codice mostra come usareaccept-reserved-node-exchange.
- AWS CLI
-
Come accettare lo scambio di nodi riservati
L'
accept-reserved-node-exchangeesempio seguente accetta lo scambio di un nodo DC1 riservato con un nodo DC2 riservato.aws redshift accept-reserved-node-exchange/--reserved-node-id12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLE/--target-reserved-node-offering-id12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLEOutput:
{ "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" } }Per ulteriori informazioni, consulta Upgrade Reserved Nodes With the AWS CLI nella Amazon Redshift Cluster Management Guide.
-
Per i dettagli sull'API, consulta AcceptReservedNodeExchange
Command Reference.AWS CLI
-
Il seguente esempio di codice mostra come utilizzareauthorize-cluster-security-group-ingress.
- AWS CLI
-
L' GroupThis esempio di autorizzazione dell'accesso a una EC2 sicurezza autorizza l'accesso a un gruppo di EC2 sicurezza Amazon denominato. Comando:
aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2-security-group-owner-id 123445677890Come autorizzare l’accesso a un intervallo CIDR L’esempio seguente autorizza l’accesso a un intervallo CIDR. Comando:
aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32-
Per i dettagli sull'API, consulta AuthorizeClusterSecurityGroupIngress
Command Reference.AWS CLI
-
Il seguente esempio di codice mostra come utilizzareauthorize-snapshot-access.
- AWS CLI
-
Autorizza un AWS account al ripristino Un SnapshotThis esempio autorizza l' AWS account
444455556666a ripristinare l'istantanea.my-snapshot-idPer impostazione predefinita, l’output è in formato JSON. Comando:aws redshift authorize-snapshot-access --snapshot-id my-snapshot-id --account-with-restore-access 444455556666Risultato:
{ "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" } }-
Per i dettagli sull'API, consulta Command AuthorizeSnapshotAccess
Reference AWS CLI .
-
Il seguente esempio di codice mostra come utilizzarebatch-delete-cluster-snapshots.
- AWS CLI
-
Come eliminare un set di snapshot del cluster
L’esempio
batch-delete-cluster-snapshotsseguente elimina un set di snapshot del cluster manuali.aws redshift batch-delete-cluster-snapshots \ --identifiersSnapshotIdentifier=mycluster-2019-11-06-14-12SnapshotIdentifier=mycluster-2019-11-06-14-20Output:
{ "Resources": [ "mycluster-2019-11-06-14-12", "mycluster-2019-11-06-14-20" ] }Per ulteriori informazioni, consulta Snapshot di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta BatchDeleteClusterSnapshots AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarebatch-modify-cluster-snapshots.
- AWS CLI
-
Come modificare un set di snapshot del cluster
L’esempio
batch-modify-cluster-snapshotsseguente modifica le impostazioni per un set di snapshot del cluster.aws redshift batch-modify-cluster-snapshots \ --snapshot-identifier-listmycluster-2019-11-06-16-31mycluster-2019-11-06-16-32\ --manual-snapshot-retention-period30Output:
{ "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 } }Per ulteriori informazioni, consulta Snapshot di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta BatchModifyClusterSnapshots AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecancel-resize.
- AWS CLI
-
Come annullare il ridimensionamento di un cluster
L’esempio
cancel-resizeseguente annulla una classica operazione di ridimensionamento per un cluster.aws redshift cancel-resize \ --cluster-identifiermyclusterOutput:
{ "TargetNodeType": "dc2.large", "TargetNumberOfNodes": 2, "TargetClusterType": "multi-node", "Status": "CANCELLING", "ResizeType": "ClassicResize", "TargetEncryptionType": "NONE" }Per ulteriori informazioni, consulta Ridimensionamento di cluster in Amazon Redshift nella Guida alla gestione dei cluster Amazon Redshift.
-
Per i dettagli sull'API, consulta CancelResize AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecopy-cluster-snapshot.
- AWS CLI
-
L' VersionsThis esempio Get a Description of All Cluster restituisce una descrizione di tutte le versioni del cluster. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift copy-cluster-snapshot --source-snapshot-identifier cm:examplecluster-2013-01-22-19-27-58 --target-snapshot-identifier my-saved-snapshot-copyRisultato:
{ "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" } }-
Per i dettagli sull'API, consulta CopyClusterSnapshot AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-cluster-parameter-group.
- AWS CLI
-
L' GroupThis esempio di creazione di un parametro cluster crea un nuovo gruppo di parametri del cluster. Comando:
aws redshift create-cluster-parameter-group --parameter-group-name myclusterparametergroup --parameter-group-family redshift-1.0 --description "My first cluster parameter group"Risultato:
{ "ClusterParameterGroup": { "ParameterGroupFamily": "redshift-1.0", "Description": "My first cluster parameter group", "ParameterGroupName": "myclusterparametergroup" }, "ResponseMetadata": { "RequestId": "739448f0-64cc-11e2-8f7d-3b939af52818" } }-
Per i dettagli sull'API, consulta AWS CLI Command CreateClusterParameterGroup
Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-cluster-security-group.
- AWS CLI
-
La creazione di un GroupThis esempio di Cluster Security crea un nuovo gruppo di sicurezza del cluster. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift create-cluster-security-group --cluster-security-group-name mysecuritygroup --description "This is my cluster security group"Risultato:
{ "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" } } }Puoi ottenere le stesse informazioni anche in formato testo utilizzando l’opzione
--output text. Comando:opzione
--output text. Comando:opzione. Comando:
aws redshift create-cluster-security-group --cluster-security-group-name mysecuritygroup --description "This is my cluster security group" --output textRisultato:
This is my cluster security group 300454760768 mysecuritygroup a0c0bfab-343a-11e2-95d2-c3dc9fe8ab57-
Per i dettagli sull'API, vedere CreateClusterSecurityGroup
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-cluster-snapshot.
- AWS CLI
-
L' SnapshotThis esempio di creazione di un cluster crea una nuova istantanea del cluster. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift create-cluster-snapshot --cluster-identifier mycluster --snapshot-identifier my-snapshot-idRisultato:
{ "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" } }-
Per i dettagli sull'API, consulta CreateClusterSnapshot AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-cluster-subnet-group.
- AWS CLI
-
L' GroupThis esempio di creazione di una sottorete del cluster crea un nuovo gruppo di sottoreti del cluster.Comando:
aws redshift create-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup --description "My subnet group" --subnet-ids subnet-763fdd1cRisultato:
{ "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" } }-
Per i dettagli sull'API, vedere CreateClusterSubnetGroup
in Command Reference.AWS CLI
-
Il seguente esempio di codice mostra come utilizzarecreate-cluster.
- AWS CLI
-
L' ParametersThis esempio Create a Cluster with Minimal crea un cluster con il set minimo di parametri. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift create-cluster --node-type dw.hs1.xlarge --number-of-nodes 2 --master-username adminuser --master-user-password TopSecret1 --cluster-identifier myclusterRisultato:
{ "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" } }-
Per i dettagli sull'API, consulta CreateCluster AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-event-subscription.
- AWS CLI
-
Come creare una sottoscrizione alle notifiche per un evento
L’esempio
create-event-subscriptionseguente crea una sottoscrizione alle notifiche di un evento.aws redshift create-event-subscription \ --subscription-namemysubscription\ --sns-topic-arnarn:aws:sns:us-west-2:123456789012:MySNStopic\ --source-typecluster\ --source-idsmyclusterOutput:
{ "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": [] } }Per ulteriori informazioni, consulta Sottoscrizione alle notifiche eventi di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta CreateEventSubscription AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-hsm-client-certificate.
- AWS CLI
-
Come creare un certificato client HSM
L’esempio
create-hsm-client-certificateseguente genera un certificato client HSM che un cluster può utilizzare per connettersi a un HSM.aws redshift create-hsm-client-certificate \ --hsm-client-certificate-identifiermyhsmclientcertOutput:
{ "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": [] } }Per ulteriori informazioni, consulta Riferimento alle autorizzazioni per l’API Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta CreateHsmClientCertificate AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-hsm-configuration.
- AWS CLI
-
Come creare una configurazione HSM
L’esempio
create-hsm-configurationseguente crea la configurazione HSM specificata che contiene le informazioni richieste da un cluster per archiviare e utilizzare le chiavi di crittografia del database in un modulo di sicurezza hardware (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-certificatemyhsmclientcertOutput:
{ "HsmConfiguration": { "HsmConfigurationIdentifier": "myhsmconnection", "Description": "My HSM connection", "HsmIpAddress": "192.0.2.09", "HsmPartitionName": "myhsmpartition", "Tags": [] } }-
Per i dettagli sull'API, consulta CreateHsmConfiguration AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-snapshot-copy-grant.
- AWS CLI
-
Come creare una concessione di copia degli snapshot
L'
create-snapshot-copy-grantesempio seguente crea una concessione di copia delle istantanee e crittografa le istantanee copiate in una regione di destinazione. AWSaws redshift create-snapshot-copy-grant \ --snapshot-copy-grant-namemysnapshotcopygrantnameOutput:
{ "SnapshotCopyGrant": { "SnapshotCopyGrantName": "mysnapshotcopygrantname", "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY", "Tags": [] } }Per ulteriori informazioni, consulta Crittografia dei database di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, vedere CreateSnapshotCopyGrant
in Command Reference.AWS CLI
-
Il seguente esempio di codice mostra come utilizzarecreate-snapshot-schedule.
- AWS CLI
-
Come creare una pianificazione di snapshot
L’esempio
create-snapshot-scheduleseguente crea una pianificazione di snapshot con la descrizione specificata e una frequenza di 12 ore.aws redshift create-snapshot-schedule \ --schedule-definitions"rate(12 hours)"\ --schedule-identifiermysnapshotschedule\ --schedule-description"My schedule description"Output:
{ "ScheduleDefinitions": [ "rate(12 hours)" ], "ScheduleIdentifier": "mysnapshotschedule", "ScheduleDescription": "My schedule description", "Tags": [] }Per ulteriori informazioni, consulta Pianificazioni di snapshot automatici nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta CreateSnapshotSchedule AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarecreate-tags.
- AWS CLI
-
Come creare tag per un cluster
L'
create-tagsesempio seguente aggiunge la key/value coppia di tag specificata al cluster specificato.aws redshift create-tags \ --resource-namearn:aws:redshift:us-west-2:123456789012:cluster:mycluster\ --tags "Key"="mytags","Value"="tag1"Il comando non produce output.
Per ulteriori informazioni, consulta Tagging delle risorse in Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, vedere CreateTags
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-cluster-parameter-group.
- AWS CLI
-
L' GroupThis esempio di eliminazione di un parametro del cluster elimina un parametro del cluster Group.Comando:
aws redshift delete-cluster-parameter-group --parameter-group-name myclusterparametergroup-
Per i dettagli sull'API, vedere DeleteClusterParameterGroup
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-cluster-security-group.
- AWS CLI
-
Eliminare un GroupThis esempio di Cluster Security elimina un gruppo di sicurezza del cluster.Comando:
aws redshift delete-cluster-security-group --cluster-security-group-name mysecuritygroup-
Per i dettagli sull'API, vedere DeleteClusterSecurityGroup
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-cluster-snapshot.
- AWS CLI
-
L' SnapshotThis esempio di eliminazione di un cluster elimina uno snapshot.Comando:
aws redshift delete-cluster-snapshot --snapshot-identifier my-snapshot-id-
Per i dettagli sull'API, vedere in Command Reference. DeleteClusterSnapshot
AWS CLI
-
Il seguente esempio di codice mostra come utilizzaredelete-cluster-subnet-group.
- AWS CLI
-
Eliminare un GroupThis esempio di sottorete Cluster elimina un gruppo di sottoreti del cluster.Comando:
aws redshift delete-cluster-subnet-group --cluster-subnet-group-name mysubnetgroupRisultato:
{ "ResponseMetadata": { "RequestId": "253fbffd-6993-11e2-bc3a-47431073908a" } }-
Per i dettagli sull'API, vedere in Command Reference. DeleteClusterSubnetGroup
AWS CLI
-
Il seguente esempio di codice mostra come utilizzaredelete-cluster.
- AWS CLI
-
L' SnapshotThis esempio Elimina un cluster senza un cluster finale elimina un cluster, forzando l'eliminazione dei dati in modo che non venga creata alcuna istantanea finale del cluster. Comando:
aws redshift delete-cluster --cluster-identifier mycluster --skip-final-cluster-snapshotL' SnapshotThis esempio Elimina un cluster, Allowing a Final Cluster elimina un cluster, ma specifica uno snapshot finale del cluster. Comando:
aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier myfinalsnapshot-
Per i dettagli sull'API, vedere in Command Reference. DeleteCluster
AWS CLI
-
Il seguente esempio di codice mostra come utilizzaredelete-event-subscription.
- AWS CLI
-
Come eliminare la sottoscrizione a eventi
L’esempio
delete-event-subscriptionseguente elimina la sottoscrizione alle notifiche eventi specificata.aws redshift delete-event-subscription \ --subscription-namemysubscriptionIl comando non produce output.
Per ulteriori informazioni, consulta Sottoscrizione alle notifiche eventi di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DeleteEventSubscription AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-hsm-client-certificate.
- AWS CLI
-
Come eliminare un certificato client HSM
L’esempio
delete-hsm-client-certificateseguente elimina un certificato client HSM.aws redshift delete-hsm-client-certificate \ --hsm-client-certificate-identifiermyhsmclientcertIl comando non produce output.
Per ulteriori informazioni, consulta Riferimento alle autorizzazioni per l’API Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DeleteHsmClientCertificate AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-hsm-configuration.
- AWS CLI
-
Come eliminare una configurazione HSM
L'
delete-hsm-configurationesempio seguente elimina la configurazione HSM specificata dall'account corrente AWS .aws redshift delete-hsm-configuration/--hsm-configuration-identifiermyhsmconnectionIl comando non produce output.
-
Per i dettagli sull'API, vedere DeleteHsmConfiguration
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-scheduled-action.
- AWS CLI
-
Come eliminare un’azione pianificata
L’esempio
delete-scheduled-actionseguente elimina un’azione pianificata specificata.aws redshift delete-scheduled-action \ --scheduled-action-namemyscheduledactionIl comando non produce output.
-
Per i dettagli sull'API, consulta DeleteScheduledAction AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-snapshot-copy-grant.
- AWS CLI
-
Come eliminare una concessione di copia degli snapshot
L’esempio
delete-snapshot-copy-grantseguente elimina la concessione di copia degli snapshot specificata.aws redshift delete-snapshot-copy-grant \ --snapshot-copy-grant-namemysnapshotcopygrantnameIl comando non produce output.
Per ulteriori informazioni, consulta Crittografia dei database di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DeleteSnapshotCopyGrant AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-snapshot-schedule.
- AWS CLI
-
Come eliminare una pianificazione di snapshot
L’esempio
delete-snapshot-scheduleseguente elimina la pianificazione di snapshot specificata. Prima di eliminare la pianificazione è necessario dissociare i cluster.aws redshift delete-snapshot-schedule \ --schedule-identifiermysnapshotscheduleIl comando non produce output.
Per ulteriori informazioni, consulta Pianificazioni di snapshot automatici nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DeleteSnapshotSchedule AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredelete-tags.
- AWS CLI
-
Come eliminare tag da un cluster
L’esempio
delete-tagsseguente elimina i tag con i nomi di chiave specificati dal cluster specificato.aws redshift delete-tags \ --resource-namearn:aws:redshift:us-west-2:123456789012:cluster:mycluster\ --tag-keys"clustertagkey""clustertagvalue"Il comando non produce output.
Per ulteriori informazioni, consulta Tagging delle risorse in Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DeleteTags AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-account-attributes.
- AWS CLI
-
Per descrivere gli attributi di un AWS account
L'
describe-account-attributesesempio seguente visualizza gli attributi associati all' AWS account chiamante.aws redshift describe-account-attributesOutput:
{ "AccountAttributes": [ { "AttributeName": "max-defer-maintenance-duration", "AttributeValues": [ { "AttributeValue": "45" } ] } ] }-
Per i dettagli sull'API, vedere DescribeAccountAttributes
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-db-revisions.
- AWS CLI
-
Come descrivere le revisioni del database per un cluster
L’esempio
describe-cluster-db-revisionsseguente mostra i dettagli relativi a un array di oggettiClusterDbRevisionper il cluster specificato.aws redshift describe-cluster-db-revisions \ --cluster-identifiermyclusterOutput:
{ "ClusterDbRevisions": [ { "ClusterIdentifier": "mycluster", "CurrentDatabaseRevision": "11420", "DatabaseRevisionReleaseDate": "2019-11-22T16:43:49.597Z", "RevisionTargets": [] } ] }-
Per i dettagli sull'API, consulta DescribeClusterDbRevisions AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-parameter-groups.
- AWS CLI
-
L' GroupsThis esempio Get a Description of All Cluster Parameter restituisce una descrizione di tutti i gruppi di parametri del cluster per l'account, con le intestazioni delle colonne. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-cluster-parameter-groupsRisultato:
{ "ParameterGroups": [ { "ParameterGroupFamily": "redshift-1.0", "Description": "My first cluster parameter group", "ParameterGroupName": "myclusterparametergroup" } ], "ResponseMetadata": { "RequestId": "8ceb8f6f-64cc-11e2-bea9-49e0ce183f07" } }Puoi ottenere le stesse informazioni anche in formato testo utilizzando l’opzione
--output text. Comando:opzione
--output text. Comando:opzione. Comando:
aws redshift describe-cluster-parameter-groups --output textRisultato:
redshift-1.0 My first cluster parameter group myclusterparametergroup RESPONSEMETADATA 9e665a36-64cc-11e2-8f7d-3b939af52818-
Per i dettagli sull'API, consulta DescribeClusterParameterGroups AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-parameters.
- AWS CLI
-
L' GroupThis esempio Recupera i parametri per un parametro di cluster specificato recupera i parametri per il gruppo di parametri denominato. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-cluster-parameters --parameter-group-name myclusterparametergroupRisultato:
{ "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...) ] }Puoi ottenere le stesse informazioni anche in formato testo utilizzando l’opzione
--output text. Comando:opzione
--output text. Comando:opzione. Comando:
aws redshift describe-cluster-parameters --parameter-group-name myclusterparametergroup --output textRisultato:
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-
Per i dettagli sull'API, consultate AWS CLI Command DescribeClusterParameters
Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-security-groups.
- AWS CLI
-
L' GroupsThis esempio Get a Description of All Cluster Security restituisce una descrizione di tutti i gruppi di sicurezza del cluster per l'account. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-cluster-security-groupsRisultato:
{ "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...) ] }-
Per i dettagli sull'API, vedere DescribeClusterSecurityGroups
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-snapshots.
- AWS CLI
-
L' SnapshotsThis esempio Get a Description of All Cluster restituisce una descrizione di tutte le istantanee del cluster per l'account. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-cluster-snapshotsRisultato:
{ "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...)-
Per i dettagli sull'API, consulta DescribeClusterSnapshots AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-subnet-groups.
- AWS CLI
-
L' GroupsThis esempio Get a Description of All Cluster Subnet restituisce una descrizione di tutti i gruppi di sottoreti del cluster. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-cluster-subnet-groupsRisultato:
{ "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" } }-
Per i dettagli sull'API, vedere DescribeClusterSubnetGroups
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-tracks.
- AWS CLI
-
Come descrivere le tracce del cluster
L’esempio
describe-cluster-tracksseguente mostra i dettagli relativi alle tracce di manutenzione disponibili.aws redshift describe-cluster-tracks \ --maintenance-track-namecurrentOutput:
{ "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" } ] } ] } ] }Per ulteriori informazioni, consulta Selezione delle tracce di manutenzione del cluster nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeClusterTracks AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-cluster-versions.
- AWS CLI
-
L' VersionsThis esempio Get a Description of All Cluster restituisce una descrizione di tutte le versioni del cluster. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-cluster-versionsRisultato:
{ "ClusterVersions": [ { "ClusterVersion": "1.0", "Description": "Initial release", "ClusterParameterGroupFamily": "redshift-1.0" } ], "ResponseMetadata": { "RequestId": "16a53de3-64cc-11e2-bec0-17624ad140dd" } }-
Per i dettagli sull'API, consulta DescribeClusterVersions AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-clusters.
- AWS CLI
-
L' ClustersThis esempio Get a Description of All restituisce una descrizione di tutti i cluster dell'account. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-clustersRisultato:
{ "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" } }Puoi ottenere le stesse informazioni anche in formato testo utilizzando l’opzione
--output text. Comando:opzione
--output text. Comando:opzione. Comando:
aws redshift describe-clusters --output textRisultato:
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-
Per i dettagli sull'API, consulta DescribeClusters AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-default-cluster-parameters.
- AWS CLI
-
L' ParametersThis esempio Get a Description of Default Cluster restituisce una descrizione dei parametri di cluster predefiniti per la
redshift-1.0famiglia. Per impostazione predefinita, l’output è in formato JSON. Comando:aws redshift describe-default-cluster-parameters --parameter-group-family redshift-1.0Risultato:
{ "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...) ] } }Per visualizzare un elenco di famiglie di gruppi di parametri valide, utilizza il comando
describe-cluster-parameter-groups.Comando
describe-cluster-parameter-groupscomando.
-
Per i dettagli sull'API, consulta DescribeDefaultClusterParameters AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-event-categories.
- AWS CLI
-
Come descrivere le categorie di eventi per un cluster
L’esempio
describe-event-categoriesseguente mostra i dettagli relativi alle categorie di eventi per un cluster.aws redshift describe-event-categories \ --source-typeclusterOutput:
{ "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" } ] } ] }-
Per i dettagli sull'API, consulta DescribeEventCategories AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-event-subscriptions.
- AWS CLI
-
Come descrivere le sottoscrizioni a eventi
L’esempio
describe-event-subscriptionsseguente mostra le sottoscrizioni alle notifiche eventi per la sottoscrizione specificata.aws redshift describe-event-subscriptions \ --subscription-namemysubscriptionOutput:
{ "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": [] } ] }Per ulteriori informazioni, consulta Sottoscrizione alle notifiche eventi di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeEventSubscriptions AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-events.
- AWS CLI
-
Come descrivere tutti gli eventi L’esempio seguente restituisce tutti gli eventi. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-eventsRisultato:
{ "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" } }Puoi ottenere le stesse informazioni anche in formato testo utilizzando l’opzione
--output text. Comando:opzione
--output text. Comando:opzione. Comando:
aws redshift describe-events --output textRisultato:
2013-01-22T19:17:03.640Z myclusterparametergroup Cluster parameter group myclusterparametergroup has been created. cluster-parameter-group RESPONSEMETADATA 8e5fe765-64c9-11e2-bce3-e56f52c50e17-
Per i dettagli sull'API, consulta DescribeEvents AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-hsm-client-certificates.
- AWS CLI
-
Come descrivere i certificati client HSM
L’esempio
describe-hsm-client-certificatesseguente mostra i dettagli relativi al certificato client HSM specificato.aws redshift describe-hsm-client-certificates \ --hsm-client-certificate-identifiermyhsmclientcertOutput:
{ "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": [] } ] }Per ulteriori informazioni, consulta Riferimento alle autorizzazioni per l’API Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeHsmClientCertificates AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-hsm-configurations.
- AWS CLI
-
Come descrivere le configurazioni HSM
L'
describe-hsm-configurationsesempio seguente visualizza i dettagli delle configurazioni HSM disponibili per l'account chiamante AWS .aws redshift describe-hsm-configurations/--hsm-configuration-identifiermyhsmconnectionOutput:
{ "HsmConfigurations": [ { "HsmConfigurationIdentifier": "myhsmconnection", "Description": "My HSM connection", "HsmIpAddress": "192.0.2.09", "HsmPartitionName": "myhsmpartition", "Tags": [] } ] }-
Per i dettagli sull'API, vedere DescribeHsmConfigurations
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-logging-status.
- AWS CLI
-
Come descrivere lo stato della registrazione di log per un cluster
L’esempio
describe-logging-statusseguente mostra se le informazioni, ad esempio query e tentativi di connessione, vengono registrate nei log per un cluster.aws redshift describe-logging-status \ --cluster-identifiermyclusterOutput:
{ "LoggingEnabled": false }Per ulteriori informazioni, consulta Logging di controllo dei database nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeLoggingStatus AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-node-configuration-options.
- AWS CLI
-
Come descrivere le opzioni di configurazione dei nodi
L’esempio
describe-node-configuration-optionsseguente mostra le proprietà delle possibili configurazioni dei nodi, ad esempio il tipo di nodo, il numero di nodi e l’utilizzo del disco per lo snapshot del cluster specificato.aws redshift describe-node-configuration-options \ --action-typerestore-cluster\ --snapshot-identifierrs:mycluster-2019-12-09-16-42-43Output:
{ "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 } ] }Per ulteriori informazioni, consulta Acquisto di nodi riservati di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeNodeConfigurationOptions AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-orderable-cluster-options.
- AWS CLI
-
L' OptionsThis esempio Describing All Orderable Cluster restituisce le descrizioni di tutte le opzioni di cluster ordinabili. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift describe-orderable-cluster-optionsRisultato:
{ "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" } }Puoi ottenere le stesse informazioni anche in formato testo utilizzando l’opzione
--output text. Comando:opzione
--output text. Comando:opzione. Comando:
aws redshift describe-orderable-cluster-options --output textRisultato:
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-
Per i dettagli sull'API, vedere DescribeOrderableClusterOptions
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-reserved-node-offerings.
- AWS CLI
-
L' OfferingsThis esempio Descrivi il nodo riservato mostra tutte le offerte di nodi riservati disponibili per Purchase.Command:
aws redshift describe-reserved-node-offeringsRisultato:
{ "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" } }Se desideri acquistare un'offerta di nodi riservati, puoi chiamare
purchase-reserved-node-offeringutilizzando un nodo valido. ReservedNodeOfferingIdpurchase-reserved-node-offeringutilizzando un valido ReservedNodeOfferingId.utilizzando un valido ReservedNodeOfferingId.
ReservedNodeOfferingId.
.
-
Per i dettagli sull'API, consulta DescribeReservedNodeOfferings AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-reserved-nodes.
- AWS CLI
-
Descrivi l' NodesThis esempio riservato mostra un'offerta di nodi riservati che è stata acquistata.Comando:
aws redshift describe-reserved-nodesRisultato:
{ "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" } ] }-
Per i dettagli sull'API, consulta DescribeReservedNodes
Command Reference.AWS CLI
-
Il seguente esempio di codice mostra come utilizzaredescribe-resize.
- AWS CLI
-
Descrivi l' ResizeThis esempio che descrive l'ultimo ridimensionamento di un cluster. La richiesta riguarda tre nodi di tipo
dw.hs1.8xlarge. Comando:aws redshift describe-resize --cluster-identifier myclusterRisultato:
{ "Status": "NONE", "TargetClusterType": "multi-node", "TargetNodeType": "dw.hs1.8xlarge", "ResponseMetadata": { "RequestId": "9f52b0b4-7733-11e2-aa9b-318b2909bd27" }, "TargetNumberOfNodes": "3" }-
Per i dettagli sull'API, consulta DescribeResize AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-scheduled-actions.
- AWS CLI
-
Come descrivere le azioni pianificate
L’esempio
describe-scheduled-actionsseguente mostra i dettagli relativi a tutte le azioni attualmente pianificate.aws redshift describe-scheduled-actionsOutput:
{ "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" ] } ] }-
Per i dettagli sull'API, consulta DescribeScheduledActions AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-snapshot-copy-grants.
- AWS CLI
-
Come descrivere le concessioni di copia degli snapshot
L’esempio
describe-snapshot-copy-grantsseguente mostra i dettagli relativi alla concessione di copia degli snapshot specificata.aws redshift describe-snapshot-copy-grants \ --snapshot-copy-grant-namemysnapshotcopygrantnameOutput:
{ "SnapshotCopyGrants": [ { "SnapshotCopyGrantName": "mysnapshotcopygrantname", "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/bPxRfih3yCo8nvbEXAMPLEKEY", "Tags": [] } ] }Per ulteriori informazioni, consulta Crittografia dei database di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeSnapshotCopyGrants AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-snapshot-schedules.
- AWS CLI
-
Come descrivere le pianificazioni di snapshot
L’esempio
describe-snapshot-schedulesseguente mostra i dettagli relativi alla pianificazione di snapshot del cluster specificata.aws redshift describe-snapshot-schedules \ --cluster-identifiermycluster\ --schedule-identifiermysnapshotscheduleOutput:
{ "SnapshotSchedules": [ { "ScheduleDefinitions": [ "rate(12 hours)" ], "ScheduleIdentifier": "mysnapshotschedule", "ScheduleDescription": "My schedule description", "Tags": [], "AssociatedClusterCount": 1, "AssociatedClusters": [ { "ClusterIdentifier": "mycluster", "ScheduleAssociationState": "ACTIVE" } ] } ] }Per ulteriori informazioni, consulta Pianificazioni di snapshot automatici nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeSnapshotSchedules AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-storage.
- AWS CLI
-
Come descrivere l’archiviazione
L’esempio
describe-storageseguente mostra i dettagli relativi all’archiviazione di backup e alle dimensioni di archiviazione provvisorie per l’account.aws redshift describe-storageOutput:
{ "TotalBackupSizeInMegaBytes": 193149.0, "TotalProvisionedStorageInMegaBytes": 655360.0 }Per ulteriori informazioni, consulta Gestione dell’archiviazione di snapshot nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeStorage AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-table-restore-status.
- AWS CLI
-
Come descrivere lo stato delle richieste di ripristino delle tabelle da uno snapshot del cluster
L’esempio
describe-table-restore-statusseguente mostra i dettagli relativi alle richieste di ripristino delle tabelle effettuate per il cluster specificato.aws redshift describe-table-restore-status/--cluster-identifiermyclusterOutput:
{ "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" } ] }Per ulteriori informazioni, consulta Ripristino di una tabella da uno snapshot nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeTableRestoreStatus AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredescribe-tags.
- AWS CLI
-
Come descrivere i tag
L’esempio
describe-tagsseguente mostra le risorse del cluster specificato che sono associate ai nomi e ai valori dei tag specificati.aws redshift describe-tags \ --resource-namearn:aws:redshift:us-west-2:123456789012:cluster:mycluster\ --tag-keysclustertagkey\ --tag-valuesclustertagvalueOutput:
{ "TaggedResources": [ { "Tag": { "Key": "clustertagkey", "Value": "clustertagvalue" }, "ResourceName": "arn:aws:redshift:us-west-2:123456789012:cluster:mycluster", "ResourceType": "cluster" } ] }Per ulteriori informazioni, consulta Tagging delle risorse in Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta DescribeTags AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaredisable-snapshot-copy.
- AWS CLI
-
Come disabilitare la copia di snapshot per un cluster
L’esempio
disable-snapshot-copyseguente disabilita la copia automatica di uno snapshot per il cluster specificato.aws redshift disable-snapshot-copy \ --cluster-identifiermyclusterOutput:
{ "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" } }Per ulteriori informazioni, consulta Copiare gli snapshot in un'altra AWS regione nella Amazon Redshift Cluster Management Guide.
-
Per i dettagli sull'API, consulta Command DisableSnapshotCopy
Reference AWS CLI .
-
Il seguente esempio di codice mostra come utilizzareenable-snapshot-copy.
- AWS CLI
-
Come abilitare la copia di snapshot per un cluster
L’esempio
enable-snapshot-copyseguente abilita la copia automatica di uno snapshot per il cluster specificato.aws redshift enable-snapshot-copy \ --cluster-identifiermycluster\ --destination-regionus-west-1Output:
{ "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" } }Per ulteriori informazioni, consulta Copiare gli snapshot in un'altra AWS regione nella Amazon Redshift Cluster Management Guide.
-
Per i dettagli sull'API, consulta Command EnableSnapshotCopy
Reference AWS CLI .
-
Il seguente esempio di codice mostra come utilizzareget-cluster-credentials.
- AWS CLI
-
Per ottenere le credenziali del cluster per un account AWS
L’esempio
get-cluster-credentialsseguente recupera le credenziali temporanee che consentono l’accesso a un database Amazon Redshift.aws redshift get-cluster-credentials \ --db-useradminuser--db-namedev\ --cluster-identifiermyclusterOutput:
{ "DbUser": "IAM:adminuser", "DbPassword": "AMAFUyyuros/QjxPTtgzcsuQsqzIasdzJEN04aCtWDzXx1O9d6UmpkBtvEeqFly/EXAMPLE==", "Expiration": "2019-12-10T17:25:05.770Z" }Per ulteriori informazioni, consulta Generazione di credenziali di database IAM mediante la CLI o l’API di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta GetClusterCredentials AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzareget-reserved-node-exchange-offerings.
- AWS CLI
-
Come ottenere offerte di scambio di nodi riservati
L’esempio
get-reserved-node-exchange-offeringsseguente recupera un array diReservedNodeOfferingsDC2che corrispondono al nodo riservatoDC1.aws redshift get-reserved-node-exchange-offerings \ --reserved-node-id12345678-12ab-12a1-1a2a-12ab-12a12EXAMPLEOutput:
{ "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" } ] }Per ulteriori informazioni, consulta Upgrade Reserved Nodes With the AWS CLI nella Amazon Redshift Cluster Management Guide.
-
Per i dettagli sull'API, consulta GetReservedNodeExchangeOfferings
Command Reference.AWS CLI
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster-iam-roles.
- AWS CLI
-
Come modificare il ruolo IAM per un cluster
L'
modify-cluster-iam-rolesesempio seguente rimuove il ruolo AWS IAM specificato dal cluster specificato.aws redshift modify-cluster-iam-roles \ --cluster-identifiermycluster\ --remove-iam-rolesarn:aws:iam::123456789012:role/myRedshiftRoleOutput:
{ "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" } }Per ulteriori informazioni, consulta Utilizzo di policy basate su identità (policy IAM) per Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, vedere ModifyClusterIamRoles
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster-maintenance.
- AWS CLI
-
Come modificare la manutenzione del cluster
L’esempio
modify-cluster-maintenanceseguente posticipa di 30 giorni la manutenzione del cluster specificato.aws redshift modify-cluster-maintenance \ --cluster-identifiermycluster\ --defer-maintenance \ --defer-maintenance-duration30Output:
{ "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" } }Per ulteriori informazioni, consulta Manutenzione del cluster nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta ModifyClusterMaintenance AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster-parameter-group.
- AWS CLI
-
Come modificare i parametri in un gruppo di parametri
L’esempio
modify-cluster-parameter-groupseguente modifica il parametro wlm_json_configuration per la gestione dei carichi di lavoro. Il comando accetta i parametri da un file con il contenuto JSON mostrato di seguito.aws redshift modify-cluster-parameter-group \ --parameter-group-namemyclusterparametergroup\ --parametersfile://modify_pg.jsonContenuto di
modify_pg.json:[ { "ParameterName": "wlm_json_configuration", "ParameterValue": "[{\"user_group\":\"example_user_group1\",\"query_group\": \"example_query_group1\", \"query_concurrency\":7},{\"query_concurrency\":5}]" } ]Output:
{ "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" } }-
Per i dettagli sull'API, consulta ModifyClusterParameterGroup AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster-snapshot-schedule.
- AWS CLI
-
Come modificare la pianificazione di snapshot del cluster
L’esempio
modify-cluster-snapshot-scheduleseguente rimuove la pianificazione di snapshot specificata dal cluster specificato.aws redshift modify-cluster-snapshot-schedule \ --cluster-identifiermycluster\ --schedule-identifiermysnapshotschedule\ --disassociate-scheduleIl comando non produce output.
Per ulteriori informazioni, consulta Pianificazioni di snapshot automatici nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta ModifyClusterSnapshotSchedule AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster-snapshot.
- AWS CLI
-
Come modificare uno snapshot del cluster
L’esempio
modify-cluster-snapshotseguente imposta il periodo di conservazione manuale per lo snapshot del cluster specificato su un valore di 10 giorni.aws redshift modify-cluster-snapshot \ --snapshot-identifiermycluster-2019-11-06-16-32\ --manual-snapshot-retention-period10Output:
{ "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" } }Per ulteriori informazioni, consulta Snapshot di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta ModifyClusterSnapshot AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster-subnet-group.
- AWS CLI
-
L' GroupThis esempio di modifica delle sottoreti in una sottorete del cluster mostra come modificare l'elenco delle sottoreti in un gruppo di sottoreti della cache. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift modify-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup --subnet-ids subnet-763fdd1 subnet-ac830e9Risultato:
{ "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" } }-
Per i dettagli sull'API, vedere in Command Reference. ModifyClusterSubnetGroup
AWS CLI
-
Il seguente esempio di codice mostra come utilizzaremodify-cluster.
- AWS CLI
-
Associare un gruppo di sicurezza a un ClusterThis esempio mostra come associare un gruppo di sicurezza del cluster al Cluster.command specificato:
aws redshift modify-cluster --cluster-identifier mycluster --cluster-security-groups mysecuritygroupModifica la finestra di manutenzione per ClusterThis mostrare come modificare la finestra di manutenzione settimanale preferita per un cluster in modo che diventi la finestra di manutenzione minima di quattro ore che inizia la domenica alle 23:15 e termina il lunedì alle 3:15. Comando:
aws redshift modify-cluster --cluster-identifier mycluster --preferred-maintenance-window Sun:23:15-Mon:03:15Modifica la password principale: nell' ClusterThis esempio viene illustrato come modificare la password principale per un Cluster.Comando:
aws redshift modify-cluster --cluster-identifier mycluster --master-user-password A1b2c3d4-
Per i dettagli sull'API, vedere ModifyCluster
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-event-subscription.
- AWS CLI
-
Come modificare la sottoscrizione a eventi
L’esempio
modify-event-subscriptionseguente disabilita la sottoscrizione alle notifiche eventi specificata.aws redshift modify-event-subscription \ --subscription-namemysubscription\ --no-enabledOutput:
{ "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": [] } }Per ulteriori informazioni, consulta Sottoscrizione alle notifiche eventi di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta ModifyEventSubscription AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-scheduled-action.
- AWS CLI
-
Come modificare un’azione pianificata
L’esempio
modify-scheduled-actionseguente aggiunge una descrizione all’azione pianificata esistente specificata.aws redshift modify-scheduled-action \ --scheduled-action-namemyscheduledaction\ --scheduled-action-description"My scheduled action"Output:
{ "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" ] }-
Per i dettagli sull'API, consulta ModifyScheduledAction AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-snapshot-copy-retention-period.
- AWS CLI
-
Come modificare il periodo di conservazione delle copie di snapshot
L'
modify-snapshot-copy-retention-periodesempio seguente modifica il numero di giorni in cui conservare le istantanee per il cluster specificato nella AWS regione di destinazione dopo che sono state copiate dalla regione di origine. AWSaws redshift modify-snapshot-copy-retention-period \ --cluster-identifiermycluster\ --retention-period15Output:
{ "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" } }Per ulteriori informazioni, consulta Formato di una pianificazione di snapshot nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, vedere ModifySnapshotCopyRetentionPeriod
in AWS CLI Command Reference.
-
Il seguente esempio di codice mostra come utilizzaremodify-snapshot-schedule.
- AWS CLI
-
Come modificare la pianificazione di snapshot
L’esempio
modify-snapshot-scheduleseguente modifica la pianificazione di snapshot specificata impostando una frequenza di 10 ore.aws redshift modify-snapshot-schedule \ --schedule-identifiermysnapshotschedule\ --schedule-definitions"rate(10 hours)"Output:
{ "ScheduleDefinitions": [ "rate(10 hours)" ], "ScheduleIdentifier": "mysnapshotschedule", "ScheduleDescription": "My schedule description", "Tags": [] }Per ulteriori informazioni, consulta Formato di una pianificazione di snapshot nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta ModifySnapshotSchedule AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarepurchase-reserved-node-offering.
- AWS CLI
-
L' NodeThis esempio di acquisto di un nodo riservato mostra come acquistare un'offerta di nodi riservati. Il valore di
reserved-node-offering-idviene ottenuto chiamandodescribe-reserved-node-offerings. Comando:aws redshift purchase-reserved-node-offering --reserved-node-offering-id ceb6a579-cf4c-4343-be8b-d832c45ab51cRisultato:
{ "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" } }-
Per i dettagli sull'API, consulta PurchaseReservedNodeOffering AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarereboot-cluster.
- AWS CLI
-
Riavvia un ClusterThis esempio riavvia un cluster. Per impostazione predefinita, l’output è in formato JSON. Comando:
aws redshift reboot-cluster --cluster-identifier myclusterRisultato:
{ "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" } }-
Per i dettagli sull'API, consulta AWS CLI Command RebootCluster
Reference.
-
Il seguente esempio di codice mostra come utilizzarereset-cluster-parameter-group.
- AWS CLI
-
L' GroupThis esempio di reset Parameters in a Parameter mostra come reimpostare tutti i parametri in un gruppo di parametri.Comando:
aws redshift reset-cluster-parameter-group --parameter-group-name myclusterparametergroup --reset-all-parameters-
Per i dettagli sull'API, consulta AWS CLI Command ResetClusterParameterGroup
Reference.
-
Il seguente esempio di codice mostra come utilizzareresize-cluster.
- AWS CLI
-
Come ridimensionare un cluster
L’esempio
resize-clusterseguente ridimensiona il cluster specificato.aws redshift resize-cluster \ --cluster-identifiermycluster\ --cluster-typemulti-node\ --node-typedc2.large\ --number-of-nodes6\ --classicOutput:
{ "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 } } }Per ulteriori informazioni, consulta Ridimensionamento di un cluster nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta ResizeCluster AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarerestore-from-cluster-snapshot.
- AWS CLI
-
Ripristina un cluster Da un SnapshotThis esempio ripristina un cluster da uno snapshot.Comando:
aws redshift restore-from-cluster-snapshot --cluster-identifier mycluster-clone --snapshot-identifier my-snapshot-idRisultato:
{ "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" } }-
Per i dettagli sull'API, vedere in Command Reference. RestoreFromClusterSnapshot
AWS CLI
-
Il seguente esempio di codice mostra come utilizzarerestore-table-from-cluster-snapshot.
- AWS CLI
-
Come ripristinare una tabella da uno snapshot di cluster
L’esempio
restore-table-from-cluster-snapshotseguente crea una nuova tabella in base alla tabella specificata nello snapshot del cluster specificato.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-cloneOutput:
{ "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" } }Per ulteriori informazioni, consulta Ripristino di una tabella da uno snapshot nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta RestoreTableFromClusterSnapshot AWS CLI
Command Reference.
-
Il seguente esempio di codice mostra come utilizzarerevoke-cluster-security-group-ingress.
- AWS CLI
-
L' GroupThis esempio Revoke Access from an EC2 Security revoca l'accesso a un gruppo di sicurezza Amazon denominato. Comando: EC2
aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2-security-group-owner-id 123445677890Come revocare l’accesso a un intervallo CIDR L’esempio seguente revoca l’accesso a un intervallo CIDR. Comando:
aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32-
Per i dettagli sull'API, consulta Command Reference. RevokeClusterSecurityGroupIngress
AWS CLI
-
Il seguente esempio di codice mostra come utilizzarerevoke-snapshot-access.
- AWS CLI
-
Revoca l'autorizzazione di un AWS account al ripristino Un SnapshotThis esempio revoca l'autorizzazione dell' AWS account
444455556666a ripristinare l'istantanea.my-snapshot-idPer impostazione predefinita, l’output è in formato JSON. Comando:aws redshift revoke-snapshot-access --snapshot-id my-snapshot-id --account-with-restore-access 444455556666Risultato:
{ "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" } }-
Per i dettagli sull'API, consulta Command Reference. RevokeSnapshotAccess
AWS CLI
-
Il seguente esempio di codice mostra come utilizzarerotate-encryption-key.
- AWS CLI
-
Come ruotare le chiavi di crittografia per un cluster
L’esempio
rotate-encryption-keyseguente ruota la chiave di crittografia per il cluster specificato.aws redshift rotate-encryption-key \ --cluster-identifiermyclusterOutput:
{ "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" } }Per ulteriori informazioni, consulta Crittografia dei database di Amazon Redshift nella Guida alla gestione dei cluster di Amazon Redshift.
-
Per i dettagli sull'API, consulta RotateEncryptionKey AWS CLI
Command Reference.
-