Transcript
Amazon Redshift Command Line Reference API Version 2012-12-01
Amazon Redshift Command Line Reference
Amazon Web Services
Amazon Redshift Command Line Reference
Amazon Redshift: Command Line Reference Amazon Web Services Copyright © 2012 Amazon Web Services LLC or its affiliates. All rights reserved.
Amazon Redshift Command Line Reference
Welcome ................................................................................................................................................. 1 Setting up the Command Line Tools ....................................................................................................... 2 Getting Started with the AWS Command Line Interface ......................................................................... 3 Common Options .................................................................................................................................... 8 List of Command Line Operations by Function ..................................................................................... 11 Command Line Interface (CLI) Reference ............................................................................................ 13 authorize-cluster-security-group-ingress .............................................................................................. 14 create-cluster ........................................................................................................................................ 16 copy-cluster-snapshot ........................................................................................................................... 23 create-cluster-parameter-group ............................................................................................................ 26 create-cluster-security-group ................................................................................................................ 28 create-cluster-snapshot ........................................................................................................................ 30 create-cluster-subnet-group .................................................................................................................. 32 delete-cluster ........................................................................................................................................ 33 delete-cluster-parameter-group ............................................................................................................ 36 delete-cluster-security-group ................................................................................................................ 37 delete-cluster-snapshot ........................................................................................................................ 38 delete-cluster-subnet-group .................................................................................................................. 40 describe-cluster-parameter-groups ....................................................................................................... 40 describe-cluster-parameters ................................................................................................................. 42 describe-clusters .................................................................................................................................. 45 describe-cluster-security-groups .......................................................................................................... 49 describe-cluster-snapshots ................................................................................................................... 51 describe-cluster-subnet-groups ............................................................................................................ 55 describe-cluster-versions ...................................................................................................................... 57 describe-default-cluster-parameters ..................................................................................................... 58 describe-events .................................................................................................................................... 60 describe-orderable-cluster-options ....................................................................................................... 63 describe-reserved-node-offerings ......................................................................................................... 66 describe-reserved-nodes ...................................................................................................................... 69 describe-resize ..................................................................................................................................... 71 modify-cluster ....................................................................................................................................... 72 modify-cluster-parameter-group ........................................................................................................... 79 modify-cluster-subnet-group ................................................................................................................. 81 purchase-reserved-node-offering ......................................................................................................... 83 reboot-cluster ........................................................................................................................................ 85 reset-cluster-parameter-group .............................................................................................................. 88 restore-from-cluster-snapshot ............................................................................................................... 90 revoke-cluster-security-group-ingress ................................................................................................... 94 Document History ................................................................................................................................. 97
API Version 2012-12-01 4
Amazon Redshift Command Line Reference Are You a First-Time Amazon Redshift User?
Welcome This is the Amazon Redshift Command Line Reference. To work with Amazon Redshift from the command line, you use the AWS Command Line Interface (CLI). The AWS CLI lets you control multiple AWS services, including Amazon Redshift. Using the AWS CLI, you can interact directly with Amazon Redshift and other services; you can also use the AWS CLI to create your own scripts and automate tasks. This section discusses who should read this guide, how the guide is organized, and other resources related to Amazon Redshift.
Are You a First-Time Amazon Redshift User? If you are a first-time user of Amazon Redshift, we recommend that you begin by reading the following sections: • Service Highlights and Pricing – The product detail page provides the Amazon Redshift value proposition, service highlights, and pricing. • Getting Started – The Getting Started Guide includes an example that walks you through the process of creating a cluster, creating database tables, uploading data, and testing queries. After you complete the Getting Started guide, we recommend that you explore one of the following guides: • Amazon Redshift Cluster Management Guide – This guide shows you how to create and manage Amazon Redshift clusters. For more information, go to the Amazon Redshift Cluster Management Guide. If you are an application developer, you can use the Amazon Redshift Query API to manage clusters programmatically. Additionally, the AWS SDK libraries that wrap the underlying Amazon Redshift API simplify your programming tasks. If you prefer a more interactive way of managing clusters, you can use the Amazon Redshift console and the AWS command line interface (AWS CLI). For information about the API, go to the API Reference. • Amazon Redshift Database Developer Guide – If you are a database developer, the Amazon Redshift Database Developer Guide explains how to design, build, query, and maintain the databases that make up your data warehouse.
API Version 2012-12-01 1
Amazon Redshift Command Line Reference Installation Instructions
Setting up the Command Line Tools This section explains how to set up and run the Amazon Redshift command line tools. The Amazon Redshift command line tools run on the the AWS Command Line Interface (CLI), which in turn uses Python (http://www.python.org/). The AWS CLI can be run on any operating system that supports Python.
Installation Instructions To set up the Amazon Redshift command line tools, you set up the AWS Command Line Interface, and then you add configuration files that define Amazon Redshift commands. If you have already installed the AWS CLI, you can skip this procedure.
To install the AWS Command Line Interface 1.
2.
3.
Go to http://aws.amazon.com/cli and then follow the onscreen instructions for installing the AWS Command Line Interface. For detailed instructions, go to Getting Set Up in the AWS Command Line Interface User Guide. Create a file containing your AWS credentials, and then set the AWS_CONFIG_FILE environment variable. For detailed instructions, go to Getting Started in the AWS Command Line Interface User Guide. Run a test command to confirm that the CLI interface is working. For example, the following command should display help information for the CLI: aws help
The following command should display help information for Amazon Redshift: aws redshift help
API Version 2012-12-01 2
Amazon Redshift Command Line Reference Step 1: Before You Begin
Getting Started with the AWS Command Line Interface Topics • Step 1: Before You Begin (p. 3) • Step 2: Launch a Cluster (p. 4) • Step 3: Authorize Inbound Traffic for Cluster Access (p. 5) • Step 4: Connect to Your Cluster (p. 6) • Step 5: Create Tables, Upload Data, and Try Example Queries (p. 6) • Step 6: Delete Your Sample Cluster (p. 7) To help you get started using the command line interface, this section shows how to perform basic administrative tasks for an Amazon Redshift cluster. These tasks are very similar to those in the Amazon Redshift Getting Started Guide, but they are focused on the command line interface rather than the Amazon Redshift console. This section walks you through the process of creating a cluster, creating database tables, uploading data, and testing queries. You will use the Amazon Redshift CLI to provision a cluster and to authorize necessary access permissions.You will then use the SQL Workbench client to connect to the cluster and create sample tables, upload sample data, and execute test queries.
Step 1: Before You Begin If you don't already have an AWS account, you must sign up for one. Then you'll need to set up the Amazon Redshift command line tools. Finally, you'll need to download client tools and drivers in order to connect to your cluster.
Step 1.1: Sign Up for an AWS account For information about signing up for an AWS user account, go to the Amazon Redshift Getting Started Guide.
API Version 2012-12-01 3
Amazon Redshift Command Line Reference Step 1.2: Download and Install the AWS Command Line Interface (CLI)
Step 1.2: Download and Install the AWS Command Line Interface (CLI) If you have not installed the AWS Command Line Interface, see Setting up the Command Line Tools (p. 2).
Step 1.3: Download the Client Tools and Drivers You can use any SQL client tools to connect to an Amazon Redshift cluster with PostgreSQL JDBC or ODBC drivers. If you do not currently have such software installed, you can use SQL Workbench, a free cross-platform tool that you can use to query tables in an Amazon Redshift cluster. The examples in this section will use the SQL Workbench client. To download SQL Workbench and the PostgreSQL drivers, go to the Amazon Redshift Getting Started Guide.
Step 2: Launch a Cluster Now you're ready to launch a cluster by using the AWS Command Line Interface (CLI).
Important The cluster that you're about to launch will be live (and not running in a sandbox). You will incur the standard usage fees for the cluster until you terminate it. If you complete the exercise described here in one sitting and terminate your cluster when you are finished, the total charges will be minimal. The create-cluster command has a large number of parameters. For this exercise, you will use the parameter values that are described in the following table. Before you create a cluster in a production environment, we recommend that you review all the required and optional parameters so that your cluster configuration matches your requirements. For more information, see create-cluster (p. 16) Parameter Name
Parameter Value for This Exercise
Cluster Identifier
examplecluster
Master Username
masteruser
Master Password
TopSecret1
Node Type
dw.hs1.xlarge. If you plan to test with a larger dataset, consider using the dw.hs1.8xlarge node type.
Cluster Type
single-node
To create your cluster, type the following command: aws redshift create-cluster --cluster-identifier examplecluster --master-username masteruser --master-user-password TopSecret1 --node-type dw.hs1.xlarge -cluster-type single-node
The cluster creation process will take several minutes to complete. To check the status, type the following command:
API Version 2012-12-01 4
Amazon Redshift Command Line Reference Step 3: Authorize Inbound Traffic for Cluster Access
aws redshift describe-clusters --cluster-identifier examplecluster
The output will look similar to this: { "Clusters": [ { ...output omitted... "ClusterStatus": "creating", "ClusterIdentifier": "examplecluster", ...output omitted... }
When the ClusterStatus field changes from creating to available, your cluster is ready for use. In the next step, you will authorize access so that you can connect to the cluster.
Step 3: Authorize Inbound Traffic for Cluster Access You must explicitly grant inbound access to your client in order to connect to the cluster. Your client can be an Amazon EC2 instance or an external computer. When you created a cluster in the previous step, because you did not specify a security group, you associated the default cluster security group with the cluster. The default cluster security group contains no rules to authorize any inbound traffic to the cluster. To access the new cluster, you must add rules for inbound traffic, which are called ingress rules, to the cluster security group.
Ingress Rules for Applications Running on the Internet If you are accessing your cluster from the Internet, you will need to authorize a Classless Inter-Domain Routing IP (CIDR/IP) address range. For this example, we will use a CIDR/IP rule of 192.0.2.0/24; you will need to modify this range to reflect your actual IP address and netmask. To allow network ingress to your cluster, type the following command: aws redshift authorize-cluster-security-group-ingress --cluster-security-groupname default --cidrip 192.0.2.0/24
Ingress Rules for EC2 Instances If you are accessing your cluster from an Amazon EC2 instance, you will need to authorize an Amazon EC2 security group. To do so, you specify the security group name, along with the 12-digit account number of the EC2 security group owner.
API Version 2012-12-01 5
Amazon Redshift Command Line Reference Step 4: Connect to Your Cluster
You can use the Amazon EC2 console to determine the EC2 security group associated with your instance:
To find your AWS account number, go to http://aws.amazon.com and sign in to the My Account page. Your AWS account number is shown in the upper right-hand corner of that page. For this example, we will use myec2securitygroup for the Amazon EC2 security group name, and 123456789012 for the account number. You will need to modify these to suit your needs. To allow network ingress to your cluster, type the following command: aws redshift authorize-cluster-security-group-ingress --cluster-security-groupname default --ec2-security-group-name myec2securitygroup --ec2-security-groupowner 123456789012
Step 4: Connect to Your Cluster Now that you have added an ingress rule to the default cluster security group, incoming connections from a specific CIDR/IP or EC2 Security Group to examplecluster are authorized. You are now ready to connect to the cluster. For information about connecting to your cluster, go to the Amazon Redshift Getting Started Guide.
Step 5: Create Tables, Upload Data, and Try Example Queries For information about creating tables, uploading data, and issuing queries, go to the Amazon Redshift Getting Started Guide.
API Version 2012-12-01 6
Amazon Redshift Command Line Reference Step 6: Delete Your Sample Cluster
Step 6: Delete Your Sample Cluster After you have launched a cluster and it is available for use, you are billed for the time the cluster is running, even if you are not actively using it. When you no longer need the cluster, you can delete it. When you delete a cluster, you must decide whether to create a final snapshot. Because this is an exercise and your test cluster should not have any important data in it, you can skip the final snapshot. To delete your cluster, type the following command: aws redshift delete-cluster --cluster-identifier examplecluster --skip-finalcluster-snapshot
Congratulations! You successfully launched, authorized access to, connected to, and terminated a cluster.
API Version 2012-12-01 7
Amazon Redshift Command Line Reference Syntax
Common Options This section describes the syntax and common options for Amazon Redshift command line tools.
Syntax aws redshift operation [--output output_format] [--region region_name] [--profile debug] [--profile profile_name] [--endpoint-url endpoint_url]
Only the operation is required. For a list of valid operations, see Command Line Interface (CLI) Reference (p. 13).
Options Following are the common options for all Amazon Redshift commands. Option
Description
operation
Specifies the Amazon Redshift operation to perform. Examples of operations are create-cluster, describe-events and modify-cluster-parameter-group. For a list of valid operations, see Command Line Interface (CLI) Reference (p. 13).
--output
Specifies the format of the command output. Default: json Valid values: json | text | csv
API Version 2012-12-01 8
Amazon Redshift Command Line Reference Examples
Option
Description
--region
Overrides the default AWS Region. Default: us-east-1 Example: --region us-west-2
--debug
Turns on debug logging. Default: No debug information is generated.
--profile
Uses a specific profile from your credential file. Default: The [default] profile is used.
--endpoint-url
Overrides the Amazon Redshift default URL with the given URL.
Examples This example returns a description of all clusters for the account.
PROMPT> aws redshift describe-clusters
This example returns a description of all clusters for the account. The output is returned in text format
PROMPT> aws redshift create-cluster-parameter-group --parameter-group-name myc lusterparametergroup --parameter-group-family redshift-1.0 --description "My first cluster parameter group" --output text
Troubleshooting The following table lists common error conditions you might encounter, and how to address them. Error Message
Try the following...
error: argument Check the spelling of the command you specified. operation: invalid choice Something is wrong. We have leftover options
Check the options you specified for the command. • Check the spelling of the options. • Check that all options have an "--" before them. • Verify that the options are valid for the specified operation.
API Version 2012-12-01 9
Amazon Redshift Command Line Reference Troubleshooting
Error Message
Try the following...
A client error (Unknown) Check the request response which contains details of the error. For example, the following error is returned when using the aws occurred redshift describe-clusters command with a cluster-identifier that does not exist. { "ErrorResponse": { "RequestId": "5a48a9e4-5a93-11e2-b05d2129be933c3d", "Error": { "Message": "Cluster mycluster not found.", "Code": "ClusterNotFound", "Type": "Sender" } } }
If the cause of the error is an invalid security token, the response will be as follows: { "ErrorResponse": { "RequestId": "aad31e1a-5a97-11e2-9b77f77b7944b367", "Error": { "Message": "The security token included in the request is invalid.", "Code": "InvalidClientTokenId", "Type": "Sender" } } }
In the event of an invalid security token, you can use the --debug option to show details of the request sent to the Amazon Redshift endpoint. In the debug output, confirm that you are using the correct AWS access key ID. You must specify a region The CLI cannot determine the region in which to execute the using the --region option command. For information on setting a default region, or specifying the region on the command line, go to Specifying Your AWS or in your config file. Credentials and Region in the AWS Command Line Interface User Guide.
API Version 2012-12-01 10
Amazon Redshift Command Line Reference
List of Command Line Operations by Function Clusters • • • • • •
create-cluster (p. 16) modify-cluster (p. 72) describe-clusters (p. 45) describe-resize (p. 71) reboot-cluster (p. 85) delete-cluster (p. 33)
Parameter Groups • • • •
create-cluster-parameter-group (p. 26) delete-cluster-parameter-group (p. 36) describe-cluster-parameter-groups (p. 40) describe-cluster-parameters (p. 42)
• modify-cluster-parameter-group (p. 79) • reset-cluster-parameter-group (p. 88) • describe-default-cluster-parameters (p. 58)
Security Groups • create-cluster-security-group (p. 28) • authorize-cluster-security-group-ingress (p. 14) • delete-cluster-security-group (p. 37) • describe-cluster-security-groups (p. 49) • revoke-cluster-security-group-ingress (p. 94)
Backups • create-cluster-snapshot (p. 30)
API Version 2012-12-01 11
Amazon Redshift Command Line Reference
• delete-cluster-snapshot (p. 38) • describe-cluster-snapshots (p. 51) • copy-cluster-snapshot (p. 23) • restore-from-cluster-snapshot (p. 90)
Reserved Nodes • describe-reserved-nodes (p. 69) • describe-reserved-node-offerings (p. 66) • purchase-reserved-node-offering (p. 83)
Subnet Groups • create-cluster-subnet-group (p. 32) • modify-cluster-subnet-group (p. 81) • describe-cluster-subnet-groups (p. 55) • delete-cluster-subnet-group (p. 40)
Configuration • describe-cluster-versions (p. 57) • describe-orderable-cluster-options (p. 63)
Events • describe-events (p. 60)
API Version 2012-12-01 12
Amazon Redshift Command Line Reference
Command Line Interface (CLI) Reference Topics • authorize-cluster-security-group-ingress (p. 14) • create-cluster (p. 16) • copy-cluster-snapshot (p. 23) • create-cluster-parameter-group (p. 26) • create-cluster-security-group (p. 28) • create-cluster-snapshot (p. 30) • create-cluster-subnet-group (p. 32) • delete-cluster (p. 33) • delete-cluster-parameter-group (p. 36) • delete-cluster-security-group (p. 37) • delete-cluster-snapshot (p. 38) • delete-cluster-subnet-group (p. 40) • describe-cluster-parameter-groups (p. 40) • describe-cluster-parameters (p. 42) • describe-clusters (p. 45) • describe-cluster-security-groups (p. 49) • describe-cluster-snapshots (p. 51) • describe-cluster-subnet-groups (p. 55) • describe-cluster-versions (p. 57) • describe-default-cluster-parameters (p. 58) • describe-events (p. 60) • describe-orderable-cluster-options (p. 63) • describe-reserved-node-offerings (p. 66) • describe-reserved-nodes (p. 69) • describe-resize (p. 71) • modify-cluster (p. 72) • modify-cluster-parameter-group (p. 79) • modify-cluster-subnet-group (p. 81) API Version 2012-12-01 13
Amazon Redshift Command Line Reference authorize-cluster-security-group-ingress
• purchase-reserved-node-offering (p. 83) • reboot-cluster (p. 85) • reset-cluster-parameter-group (p. 88) • restore-from-cluster-snapshot (p. 90) • revoke-cluster-security-group-ingress (p. 94)
authorize-cluster-security-group-ingress Description Adds an inbound (ingress) rule to an Amazon Redshift security group. Depending on whether the application accessing your cluster is running on the Internet or an EC2 instance, you can authorize inbound access to either a Classless Interdomain Routing (CIDR) IP address range or an EC2 security group. You can add as many as 20 ingress rules to an Amazon Redshift security group.
Note The EC2 security group must be defined in the AWS region where the cluster resides. For an overview of CIDR blocks, see the Wikipedia article on Classless Inter-Domain Routing. You must also associate the security group with a cluster so that clients running on these IP addresses or the EC2 instance are authorized to connect to the cluster. For information about managing security groups, go to Working with Security Groups in the Amazon Redshift Management Guide.
Syntax authorize-cluster-security-group-ingress --cluster-security-group-name value [--ec2-security-group-name value] [--ec2-security-group-owner-id value] [--cidrip value] Common Options (p. 8)
Options Name
Description
Required
--cluster-security-group-name The name of the security group to which the ingress Yes rule is added. --cidrip
The IP range to be added the Amazon Redshift security group.
No
--ec2-security-group-name
The EC2 security group to be added the Amazon Redshift security group.
No
API Version 2012-12-01 14
Amazon Redshift Command Line Reference Output
Name
Description
--ec2-security-group-owner-id The AWS account number of the owner of the security group specified by the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.
Required No
Example: 111122223333
Output The command returns the following information: • ClusterSecurityGroup— Describes a security group. • ClusterSecurityGroup:IPRanges— A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroup:IPRanges:IPRange— Describes an IP range used in a security group. • ClusterSecurityGroup:IPRanges:IPRange:Status— The status of the IP range, for example, "authorized". • ClusterSecurityGroup:IPRanges:IPRange:CIDRIP— The IP range in Classless Inter-Domain Routing (CIDR) notation. • ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group to which the operation was applied. • ClusterSecurityGroup:Description— A description of the security group. • ClusterSecurityGroup:EC2SecurityGroups— A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup— Describes an Amazon EC2 security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:Status— The status of the EC2 security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupName— The name of the EC2 Security Group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupOwnerId— The AWS ID of the owner of the EC2 security group specified in the EC2SecurityGroupName field.
Examples Authorizing Access to an EC2 Security Group This example authorizes access to a named Amazon EC2 security group. PROMPT> aws redshift authorize-cluster-security-group-ingress --cluster-securitygroup-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2security-group-owner-id 123445677890
Authorizing Access to a CIDR range This example authorizes access to a CIDR range. API Version 2012-12-01 15
Amazon Redshift Command Line Reference create-cluster
PROMPT> aws redshift authorize-cluster-security-group-ingress --cluster-securitygroup-name mysecuritygroup --cidrip 192.168.100.100/32
create-cluster Description Creates a new cluster. To create the cluster in virtual private cloud (VPC), you must provide cluster subnet group name. If you don't provide a cluster subnet group name or the cluster security group parameter, Amazon Redshift creates a non-VPC cluster, it associates the default cluster security group with the cluster. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide.
Syntax create-cluster --node-type value --master-username value --master-user-password value --cluster-identifier value [--number-of-nodes value] [--availability-zone value] [--publicly-accessible] [--cluster-parameter-group-name value] [--encrypted] [--cluster-type value] [--vpc-security-group-ids value] [--allow-version-upgrade] [--cluster-subnet-group-name value] [--automated-snapshot-retention-period value] [--cluster-security-groups value] [--port value] [--db-name value] [--preferred-maintenance-window value] [--cluster-version value]
API Version 2012-12-01 16
Amazon Redshift Command Line Reference Options
Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
A unique identifier for the cluster. You use this Yes identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. The identifier also appears in the Amazon Redshift console. Constraints: • Must contain only lowercase characters. • Must contain from 1 to 63 alphanumeric characters or hyphens. • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens. • Must be unique for all clusters within an AWS account. Example: myexamplecluster
--master-user-password
The password associated with the master user account for the cluster that is being created.
Yes
Constraints: • • • • •
--master-username
Must be between 8 and 64 characters in length. Must contain at least one uppercase letter. Must contain at least one lowercase letter. Must contain one number. Can be any printable ASCII character (ASCII code 33 to 126) except ' (single quote), " (double quote), \, /, @, or space.
The user name associated with the master user account for the cluster that is being created. Constraints: • Must be 1 - 128 alphanumeric characters. • First character must be a letter. • Cannot be a reserved word. A list of reserved words can be found in Reserved Words in the Amazon Redshift Developer Guide.
API Version 2012-12-01 17
Yes
Amazon Redshift Command Line Reference Options
Name
Description
Required
--node-type
The node type to be provisioned for the cluster. For Yes information about node types, go to Working with Clusters in the Amazon Redshift Management Guide. Valid Values: dw.hs1.xlarge | dw.hs1.8xlarge.
--allow-version-upgrade
If true, upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
No
When a new version of the Amazon Redshift engine is released, you can request that the service automatically apply upgrades during the maintenance window to the Amazon Redshift engine that is running on your cluster. Default: true --automated-snapshot-retention-period The number of days that automated snapshots are No retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with create-cluster-snapshot (p. 30).
Default: 1 Constraints: Must be a value from 0 to 35. --availability-zone
The EC2 Availability Zone (AZ) in which you want No Amazon Redshift to provision the cluster. For example, if you have several EC2 instances running in a specific Availability Zone, then you might want the cluster to be provisioned in the same zone in order to decrease network latency. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint. Example: us-east-1d Constraint: The specified Availability Zone must be in the same region as the current endpoint.
API Version 2012-12-01 18
Amazon Redshift Command Line Reference Options
Name
Description
Required
--cluster-parameter-group-name The name of the parameter group to be associated No with this cluster.
Default: The default Amazon Redshift cluster parameter group. For information about the default parameter group, go to Working with Amazon Redshift Parameter Groups Constraints: • Must be 1 to 255 alphanumeric characters or hyphens. • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens.
--cluster-security-groups
A list of security groups to be associated with this cluster.
No
Default: The default cluster security group for Amazon Redshift. --cluster-subnet-group-name
The name of a cluster subnet group to be associated with this cluster.
No
If this parameter is not provided the resulting cluster will be deployed outside virtual private cloud (VPC). --cluster-type
The type of the cluster. When cluster type is specified as
No
• single-node, the NumberOfNodes parameter is not required. • multi-node, the NumberOfNodes parameter is required. Valid Values: multi-node | single-node Default: multi-node --cluster-version
The version of the Amazon Redshift engine software that you want to deploy on the cluster. The version selected runs on all the nodes in the cluster. Constraints: Only version 1.0 is currently available. Example: 1.0
API Version 2012-12-01 19
No
Amazon Redshift Command Line Reference Options
Name
Description
Required
--db-name
The name of the first database to be created when No the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. For more information, go to Create a Database in the Amazon Redshift Developer Guide. Default: dev Constraints: • Must contain 1 to 64 alphanumeric characters. • Must contain only lowercase letters. • Cannot be a word that is reserved by the service. A list of reserved words can be found in Reserved Words in the Amazon Redshift Developer Guide.
--encrypted
If true, the data in cluster is encrypted at rest.
No
Default: false --number-of-nodes
The number of compute nodes in the cluster. This No parameter is required when the ClusterType parameter is specified as multi-node. For information about determining how many nodes you need, go to Working with Clusters in the Amazon Redshift Management Guide. If you don't specify this parameter, you get a single-node cluster. When requesting a multi-node cluster, you must specify the number of nodes that you want in the cluster. Default: 1 Constraints: Value must be at least 1 and no more than 100.
--port
The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings. Part of the connection string requires the port on which the cluster will listen for incoming connections. Default: 5439 Valid Values: 1150-65535
API Version 2012-12-01 20
No
Amazon Redshift Command Line Reference Output
Name
Description
--preferred-maintenance-window The weekly time range (in UTC) during which automated cluster maintenance can occur.
Required No
Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. The following list shows the time blocks for each region from which the default maintenance windows are assigned. • US-East (Northern Virginia) Region: 03:00-11:00 UTC • US-West (Oregon) Region: 06:00-14:00 UTC Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun Constraints: Minimum 30-minute window. --publicly-accessible
If true, the cluster can be accessed from a public No network.
--vpc-security-group-ids
A list of Virtual Private Cloud (VPC) security groups No to be associated with the cluster. Default: The default VPC security group is associated with the cluster.
Output The command returns the following information: • Cluster— Describes a cluster. • Cluster:PubliclyAccessible— If true, the cluster can be accessed from a public network. • Cluster:MasterUsername— The master user name for the cluster. This name is used to connect to the database that is specified in DBName. • Cluster:VpcSecurityGroups— A list of Virtual Private Cloud (VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC. • Cluster:VpcSecurityGroups:VpcSecurityGroup— Describes the members of a VPC security group. • Cluster:VpcSecurityGroups:VpcSecurityGroup:Status— • Cluster:VpcSecurityGroups:VpcSecurityGroup:VpcSecurityGroupId— • Cluster:ModifyStatus— The status of a modify operation, if any, initiated for the cluster. • Cluster:NumberOfNodes— The number of compute nodes in the cluster. • Cluster:PendingModifiedValues— If present, changes to the cluster are pending. Specific pending changes are identified by subelements. • Cluster:PendingModifiedValues:ClusterVersion— The pending or in-progress change of the service version. • Cluster:PendingModifiedValues:ClusterType— The pending or in-progress change of the cluster type. • Cluster:PendingModifiedValues:MasterUserPassword— The pending or in-progress change of the master credentials for the cluster.
API Version 2012-12-01 21
Amazon Redshift Command Line Reference Output
• Cluster:PendingModifiedValues:AutomatedSnapshotRetentionPeriod— The pending or in-progress change of the automated snapshot retention period. • Cluster:PendingModifiedValues:NodeType— The pending or in-progress change of the cluster's node type. • Cluster:PendingModifiedValues:NumberOfNodes— The pending or in-progress change of the number nodes in the cluster. • Cluster:VpcId— The identifier of the VPC the cluster is in, if the cluster is in a VPC. • Cluster:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Cluster:AutomatedSnapshotRetentionPeriod— The number of days that automatic cluster snapshots are retained. • Cluster:ClusterParameterGroups— The list of cluster parameter groups that are associated with this cluster. • Cluster:ClusterParameterGroups:ClusterParameterGroup— Describes the status of a parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterApplyStatus— The status of parameter updates. • Cluster:DBName— The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named "dev" was created by default. • Cluster:PreferredMaintenanceWindow— The weekly time range (in UTC) during which system maintenance can occur. • Cluster:Endpoint— The connection endpoint. • Cluster:Endpoint:Port— The port that the database engine is listening on. • Cluster:Endpoint:Address— The DNS address of the Cluster. • Cluster:AllowVersionUpgrade— If true, version upgrades will be applied automatically to the cluster during the maintenance window. • Cluster:ClusterCreateTime— The date and time that the cluster was created. • Cluster:ClusterSubnetGroupName— The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC. • Cluster:ClusterSecurityGroups— A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster security groups are used when the cluster is not created in a VPC. Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:Status— The status of the cluster security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group. • Cluster:ClusterIdentifier— The unique identifier of the cluster. • Cluster:AvailabilityZone— The name of the Availability Zone in which the cluster is located. • Cluster:NodeType— The node type for the nodes in the cluster. • Cluster:Encrypted— If true, data in cluster is encrypted at rest. • Cluster:ClusterStatus— The current state of this cluster. Possible values include available, creating, deleting, rebooting, and resizing.
API Version 2012-12-01 22
Amazon Redshift Command Line Reference Examples
Examples Create a Cluster with Minimal Parameters This example creates a cluster with the minimal set of parameters. By default, the output is in JSON format.
PROMPT> aws redshift create-cluster --node-type dw.hs1.xlarge --number-of-nodes 2 --master-username adminuser --master-user-password TopSecret1 --clusteridentifier 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" }
copy-cluster-snapshot Description Copies the specified automated cluster snapshot to a new manual cluster snapshot. The source must be an automated snapshot and it must be in the available state.
API Version 2012-12-01 23
Amazon Redshift Command Line Reference Syntax
When you delete a cluster, Amazon Redshift deletes any automated snapshots of the cluster. Also, when the retention period of the snapshot expires, Amazon Redshift automatically deletes it. If you want to keep an automated snapshot for a longer period, you can make a manual copy of the snapshot. Manual snapshots are retained until you delete them. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Management Guide.
Syntax copy-cluster-snapshot --source-snapshot-identifier value --target-snapshot-identifier value Common Options (p. 8)
Options Name
Description
--source-snapshot-identifier The identifier for the source snapshot.
Required Yes
Constraints: • Must be the identifier for a valid automated snapshot whose state is "available".
--target-snapshot-identifier The identifier given to the new manual snapshot.
Yes
Constraints: • Cannot be null, empty, or blank. • Must contain from 1 to 255 alphanumeric characters or hyphens. • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens. • Must be unique for the AWS account that is making the request.
Output The command returns the following information: • Snapshot— Describes a snapshot. • Snapshot:Status— The snapshot status. The value of the status depends on the API operation used. • create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) returns status as "creating". • describe-cluster-snapshots (p. 51) returns status as "creating", "available", or "failed". • delete-cluster-snapshot (p. 38) returns status as "deleted". API Version 2012-12-01 24
Amazon Redshift Command Line Reference Examples
• Snapshot:SnapshotCreateTime— The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time. • Snapshot:AvailabilityZone— The Availability Zone in which the cluster was created. • Snapshot:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Snapshot:MasterUsername— The master user name for the cluster. • Snapshot:Encrypted— If true, the data in the snapshot is encrypted at rest. • Snapshot:DBName— The name of the database that was created when the cluster was created. • Snapshot:VpcId— The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output. • Snapshot:ClusterCreateTime— The time (UTC) when the cluster was originally created. • Snapshot:SnapshotType— The snapshot type. Snapshots created using create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) will be of type "manual". • • • • •
Snapshot:NodeType— The node type of the nodes in the cluster. Snapshot:ClusterIdentifier— The identifier of the cluster for which the snapshot was taken. Snapshot:Port— The port that the cluster is listening on. Snapshot:NumberOfNodes— The number of nodes in the cluster. Snapshot:SnapshotIdentifier— The snapshot identifier that is provided in the request.
Examples Get a Description of All Cluster Versions This example returns a description of all cluster versions. By default, the output is in JSON format.
PROMPT> aws redshift copy-cluster-snapshot --source-snapshot-identifier cm:ex amplecluster-2013-01-22-19-27-58 --target-snapshot-identifier my-saved-snapshotcopy { "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 Version 2012-12-01 25
Amazon Redshift Command Line Reference create-cluster-parameter-group
create-cluster-parameter-group Description Creates an Amazon Redshift parameter group. Creating parameter groups is independent of creating clusters.You can associate a cluster with a parameter group when you create the cluster. You can also associate an existing cluster with a parameter group after the cluster is created by using modify-cluster (p. 72). Parameters in the parameter group define specific behavior that applies to the databases you create on the cluster. For more information about managing parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Management Guide.
Syntax create-cluster-parameter-group --parameter-group-family value --parameter-group-name value --description value Common Options (p. 8)
Options Name
Description
Required
--description
A description of the parameter group.
Yes
--parameter-group-family
The Amazon Redshift engine version to which the Yes cluster parameter group applies.The cluster engine version determines the set of parameters. To get a list of valid parameter group family names, you can call describe-cluster-parameter-groups (p. 40). By default, Amazon Redshift returns a list of all the parameter groups that are owned by your AWS account, including the default parameter groups for each Amazon Redshift engine version. The parameter group family names associated with the default parameter groups provide you the valid values. For example, a valid family name is "redshift-1.0".
API Version 2012-12-01 26
Amazon Redshift Command Line Reference Output
Name
Description
Required
--parameter-group-name
The name of the cluster parameter group.
Yes
Constraints: • Must be 1 to 255 alphanumeric characters or hyphens • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens. • Must be unique withing your AWS account.
Note This value is stored as a lower-case string.
Output The command returns the following information: • ClusterParameterGroup— Describes a parameter group. • ClusterParameterGroup:ParameterGroupFamily— The name of the cluster parameter group family that this cluster parameter group is compatible with. • ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • ClusterParameterGroup:Description— The description of the parameter group.
Examples Create a Cluster Parameter Group This example creates a new cluster parameter group.
PROMPT> aws redshift create-cluster-parameter-group --parameter-group-name myc lusterparametergroup --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 Version 2012-12-01 27
Amazon Redshift Command Line Reference create-cluster-security-group
create-cluster-security-group Description Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters. For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Management Guide.
Syntax create-cluster-security-group --cluster-security-group-name value --description value Common Options (p. 8)
Options Name
Description
Required
--cluster-security-group-name The name for the security group. Amazon Redshift Yes stores the value as a lowercase string.
Constraints: • Must contain no more than 255 alphanumeric characters or hyphens. • Must not be "Default". • Must be unique for all security groups that are created by your AWS account. Example: examplesecuritygroup --description
A description for the security group.
Yes
Output The command returns the following information: • ClusterSecurityGroup— Describes a security group. • ClusterSecurityGroup:IPRanges— A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroup:IPRanges:IPRange— Describes an IP range used in a security group. • ClusterSecurityGroup:IPRanges:IPRange:Status— The status of the IP range, for example, "authorized". • ClusterSecurityGroup:IPRanges:IPRange:CIDRIP— The IP range in Classless Inter-Domain Routing (CIDR) notation.
API Version 2012-12-01 28
Amazon Redshift Command Line Reference Examples
• ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group to which the operation was applied. • ClusterSecurityGroup:Description— A description of the security group. • ClusterSecurityGroup:EC2SecurityGroups— A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup— Describes an Amazon EC2 security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:Status— The status of the EC2 security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupName— The name of the EC2 Security Group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupOwnerId— The AWS ID of the owner of the EC2 security group specified in the EC2SecurityGroupName field.
Examples Creating a Cluster Security Group This example creates a new cluster security group. By default, the output is in JSON format. PROMPT> aws redshift create-cluster-security-group --cluster-security-groupname 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" } } }
You can also obtain the same information in text format using the --output text option. PROMPT> aws redshift create-cluster-security-group --cluster-security-groupname mysecuritygroup --description "This is my cluster security group" --output text This is my cluster security group 300454760768 mysecuritygroup a0c0bfab-343a-11e2-95d2-c3dc9fe8ab57
API Version 2012-12-01 29
Amazon Redshift Command Line Reference create-cluster-snapshot
create-cluster-snapshot Description Creates a manual snapshot of the specified cluster. The cluster must be in the "available" state. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Management Guide.
Syntax create-cluster-snapshot --cluster-identifier value --snapshot-identifier value Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
The cluster identifier for which you want a snapshot. Yes
--snapshot-identifier
A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the AWS account.
Yes
Constraints: • Cannot be null, empty, or blank • Must contain from 1 to 255 alphanumeric characters or hyphens • First character must be a letter • Cannot end with a hyphen or contain two consecutive hyphens Example: my-snapshot-id
Output The command returns the following information: • Snapshot— Describes a snapshot. • Snapshot:Status— The snapshot status. The value of the status depends on the API operation used. • create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) returns status as "creating". • describe-cluster-snapshots (p. 51) returns status as "creating", "available", or "failed". • delete-cluster-snapshot (p. 38) returns status as "deleted". • Snapshot:SnapshotCreateTime— The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
API Version 2012-12-01 30
Amazon Redshift Command Line Reference Examples
• Snapshot:AvailabilityZone— The Availability Zone in which the cluster was created. • Snapshot:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Snapshot:MasterUsername— The master user name for the cluster. • Snapshot:Encrypted— If true, the data in the snapshot is encrypted at rest. • Snapshot:DBName— The name of the database that was created when the cluster was created. • Snapshot:VpcId— The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output. • Snapshot:ClusterCreateTime— The time (UTC) when the cluster was originally created. • Snapshot:SnapshotType— The snapshot type. Snapshots created using create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) will be of type "manual". • Snapshot:NodeType— The node type of the nodes in the cluster. • Snapshot:ClusterIdentifier— The identifier of the cluster for which the snapshot was taken. • Snapshot:Port— The port that the cluster is listening on. • Snapshot:NumberOfNodes— The number of nodes in the cluster. • Snapshot:SnapshotIdentifier— The snapshot identifier that is provided in the request.
Examples Create a Cluster Snapshot This example creates a new cluster snapshot. By default, the output is in JSON format.
PROMPT> 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 Version 2012-12-01 31
Amazon Redshift Command Line Reference create-cluster-subnet-group
create-cluster-subnet-group Description Creates a new Amazon Redshift subnet group. You must provide a list of one or more subnets in your existing Amazon Virtual Private Cloud (Amazon VPC) when creating Amazon Redshift subnet group. For information about subnet groups, go to Amazon Redshift Cluster Subnet Groups in the Amazon Redshift Management Guide.
Syntax create-cluster-subnet-group --subnet-ids value --cluster-subnet-group-name value --description value Common Options (p. 8)
Options Name
Description
Required
--cluster-subnet-group-name
The name for the subnet group. Amazon Redshift stores the value as a lowercase string.
Yes
Constraints: • Must contain no more than 255 alphanumeric characters or hyphens. • Must not be "Default". • Must be unique for all subnet groups that are created by your AWS account. Example: examplesubnetgroup --description
A description for the subnet group.
Yes
--subnet-ids
An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.
Yes
Output The command returns the following information: • ClusterSubnetGroup— Describes a subnet group. • ClusterSubnetGroup:Subnets— A list of the VPC Subnet elements. • ClusterSubnetGroup:Subnets:Subnet— Describes a subnet. • ClusterSubnetGroup:Subnets:Subnet:SubnetStatus— The status of the subnet.
API Version 2012-12-01 32
Amazon Redshift Command Line Reference Examples
• ClusterSubnetGroup:Subnets:Subnet:SubnetIdentifier— The identifier of the subnet. • ClusterSubnetGroup:Subnets:Subnet:SubnetAvailabilityZone— • ClusterSubnetGroup:Subnets:Subnet:SubnetAvailabilityZone:Name— The name of the availability zone. • ClusterSubnetGroup:VpcId— The VPC ID of the cluster subnet group. • ClusterSubnetGroup:SubnetGroupStatus— The status of the cluster subnet group. Possible values are Complete, Incomplete and Invalid. • ClusterSubnetGroup:ClusterSubnetGroupName— The name of the cluster subnet group. • ClusterSubnetGroup:Description— The description of the cluster subnet group.
Examples Create a Cluster Subnet Group This example creates a new cluster subnet group.
PROMPT> 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" } }
delete-cluster Description Deletes a previously provisioned cluster. A successful response from the web service indicates that the request was received correctly. If a final cluster snapshot is requested the status of the cluster will be "final-snapshot" while the snapshot is being taken, then it's "deleting" once Amazon Redshift begins deleting the cluster. Use describe-clusters (p. 45) to monitor the status of the deletion. The delete operation
API Version 2012-12-01 33
Amazon Redshift Command Line Reference Syntax
cannot be canceled or reverted once submitted. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide.
Syntax delete-cluster --cluster-identifier value [--final-cluster-snapshot-identifier value] [--skip-final-cluster-snapshot] Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
The identifier of the cluster to be deleted.
Yes
Constraints: • Must contain lowercase characters. • Must contain from 1 to 63 alphanumeric characters or hyphens. • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens.
--final-cluster-snapshot-identifier The identifier of the final snapshot that is to be created immediately before deleting the cluster. If this parameter is provided, SkipFinalClusterSnapshot must be false.
No
Constraints: • Must be 1 to 255 alphanumeric characters. • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens.
--skip-final-cluster-snapshot Determines whether a final snapshot of the cluster No is created before Amazon Redshift deletes the cluster. If true, a final cluster snapshot is not created. If false, a final cluster snapshot is created before the cluster is deleted.
Note The FinalClusterSnapshotIdentifier parameter must be specified if SkipFinalClusterSnapshot is false. Default: false API Version 2012-12-01 34
Amazon Redshift Command Line Reference Output
Output The command returns the following information: • Cluster— Describes a cluster. • Cluster:PubliclyAccessible— If true, the cluster can be accessed from a public network. • Cluster:MasterUsername— The master user name for the cluster. This name is used to connect to the database that is specified in DBName. • Cluster:VpcSecurityGroups— A list of Virtual Private Cloud (VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC. • Cluster:VpcSecurityGroups:VpcSecurityGroup— Describes the members of a VPC security group. • Cluster:VpcSecurityGroups:VpcSecurityGroup:Status— • Cluster:VpcSecurityGroups:VpcSecurityGroup:VpcSecurityGroupId— • Cluster:ModifyStatus— The status of a modify operation, if any, initiated for the cluster. • Cluster:NumberOfNodes— The number of compute nodes in the cluster. • Cluster:PendingModifiedValues— If present, changes to the cluster are pending. Specific pending changes are identified by subelements. • Cluster:PendingModifiedValues:ClusterVersion— The pending or in-progress change of the service version. • Cluster:PendingModifiedValues:ClusterType— The pending or in-progress change of the cluster type. • Cluster:PendingModifiedValues:MasterUserPassword— The pending or in-progress change of the master credentials for the cluster. • Cluster:PendingModifiedValues:AutomatedSnapshotRetentionPeriod— The pending or in-progress change of the automated snapshot retention period. • Cluster:PendingModifiedValues:NodeType— The pending or in-progress change of the cluster's node type. • Cluster:PendingModifiedValues:NumberOfNodes— The pending or in-progress change of the number nodes in the cluster. • Cluster:VpcId— The identifier of the VPC the cluster is in, if the cluster is in a VPC. • Cluster:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Cluster:AutomatedSnapshotRetentionPeriod— The number of days that automatic cluster snapshots are retained. • Cluster:ClusterParameterGroups— The list of cluster parameter groups that are associated with this cluster. • Cluster:ClusterParameterGroups:ClusterParameterGroup— Describes the status of a parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterApplyStatus— The status of parameter updates. • Cluster:DBName— The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named "dev" was created by default. • Cluster:PreferredMaintenanceWindow— The weekly time range (in UTC) during which system maintenance can occur. • Cluster:Endpoint— The connection endpoint. • Cluster:Endpoint:Port— The port that the database engine is listening on. • Cluster:Endpoint:Address— The DNS address of the Cluster.
API Version 2012-12-01 35
Amazon Redshift Command Line Reference Examples
• Cluster:AllowVersionUpgrade— If true, version upgrades will be applied automatically to the cluster during the maintenance window. • Cluster:ClusterCreateTime— The date and time that the cluster was created. • Cluster:ClusterSubnetGroupName— The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC. • Cluster:ClusterSecurityGroups— A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster security groups are used when the cluster is not created in a VPC. Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:Status— The status of the cluster security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group. • Cluster:ClusterIdentifier— The unique identifier of the cluster. • Cluster:AvailabilityZone— The name of the Availability Zone in which the cluster is located. • Cluster:NodeType— The node type for the nodes in the cluster. • Cluster:Encrypted— If true, data in cluster is encrypted at rest. • Cluster:ClusterStatus— The current state of this cluster. Possible values include available, creating, deleting, rebooting, and resizing.
Examples Delete a Cluster with No Final Cluster Snapshot This example deletes a cluster, forcing data deletion so no final cluster snapshot is created. PROMPT> aws redshift delete-cluster --cluster-identifier mycluster --skip-finalcluster-snapshot
Delete a Cluster, Allowing a Final Cluster Snapshot This example deletes a cluster, but specifies a final cluster snapshot.
PROMPT> aws redshift delete-cluster --cluster-identifier mycluster --finalcluster-snapshot-identifier myfinalsnapshot
delete-cluster-parameter-group Description Deletes a specified Amazon Redshift parameter group.
Note You cannot delete a parameter group if it is associated with a cluster.
API Version 2012-12-01 36
Amazon Redshift Command Line Reference Syntax
Syntax delete-cluster-parameter-group --parameter-group-name value Common Options (p. 8)
Options Name
Description
Required
--parameter-group-name
The name of the parameter group to be deleted.
Yes
Constraints: • Must be the name of an existing cluster parameter group. • Cannot delete a default cluster parameter group.
Output The command returns the following information:
Examples Delete a Cluster Parameter Group This example deletes a cluster parameter group.
PROMPT> aws redshift delete-cluster-parameter-group --parameter-group-name myc lusterparametergroup
delete-cluster-security-group Description Deletes an Amazon Redshift security group.
Note You cannot delete a security group that is associated with any clusters. You cannot delete the default security group. For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Management Guide.
API Version 2012-12-01 37
Amazon Redshift Command Line Reference Syntax
Syntax delete-cluster-security-group --cluster-security-group-name value Common Options (p. 8)
Options Name
Description
--cluster-security-group-name The name of the cluster security group to be deleted.
Required Yes
Output The command returns the following information:
Examples Delete a Cluster Security Group This example deletes a cluster security group.
PROMPT> aws redshift delete-cluster-security-group --cluster-security-groupname mysecuritygroup
delete-cluster-snapshot Description Deletes the specified manual snapshot. The snapshot must be in the "available" state. Unlike automated snapshots, manual snapshots are retained even after you delete your cluster. Amazon Redshift does not delete your manual snapshots. You must delete manual snapshot explicitly to avoid getting charged.
Syntax delete-cluster-snapshot --snapshot-identifier value Common Options (p. 8)
API Version 2012-12-01 38
Amazon Redshift Command Line Reference Options
Options Name
Description
Required
--snapshot-identifier
The unique identifier of the manual snapshot to be Yes deleted. Constraints: Must be the name of an existing snapshot that is in the available state.
Output The command returns the following information: • Snapshot— Describes a snapshot. • Snapshot:Status— The snapshot status. The value of the status depends on the API operation used. • create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) returns status as "creating". • describe-cluster-snapshots (p. 51) returns status as "creating", "available", or "failed". • delete-cluster-snapshot (p. 38) returns status as "deleted". • Snapshot:SnapshotCreateTime— The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time. • Snapshot:AvailabilityZone— The Availability Zone in which the cluster was created. • Snapshot:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Snapshot:MasterUsername— The master user name for the cluster. • Snapshot:Encrypted— If true, the data in the snapshot is encrypted at rest. • Snapshot:DBName— The name of the database that was created when the cluster was created. • Snapshot:VpcId— The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output. • Snapshot:ClusterCreateTime— The time (UTC) when the cluster was originally created. • Snapshot:SnapshotType— The snapshot type. Snapshots created using create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) will be of type "manual". • Snapshot:NodeType— The node type of the nodes in the cluster. • Snapshot:ClusterIdentifier— The identifier of the cluster for which the snapshot was taken. • Snapshot:Port— The port that the cluster is listening on. • Snapshot:NumberOfNodes— The number of nodes in the cluster. • Snapshot:SnapshotIdentifier— The snapshot identifier that is provided in the request.
Examples Delete a Cluster Snapshot This example deletes a cluster snapshot.
PROMPT> aws redshift delete-cluster-snapshot --snapshot-identifier my-snapshotid
API Version 2012-12-01 39
Amazon Redshift Command Line Reference delete-cluster-subnet-group
delete-cluster-subnet-group Description Deletes the specified cluster subnet group.
Syntax delete-cluster-subnet-group --cluster-subnet-group-name value Common Options (p. 8)
Options Name
Description
Required
--cluster-subnet-group-name
The name of the cluster subnet group name to be Yes deleted.
Output The command returns the following information:
Examples Delete a Cluster subnet Group This example deletes a cluster subnet group.
PROMPT> aws redshift delete-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup { "ResponseMetadata": { "RequestId": "253fbffd-6993-11e2-bc3a-47431073908a" } }
describe-cluster-parameter-groups Description Returns a list of Amazon Redshift parameter groups, including parameter groups you created and the default parameter group. For each parameter group, the response includes the parameter group name,
API Version 2012-12-01 40
Amazon Redshift Command Line Reference Syntax
description, and parameter group family name.You can optionally specify a name to retrieve the description of a specific parameter group. For more information about managing parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Management Guide.
Syntax describe-cluster-parameter-groups [--marker value] [--max-records value] [--parameter-group-name value] Common Options (p. 8)
Options Name
Description
Required
--marker
An optional marker returned by a previous No describe-cluster-parameter-groups (p. 40) request to indicate the first parameter group that the current request will return.
--max-records
The maximum number of parameter group records No to include in the response. If more records exist than the specified MaxRecords value, the response includes a marker that you can use in a subsequent describe-cluster-parameter-groups (p. 40) request to retrieve the next set of records. Default: 100 Constraints: Value must be at least 20 and no more than 100.
--parameter-group-name
The name of a specific parameter group for which No to return details. By default, details about all parameter groups and the default parameter group are returned.
Output The command returns the following information: • Marker— A marker at which to continue listing cluster parameter groups in a new request. The response returns a marker if there are more parameter groups to list than returned in the response. • ParameterGroups— A list of ClusterParameterGroup instances. Each instance describes one cluster parameter group. • ParameterGroups:ClusterParameterGroup— Describes a parameter group. • ParameterGroups:ClusterParameterGroup:ParameterGroupFamily— The name of the cluster parameter group family that this cluster parameter group is compatible with.
API Version 2012-12-01 41
Amazon Redshift Command Line Reference Examples
• ParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • ParameterGroups:ClusterParameterGroup:Description— The description of the parameter group.
Examples Get a Description of All Cluster Parameter Groups This example returns a description of all cluster parameter groups for the account, with column headers. By default, the output is in JSON format.
PROMPT> 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" } }
You can also obtain the same information in text format using the --output text option.
PROMPT> aws redshift describe-cluster-parameter-groups --output text
redshift-1.0 My first cluster parameter group myclusterparametergroup RESPONSEMETADATA 9e665a36-64cc-11e2-8f7d-3b939af52818
describe-cluster-parameters Description Returns a detailed list of parameters contained within the specified Amazon Redshift parameter group. For each parameter the response includes information such as parameter name, description, data type, value, whether the parameter value is modifiable, and so on. You can specify source filter to retrieve parameters of only specific type. For example, to retrieve parameters that were modified by a user action such as from modify-cluster-parameter-group (p. 79), you can specify source equal to user. For more information about managing parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Management Guide.
API Version 2012-12-01 42
Amazon Redshift Command Line Reference Syntax
Syntax describe-cluster-parameters --parameter-group-name value [--marker value] [--source value] [--max-records value] Common Options (p. 8)
Options Name
Description
Required
--parameter-group-name
The name of a cluster parameter group for which to return details.
Yes
--marker
An optional marker returned from a previous No describe-cluster-parameters request. If this parameter is specified, the response includes only records beyond the specified marker, up to the value specified by MaxRecords.
--max-records
The maximum number of records to include in the No response. If more records exist than the specified MaxRecords value, response includes a marker that you can specify in your subsequent request to retrieve remaining result. Default: 100 Constraints: Value must be at least 20 and no more than 100.
--source
The parameter types to return. Specify user to No show parameters that are different form the default. Similarly, specify engine-default to show parameters that are the same as the default parameter group. Default: All parameter types returned. Valid Values: user | engine-default
Output The command returns the following information: • Marker— A marker that indicates the first parameter group that a subsequent describe-cluster-parameter-groups (p. 40) request will return. The response returns a marker only if there are more parameter groups details to list than the current response can return.
API Version 2012-12-01 43
Amazon Redshift Command Line Reference Examples
• Parameters— A list of Parameter instances. Each instance lists the parameters of one cluster parameter group. • Parameters:Parameter— Describes a parameter in a cluster parameter group. • Parameters:Parameter:Description— A description of the parameter. • Parameters:Parameter:DataType— The data type of the parameter. • Parameters:Parameter:IsModifiable— If true, the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed. • Parameters:Parameter:AllowedValues— The valid range of values for the parameter. • Parameters:Parameter:Source— The source of the parameter value, such as "engine-default" or "user". • Parameters:Parameter:ParameterValue— The value of the parameter. • Parameters:Parameter:ParameterName— The name of the parameter. • Parameters:Parameter:MinimumEngineVersion— The earliest engine version to which the parameter can apply.
Examples Retrieve the Parameters for a Specified Cluster Parameter Group This example retrieves the parameters for the named parameter group. By default, the output is in JSON format.
PROMPT> aws redshift describe-cluster-parameters --parameter-group-name mycluster parametergroup { "ResponseMetadata": { "RequestId": "c2ae881a-64cc-11e2-9e70-918437dd236d" }, "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 floatingpoint values", "DataType": "integer", "IsModifiable": true, "AllowedValues": "-15-2", "Source": "engine-default", "ParameterValue": "0", "ParameterName": "extra_float_digits" },
API Version 2012-12-01 44
Amazon Redshift Command Line Reference describe-clusters
(...remaining output omitted...)
You can also obtain the same information in text format using the --output text option.
PROMPT> aws redshift describe-cluster-parameters --parameter-group-name mycluster parametergroup --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 -152 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. in teger True engine-default 0 statement_timeout wlm json configuration string True engine-default [{"query_concurrency":5}] wlm_json_configuration
describe-clusters Description Returns properties of provisioned clusters including general cluster properties, cluster database properties, maintenance and backup properties, and security and access properties. This operation supports pagination. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide.
Syntax describe-clusters [--marker value] [--cluster-identifier value] [--max-records value] Common Options (p. 8)
API Version 2012-12-01 45
Amazon Redshift Command Line Reference Options
Options Name
Description
Required
--cluster-identifier
The unique identifier of a cluster whose properties No you are requesting. This parameter isn't case sensitive. The default is that all clusters defined for an account are returned.
--marker
An optional marker returned by a previous No describe-clusters request to indicate the first cluster that the current describe-clusters request will return. You can specify either a Marker parameter or a ClusterIdentifier parameter in a describe-clusters request, but not both.
--max-records
The maximum number of records that the response No can include. If more records exist than the specified MaxRecords value, a marker is included in the response that can be used in a new describe-clusters request to continue listing results. Default: 100 Constraints: Value must be at least 20 and no more than 100.
Output The command returns the following information: • Marker— A marker at which to continue listing clusters in a new request. A marker is returned if there are more clusters to list than were returned in the response. • Clusters— A list of Cluster objects, where each object describes one cluster. • Clusters:Cluster— Describes a cluster. • Clusters:Cluster:PubliclyAccessible— If true, the cluster can be accessed from a public network. • Clusters:Cluster:MasterUsername— The master user name for the cluster. This name is used to connect to the database that is specified in DBName. • Clusters:Cluster:VpcSecurityGroups— A list of Virtual Private Cloud (VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC. • Clusters:Cluster:VpcSecurityGroups:VpcSecurityGroup— Describes the members of a VPC security group. • Clusters:Cluster:VpcSecurityGroups:VpcSecurityGroup:Status— • Clusters:Cluster:VpcSecurityGroups:VpcSecurityGroup:VpcSecurityGroupId— • Clusters:Cluster:ModifyStatus— The status of a modify operation, if any, initiated for the cluster. • Clusters:Cluster:NumberOfNodes— The number of compute nodes in the cluster. • Clusters:Cluster:PendingModifiedValues— If present, changes to the cluster are pending. Specific pending changes are identified by subelements.
API Version 2012-12-01 46
Amazon Redshift Command Line Reference Output
• Clusters:Cluster:PendingModifiedValues:ClusterVersion— The pending or in-progress change of the service version. • Clusters:Cluster:PendingModifiedValues:ClusterType— The pending or in-progress change of the cluster type. • Clusters:Cluster:PendingModifiedValues:MasterUserPassword— The pending or in-progress change of the master credentials for the cluster. • Clusters:Cluster:PendingModifiedValues:AutomatedSnapshotRetentionPeriod— The pending or in-progress change of the automated snapshot retention period. • Clusters:Cluster:PendingModifiedValues:NodeType— The pending or in-progress change of the cluster's node type. • Clusters:Cluster:PendingModifiedValues:NumberOfNodes— The pending or in-progress change of the number nodes in the cluster. • Clusters:Cluster:VpcId— The identifier of the VPC the cluster is in, if the cluster is in a VPC. • Clusters:Cluster:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Clusters:Cluster:AutomatedSnapshotRetentionPeriod— The number of days that automatic cluster snapshots are retained. • Clusters:Cluster:ClusterParameterGroups— The list of cluster parameter groups that are associated with this cluster. • Clusters:Cluster:ClusterParameterGroups:ClusterParameterGroup— Describes the status of a parameter group. • Clusters:Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • Clusters:Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterApplyStatus— The status of parameter updates. • Clusters:Cluster:DBName— The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named "dev" was created by default. • Clusters:Cluster:PreferredMaintenanceWindow— The weekly time range (in UTC) during which system maintenance can occur. • Clusters:Cluster:Endpoint— The connection endpoint. • Clusters:Cluster:Endpoint:Port— The port that the database engine is listening on. • Clusters:Cluster:Endpoint:Address— The DNS address of the Cluster. • Clusters:Cluster:AllowVersionUpgrade— If true, version upgrades will be applied automatically to the cluster during the maintenance window. • Clusters:Cluster:ClusterCreateTime— The date and time that the cluster was created. • Clusters:Cluster:ClusterSubnetGroupName— The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC. • Clusters:Cluster:ClusterSecurityGroups— A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster security groups are used when the cluster is not created in a VPC. Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter. • Clusters:Cluster:ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • Clusters:Cluster:ClusterSecurityGroups:ClusterSecurityGroup:Status— The status of the cluster security group. • Clusters:Cluster:ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group. • Clusters:Cluster:ClusterIdentifier— The unique identifier of the cluster. • Clusters:Cluster:AvailabilityZone— The name of the Availability Zone in which the cluster is located. • Clusters:Cluster:NodeType— The node type for the nodes in the cluster. API Version 2012-12-01 47
Amazon Redshift Command Line Reference Examples
• Clusters:Cluster:Encrypted— If true, data in cluster is encrypted at rest. • Clusters:Cluster:ClusterStatus— The current state of this cluster. Possible values include available, creating, deleting, rebooting, and resizing.
Examples Get a Description of All Clusters This example returns a description of all clusters for the account. By default, the output is in JSON format.
PROMPT> aws redshift describe-clusters { "Clusters": [ { "NodeType": "dw.hs1.xlarge", "Endpoint": { "Port": 5439, "Address": "mycluster.coqoarplqhsn.us-east-1.redshift.amazon aws.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" } }
API Version 2012-12-01 48
Amazon Redshift Command Line Reference describe-cluster-security-groups
You can also obtain the same information in text format using the --output text option.
PROMPT> 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
describe-cluster-security-groups Description Returns information about Amazon Redshift security groups. If the name of a security group is specified, the response will contain only information about only that security group. For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Management Guide.
Syntax describe-cluster-security-groups [--marker value] [--max-records value] [--cluster-security-group-name value] Common Options (p. 8)
Options Name
Description
Required
--cluster-security-group-name The name of a cluster security group for which you No are requesting details. You can specify either the Marker parameter or a ClusterSecurityGroupName parameter, but not both.
Example: securitygroup1
API Version 2012-12-01 49
Amazon Redshift Command Line Reference Output
Name
Description
Required
--marker
An optional marker returned by a previous No describe-cluster-security-groups (p. 49) request to indicate the first security group that the current request will return. You can specify either the Marker parameter or a ClusterSecurityGroupName parameter, but not both.
--max-records
The maximum number of records to be included in No the response. If more records exist than the specified MaxRecords value, a marker is included in the response, which you can use in a subsequent describe-cluster-security-groups (p. 49) request. Default: 100 Constraints: Value must be at least 20 and no more than 100.
Output The command returns the following information: • Marker— A marker at which to continue listing cluster security groups in a new request. The response returns a marker if there are more security groups to list than could be returned in the response. • ClusterSecurityGroups— A list of ClusterSecurityGroup instances. • ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • ClusterSecurityGroups:ClusterSecurityGroup:IPRanges— A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroups:ClusterSecurityGroup:IPRanges:IPRange— Describes an IP range used in a security group. • ClusterSecurityGroups:ClusterSecurityGroup:IPRanges:IPRange:Status— The status of the IP range, for example, "authorized". • ClusterSecurityGroups:ClusterSecurityGroup:IPRanges:IPRange:CIDRIP— The IP range in Classless Inter-Domain Routing (CIDR) notation. • ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group to which the operation was applied. • ClusterSecurityGroups:ClusterSecurityGroup:Description— A description of the security group. • ClusterSecurityGroups:ClusterSecurityGroup:EC2SecurityGroups— A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroups:ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup— Describes an Amazon EC2 security group. • ClusterSecurityGroups:ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:Status— The status of the EC2 security group. • ClusterSecurityGroups:ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupName— The name of the EC2 Security Group. • ClusterSecurityGroups:ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupOwnerId— The AWS ID of the owner of the EC2 security group specified in the EC2SecurityGroupName field.
API Version 2012-12-01 50
Amazon Redshift Command Line Reference Examples
Examples Get a Description of All Cluster Security Groups This example returns a description of all cluster security groups for the account. By default, the output is in JSON format.
PROMPT> 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...)
describe-cluster-snapshots Description Returns one or more snapshot objects, which contain metadata about your cluster snapshots. By default, this operation returns information about all snapshots of all clusters that are owned by the AWS account.
Syntax describe-cluster-snapshots [--marker value] [--max-records value] [--start-time value] [--snapshot-type value] [--cluster-identifier value]
API Version 2012-12-01 51
Amazon Redshift Command Line Reference Options
[--end-time value] [--snapshot-identifier value] Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
The identifier of the cluster for which information about snapshots is requested.
No
--end-time
A time value that requests only snapshots created No at or before the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page. Example: 2012-07-16T18:00:00Z
--marker
An optional marker returned by a previous describe-cluster-snapshots (p. 51) request to indicate the first snapshot that the request will return.
No
--max-records
The maximum number of snapshot records to No include in the response. If more records exist than the specified MaxRecords value, the response returns a marker that you can use in a subsequent describe-cluster-snapshots (p. 51) request in order to retrieve the next set of snapshot records. Default: 100 Constraints: Must be at least 20 and no more than 100.
--snapshot-identifier
The snapshot identifier of the snapshot about which No to return information.
--snapshot-type
The type of snapshots for which you are requesting No information. By default, snapshots of all types are returned. Valid Values: automated | manual
--start-time
A value that requests only snapshots created at or No after the specified time. The time value is specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page. Example: 2012-07-16T18:00:00Z
Output The command returns the following information:
API Version 2012-12-01 52
Amazon Redshift Command Line Reference Examples
• Marker— A marker that indicates the first snapshot that a subsequent describe-cluster-snapshots (p. 51) request will return. The response returns a marker only if there are more snapshots to list than the current response can return. • Snapshots— A list of Snapshot instances. • Snapshots:Snapshot— Describes a snapshot. • Snapshots:Snapshot:Status— The snapshot status. The value of the status depends on the API operation used. • create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) returns status as "creating". • describe-cluster-snapshots (p. 51) returns status as "creating", "available", or "failed". • delete-cluster-snapshot (p. 38) returns status as "deleted". • Snapshots:Snapshot:SnapshotCreateTime— The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time. • Snapshots:Snapshot:AvailabilityZone— The Availability Zone in which the cluster was created. • Snapshots:Snapshot:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Snapshots:Snapshot:MasterUsername— The master user name for the cluster. • Snapshots:Snapshot:Encrypted— If true, the data in the snapshot is encrypted at rest. • Snapshots:Snapshot:DBName— The name of the database that was created when the cluster was created. • Snapshots:Snapshot:VpcId— The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output. • Snapshots:Snapshot:ClusterCreateTime— The time (UTC) when the cluster was originally created. • Snapshots:Snapshot:SnapshotType— The snapshot type. Snapshots created using create-cluster-snapshot (p. 30) and copy-cluster-snapshot (p. 23) will be of type "manual". • Snapshots:Snapshot:NodeType— The node type of the nodes in the cluster. • Snapshots:Snapshot:ClusterIdentifier— The identifier of the cluster for which the snapshot was taken. • Snapshots:Snapshot:Port— The port that the cluster is listening on. • Snapshots:Snapshot:NumberOfNodes— The number of nodes in the cluster. • Snapshots:Snapshot:SnapshotIdentifier— The snapshot identifier that is provided in the request.
Examples Get a Description of All Cluster Snapshots This example returns a description of all cluster snapshots for the account. By default, the output is in JSON format.
PROMPT> aws redshift describe-cluster-snapshots { "ResponseMetadata": { "RequestId": "2589561f-64e2-11e2-9e70-918437dd236d" }, "Snapshots": [ { "Status": "available", "SnapshotCreateTime": "2013-01-22T22:04:18.947Z", "AvailabilityZone": "us-east-1a",
API Version 2012-12-01 53
Amazon Redshift Command Line Reference Examples
"ClusterVersion": "1.0", "MasterUsername": "adminuser", "DBName": "dev", "ClusterCreateTime": "2013-01-22T21:59:29.559Z", "SnapshotType": "automated", "NodeType": "dw.hs1.xlarge", "ClusterIdentifier": "mycluster", "Port": 5439, "NumberOfNodes": "2", "SnapshotIdentifier": "cm:mycluster-2013-01-22-22-04-18" }, { "Status": "creating", "SnapshotCreateTime": "2013-01-22T22:20:57.910Z", "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" } ] } (...remaining output omitted...)
You can also obtain the same information in text format using the --output text option.
PROMPT> aws redshift describe-cluster-snapshots --output-text
RESPONSEMETADATA be5c1ba5-64e2-11e2-9e70-918437dd236d available 2013-01-22T22:04:18.947Z us-east-1a 1.0 adminuser dev 2013-0122T21:59:29.559Z automated dw.hs1.xlarge mycluster 5439 2 cm:mycluster-2013-0122-22-04-18 available 2013-01-22T22:20:57.910Z us-east-1a 1.0 adminuser dev 2013-0122T21:59:29.559Z manual dw.hs1.xlarge mycluster 5439 2 my-snapshot-id (...remaining output omitted...)
API Version 2012-12-01 54
Amazon Redshift Command Line Reference describe-cluster-subnet-groups
describe-cluster-subnet-groups Description Returns one or more cluster subnet group objects, which contain metadata about your cluster subnet groups. By default, this operation returns information about all cluster subnet groups that are defined in you AWS account.
Syntax describe-cluster-subnet-groups [--marker value] [--max-records value] [--cluster-subnet-group-name value] Common Options (p. 8)
Options Name
Description
Required
--cluster-subnet-group-name
The name of the cluster subnet group for which information is requested.
No
--marker
An optional marker returned by a previous describe-cluster-subnet-groups (p. 55) request to indicate the first cluster subnet group that the current request will return.
No
--max-records
The maximum number of cluster subnet group No records to include in the response. If more records exist than the specified MaxRecords value, the response returns a marker that you can use in a subsequent describe-cluster-subnet-groups (p. 55) request in order to retrieve the next set of cluster subnet group records. Default: 100 Constraints: Must be at least 20 and no more than 100.
Output The command returns the following information: • Marker— A marker at which to continue listing cluster subnet groups in a new request. A marker is returned if there are more cluster subnet groups to list than were returned in the response. • ClusterSubnetGroups— A list of ClusterSubnetGroup instances. • ClusterSubnetGroups:ClusterSubnetGroup— Describes a subnet group.
API Version 2012-12-01 55
Amazon Redshift Command Line Reference Examples
• ClusterSubnetGroups:ClusterSubnetGroup:Subnets— A list of the VPC Subnet elements. • ClusterSubnetGroups:ClusterSubnetGroup:Subnets:Subnet— Describes a subnet. • ClusterSubnetGroups:ClusterSubnetGroup:Subnets:Subnet:SubnetStatus— The status of the subnet. • ClusterSubnetGroups:ClusterSubnetGroup:Subnets:Subnet:SubnetIdentifier— The identifier of the subnet. • ClusterSubnetGroups:ClusterSubnetGroup:Subnets:Subnet:SubnetAvailabilityZone— • ClusterSubnetGroups:ClusterSubnetGroup:Subnets:Subnet:SubnetAvailabilityZone:Name— The name of the availability zone. • ClusterSubnetGroups:ClusterSubnetGroup:VpcId— The VPC ID of the cluster subnet group. • ClusterSubnetGroups:ClusterSubnetGroup:SubnetGroupStatus— The status of the cluster subnet group. Possible values are Complete, Incomplete and Invalid. • ClusterSubnetGroups:ClusterSubnetGroup:ClusterSubnetGroupName— The name of the cluster subnet group. • ClusterSubnetGroups:ClusterSubnetGroup:Description— The description of the cluster subnet group.
Examples Get a Description of All Cluster Subnet Groups This example returns a description of all cluster subnet groups. By default, the output is in JSON format.
PROMPT> 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 Version 2012-12-01 56
Amazon Redshift Command Line Reference describe-cluster-versions
describe-cluster-versions Description Returns descriptions of the available Amazon Redshift cluster versions. You can call this operation even before creating any clusters to learn more about the Amazon Redshift versions. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide
Syntax describe-cluster-versions [--marker value] [--max-records value] [--cluster-version value] [--cluster-parameter-group-family value] Common Options (p. 8)
Options Name
Description
--cluster-parameter-group-family The name of a specific cluster parameter group family to return details for.
Required No
Constraints: • Must be 1 to 255 alphanumeric characters • First character must be a letter • Cannot end with a hyphen or contain two consecutive hyphens
--cluster-version
The specific cluster version to return.
No
Example: 1.0 --marker
The marker returned from a previous request. If No this parameter is specified, the response includes records beyond the marker only, up to MaxRecords.
--max-records
The maximum number of records to include in the No response. If more than the MaxRecords value is available, a marker is included in the response so that the following results can be retrieved. Default: 100 Constraints: Value must be at least 20 and no more than 100.
API Version 2012-12-01 57
Amazon Redshift Command Line Reference Output
Output The command returns the following information: • Marker— The identifier returned to allow retrieval of paginated results. • ClusterVersions— A list of Version elements. • ClusterVersions:ClusterVersion— Describes a cluster version, including the parameter group family and description of the version. • ClusterVersions:ClusterVersion:ClusterVersion— The version number used by the cluster. • ClusterVersions:ClusterVersion:Description— The description of the cluster version. • ClusterVersions:ClusterVersion:ClusterParameterGroupFamily— The name of the cluster parameter group family for the cluster.
Examples Get a Description of All Cluster Versions This example returns a description of all cluster versions. By default, the output is in JSON format.
PROMPT> aws redshift describe-cluster-versions { "ClusterVersions": [ { "ClusterVersion": "1.0", "Description": "Initial release", "ClusterParameterGroupFamily": "redshift-1.0" } ], "ResponseMetadata": { "RequestId": "16a53de3-64cc-11e2-bec0-17624ad140dd" } }
describe-default-cluster-parameters Description Returns a list of parameter settings for the specified parameter group family. For more information about managing parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Management Guide.
Syntax describe-default-cluster-parameters --parameter-group-family value
API Version 2012-12-01 58
Amazon Redshift Command Line Reference Options
[--marker value] [--max-records value] Common Options (p. 8)
Options Name
Description
Required
--parameter-group-family
The name of the cluster parameter group family.
Yes
--marker
An optional marker returned from a previous No describe-default-cluster-parameters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
--max-records
The maximum number of records to include in the No response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: Value must be at least 20 and no more than 100.
Output The command returns the following information: • DefaultClusterParameters— Describes the default cluster parameters for a parameter group family. • DefaultClusterParameters:Marker— An identifier to allow retrieval of paginated results. • DefaultClusterParameters:ParameterGroupFamily— The name of the cluster parameter group family to which the engine default parameters apply. • DefaultClusterParameters:Parameters— The list of cluster default parameters. • DefaultClusterParameters:Parameters:Parameter— Describes a parameter in a cluster parameter group. • DefaultClusterParameters:Parameters:Parameter:Description— A description of the parameter. • DefaultClusterParameters:Parameters:Parameter:DataType— The data type of the parameter. • DefaultClusterParameters:Parameters:Parameter:IsModifiable— If true, the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed. • DefaultClusterParameters:Parameters:Parameter:AllowedValues— The valid range of values for the parameter. • DefaultClusterParameters:Parameters:Parameter:Source— The source of the parameter value, such as "engine-default" or "user". • DefaultClusterParameters:Parameters:Parameter:ParameterValue— The value of the parameter. • DefaultClusterParameters:Parameters:Parameter:ParameterName— The name of the parameter. • DefaultClusterParameters:Parameters:Parameter:MinimumEngineVersion— The earliest engine version to which the parameter can apply.
API Version 2012-12-01 59
Amazon Redshift Command Line Reference Examples
Examples Get a Description of Default Cluster Parameters This example returns a description of the default cluster parameters for the redshift-1.0 family. By default, the output is in JSON format.
PROMPT> aws redshift describe-default-cluster-parameters --parameter-groupfamily redshift-1.0 { "DefaultClusterParameters": { "ParameterGroupFamily": "redshift-1.0", "Parameters": [ { "Description": "Sets the display format for date and time val ues.", "DataType": "string", "IsModifiable": true, "Source": "engine-default", "ParameterValue": "ISO, MDY", "ParameterName": "datestyle" }, { "Description": "Sets the number of digits displayed for floatingpoint values", "DataType": "integer", "IsModifiable": true, "AllowedValues": "-15-2", "Source": "engine-default", "ParameterValue": "0", "ParameterName": "extra_float_digits" },
(...remaining output omitted...)
Tip To see a list of valid parameter group families, use the describe-cluster-parameter-groups command.
describe-events Description Returns events related to clusters, security groups, snapshots, and parameter groups for the past 14 days. Events specific to a particular cluster, security group, snapshot or parameter group can be obtained by providing the name as a parameter. By default, the past hour of events are returned.
API Version 2012-12-01 60
Amazon Redshift Command Line Reference Syntax
Syntax describe-events [--source-type value] [--marker value] [--max-records value] [--start-time value] [--duration value] [--source-identifier value] [--end-time value] Common Options (p. 8)
Options Name
Description
Required
--duration
The number of minutes prior to the time of the request for which to retrieve events. For example, if the request is sent at 18:00 and you specify a duration of 60, then only events which have occurred after 17:00 will be returned.
No
Default: 60 --end-time
The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.
No
Example: 2009-07-08T18:00Z --marker
An optional marker returned from a previous describe-events request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
--max-records
The maximum number of records to include in the No response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: Value must be at least 20 and no more than 100.
API Version 2012-12-01 61
No
Amazon Redshift Command Line Reference Output
Name
Description
Required
--source-identifier
The identifier of the event source for which events No will be returned. If this parameter is not specified, then all sources are included in the response. Constraints: If SourceIdentifier is supplied, SourceType must also be provided. • Specify a cluster identifier when SourceType is cluster. • Specify a cluster security group name when SourceType is cluster-security-group. • Specify a cluster parameter group name when SourceType is cluster-parameter-group. • Specify a cluster snapshot identifier when SourceType is cluster-snapshot.
--source-type
The event source to retrieve events for. If no value No is specified, all events are returned. Constraints: If SourceType is supplied, SourceIdentifier must also be provided. • Specify cluster when SourceIdentifier is a cluster identifier. • Specify cluster-security-group when SourceIdentifier is a cluster security group name. • Specify cluster-parameter-group when SourceIdentifier is a cluster parameter group name. • Specify cluster-snapshot when SourceIdentifier is a cluster snapshot identifier.
--start-time
The beginning of the time interval to retrieve events No for, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page. Example: 2009-07-08T18:00Z
Output The command returns the following information: • Marker— A marker at which to continue listing events in a new request. The response returns a marker if there are more events to list than returned in the response. • Events— A list of Event instances.
API Version 2012-12-01 62
Amazon Redshift Command Line Reference Examples
• Events:Event— Describes an event. • Events:Event:Date— The date and time of the event. • Events:Event:Message— The text of this event. • Events:Event:SourceIdentifier— The identifier for the source of the event. • Events:Event:SourceType— The source type for this event.
Examples Describe All Events This example returns all events. By default, the output is in JSON format.
PROMPT> 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" } }
You can also obtain the same information in text format using the --output text option.
PROMPT> aws redshift describe-events --output text 2013-01-22T19:17:03.640Z myclusterparametergroup Cluster parameter group myc lusterparametergroup has been created. cluster-parameter-group RESPONSEMETADATA 8e5fe765-64c9-11e2-bce3-e56f52c50e17
describe-orderable-cluster-options Description Returns a list of orderable cluster options. Before you create a new cluster you can use this operation to find what options are available, such as the EC2 Availability Zones (AZ) in the specific AWS region that you can specify, and the node types you can request. The node types differ by available storage, memory, CPU and price. With the cost involved you might want to obtain a list of cluster options in the specific region and specify values when creating a cluster. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide
API Version 2012-12-01 63
Amazon Redshift Command Line Reference Syntax
Syntax describe-orderable-cluster-options [--marker value] [--node-type value] [--max-records value] [--cluster-version value] Common Options (p. 8)
Options Name
Description
Required
--cluster-version
The version filter value. Specify this parameter to show only the available offerings matching the specified version.
No
Default: All versions. Constraints: Must be one of the version returned from describe-cluster-versions (p. 57). --marker
An optional marker returned from a previous No describe-orderable-cluster-options request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
--max-records
The maximum number of records to include in the No response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100.
--node-type
The node type filter value. Specify this parameter to show only the available offerings matching the specified node type.
No
Output The command returns the following information: • Marker— A marker that can be used to retrieve paginated results. • OrderableClusterOptions— An OrderableClusterOption structure containing information about orderable options for the Cluster. • OrderableClusterOptions:OrderableClusterOption— Describes an orderable cluster option.
API Version 2012-12-01 64
Amazon Redshift Command Line Reference Examples
• OrderableClusterOptions:OrderableClusterOption:NodeType— The node type for the orderable cluster. • OrderableClusterOptions:OrderableClusterOption:AvailabilityZones— A list of availability zones for the orderable cluster. • OrderableClusterOptions:OrderableClusterOption:AvailabilityZones:AvailabilityZone— Describes an availability zone. • OrderableClusterOptions:OrderableClusterOption:AvailabilityZones:AvailabilityZone:Name— The name of the availability zone. • OrderableClusterOptions:OrderableClusterOption:ClusterVersion— The version of the orderable cluster. • OrderableClusterOptions:OrderableClusterOption:ClusterType— The cluster type, for example multi-node.
Examples Describing All Orderable Cluster Options This example returns descriptions of all orderable cluster options. By default, the output is in JSON format.
PROMPT> 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",
API Version 2012-12-01 65
Amazon Redshift Command Line Reference describe-reserved-node-offerings
"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" } }
You can also obtain the same information in text format using the --output text option.
PROMPT> 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
describe-reserved-node-offerings Description Returns a list of the available reserved node offerings by Amazon Redshift with their descriptions including the node type, the fixed and recurring costs of reserving the node and duration the node will be reserved for you. These descriptions help you determine which reserve node offering you want to purchase. You
API Version 2012-12-01 66
Amazon Redshift Command Line Reference Syntax
then use the unique offering ID in you call to purchase-reserved-node-offering (p. 83) to reserve one or more nodes for your Amazon Redshift cluster. For more information about managing parameter groups, go to Purchasing Reserved Nodes in the Amazon Redshift Management Guide.
Syntax describe-reserved-node-offerings [--marker value] [--max-records value] [--reserved-node-offering-id value] Common Options (p. 8)
Options Name
Description
Required
--marker
An optional marker returned by a previous describe-reserved-node-offerings (p. 66) request to indicate the first offering that the request will return.
No
You can specify either a Marker parameter or a ClusterIdentifier parameter in a describe-clusters (p. 45) request, but not both. The maximum number of records to include in the No response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results may be retrieved.
--max-records
Default: 100 Constraints: minimum 20, maximum 100. --reserved-node-offering-id
The unique identifier for the offering.
No
Output The command returns the following information: • Marker— An optional marker returned by a previous describe-reserved-node-offerings (p. 66) request to indicate the first reserved node offering that the request will return. • ReservedNodeOfferings— A list of reserved node offerings. • ReservedNodeOfferings:ReservedNodeOffering— Describes a reserved node offering. • ReservedNodeOfferings:ReservedNodeOffering:OfferingType— The anticipated utilization of the reserved node, as defined in the reserved node offering. • ReservedNodeOfferings:ReservedNodeOffering:FixedPrice— The upfront fixed charge you will pay to purchase the specific reserved node offering.
API Version 2012-12-01 67
Amazon Redshift Command Line Reference Examples
• ReservedNodeOfferings:ReservedNodeOffering:NodeType— The node type offered by the reserved node offering. • ReservedNodeOfferings:ReservedNodeOffering:UsagePrice— The rate you are charged for each hour the cluster that is using the offering is running. • ReservedNodeOfferings:ReservedNodeOffering:RecurringCharges— The charge to your account regardless of whether you are creating any clusters using the node offering. Recurring charges are only in effect for heavy-utilization reserved nodes. • ReservedNodeOfferings:ReservedNodeOffering:RecurringCharges:RecurringCharge— Describes a recurring charge. • ReservedNodeOfferings:ReservedNodeOffering:RecurringCharges:RecurringCharge:RecurringChargeAmount— The amount charged per the period of time specified by the recurring charge frequency. • ReservedNodeOfferings:ReservedNodeOffering:RecurringCharges:RecurringCharge:RecurringChargeFrequency— The frequency at which the recurring charge amount is applied. • ReservedNodeOfferings:ReservedNodeOffering:Duration— The duration, in seconds, for which the offering will reserve the node. • ReservedNodeOfferings:ReservedNodeOffering:ReservedNodeOfferingId— The offering identifier. • ReservedNodeOfferings:ReservedNodeOffering:CurrencyCode— The currency code for the compute nodes offering.
Examples Describe Reserved Node Offerings This example shows all of the reserved node offerings that are available for purchase. PROMPT> 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" }
API Version 2012-12-01 68
Amazon Redshift Command Line Reference describe-reserved-nodes
], "Duration": 31536000, "ReservedNodeOfferingId": "e5a2ff3b-352d-4a9c-ad7d-373c4cab5dd2" }, ...remaining output omitted... ], "ResponseMetadata": { "RequestId": "8b1a1a43-75ff-11e2-9666-e142fe91ddd1" } }
If you want to purchase a reserved node offering, you can call purchase-reserved-node-offering using a valid ReservedNodeOfferingId.
describe-reserved-nodes Description Returns the descriptions of the reserved nodes.
Syntax describe-reserved-nodes [--marker value] [--reserved-node-id value] [--max-records value] Common Options (p. 8)
Options Name
Description
Required
--marker
An optional marker returned by a previous No describe-reserved-nodes (p. 69) request to indicate the first parameter group that the current request will return.
--max-records
The maximum number of records to include in the No response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100.
--reserved-node-id
Identifier for the node reservation.
API Version 2012-12-01 69
No
Amazon Redshift Command Line Reference Output
Output The command returns the following information: • Marker— A marker that can be used to retrieve paginated results. • ReservedNodes— The list of reserved nodes. • ReservedNodes:ReservedNode— Describes a reserved node. • ReservedNodes:ReservedNode:OfferingType— The anticipated utilization of the reserved node, as defined in the reserved node offering. • ReservedNodes:ReservedNode:FixedPrice— The fixed cost Amazon Redshift charged you for this reserved node. • ReservedNodes:ReservedNode:NodeType— The node type of the reserved node. • ReservedNodes:ReservedNode:NodeCount— The number of reserved compute nodes. • ReservedNodes:ReservedNode:UsagePrice— The hourly rate Amazon Redshift charge you for this reserved node. • ReservedNodes:ReservedNode:RecurringCharges— The recurring charges for the reserved node. • ReservedNodes:ReservedNode:RecurringCharges:RecurringCharge— Describes a recurring charge. • ReservedNodes:ReservedNode:RecurringCharges:RecurringCharge:RecurringChargeAmount— The amount charged per the period of time specified by the recurring charge frequency. • ReservedNodes:ReservedNode:RecurringCharges:RecurringCharge:RecurringChargeFrequency— The frequency at which the recurring charge amount is applied. • ReservedNodes:ReservedNode:ReservedNodeId— The unique identifier for the reservation. • ReservedNodes:ReservedNode:State— The state of the reserved Compute Node. Possible Values: • pending-payment-This reserved node has recently been purchased, and the sale has been approved, but payment has not yet been confirmed. • active-This reserved node is owned by the caller and is available for use. • payment-failed-Payment failed for the purchase attempt. • ReservedNodes:ReservedNode:StartTime— The time the reservation started. You purchase a reserved node offering for a duration. This is the start time of that duration. • ReservedNodes:ReservedNode:Duration— The duration of the node reservation in seconds. • ReservedNodes:ReservedNode:ReservedNodeOfferingId— The identifier for the reserved node offering. • ReservedNodes:ReservedNode:CurrencyCode— The currency code for the reserved cluster.
Examples Describe Reserved Nodes This example shows a reserved node offering that has been purchased. PROMPT> aws redshift describe-reserved-nodes { "ResponseMetadata": { "RequestId": "bc29ce2e-7600-11e2-9949-4b361e7420b7" }, "ReservedNodes": [ {
API Version 2012-12-01 70
Amazon Redshift Command Line Reference describe-resize
"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" } ] }
describe-resize Description Returns information about the last resize operation for the specified cluster. If no resize operation has ever been initiated for the specified cluster, a HTTP 404 error is returned. If a resize operation was initiated and completed, the status of the resize remains as SUCCEEDED until the next resize. A resize operation can be requested using modify-cluster (p. 72) and specifying a different number or type of nodes for the cluster.
Syntax describe-resize --cluster-identifier value Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
The unique identifier of a cluster whose resize progress you are requesting. This parameter isn't case-sensitive.
Yes
By default, resize operations for all clusters defined for an AWS account are returned.
API Version 2012-12-01 71
Amazon Redshift Command Line Reference Output
Output The command returns the following information: • Status— The status of the resize operation. Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED • ImportTablesCompleted— The names of tables that have been completely imported . Valid Values: List of table names. • ImportTablesCompleted:— • TargetClusterType— The cluster type after the resize is complete. Valid Values: multi-node | single-node • TargetNumberOfNodes— The number of nodes that the cluster will have after the resize is complete. • ImportTablesInProgress— The names of tables that are being currently imported. Valid Values: List of table names. • ImportTablesInProgress:— • ImportTablesNotStarted— The names of tables that have not been yet imported. Valid Values: List of table names • ImportTablesNotStarted:— • TargetNodeType— The node type that the cluster will have after the resize is complete.
Examples Describe Resize This example describes the latest resize of a cluster. The request was for 3 nodes of type dw.hs1.8xlarge. 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" }
modify-cluster Description Modifies the settings for a cluster. For example, you can add another security or parameter group, update the preferred maintenance window, or change the master user password. Resetting a cluster password or modifying the security groups associated with a cluster do not need a reboot. However, modifying parameter group requires a reboot for parameters to take effect. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide
API Version 2012-12-01 72
Amazon Redshift Command Line Reference Syntax
You can also change node type and the number of nodes to scale up or down the cluster. When resizing a cluster, you must specify both the number of nodes and the node type even if one of the parameters does not change. If you specify the same number of nodes and node type that are already configured for the cluster, an error is returned.
Syntax modify-cluster --cluster-identifier value [--node-type value] [--cluster-parameter-group-name value] [--cluster-type value] [--master-user-password value] [--vpc-security-group-ids value] [--allow-version-upgrade] [--preferred-maintenance-window value] [--automated-snapshot-retention-period value] [--cluster-security-groups value] [--number-of-nodes value] [--cluster-version value] Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
The unique identifier of the cluster to be modified. Yes Example: examplecluster
--allow-version-upgrade
If true, upgrades will be applied automatically to the cluster during the maintenance window. Default: false
API Version 2012-12-01 73
No
Amazon Redshift Command Line Reference Options
Name
Description
Required
--automated-snapshot-retention-period The number of days that automated snapshots are No retained. If the value is 0, automated snapshots are disabled. Even if automated snapshots are disabled, you can still create manual snapshots when you want with create-cluster-snapshot (p. 30).
If you decrease the automated snapshot retention period from its current value, existing automated snapshots which fall outside of the new retention period will be immediately deleted. Default: Uses existing setting. Constraints: Must be a value from 0 to 35. --cluster-parameter-group-name The name of the cluster parameter group to apply No to this cluster. This change is applied only after the cluster is rebooted. To reboot a cluster use reboot-cluster (p. 85).
Default: Uses existing setting. Constraints: The cluster parameter group must be in the same parameter group family that matches the cluster version. --cluster-security-groups
A list of cluster security groups to be authorized on No this cluster.This change is asynchronously applied as soon as possible. Security groups currently associated with the cluster and not in the list of groups to apply, will be revoked from the cluster. Constraints: • Must be 1 to 255 alphanumeric characters or hyphens • First character must be a letter • Cannot end with a hyphen or contain two consecutive hyphens
--cluster-type
The new cluster type. When you submit your cluster resize request, your existing cluster goes into a read-only mode. After Amazon Redshift provisions a new cluster based on your resize requirements, there will be outage for a period while the old cluster is deleted and your connection is switched to the new cluster. You can use describe-resize (p. 71) to track the progress of the resize request. Valid Values: multi-node | single-node
API Version 2012-12-01 74
No
Amazon Redshift Command Line Reference Options
Name
Description
Required
--cluster-version
The new version number of the Amazon Redshift engine to upgrade to.
No
For major version upgrades, if a non-default cluster parameter group is currently in use, a new cluster parameter group in the cluster parameter group family for the new version must be specified. The new cluster parameter group can be the default for that cluster parameter group family. For more information about managing parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Management Guide. Example: 1.0 --master-user-password
The new password for the cluster master user.This No change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response.
Note Operations never return the password, so this operation provides a way to regain access to the master user account for a cluster if the password is lost. Default: Uses existing setting. Constraints: • • • • •
Must be between 8 and 64 characters in length. Must contain at least one uppercase letter. Must contain at least one lowercase letter. Must contain one number. Can be any printable ASCII character (ASCII code 33 to 126) except ' (single quote), " (double quote), \, /, @, or space.
API Version 2012-12-01 75
Amazon Redshift Command Line Reference Options
Name
Description
Required
--node-type
The new node type of the cluster. If you specify a No new node type, you must also specify the number of nodes parameter also. When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use the describe-resize (p. 71) to track the progress of the resize request. Valid Values: dw.hs1.xlarge | dw.hs1.8xlarge
--number-of-nodes
The new number of nodes of the cluster. If you specify a new number of nodes, you must also specify the node type parameter also.
No
When you submit your request to resize a cluster, Amazon Redshift sets access permissions for the cluster to read-only. After Amazon Redshift provisions a new cluster according to your resize requirements, there will be a temporary outage while the old cluster is deleted and your connection is switched to the new cluster. When the new connection is complete, the original access permissions for the cluster are restored. You can use describe-resize (p. 71) to track the progress of the resize request. Valid Values: Integer greater than 0. --preferred-maintenance-window The weekly time range (in UTC) during which system maintenance can occur, if necessary. If system maintenance is necessary during the window, it may result in an outage.
This maintenance window change is made immediately. If the new maintenance window indicates the current time, there must be at least 120 minutes between the current time and end of the window in order to ensure that pending changes are applied. Default: Uses existing setting. Format: ddd:hh24:mi-ddd:hh24:mi, for example wed:07:30-wed:08:00. Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun Constraints: Must be at least 30 minutes.
API Version 2012-12-01 76
No
Amazon Redshift Command Line Reference Output
Name
Description
Required
--vpc-security-group-ids
A list of Virtual Private Cloud (VPC) security groups No to be associated with the cluster.
Output The command returns the following information: • Cluster— Describes a cluster. • Cluster:PubliclyAccessible— If true, the cluster can be accessed from a public network. • Cluster:MasterUsername— The master user name for the cluster. This name is used to connect to the database that is specified in DBName. • Cluster:VpcSecurityGroups— A list of Virtual Private Cloud (VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC. • Cluster:VpcSecurityGroups:VpcSecurityGroup— Describes the members of a VPC security group. • Cluster:VpcSecurityGroups:VpcSecurityGroup:Status— • Cluster:VpcSecurityGroups:VpcSecurityGroup:VpcSecurityGroupId— • Cluster:ModifyStatus— The status of a modify operation, if any, initiated for the cluster. • Cluster:NumberOfNodes— The number of compute nodes in the cluster. • Cluster:PendingModifiedValues— If present, changes to the cluster are pending. Specific pending changes are identified by subelements. • Cluster:PendingModifiedValues:ClusterVersion— The pending or in-progress change of the service version. • Cluster:PendingModifiedValues:ClusterType— The pending or in-progress change of the cluster type. • Cluster:PendingModifiedValues:MasterUserPassword— The pending or in-progress change of the master credentials for the cluster. • Cluster:PendingModifiedValues:AutomatedSnapshotRetentionPeriod— The pending or in-progress change of the automated snapshot retention period. • Cluster:PendingModifiedValues:NodeType— The pending or in-progress change of the cluster's node type. • Cluster:PendingModifiedValues:NumberOfNodes— The pending or in-progress change of the number nodes in the cluster. • Cluster:VpcId— The identifier of the VPC the cluster is in, if the cluster is in a VPC. • Cluster:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Cluster:AutomatedSnapshotRetentionPeriod— The number of days that automatic cluster snapshots are retained. • Cluster:ClusterParameterGroups— The list of cluster parameter groups that are associated with this cluster. • Cluster:ClusterParameterGroups:ClusterParameterGroup— Describes the status of a parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterApplyStatus— The status of parameter updates. • Cluster:DBName— The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named "dev" was created by default.
API Version 2012-12-01 77
Amazon Redshift Command Line Reference Examples
• Cluster:PreferredMaintenanceWindow— The weekly time range (in UTC) during which system maintenance can occur. • Cluster:Endpoint— The connection endpoint. • Cluster:Endpoint:Port— The port that the database engine is listening on. • Cluster:Endpoint:Address— The DNS address of the Cluster. • Cluster:AllowVersionUpgrade— If true, version upgrades will be applied automatically to the cluster during the maintenance window. • Cluster:ClusterCreateTime— The date and time that the cluster was created. • Cluster:ClusterSubnetGroupName— The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC. • Cluster:ClusterSecurityGroups— A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster security groups are used when the cluster is not created in a VPC. Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:Status— The status of the cluster security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group. • Cluster:ClusterIdentifier— The unique identifier of the cluster. • Cluster:AvailabilityZone— The name of the Availability Zone in which the cluster is located. • Cluster:NodeType— The node type for the nodes in the cluster. • Cluster:Encrypted— If true, data in cluster is encrypted at rest. • Cluster:ClusterStatus— The current state of this cluster. Possible values include available, creating, deleting, rebooting, and resizing.
Examples Associate a Security Group with a Cluster This example shows how to associate a cluster security group with the specified cluster.
PROMPT> aws redshift modify-cluster --cluster-identifier mycluster --clustersecurity-groups mysecuritygroup
Modify the Maintenance Window for a Cluster This shows how to change the weekly preferred maintenance window for a cluster to be the minimum four hour window starting Sundays at 11:15 PM, and ending Mondays at 3:15 AM.
PROMPT> aws redshift modify-cluster --cluster-identifier mycluster --preferredmaintenance-window Sun:23:15-Mon:03:15
API Version 2012-12-01 78
Amazon Redshift Command Line Reference modify-cluster-parameter-group
Change the Master Password for the Cluster This example shows how to change the master password for a cluster.
PROMPT> aws redshift modify-cluster --cluster-identifier mycluster --masteruser-password A1b2c3d4
modify-cluster-parameter-group Description Modifies the parameters of a parameter group. For more information about managing parameter groups, go to Amazon Redshift Parameter Groups in the Amazon Redshift Management Guide.
Syntax modify-cluster-parameter-group --parameter-group-name value --parameters value Common Options (p. 8)
Options Name
Description
Required
--parameter-group-name
The name of the parameter group to be modified.
Yes
API Version 2012-12-01 79
Amazon Redshift Command Line Reference Output
Name
Description
Required
--parameters
An array of parameters to be modified. A maximum Yes of 20 parameters can be modified in a single request. For each parameter to be modified, you must supply at least the parameter name and parameter value; other name-value pairs of the parameter are optional. Describes a parameter in a cluster parameter group. description (string) A description of the parameter. data_type (string) The data type of the parameter. is_modifiable (boolean) If true, the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed. allowed_values (string) The valid range of values for the parameter. source (string) The source of the parameter value, such as "engine-default" or "user". parameter_value (string) The value of the parameter. parameter_name (string) The name of the parameter. minimum_engine_version (string) The earliest engine version to which the parameter can apply.
Output The command returns the following information: • ParameterGroupStatus— The status of the parameter group. For example, if you made a change to a parameter group name-value pair, then the change could be pending a reboot of an associated cluster. • ParameterGroupName— The name of the cluster parameter group.
Examples Modify a Parameter in a Parameter Group This example shows how to modify the wlm_json_configuration parameter for workload management.
API Version 2012-12-01 80
Amazon Redshift Command Line Reference modify-cluster-subnet-group
PROMPT> aws redshift modify-cluster-parameter-group --parameter-group-name myc lusterparametergroup --parameters '{"parameter_name":"wlm_json_configura tion","parameter_value":"[{\"user_group\":[\"ex ample_user_group1\"],\"query_group\":[\"example_query_group1\"],\"query_concur rency\":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" } }
modify-cluster-subnet-group Description Modifies a cluster subnet group to include the specified list of VPC subnets. The operation replaces the existing list of subnets with the new list of subnets.
Syntax modify-cluster-subnet-group --subnet-ids value --cluster-subnet-group-name value [--description value] Common Options (p. 8)
Options Name
Description
Required
--cluster-subnet-group-name
The name of the subnet group to be modified.
Yes
--subnet-ids
An array of VPC subnet IDs. A maximum of 20 subnets can be modified in a single request.
Yes
--description
A text description of the subnet group to be modified.
No
Output The command returns the following information:
API Version 2012-12-01 81
Amazon Redshift Command Line Reference Examples
• ClusterSubnetGroup— Describes a subnet group. • ClusterSubnetGroup:Subnets— A list of the VPC Subnet elements. • ClusterSubnetGroup:Subnets:Subnet— Describes a subnet. • ClusterSubnetGroup:Subnets:Subnet:SubnetStatus— The status of the subnet. • ClusterSubnetGroup:Subnets:Subnet:SubnetIdentifier— The identifier of the subnet. • ClusterSubnetGroup:Subnets:Subnet:SubnetAvailabilityZone— • ClusterSubnetGroup:Subnets:Subnet:SubnetAvailabilityZone:Name— The name of the availability zone. • ClusterSubnetGroup:VpcId— The VPC ID of the cluster subnet group. • ClusterSubnetGroup:SubnetGroupStatus— The status of the cluster subnet group. Possible values are Complete, Incomplete and Invalid. • ClusterSubnetGroup:ClusterSubnetGroupName— The name of the cluster subnet group. • ClusterSubnetGroup:Description— The description of the cluster subnet group.
Examples Modify the Subnets in a Cluster Subnet Group This example shows how to modify the list of subnets in a cache subnet group. By default, the output is in JSON format.
PROMPT> 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 Version 2012-12-01 82
Amazon Redshift Command Line Reference purchase-reserved-node-offering
purchase-reserved-node-offering Description Allows you to purchase reserved nodes. Amazon Redshift offers a predefined set of reserved node offerings.You can purchase one of the offerings.You can call the describe-reserved-node-offerings (p. 66) API to obtain the available reserved node offerings. You can call this API by providing a specific reserved node offering and the number of nodes you want to reserve. For more information about managing parameter groups, go to Purchasing Reserved Nodes in the Amazon Redshift Management Guide.
Syntax purchase-reserved-node-offering --reserved-node-offering-id value [--node-count value] Common Options (p. 8)
Options Name
Description
Required
--reserved-node-offering-id
The unique identifier of the reserved node offering Yes you want to purchase.
--node-count
The number of reserved nodes you want to purchase.
No
Default: 1
Output The command returns the following information: • ReservedNode— Describes a reserved node. • ReservedNode:OfferingType— The anticipated utilization of the reserved node, as defined in the reserved node offering. • ReservedNode:FixedPrice— The fixed cost Amazon Redshift charged you for this reserved node. • ReservedNode:NodeType— The node type of the reserved node. • ReservedNode:NodeCount— The number of reserved compute nodes. • ReservedNode:UsagePrice— The hourly rate Amazon Redshift charge you for this reserved node. • ReservedNode:RecurringCharges— The recurring charges for the reserved node. • ReservedNode:RecurringCharges:RecurringCharge— Describes a recurring charge. • ReservedNode:RecurringCharges:RecurringCharge:RecurringChargeAmount— The amount charged per the period of time specified by the recurring charge frequency. • ReservedNode:RecurringCharges:RecurringCharge:RecurringChargeFrequency— The frequency at which the recurring charge amount is applied.
API Version 2012-12-01 83
Amazon Redshift Command Line Reference Examples
• ReservedNode:ReservedNodeId— The unique identifier for the reservation. • ReservedNode:State— The state of the reserved Compute Node. Possible Values: • pending-payment-This reserved node has recently been purchased, and the sale has been approved, but payment has not yet been confirmed. • active-This reserved node is owned by the caller and is available for use. • payment-failed-Payment failed for the purchase attempt. • ReservedNode:StartTime— The time the reservation started. You purchase a reserved node offering for a duration. This is the start time of that duration. • ReservedNode:Duration— The duration of the node reservation in seconds. • ReservedNode:ReservedNodeOfferingId— The identifier for the reserved node offering. • ReservedNode:CurrencyCode— The currency code for the reserved cluster.
Examples Purchase a Reserved Node This example shows how to purchase a reserved node offering. The reserved-node-offering-id is obtained by calling describe-reserved-node-offerings. PROMPT> aws redshift purchase-reserved-node-offering --reserved-node-offeringid 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 Version 2012-12-01 84
Amazon Redshift Command Line Reference reboot-cluster
reboot-cluster Description Reboots a cluster. This action is taken as soon as possible. It results in a momentary outage to the cluster, during which the cluster status is set to rebooting. A cluster event is created when the reboot is completed. Any pending cluster modifications (see modify-cluster (p. 72)) are applied at this reboot. For more information about managing clusters, go to Amazon Redshift Clusters in the Amazon Redshift Management Guide
Syntax reboot-cluster --cluster-identifier value Common Options (p. 8)
Options Name
Description
Required
--cluster-identifier
The cluster identifier.
Yes
Output The command returns the following information: • Cluster— Describes a cluster. • Cluster:PubliclyAccessible— If true, the cluster can be accessed from a public network. • Cluster:MasterUsername— The master user name for the cluster. This name is used to connect to the database that is specified in DBName. • Cluster:VpcSecurityGroups— A list of Virtual Private Cloud (VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC. • Cluster:VpcSecurityGroups:VpcSecurityGroup— Describes the members of a VPC security group. • Cluster:VpcSecurityGroups:VpcSecurityGroup:Status— • Cluster:VpcSecurityGroups:VpcSecurityGroup:VpcSecurityGroupId— • Cluster:ModifyStatus— The status of a modify operation, if any, initiated for the cluster. • Cluster:NumberOfNodes— The number of compute nodes in the cluster. • Cluster:PendingModifiedValues— If present, changes to the cluster are pending. Specific pending changes are identified by subelements. • Cluster:PendingModifiedValues:ClusterVersion— The pending or in-progress change of the service version. • Cluster:PendingModifiedValues:ClusterType— The pending or in-progress change of the cluster type. • Cluster:PendingModifiedValues:MasterUserPassword— The pending or in-progress change of the master credentials for the cluster. • Cluster:PendingModifiedValues:AutomatedSnapshotRetentionPeriod— The pending or in-progress change of the automated snapshot retention period.
API Version 2012-12-01 85
Amazon Redshift Command Line Reference Output
• Cluster:PendingModifiedValues:NodeType— The pending or in-progress change of the cluster's node type. • Cluster:PendingModifiedValues:NumberOfNodes— The pending or in-progress change of the number nodes in the cluster. • Cluster:VpcId— The identifier of the VPC the cluster is in, if the cluster is in a VPC. • Cluster:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Cluster:AutomatedSnapshotRetentionPeriod— The number of days that automatic cluster snapshots are retained. • Cluster:ClusterParameterGroups— The list of cluster parameter groups that are associated with this cluster. • Cluster:ClusterParameterGroups:ClusterParameterGroup— Describes the status of a parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterApplyStatus— The status of parameter updates. • Cluster:DBName— The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named "dev" was created by default. • Cluster:PreferredMaintenanceWindow— The weekly time range (in UTC) during which system maintenance can occur. • Cluster:Endpoint— The connection endpoint. • Cluster:Endpoint:Port— The port that the database engine is listening on. • Cluster:Endpoint:Address— The DNS address of the Cluster. • Cluster:AllowVersionUpgrade— If true, version upgrades will be applied automatically to the cluster during the maintenance window. • Cluster:ClusterCreateTime— The date and time that the cluster was created. • Cluster:ClusterSubnetGroupName— The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC. • Cluster:ClusterSecurityGroups— A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster security groups are used when the cluster is not created in a VPC. Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:Status— The status of the cluster security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group. • Cluster:ClusterIdentifier— The unique identifier of the cluster. • Cluster:AvailabilityZone— The name of the Availability Zone in which the cluster is located. • Cluster:NodeType— The node type for the nodes in the cluster. • Cluster:Encrypted— If true, data in cluster is encrypted at rest. • Cluster:ClusterStatus— The current state of this cluster. Possible values include available, creating, deleting, rebooting, and resizing.
API Version 2012-12-01 86
Amazon Redshift Command Line Reference Examples
Examples Reboot a Cluster This example reboots a cluster. By default, the output is in JSON format.
PROMPT> 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 Version 2012-12-01 87
Amazon Redshift Command Line Reference reset-cluster-parameter-group
reset-cluster-parameter-group Description Sets one or more parameters of the specified parameter group to their default values and sets the source values of the parameters to "engine-default". To reset the entire parameter group specify the ResetAllParameters parameter. For parameter changes to take effect you must reboot any associated clusters.
Syntax reset-cluster-parameter-group --parameter-group-name value [--reset-all-parameters] [--parameters value] Common Options (p. 8)
Options Name
Description
Required
--parameter-group-name
The name of the cluster parameter group to be reset.
Yes
API Version 2012-12-01 88
Amazon Redshift Command Line Reference Output
Name
Description
Required
--parameters
An array of names of parameters to be reset. If ResetAllParameters option is not used, then at least one parameter name must be supplied.
No
Constraints: A maximum of 20 parameters can be reset in a single request. Describes a parameter in a cluster parameter group. description (string) A description of the parameter. data_type (string) The data type of the parameter. is_modifiable (boolean) If true, the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed. allowed_values (string) The valid range of values for the parameter. source (string) The source of the parameter value, such as "engine-default" or "user". parameter_value (string) The value of the parameter. parameter_name (string) The name of the parameter. minimum_engine_version (string) The earliest engine version to which the parameter can apply.
--reset-all-parameters
If true, all parameters in the specified parameter No group will be reset to their default values. Default: true
Output The command returns the following information: • ParameterGroupStatus— The status of the parameter group. For example, if you made a change to a parameter group name-value pair, then the change could be pending a reboot of an associated cluster. • ParameterGroupName— The name of the cluster parameter group.
API Version 2012-12-01 89
Amazon Redshift Command Line Reference Examples
Examples Reset Parameters in a Parameter Group This example shows how to reset all of the parameters in a parameter group.
PROMPT> aws redshift reset-cluster-parameter-group --parameter-group-name myc lusterparametergroup --reset-all-parameters
restore-from-cluster-snapshot Description Creates a new cluster from a snapshot. Amazon Redshift creates the resulting cluster with the same configuration as the original cluster from which the snapshot was created, except that the new cluster is created with the default cluster security and parameter group. After Amazon Redshift creates the cluster you can use the modify-cluster (p. 72) API to associate a different security group and different parameter group with the restored cluster. If a snapshot is taken of a cluster in VPC, you can restore it only in VPC. In this case, you must provide a cluster subnet group where you want the cluster restored. If snapshot is taken of a cluster outside VPC, then you can restore it only outside VPC. For more information about working with snapshots, go to Amazon Redshift Snapshots in the Amazon Redshift Management Guide.
Syntax restore-from-cluster-snapshot --cluster-identifier value --snapshot-identifier value [--availability-zone value] [--publicly-accessible] [--allow-version-upgrade] [--cluster-subnet-group-name value] [--port value] Common Options (p. 8)
API Version 2012-12-01 90
Amazon Redshift Command Line Reference Options
Options Name
Description
Required
--cluster-identifier
The identifier of the cluster that will be created from Yes restoring the snapshot. Constraints: • Must contain only lowercase characters. • Must contain from 1 to 63 alphanumeric characters or hyphens. • First character must be a letter. • Cannot end with a hyphen or contain two consecutive hyphens. • Must be unique for all clusters within an AWS account.
The name of the snapshot from which to create the Yes new cluster. This parameter isn't case sensitive.
--snapshot-identifier
Example: my-snapshot-id If true, upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster.
--allow-version-upgrade
No
Default: true The Amazon EC2 Availability Zone in which to restore the cluster.
--availability-zone
No
Default: A random, system-chosen Availability Zone. Example: us-east-1a --cluster-subnet-group-name
The name of the subnet group where you want to cluster restored.
No
A snapshot of cluster in VPC can be restored only in VPC. Therefore, you must provide subnet group name where you want the cluster restored. --port
The port number on which the cluster accepts connections.
No
Default: The same port as the original cluster. Constraints: Must be between 1115 and 65535. --publicly-accessible
If true, the cluster can be accessed from a public No network.
API Version 2012-12-01 91
Amazon Redshift Command Line Reference Output
Output The command returns the following information: • Cluster— Describes a cluster. • Cluster:PubliclyAccessible— If true, the cluster can be accessed from a public network. • Cluster:MasterUsername— The master user name for the cluster. This name is used to connect to the database that is specified in DBName. • Cluster:VpcSecurityGroups— A list of Virtual Private Cloud (VPC) security groups that are associated with the cluster. This parameter is returned only if the cluster is in a VPC. • Cluster:VpcSecurityGroups:VpcSecurityGroup— Describes the members of a VPC security group. • Cluster:VpcSecurityGroups:VpcSecurityGroup:Status— • Cluster:VpcSecurityGroups:VpcSecurityGroup:VpcSecurityGroupId— • Cluster:ModifyStatus— The status of a modify operation, if any, initiated for the cluster. • Cluster:NumberOfNodes— The number of compute nodes in the cluster. • Cluster:PendingModifiedValues— If present, changes to the cluster are pending. Specific pending changes are identified by subelements. • Cluster:PendingModifiedValues:ClusterVersion— The pending or in-progress change of the service version. • Cluster:PendingModifiedValues:ClusterType— The pending or in-progress change of the cluster type. • Cluster:PendingModifiedValues:MasterUserPassword— The pending or in-progress change of the master credentials for the cluster. • Cluster:PendingModifiedValues:AutomatedSnapshotRetentionPeriod— The pending or in-progress change of the automated snapshot retention period. • Cluster:PendingModifiedValues:NodeType— The pending or in-progress change of the cluster's node type. • Cluster:PendingModifiedValues:NumberOfNodes— The pending or in-progress change of the number nodes in the cluster. • Cluster:VpcId— The identifier of the VPC the cluster is in, if the cluster is in a VPC. • Cluster:ClusterVersion— The version ID of the Amazon Redshift engine that is running on the cluster. • Cluster:AutomatedSnapshotRetentionPeriod— The number of days that automatic cluster snapshots are retained. • Cluster:ClusterParameterGroups— The list of cluster parameter groups that are associated with this cluster. • Cluster:ClusterParameterGroups:ClusterParameterGroup— Describes the status of a parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterGroupName— The name of the cluster parameter group. • Cluster:ClusterParameterGroups:ClusterParameterGroup:ParameterApplyStatus— The status of parameter updates. • Cluster:DBName— The name of the initial database that was created when the cluster was created. This same name is returned for the life of the cluster. If an initial database was not specified, a database named "dev" was created by default. • Cluster:PreferredMaintenanceWindow— The weekly time range (in UTC) during which system maintenance can occur. • Cluster:Endpoint— The connection endpoint. • Cluster:Endpoint:Port— The port that the database engine is listening on. • Cluster:Endpoint:Address— The DNS address of the Cluster.
API Version 2012-12-01 92
Amazon Redshift Command Line Reference Examples
• Cluster:AllowVersionUpgrade— If true, version upgrades will be applied automatically to the cluster during the maintenance window. • Cluster:ClusterCreateTime— The date and time that the cluster was created. • Cluster:ClusterSubnetGroupName— The name of the subnet group that is associated with the cluster. This parameter is valid only when the cluster is in a VPC. • Cluster:ClusterSecurityGroups— A list of cluster security group that are associated with the cluster. Each security group is represented by an element that contains ClusterSecurityGroup.Name and ClusterSecurityGroup.Status subelements. Cluster security groups are used when the cluster is not created in a VPC. Clusters that are created in a VPC use VPC security groups, which are listed by the VpcSecurityGroups parameter. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup— Describes a security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:Status— The status of the cluster security group. • Cluster:ClusterSecurityGroups:ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group. • Cluster:ClusterIdentifier— The unique identifier of the cluster. • Cluster:AvailabilityZone— The name of the Availability Zone in which the cluster is located. • Cluster:NodeType— The node type for the nodes in the cluster. • Cluster:Encrypted— If true, data in cluster is encrypted at rest. • Cluster:ClusterStatus— The current state of this cluster. Possible values include available, creating, deleting, rebooting, and resizing.
Examples Restore a Cluster From a Snapshot This example restores a cluster from a snapshot.
PROMPT> aws redshift restore-from-cluster-snapshot --cluster-identifier myc luster-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": [],
API Version 2012-12-01 93
Amazon Redshift Command Line Reference revoke-cluster-security-group-ingress
"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" } }
revoke-cluster-security-group-ingress Description Revokes an ingress rule in an Amazon Redshift security group for a previously authorized IP range or Amazon EC2 security group. To add an ingress rule, see authorize-cluster-security-group-ingress (p. 14). For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Management Guide.
Syntax revoke-cluster-security-group-ingress --cluster-security-group-name value [--ec2-security-group-name value] [--ec2-security-group-owner-id value] [--cidrip value] Common Options (p. 8)
Options Name
Description
--cluster-security-group-name The name of the security Group from which to revoke the ingress rule.
Required Yes
--cidrip
The IP range for which to revoke access. This No range must be a valid Classless Inter-Domain Routing (CIDR) block of IP addresses. If CIDRIP is specified, EC2SecurityGroupName and EC2SecurityGroupOwnerId cannot be provided.
--ec2-security-group-name
The name of the EC2 Security Group whose access No is to be revoked. If EC2SecurityGroupName is specified, EC2SecurityGroupOwnerId must also be provided and CIDRIP cannot be provided.
API Version 2012-12-01 94
Amazon Redshift Command Line Reference Output
Name
Description
Required
--ec2-security-group-owner-id The AWS account number of the owner of the No security group specified in the EC2SecurityGroupName parameter. The AWS access key ID is not an acceptable value. If EC2SecurityGroupOwnerId is specified, EC2SecurityGroupName must also be provided. and CIDRIP cannot be provided.
Example: 111122223333
Output The command returns the following information: • ClusterSecurityGroup— Describes a security group. • ClusterSecurityGroup:IPRanges— A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroup:IPRanges:IPRange— Describes an IP range used in a security group. • ClusterSecurityGroup:IPRanges:IPRange:Status— The status of the IP range, for example, "authorized". • ClusterSecurityGroup:IPRanges:IPRange:CIDRIP— The IP range in Classless Inter-Domain Routing (CIDR) notation. • ClusterSecurityGroup:ClusterSecurityGroupName— The name of the cluster security group to which the operation was applied. • ClusterSecurityGroup:Description— A description of the security group. • ClusterSecurityGroup:EC2SecurityGroups— A list of EC2 security groups that are permitted to access clusters associated with this cluster security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup— Describes an Amazon EC2 security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:Status— The status of the EC2 security group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupName— The name of the EC2 Security Group. • ClusterSecurityGroup:EC2SecurityGroups:EC2SecurityGroup:EC2SecurityGroupOwnerId— The AWS ID of the owner of the EC2 security group specified in the EC2SecurityGroupName field.
Examples Revoke Access from an EC2 Security Group This example revokes access to a named Amazon EC2 security group. PROMPT> aws redshift revoke-cluster-security-group-ingress --cluster-securitygroup-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2security-group-owner-id 123445677890
API Version 2012-12-01 95
Amazon Redshift Command Line Reference Examples
Revoking Access to a CIDR range This example revokes access to a CIDR range. PROMPT> aws redshift revoke-cluster-security-group-ingress --cluster-securitygroup-name mysecuritygroup --cidrip 192.168.100.100/32
API Version 2012-12-01 96
Amazon Redshift Command Line Reference
Document History This documentation is associated with the 2012-12-01 version of Amazon Redshift. This guide was last updated on April 2, 2013. The following table describes the important changes since the last release of the Amazon Redshift Command Line Reference. Change
Description
New Guide
This is the first release of Amazon Redshift Command Line 14 February 2013 Reference.
API Version 2012-12-01 97
Release Date