RDS-CLI_Amazon Relational Database Service Command Line Interface Reference


Amazon Relational Database Service Command Line Interface Reference API Version 2012-09-17 Amazon Relational Database Service: Command Line Interface Reference Copyright © 2012 Amazon Web Services LLC or its affiliates. All rights reserved. Amazon Relational Database Service Command Line Interface Reference Welcome ................................................................................................................................................. 1 Setting up the Command Line Tools ....................................................................................................... 2 API Command Line Tools Reference ...................................................................................................... 7 Common Options for API Tools ............................................................................................................... 8 List of Command Line Operations by Function ..................................................................................... 10 rds-add-option-to-option-group ............................................................................................................. 12 rds-add-tag-to-resource ........................................................................................................................ 14 rds-authorize-db-security-group-ingress ............................................................................................... 15 rds-copy-db-snapshot ........................................................................................................................... 18 rds-create-db-instance .......................................................................................................................... 20 rds-create-db-instance-read-replica ...................................................................................................... 36 rds-create-db-parameter-group ............................................................................................................ 41 rds-create-db-security-group ................................................................................................................ 43 rds-create-db-snapshot ......................................................................................................................... 45 rds-create-db-subnet-group .................................................................................................................. 47 rds-create-option-group ........................................................................................................................ 49 rds-delete-db-instance .......................................................................................................................... 51 rds-delete-db-parameter-group ............................................................................................................. 54 rds-delete-db-security-group ................................................................................................................. 55 rds-delete-db-snapshot ......................................................................................................................... 56 rds-delete-db-subnet-group .................................................................................................................. 58 rds-delete-option-group ........................................................................................................................ 59 rds-describe-db-instances .................................................................................................................... 60 rds-describe-db-parameter-groups ....................................................................................................... 63 rds-describe-db-parameters ................................................................................................................. 65 rds-describe-db-security-groups ........................................................................................................... 67 rds-describe-db-snapshots ................................................................................................................... 69 rds-describe-db-engine-versions .......................................................................................................... 71 rds-describe-db-subnet-groups ............................................................................................................. 74 rds-describe-events .............................................................................................................................. 76 rds-describe-engine-default-parameters .............................................................................................. 79 rds-describe-option-group-options ........................................................................................................ 81 rds-describe-option-groups ................................................................................................................... 83 rds-describe-orderable-db-instance-options ......................................................................................... 85 rds-describe-reserved-db-instances ..................................................................................................... 87 rds-describe-reserved-db-instances-offerings ...................................................................................... 90 rds-list-tags-for-resource ....................................................................................................................... 93 rds-modify-db-instance ......................................................................................................................... 94 rds-modify-db-parameter-group .......................................................................................................... 101 rds-modify-db-subnet-group ............................................................................................................... 103 rds-promote-read-replica .................................................................................................................... 105 rds-purchase-reserved-db-instances-offering ..................................................................................... 107 rds-reboot-db-instance ........................................................................................................................ 109 rds-remove-option-from-option-group ................................................................................................. 111 rds-remove-tags-from-resource .......................................................................................................... 113 rds-reset-db-parameter-group ............................................................................................................ 114 rds-restore-db-instance-from-db-snapshot ......................................................................................... 116 rds-restore-db-instance-to-point-in-time ............................................................................................. 122 rds-revoke-db-security-group-ingress ................................................................................................. 128 rds-version .......................................................................................................................................... 130 Document History ............................................................................................................................... 131 API Version 2012-09-17 3 Amazon Relational Database Service Command Line Interface Reference Welcome This is the Amazon Relational Database Service Command Line Reference. This section describes who should read this guide, how the guide is organized, and other resources related to Amazon RDS. Amazon Relational Database Service is often referred to within this guide as "Amazon RDS"; all copyrights and legal protections still apply. How Do I...? Relevant SectionsHow Do I? Setting up the Command Line Tools (p. 2)Download and install the Amazon RDS command line tools. API Command Line Tools Reference (p. 7)Get a list of all Amazon RDS command line tools. List of Command Line Operations by Function (p. 10)Get a list of Amazon RDS command line tools by function Common Options for API Tools (p. 8)Get a list of common options used for all Amazon RDS command line tools API Version 2012-09-17 1 Amazon Relational Database Service Command Line Interface Reference How Do I...? Setting up the Command Line Tools Topics · Prerequisites (p. 2) · Getting the Command Line Tools (p. 3) · Setting Up the Tools (p. 4) · Overriding the Default Region (p. 5) · Providing Credentials for the Tools (p. 5) This section describes the prerequisites for running the command line tools, where to get the command line tools, how to set up the tools and their environment, and includes a series of common examples of tool usage. Prerequisites This document assumes you can work in a Linux/UNIX or Windows environment. The Amazon RDS command line tools also work correctly on Mac OS X (which resembles the Linux and UNIX command environment), but no specific Mac OS X instructions are included in this guide. As a convention, all command line text is prefixed with a generic PROMPT> command line prompt. The actual command line prompt on your machine is likely to be different. We also use $ to indicate a Linux/UNIX specific command and C:\> for a Windows specific command.The example output resulting from the command is shown immediately thereafter without any prefix. The Java Runtime Environment The command line tools used in this guide require Java version 5 or later to run. Either a JRE or JDK installation is acceptable.To view and download JREs for a range of platforms, including Linux/UNIX and Windows, go to http://java.sun.com/j2se/1.5.0/. API Version 2012-09-17 2 Amazon Relational Database Service Command Line Interface Reference Prerequisites Setting the Java Home Variable The command line tools depend on an environment variable (JAVA_HOME) to locate the Java Runtime. This environment variable should be set to the full path of the directory that contains a sub directory named bin which in turn contains the executable java (on Linux and UNIX) or java.exe (on Windows) executable. To set the Java Home variable 1. Set the Java Home variable. · On Linux and UNIX, using the following command: $ export JAVA_HOME= · On Windows, using the following command: C:\> set JAVA_HOME= 2. Confirm the path setting by running $JAVA_HOME/bin/java -version and checking the output. · On Linux/UNIX, you will see output similar to the following: $ $JAVA_HOME/bin/java -version java version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing) · On Windows, you will see output similar to the following: C:\> %JAVA_HOME%\bin\java -version java version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03) Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing) Getting the Command Line Tools The command line tools are available as a ZIP file on the Amazon RDS web site. These tools are written in Java, and include shell scripts for Windows 2000/XP/Vista, Linux/UNIX, and Mac OSX. The ZIP file is self-contained and no installation is required; simply download the zip file and unzip it to a directory on your local machine. API Version 2012-09-17 3 Amazon Relational Database Service Command Line Interface Reference Getting the Command Line Tools Setting Up the Tools The command line tools depend on an environment variable (AWS_RDS_HOME) to locate supporting libraries.You need to set this environment variable before you can use the tools. Set it to the path of the directory you unzipped the command line tools into. This directory is named RDSCli-A.B.nnnn (A, B and n are version/release numbers), and contains sub-directories named bin and lib. To set the AWS_RDS_HOME environment variable · Open a command line window and enter one of the following commands to set the AWS_RDS_HOME environment variable. · On Linux and UNIX, enter the following command: $ export AWS_RDS_HOME= · On Windows, enter the following command: C:\> set AWS_RDS_HOME= To make the tools easier to use, we recommend you add the tools© BIN directory to your system PATH. The rest of this guide assumes the BIN directory is in your system path. To add the tools© BIN directory to your system path · Enter the following commands to add the tools© BIN directory to your system PATH. · On Linux and UNIX, enter the following command: $ export PATH=$PATH:$AWS_RDS_HOME/bin · On Windows, enter the following command: C:\> set PATH=%PATH%;%AWS_RDS_HOME%\bin Note The Windows environment variables are reset when you close the command window.You might want to set them permanently. Consult the documentation for your version of Windows for more information. Note Paths that contain a space must be wrapped in double quotes, for example: "C:\Program Files\Java" API Version 2012-09-17 4 Amazon Relational Database Service Command Line Interface Reference Setting Up the Tools Overriding the Default Region By default, Amazon RDS uses the us-east-1 region when you create DB Instances and other Amazon RDS objects. To temporarily specify a different region when entering an Amazon RDS command, you can use the --url or --region common command line options. For more information about common command line options, see the Amazon RDS Command Line Reference . To avoid having to pass the URL or region with each command, you can set the EC2_REGION environment variable to the appropriate region for your use. To override the default region · The following example shows how to set the default region to us-west-1. · On Linux and UNIX, enter the following command: $ export EC2_REGION=us-west-1 · On Windows, enter the following command: C:\> set EC2_REGION=us-west-1 Providing Credentials for the Tools The command line tools need the AWS Access Key and Secret Access Key provided with your AWS account.You can get them using the command line or from a credential file located on your local system. The deployment includes a template file ${AWS_RDS_HOME}/credential-file-path.template that you need to edit with your information. Following are the contents of the template file: AWSAccessKeyId= AWSSecretKey= Important On UNIX, limit permissions to the owner of the credential file: $ chmod 600 With the credentials file setup, you©ll need to set the AWS_CREDENTIAL_FILE environment variable so that the Amazon RDS tools can find your information. To set the AWS_CREDENTIAL_FILE environment variable 1. Set the environment variable · On Linux and UNIX, update the variable using the following command: API Version 2012-09-17 5 Amazon Relational Database Service Command Line Interface Reference Overriding the Default Region $ export AWS_CREDENTIAL_FILE= · On Windows, set the variable using the following command: C:\> set AWS_CREDENTIAL_FILE= 2. Check that your setup works properly, run the following command: rds --help You should see the usage page for all Amazon RDS commands. API Version 2012-09-17 6 Amazon Relational Database Service Command Line Interface Reference Providing Credentials for the Tools API Command Line Tools Reference Topics · Common Options for API Tools (p. 8) · List of Command Line Operations by Function (p. 10) · rds-add-option-to-option-group (p. 12) · rds-add-tag-to-resource (p. 14) · rds-authorize-db-security-group-ingress (p. 15) · rds-copy-db-snapshot (p. 18) · rds-create-db-instance (p. 20) · rds-create-db-instance-read-replica (p. 36) · rds-create-db-parameter-group (p. 41) · rds-create-db-security-group (p. 43) · rds-create-db-snapshot (p. 45) · rds-create-db-subnet-group (p. 47) · rds-create-option-group (p. 49) · rds-delete-db-instance (p. 51) · rds-delete-db-parameter-group (p. 54) · rds-delete-db-security-group (p. 55) · rds-delete-db-snapshot (p. 56) · rds-delete-db-subnet-group (p. 58) · rds-delete-option-group (p. 59) · rds-describe-db-instances (p. 60) · rds-describe-db-parameter-groups (p. 63) · rds-describe-db-parameters (p. 65) · rds-describe-db-security-groups (p. 67) · rds-describe-db-snapshots (p. 69) · rds-describe-db-engine-versions (p. 71) · rds-describe-db-subnet-groups (p. 74) · rds-describe-events (p. 76) · rds-describe-engine-default-parameters (p. 79) API Version 2012-09-17 7 Amazon Relational Database Service Command Line Interface Reference · rds-describe-option-group-options (p. 81) · rds-describe-option-groups (p. 83) · rds-describe-orderable-db-instance-options (p. 85) · rds-describe-reserved-db-instances (p. 87) · rds-describe-reserved-db-instances-offerings (p. 90) · rds-list-tags-for-resource (p. 93) · rds-modify-db-instance (p. 94) · rds-modify-db-parameter-group (p. 101) · rds-modify-db-subnet-group (p. 103) · rds-promote-read-replica (p. 105) · rds-purchase-reserved-db-instances-offering (p. 107) · rds-reboot-db-instance (p. 109) · rds-remove-option-from-option-group (p. 111) · rds-remove-tags-from-resource (p. 113) · rds-reset-db-parameter-group (p. 114) · rds-restore-db-instance-from-db-snapshot (p. 116) · rds-restore-db-instance-to-point-in-time (p. 122) · rds-revoke-db-security-group-ingress (p. 128) · rds-version (p. 130) Common Options for API Tools Most API tools described in this section accept the set of optional parameters described in the following table. DescriptionOption Path to the file containing your AWS credentials.This value can be stored in the AWS_CREDENTIAL_FILE environment variable. Example: --aws-credential-file c:\AWS\mycredemtials.pek --aws-credential-file value Path to an AWS X.509 certificate file. Must be specified in conjunction with --ec2-private-key-file-path and must not be specified in conjunction with --aws-credential-file. This value can be set by using the EC2_CERT environment variable. --ec2-cert-file-path value -C value Specifies the connection timeout in seconds. Default: 30 Example: --connection-timeout 60 --connection-timeout value Causes debug information to be displayed on error. Default: false --debug Specifies the delimiter to use when displaying long results. Default: comma --delimiter value Displays column headers for tabular or delimited results, or HTTP headers for XML results. Default: off --headers API Version 2012-09-17 8 Amazon Relational Database Service Command Line Interface Reference Common Options for API Tools DescriptionOption Displays help text for the command.You can also use help commandname. Default: off --help Specifies the AWS Access ID to use for requests.-I value --access-key-id value Path to an AWS X.509 private key file. Must be specified in conjunction with --ec2-cert-file-path and must not be specified in conjunction with --aws-credential-file. This value can be set by using the EC2_PRIVATE_KEY environment variable. -K value --ec2-private-key-file-path value Overrides the Region specified in the EC2_REGION environment variable. Default: The EC2_REGION environment variable, or us-east-1 if the EC2_REGION environment variable is not set. Example: --region eu-west-1 --region value Specifies the AWS Secret Access Key to use for requests.-S value --secret-key-value value Show empty fields and rows with a (nil) value.--show-empty-fields Displays the URL used to call the AWS service.--show-request Displays the results of the command in fixed column-width format. Empty fields are not displayed. This is the default output format. --show-table Displays the results of the command delimited by a character. Empty fields are shown as "(nil). The default delimiter character is a comma. --show-long Displays the results of the command as raw XML.--show-xml Suppress all output from the command.--quiet Override the URL for the service call with the value supplied. This value is set using the RDS_URL environment variable. Note You can set the EC2_REGION enviroment variable or use the --region parameter to avoid having to pass the --url parameter to specify a different regional endpoint. -U value --url value API Version 2012-09-17 9 Amazon Relational Database Service Command Line Interface Reference Common Options for API Tools List of Command Line Operations by Function Database Instances · rds-create-db-instance (p. 20) · rds-create-db-instance-read-replica (p. 36) · rds-delete-db-instance (p. 51) · rds-reboot-db-instance (p. 109) · rds-describe-db-instances (p. 60) · rds-modify-db-instance (p. 94) Configuration Discovery · rds-describe-db-engine-versions (p. 71) · rds-describe-orderable-db-instance-options (p. 85) Reserved Database Instances · rds-describe-reserved-db-instances-offerings (p. 90) · rds-purchase-reserved-db-instances-offering (p. 107) · rds-describe-reserved-db-instances (p. 87) Database Snapshots and Point-In-Time Recovery · rds-copy-db-snapshot (p. 18) · rds-create-db-snapshot (p. 45) · rds-delete-db-snapshot (p. 56) · rds-describe-db-snapshots (p. 69) · rds-restore-db-instance-from-db-snapshot (p. 116) · rds-restore-db-instance-to-point-in-time (p. 122) Parameters and Parameter Groups · rds-create-db-parameter-group (p. 41) · rds-delete-db-parameter-group (p. 54) · rds-describe-db-parameters (p. 65) · rds-describe-engine-default-parameters (p. 79) · rds-describe-db-parameter-groups (p. 63) · rds-modify-db-parameter-group (p. 101) · rds-reset-db-parameter-group (p. 114) Security Groups · rds-create-db-security-group (p. 43) API Version 2012-09-17 10 Amazon Relational Database Service Command Line Interface Reference List of Command Line Operations by Function · rds-create-db-subnet-group (p. 47) · rds-authorize-db-security-group-ingress (p. 15) · rds-delete-db-security-group (p. 55) · rds-delete-db-subnet-group (p. 58) · rds-describe-db-security-groups (p. 67) · rds-describe-db-subnet-groups (p. 74) · rds-modify-db-subnet-group (p. 103) · rds-revoke-db-security-group-ingress (p. 128) Events · rds-describe-events (p. 76) Other · rds-version (p. 130) API Version 2012-09-17 11 Amazon Relational Database Service Command Line Interface Reference List of Command Line Operations by Function rds-add-option-to-option-group Description Adds one or more options to an option group. Syntax rds-add-option-to-option-group optiongroupname --option-name value [--apply-immediately] [--security-groups value[,value2][,...]] [--port value] [General Options] Options RequiredDescriptionName YesName of the option group that the option will be added to. optiongroupname YesName of the option to be added to the option group.--option-name -n NoIf supplied, the option will be applied immediately for all associated DB Instances. If not supplied, the option will be applied for each DB Instance during its next maintenance window. --apply-immediately Yes if the option uses a port; otherwise, no. Name of the security group or groups that will be applied to the port that the option uses for communication. --security-groups -sg NoA nondefault port that the option will use for communication. --port The following options are currently supported: Default port DescriptionOption ID 1158Oracle Database Manager Database ControlOEM API Version 2012-09-17 12 Amazon Relational Database Service Command Line Interface Reference rds-add-option-to-option-group Output The command returns a table with the following information: · Group nameÐThe name of the option group. · EngineÐThe name of the DB engine that the option group is associated with. · Major engine versionÐThe major version ID of the DB engine. · Option group descriptionÐThe description of the option group. · Option nameÐThe name of the option that was added. · PortÐThe number of the port that the option will use. · Option descriptionÐA description of the option. · Security groupÐThe security group assigned to the port. · AuthorizationÐStatus of ingress authorization for the security group. · VPC SpecificÐIndicates if both VPC and non-VPC instances can join this option group. · VPCÐIndicates if only instances in this VPC can join this option group. Example This example adds the Oracle Enterprise Manager Database Control option to an option group named TestOptionGroup. The default DB security group is applied to the default port: PROMPT> rds-add-option-to-option-group TestOptionGroup --option-name OEM --se curity-groups default --apply-immediately OPTIONGROUP testoptiongroup oracle-ee 11.2 Oracle Enterprise Manager Database Control OPTION OEM 1158 Oracle Enterprise Manager SECGROUP default authorized API Version 2012-09-17 13 Amazon Relational Database Service Command Line Interface Reference Output rds-add-tag-to-resource Description Adds a tag to a DB Instance. DB Instances can have up to 10 tags, but you can add only one tag at a time using the command line interface. Syntax rds-add-tag-to-resource resourcename --key value --value value [General Options] Options RequiredDescriptionName YesThe name of the DB Instance that the tag will be added to. resourcename YesThe name of the tag to be added to the DB Instance. --key -k NoThe value of the tag to be added to the DB Instance. --value -v Output This command does not return any output. Example This example adds a tag to a DB Instance. No output is returned. PROMPT> rds-add-tag-to-resource arn:aws:rds:us-east-1:0123456789:db:my-db-in stance -k project -v trinity API Version 2012-09-17 14 Amazon Relational Database Service Command Line Interface Reference rds-add-tag-to-resource rds-authorize-db-security-group-ingress Description Authorizes network ingress for an Amazon EC2 security group or an IP address range. Note You cannot authorize ingress from an EC2 security group in one Region to an Amazon RDS DB Instance in another. Syntax rds-authorize-db-security-group-ingress DBSecurityGroupName [-s (--ec2-security-group-id) ] value [-g (--ec2-security-group-name) value ] [-i (--cidr-ip) value ] [-o (--ec2-security-group-owner) value ] [General Options] Options RequiredDescriptionName YesThe name of the Amazon RDS DB security group. This can also be passed as a named parameter using --db-security-group-name value Type: String Default: None Example: --db-security-group-name mydbsecuritygroup DBSecurityGroupName --db-security-group-name value NoIdentifier of the EC2 Security Group to authorize. Type: String Default: None Constraints: This parameter must be specified if the DB Security Group is for a VPC. Example: -g myec2securitygroup -s --ec2-security-group-id value API Version 2012-09-17 15 Amazon Relational Database Service Command Line Interface Reference rds-authorize-db-security-group-ingress RequiredDescriptionName NoThe name of the EC2 security group. Type: String Default: None Constraints: This parameter must be specified if the ec2-security-group-owner parameter is specified. Must be an existing EC2 security group. Example: -g myec2securitygroup Important Authorizing an EC2 security group only grants access to your DB instances from the EC2 instances belonging to the EC2 security group. -g --ec2-security-group-name value NoThe AWS account number of the owner of the EC2 security group. Type: String Default: None Constraints: This parameter must be specified if the ec2-security-group-name parameter is specified. Example: -o 123456789012 -o --ec2-security-group-owner-id value NoThe IP range to allow access. Type: String Constraints: Must be a valid Classless Inter-Domain Routing (CIDR) range, in the format ddd.ddd.ddd.ddd/dd. For more information, see CIDR Notation. Default: None Constraints: This parameter must not be specified if the ec2-security-group-name and ec2-security-group-owner parameters are specified. Example: -i 192.168.100.100/32 Caution To avoid inadvertently granting access to your DB Instances, be sure to understand how CIDR ranges work. For more information about CIDR ranges, go to the Wikipedia Tutorial . -i --cidr-ip-value value Output The command returns a table with the following information: · NameÐSecurity group name. · DescriptionÐSecurity group description. API Version 2012-09-17 16 Amazon Relational Database Service Command Line Interface Reference Output · EC2 Group NameÐName of the EC2 security group./ · EC2 Group IdÐIdentifier of the EC2 security group./ · EC2 Owner IDÐOwner of the EC2 security group. · IP RangeÐCIDR range for the authorized Amazon RDS security group. · StatusÐStatus of the authorization. Examples Authorizing Access to an EC2 Security Group This example authorizes access to a named Amazon EC2 security group. PROMPT> rds-authorize-db-security-group-ingress Default --ec2-security-group- name mainServerGrp --ec2-security-group-owner-id 123445677890 Authorizing Access to a CIDR range This example authorizes access to a CIDR range. PROMPT> rds-authorize-db-security-group-ingress Default --cidr-ip 192.168.100.100/32 Related Operations · rds-revoke-db-security-group-ingress (p. 128) API Version 2012-09-17 17 Amazon Relational Database Service Command Line Interface Reference Examples rds-copy-db-snapshot Description Creates a copy of all data and configuration associated with the specified DB Snapshot. Syntax rds-copy-db-snapshot SourceDBSnapshotIdentifier -t (--target-db-snapshot-identifier) value [General Options] Options RequiredDescriptionName YesSource DB Snapshot identifier. This is the unique key that identifies an existing DB Snapshot to copy. This parameter can also be set using --source-db-snapshot-identifier value Type: String Default: None Constraints: Must be the identifer of an active DB Snapshot. Example: --source-db-instance-identifier mydbsnapshot SourceDBSnapshotIdentifier YesThe identifier for the target DB Snapshot. Type: String Default: None Constraints: Cannot be null, empty, or blank. Cannot be a word reserved by the database engine. Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: -t my-copied-snapshot-id -t value --target-db-snapshot-identifier value Output The command returns the following information: · DBSnapshotIdÐName of the DB Snapshot · Snapshot CreatedÐThe time (in 24 hour UTC) when the DB Snapshot was taken · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · Instance CreatedÐThe date and time when the DB Instance was created · EngineÐThe name and version of the database engine used · StorageÐThe size of the DB Snapshot©s allocated storage (GB) API Version 2012-09-17 18 Amazon Relational Database Service Command Line Interface Reference rds-copy-db-snapshot · StatusÐStatus of the DB Snapshot. Valid values: creating | available | deleting · Master UsernameÐThe login name of the database©s master user. · AZÐThe original Availability Zone of the database from which the DB Snapshot was taken.This column appears only in the --show-long view · PortÐThe original port of the database from which the DB Snapshot was taken. This column appears only with the --show-long-view command option · VersionÐThe database engine©s version number. · LicenseÐTBD · TypeÐTBD · VpcIdÐTBD Examples Copy a Database Snapshot This example copies a DB Snapshot. PROMPT> rds-copy-db-snapshot -s rds:mydb-2012-01-15-00-01 -t snapshotdec01 Related Operations · rds-delete-db-snapshot (p. 56) · rds-describe-db-snapshots (p. 69) · rds-restore-db-instance-from-db-snapshot (p. 116) API Version 2012-09-17 19 Amazon Relational Database Service Command Line Interface Reference Examples rds-create-db-instance Description Creates a new DB Instance. Syntax rds-create-db-instance DBInstanceIdentifier [-a (--db-security-groups) value[,value...] ] [-au (--auto-minor-version-upgrade) value ] [-b (--preferred-backup-window) value ] -c (--db-instance-class) value [-cs (--character-set) value ] -e (--engine) value [-g (--db-parameter-group) value] [--iops value ] -lm (--license model) value [-m (--multi-az) value] [-n (--db-name) value ] [-og (--option-group) value ] -p (--master-user-password) value [--port value ] [-r (--backup-retention-period) value ] -s (--allocated-storage) value [-sn (--db-subnet-group-name) value ] -u (--master-username) value [-v (--engine-version) value ] [-w (--preferred-maintenance-window) value] [-z (--availability-zone) value ] [General Options] API Version 2012-09-17 20 Amazon Relational Database Service Command Line Interface Reference rds-create-db-instance Options RequiredDescriptionName YesDB Instance identifier. This is the unique key that identifies a DB Instance. This parameter is stored as a lowercase string. This can also be passed as a named parameter using --db-instance-identifier value Type: String Default: None Constraints: Must contain from 1 to 63 (1 to 15 for SQL Server) alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: myinstance DBInstanceIdentifier --db-instance-identifier value YesContains the compute and memory capacity of the DB Instance. Different instance classes are available for different database engines. For information about valid values for a particular engine, use the rds-describe-orderable-db-instance-options (p. 85) command. Type: String Default: None Valid values: db.t1.micro | db.m1.small | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge Example: --db-instance-class db.m1.xlarge Note Amazon RDS does not support db.t1.micro instances in a virtual private cloud (VPC). -c value --db-instance-class value API Version 2012-09-17 21 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoThe meaning of this parameter differs according to the database engine you use. MySQL Name of a database to create when the DB Instance is created. If this parameter is not specified, no database is created in the instance. Constraints: · Cannot be empty. · Must contain 1 to 64 alphanumeric characters. · Cannot be a word reserved by the specified database engine. Type: String Example: --db-name MyDatabase Oracle The Oracle System ID (SID) of the created DB Instance. Constraints: · Cannot be longer than 8 characters. Type: String Example: --db-name MYORACLE SQL Server Not applicable. -n value --db-name value YesName of the database engine to be used for this instance. Type: String Default: None Valid values: MySQL | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web -e value --engine value NoVersion number of the database engine to use. Type: String MySQL Example: --engine-version 5.1.42 Oracle Example: --engine-version 11.2.0.2.v2 SQL Server Example: --engine-version 10.50.2789.0.v1 -v value --engine-version value API Version 2012-09-17 22 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoName of the DB Parameter Group to associate with this DB Instance. If this argument is omitted, the default DBParameterGroup for the specified engine will be used. Type: String Example: --db-parameter-group MyDBParameterGroup -g value --db-parameter-group-name value NoLicense model for this DB Instance. Type: String Default: None Valid values: license-included | bring-your-own-license | general-public-license Example: --license-model bring-your-own -lm --license-model value NoSpecifies if this is a Multi-AZ deployment. Note At this time, multi-AZ deployments are not supported for the Microsoft SQL Server database engine. Type: Boolean Default: false Constraints: The --availability-zone parameter cannot be set if the --multi-az parameter is set to true. Valid values: true | false -m value --multi-az value NoSpecifies the amount of provisioned IOPS for the DB Instance, expressed in I/O operations per second. Constraints: Must be an integer greater than 1000. --iops value NoA list of one or more security groups to associate with this DB Instance. Type: String[] Example: --db-security-groups mysecuritygroup1, mysecuritygroup2 --db-security-groups value [,value...] API Version 2012-09-17 23 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoPort number that the DB Instance uses for connections. Type: Integer MySQL Default: 3306 Valid Values: 1150-65535 Type: Integer Oracle Default: 1521 Valid Values: 1150-65535 Type: Integer Example: --port 1234 SQL Server Default: 1433 Valid Values: 1150-65535 except for 1434 and 3389. Type: Integer --port value YesAmount of storage to be initially allocated for the DB Instance, in gigabytes. Type: String MySQL Constraints: Must be an integer between 5 and 1024. Oracle Constraints: Must be an integer between 10 and 1024. SQL Server Constraints: Must be an integer from 200 to 1024 (sqlserver-se and sqlserver-ee) or from 30 to 1024 (sqlserver-ex and sqlserver-web). Example: --allocated-storage 320 -s value --allocated-storage value NoIndicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window. Type: Boolean Default: true Example: -au true -au value --auto-minor-version-upgrade value API Version 2012-09-17 24 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName YesThe name of the master database user. Type: String MySQL Constraints: · Must be an alphanumeric string containing from 1 to 16 characters · First character must be a letter · Cannot be a reserved word for the chosen database engine Oracle Constraints: · Must be an alphanumeric string containing from 1 to 30 characters · First character must be a letter · Cannot be a reserved word for the chosen database engine SQL Server Constraints: · Must be 1 to 128 alphanumeric characters. · First character must be a letter. · Cannot be a reserved word for the chosen database engine. Example: --master-username sa -u value --master-username value NoThe name of the option group to be associated with this instance. If this parameter is not provided, the default option group for the engine specified is used. -og value --option-group value API Version 2012-09-17 25 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoPassword for the master DB Instance user. If this parameter is not provided, the user will be prompted to enter a password. MySQL Constraints: Must contain from 8 to 41 alphanumeric characters. Type: String Oracle Constraints: Must contain from 8 to 30 alphanumeric characters. Type: String SQL Server Constraints: Must contain from 8 to 128 alphanumeric characters. Example: --master-user-password mysecretpassword01 -p value --master-user-password value API Version 2012-09-17 26 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName No-w value --preferred-maintenance-window value API Version 2012-09-17 27 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName Weekly time range (in UTC) during which system maintenance can occur. Type: String 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. Time BlockRegion 03:00-11:00 UTCUS East (Northern Virginia) Region 06:00-14:00 UTCUS West (Northern California) Region 06:00-14:00 UTCUS West (Oregon) Region 22:00-06:00 UTCEU (Ireland) Region 14:00-22:00 UTCAsia Pacific (Singapore) Region 17:00-03:00 UTCAsia Pacific (Tokyo) Region 00:00-08:00 UTCSouth America (São Paulo) Region Default: Depends on the Region the database was created in. The following table lists the default maintenance window for each Region. Time BlockRegion 03:00-11:00 UTCUS East (Northern Virginia) Region 06:00-14:00 UTCUS West (Northern California) API Version 2012-09-17 28 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName Time BlockRegion Region 06:00-14:00 UTCUS West (Oregon) Region 22:00-06:00 UTCEU (Ireland) Region 14:00-22:00 UTCAsia Pacific (Singapore) Region 17:00-03:00 UTCAsia Pacific (Tokyo) Region 00:00-08:00 UTCSouth America (São Paulo) Region Constraints: · Must not conflict with the preferred backup window for this DB Instance. · Must be at least 30 minutes. · Must be in the format ddd:hh24:mi-ddd:hh24:mi. · Times should be Universal Time Coordinated (UTC). See example below. Example: --preferred-maintenance-window Tue:00:30-Tue:04:30 API Version 2012-09-17 29 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName No-b value --preferred-backup-window value API Version 2012-09-17 30 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName The daily time range (in UTC) during which automated backups are created if backups are enabled (using the --backup-retention-period) parameter. Type: String Default: A 30-minute window selected at random from an 8-hour block of time per region. The following table lists the time blocks for each region from which the default backup windows are assigned. Time BlockRegion 03:00-11:00 UTCUS East (Northern Virginia) Region 06:00-14:00 UTCUS West (Northern California) Region 06:00-14:00 UTCUS West (Oregon) Region 22:00-06:00 UTCEU (Ireland) Region 14:00-22:00 UTCAsia Pacific (Singapore) Region 17:00-03:00 UTCAsia Pacific (Tokyo) Region 00:00-08:00 UTCSouth America (São Paulo) Region Default: Depends on the Region the database was created in. The following table lists the default backup window for each Region. Time BlockRegion 03:00-11:00 UTCUS East (Northern Virginia) Region 06:00-14:00 UTCUS West API Version 2012-09-17 31 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName Time BlockRegion (Northern California) Region 06:00-14:00 UTCUS West (Oregon) Region 22:00-06:00 UTCEU (Ireland) Region 14:00-22:00 UTCAsia Pacific (Singapore) Region 17:00-03:00 UTCAsia Pacific (Tokyo) Region 00:00-08:00 UTCSouth America (São Paulo) Region Constraints: · Must not conflict with the preferred maintenance window for this DB Instance. · Must be in the format hh24:mi-hh24:mi. · Times should be 24-hour Universal Time Coordinated (UTC). · Must not conflict with the --preferred-maintenance-window. · Must be at least 30 minutes. NoThe number of days automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables backups. Type: Integer Default: 1 Constraints: Must be a value from 0 to 35. -r value --backup-retention-period value API Version 2012-09-17 32 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoThe EC2 Availability Zone that the DB Instance will be created in. Type: String Default: A random, system-chosen Availability Zone in the same region as the current endpoint. Constraints: The --availability-zone parameter cannot be set if the --multi-az parameter is set to true. Example: --availability-zone us-east-1a -z value --availability-zone value NoThe DB Subnet Group to associate with this DB Instance. Specifying a DB Subnet Group will create this DB Instance in a VPC. Type: String Default: none Constraints: Must be the name of an existing DB Subnet Group. Example: --db-subnet-group-name mydbsubnetgroup -sn value --db-subnet-group value Specifies the Oracle character set that the DB Instance will use. For a list of supported character sets, go to Appendix: Oracle Character Sets Supported in Amazon RDS. Oracle only. -cs value --character-set value Output The command returns a table that contains the following information: · DBInstanceIDÐThe user-supplied DB Instance identifier · CreatedÐThe data and time the instance was created, in 24-hour UTC · ClassÐThe compute and memory capacity of the instance · EngineÐName of the database engine to be used for this DB Instance · License ModelÐThe license model used for this DB Instance · StorageÐInitially allocated storage size specified in gigabytes (GBs) · Master UsernameÐThe master username for the DB Instance · StatusÐThe current status of the DB Instance. Valid values: available | backing-up | creating | deleted | deleting | failed | modifying | rebooting | resetting-master-credentials | storage-full | incompatible-parameters | incompatible-restore · Endpoint AddressÐAddress of the DB Instance · PortÐPort used to connect to the DB Instance · AZÐThe instance©s Availability Zone · Backup RetentionÐThe number of days that automated backups are retained before deletion · PendingBackupRetentionÐThe backup retention period which will be applied at the next maintenance window, or which is currently being applied if the --apply-immediately option was specified · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance API Version 2012-09-17 33 Amazon Relational Database Service Command Line Interface Reference Output · PendingStorageÐThe storage size to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · PendingMulti-AZÐIf true, indicates the instance will be converted to run as a Multi-AZ deployment; if false, the instance will be converted to run as a standard (Single-AZ) deployment. · PendingVersionÐThe engine version of the pending database instance. · IopsÐThe provisioned IOPS allocated, expressed as I/O operations per second. · DB NameÐName of the initial database created when the instance was created (for the MySQL engine) or the Oracle System ID (SID) of the created DB Instance (for the Oracle engine). For SQL Server, will always be null. This column appears only in the --show-long view · Maintenance WindowÐThe period during which patching and instance modifications will be performed. This column appears only in the --show-long view · Backup WindowÐThe period during which automated backups are created. This column appears only in the --show-long view · Latest Restorable TimeÐThe latest time to which a database can be restored using point-in-time restore. This column appears only in the --show-long view. · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐThe version number of the database engine. · Auto Minor Version UpgradeÐIndicates that minor version upgrades will be applied to the DB Instance during the maintenance window. This column appears only in the --show-long view. · NameÐThe DB Security Group name · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · Group NameÐName of DB Parameter Group applied to · Apply StatusÐStatus of applying the parameter group. It can be either in-sync or pending-reboot · Read Replica IDÐThe identifier of a DB Instance which acts as a read replica of this DB Instance · NameÐSubnet group name · DescriptionÐSubnet group description · StatusÐSubnet group status · VpcIdÐIdentifier of the VPC associated with the subnet group · Subnet identifierÐSubnet group identifier · Subnet Availability ZoneÐAvailability Zone of the subnet · StatusÐStatus of the subnet Examples Create a Database Instance with Minimal Parameters This example creates a DB Instance with the minimal set of parameters. PROMPT> rds-create-db-instance SimCoProd01 -s 10 -c db.m1.large -e mysql -u master -p Kew2401Sd Create an Oracle Database Instance This example creates a DB Instance with the minimal set of parameters. API Version 2012-09-17 34 Amazon Relational Database Service Command Line Interface Reference Examples PROMPT> rds-create-db-instance SimCoProd01 -s 10 -c db.m1.large -e oracle-se - -db-name MYORACLE -lm bring-your-own-license -u master -p Kew2401Sd Create a Database Instance and Prompt for a Password This example creates a database, prompting for the master user password. PROMPT> rds-create-db-instance SimCoProd02 -s 10 -c db.m1.large -e mysql -u master -p Related Operations · rds-describe-db-instances (p. 60) · rds-modify-db-instance (p. 94) · rds-delete-db-instance (p. 51) API Version 2012-09-17 35 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-create-db-instance-read-replica Description Creates a DB Instance that acts as a Read Replica of a source DB Instance. Note Read Replicas are only supported with the MySQL database engine. All Read Replica DB Instances are created as Single-AZ deployments with backups disabled. All other DB Instance attributes (including DB Security Groups and DB Parameter Groups) are inherited from the source DB Instance, except where specified otherwise. Syntax rds-create-db-instance-read-replica DBInstanceIdentifier -s (--source-db-instance-identifier) value [-c (--db-instance-class) value ] [-au (--auto-minor-version-upgrade) value ] [--iops value ] [-z (--availability-zone) value ] [-p (--port) value ] [General Options] Options RequiredDescriptionName YesDB Instance identifier of the Read Replica. This is the unique key that identifies a DB Instance. This parameter is stored as a lowercase string.This can also be passed as a named parameter using --db-instance-identifier value Type: String Default: None Constraints: · 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. Example: myinstance DBInstanceIdentifier --db-instance-identifier value API Version 2012-09-17 36 Amazon Relational Database Service Command Line Interface Reference rds-create-db-instance-read-replica RequiredDescriptionName YesThe identifier of the DB Instance for which this DB Instance will act as a Read Replica.You can have up to 5 read replicas per DB Instance. Type: String Constraints: · Must be the identifier of an existing DB Instance that is not already a Read Replica DB Instance. · The specified source DB Instance must have backups enabled. -s value --source-db-instance-identifier value NoContains the compute and memory capacity of the Read Replica. Type: String Default: Inherits from the source DB Instance. Different instance classes are available for different database engines. For information about valid values for a particular engine, use the rds-describe-orderable-db-instance-options (p. 85) command. Valid values: db.t1.micro | db.m1.small | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge Example: --db-instance-class db.m1.xlarge Note Amazon RDS does not support db.t1.micro instances in a virtual private cloud (VPC). -c value --db-instance-class value NoPort number that the Read Replica uses for connections. Type: Integer Default: Inherits from the source DB Instance Example: --port 1234 --port value NoIndicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window. Type: Boolean Default: Inherits from the source DB Instance Example: -au true -au value --auto-minor-version-upgrade value API Version 2012-09-17 37 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoSpecifies the amount of provisioned IOPS for the DB Instance, expressed in I/O operations per second. If this parameter is not specified, the IOPS value will be taken from the master. If this parameter is set to 0, the new instance will not have provisioned IOPS. Constraints: Must be an integer greater than 1000. --iops value NoThe EC2 Availability Zone that the Read Replica will be created in. Type: String Default: A random, system-chosen Availability Zone in the same region as the current endpoint. Constraints: The --availability-zone parameter cannot be set if the --multi-az parameter is set to true. Example: --availability-zone us-east-1a -z value --availability-zone value Output The command returns a table that contains the following information: · DBInstanceIDÐThe user-supplied DB Instance identifier · CreatedÐThe data and time the instance was created, in 24-hour UTC · ClassÐThe compute and memory capacity of the instance · EngineÐName of the database engine to be used for this DB Instance · StorageÐInitially allocated storage size specified in gigabytes (GBs) · Master UsernameÐThe master username for the DB Instance · StatusÐThe current status of the DB Instance. Valid values: available | backing-up | creating | deleted | deleting | failed | modifying | rebooting | resetting-master-credentials | storage-full | incompatible-parameters | incompatible-restore · Endpoint AddressÐAddress of the DB Instance · PortÐPort used to connect to the DB Instance · IopsÐThe provisioned IOPS allocated, expressed as I/O operations per second. · AZÐThe instance©s Availability Zone · Backup RetentionÐThe number of days that automated backups are retained before deletion · PendingBackupRetentionÐThe backup retention period that will be applied at the next maintenance window, or that is currently being applied if the --apply-immediately option was specified · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance · PendingStorageÐThe storage size to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · PendingMulti-AZÐIf true, indicates that the instance will be converted to run as a Multi-AZ deployment; if false, the instance will be converted to run as a standard (Single-AZ) deployment. · PendingVersionÐThe engine version of the pending database instance. API Version 2012-09-17 38 Amazon Relational Database Service Command Line Interface Reference Output · DB NameÐName of the initial database created when the instance was created.This column appears only in the --show-long view · Maintenance WindowÐThe period during which patching and instance modifications will be performed. This column appears only in the --show-long view · Backup WindowÐThe period during which automated backups are created. This column appears only in the --show-long view · Latest Restorable TimeÐThe latest time to which a database can be restored using point-in-time restore. This column appears only in the --show-long view. · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐThe version number of the database engine. · Auto Minor Version UpgradeÐIndicates that minor version upgrades will be applied to the DB Instance during the maintenance window. This column appears only in the --show-long view. · NameÐThe DB Security Group name · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · Group NameÐName of DB Parameter Group applied to · Apply StatusÐStatus of applying the parameter group. It can be either in-sync or pending-reboot · Read Replica IDÐThe identifier of the source DB Instance for which this DB Instance acts as a Read Replica Examples Create a Read Replica with Minimal Parameters This example creates a Read Replica with the minimal set of parameters. PROMPT> rds-create-db-instance-read-replica SimCoProd01Replica01 -s SimcoProd01 DBINSTANCE simcoprod01replica01 db.m1.large mysql 10 master creating us-east-1b 0 n 5.1.50 simcoprod01 SECGROUP default active PARAMGRP default.mysql5.1 in-sync Create a Read Replica and Specify an Availability Zone This example creates a Read Replica, specifying an availability zone. PROMPT> rds-create-db-instance-read-replica SimCoProd01Replica02 -s SimCoProd01- z us-east-1a DBINSTANCE simcoprod01replica02 db.m1.large mysql 10 master creating us-east-1a 0 n 5.1.50 simcoprod01 SECGROUP default active PARAMGRP default.mysql5.1 in-sync API Version 2012-09-17 39 Amazon Relational Database Service Command Line Interface Reference Examples Related Operations · rds-create-db-instance (p. 20) · rds-describe-db-instances (p. 60) · rds-modify-db-instance (p. 94) · rds-delete-db-instance (p. 51) API Version 2012-09-17 40 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-create-db-parameter-group Description Creates a DB Parameter Group. A DB Parameter Group is initially created with the default parameters for the database engine used by the DB Instance. To provide custom values for any of the parameters, you must modify the group after creating it using rds-modify-db-parameter-group (p. 101). Once you©ve created a DB Parameter Group, you need to associate it with your DB Instance using rds-modify-db-instance (p. 94).When you associate a new DB Parameter Group with a running DB Instance, you need to reboot the DB Instance for the new DB Parameter Group and associated settings to take effect. Syntax rds-create-db-parameter-group DBParameterGroupName -d (--description) value -f (--db-parameter-group-family) value [General Options] Options RequiredDescriptionName YesThe name for the DB Parameter Group. Type: String Default: None Constraints: Is non-preserving and case-insensitive. Must contain visible characters only. Must be 1 to 63 alphanumeric characters or hyphens. Must not be "Default". Example: --db-parameter-group-name mydbparametergroup DBParameterGroupName YesThe description for the DB Parameter Group. Type: String Default: None Constraints: Must not exceed 255 characters. Example: -d "This is my parameter group" -d value --description value YesThe DB parameter group family. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine compatible with that DB paramter group family. Type: String Default: None Example: -f MySQL5.1 -f value --db-parameter-group-family value API Version 2012-09-17 41 Amazon Relational Database Service Command Line Interface Reference rds-create-db-parameter-group Output The command returns the following information: · Group NameÐThe user-supplied DB Parameter Group name · Parameter Group FamilyÐParameter group family to which this group applies. · DescriptionÐThe description of the DB Parameter Group Examples Create a DB Parameter Group This example creates a new DB Parameter Group. PROMPT> rds-create-db-parameter-group mydbparametergroup -f mysql5.1 -d "My first DB Parameter Group" DBPARAMETERGROUP Group Name Parameter Group Family Description DBPARAMETERGROUP mydbparametergroup mysql5.1 My first DB Parameter Group Related Operations · rds-delete-db-parameter-group (p. 54) · rds-modify-db-instance (p. 94) · rds-modify-db-parameter-group (p. 101) · rds-describe-db-parameter-groups (p. 63) API Version 2012-09-17 42 Amazon Relational Database Service Command Line Interface Reference Output rds-create-db-security-group Description Creates a new DB Security Group. Syntax rds-create-db-security-group DBSecurityGroupName -d (--db-security-group-description) value -v (---ec2-vpc-id)value [General Options] Options RequiredDescriptionName YesThe name for the DB Security Group. This value is store as a lowercase string. Type: String Default: None Constraints: Must contain visible characters only. Must contain no more than 255 alphanumeric characters or hyphens. Must not be default. Example: --db-security-group-name mysecuritygroup DBSecurityGroupName YesThe description for the database security group. Type: String Default: None Constraints: Must not exceed 255 characters. Example: -d "This is my DB Security group" -d value --db-security-group-description value YesThe identifier of an Amazon Virtual Private Cloud (VPC). This should only be specified when createing a DB Security Group for a VPC. Type: String Default: None Constraints: Must be the identifier of an existing VPC. -v value --ec2-vpc-id value Output The command returns the following information: · NameÐDB Security Group name · DescriptionÐDB Security Group description · VpcIdÐIdentifier of the VPC to which this DB Security Group belongs API Version 2012-09-17 43 Amazon Relational Database Service Command Line Interface Reference rds-create-db-security-group · EC2 Group NameÐEC2 security group name · EC2 Owner IDÐEC2 security group owner · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · IP RangeÐCIDR range for the security group Examples Create a Database Security Group This example creates a new database security group. PROMPT> rds-create-db-security-group --db-security-group-name mygroup --db-se curity-group-description "My Security Group" Related Operations · rds-delete-db-security-group (p. 55) · rds-authorize-db-security-group-ingress (p. 15) · rds-describe-db-security-groups (p. 67) API Version 2012-09-17 44 Amazon Relational Database Service Command Line Interface Reference Examples rds-create-db-snapshot Description Creates a recoverable DB Snapshot of all data associated with a DB Instance. Note This operation is not supported for Read Replica DB Instances. Syntax rds-create-db-snapshot DBInstanceIdentifier -s (--db-snapshot-identifier) value [General Options] Options RequiredDescriptionName YesDB Instance identifier. This is the unique key that identifies a DB Instance. This parameter is stored as a lowercase string. This parameter can also be set using --db-instance-identifier value Type: String Default: None Constraints: Must contain 1 to 63 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: --db-instance-identifier mydbinstance DBInstanceIdentifier YesThe identifier for the DB Snapshot. Type: String Default: None Constraints: Cannot be null, empty, or blank. Cannot be a word reserved by the database engine. Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: -s my-snapshot-id -s value --db-snapshot-identifier value Output The command returns the following information: · DBSnapshotIdÐName of the DB Snapshot API Version 2012-09-17 45 Amazon Relational Database Service Command Line Interface Reference rds-create-db-snapshot · Snapshot CreatedÐThe time (in 24 hour UTC) when the DB Snapshot was taken · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · Instance CreatedÐThe date and time when the DB Instance was created · EngineÐThe name and version of the database engine used · StorageÐThe size of the DB Snapshot©s allocated storage (GB) · StatusÐStatus of the DB Snapshot. Valid values: creating | available | deleting · AZÐThe original Availability Zone of the database from which the DB Snapshot was taken.This column appears only in the --show-long view · IopsÐThe provisioned IOPS allocated, expressed as I/O operations per second. · StorageÐThe size of the DB Snapshot©s allocated storage (GB) · PortÐThe original port of the database from which the DB Snapshot was taken. This column appears only with the --show-long-view command option Examples Create a Database Snapshot This example creates a new DB Snapshot. PROMPT> rds-create-db-snapshot -i mydbinstance -s mytestsnapshot Related Operations · rds-delete-db-snapshot (p. 56) · rds-describe-db-snapshots (p. 69) · rds-restore-db-instance-from-db-snapshot (p. 116) API Version 2012-09-17 46 Amazon Relational Database Service Command Line Interface Reference Examples rds-create-db-subnet-group Description Creates a new DB Subnet Group. Syntax rds-create-db-subnet-group DBSubnetGroupName -d (--db-subnet-group-description) value, -s (--db-subnet-list) value, [value, ...] [General Options] Options RequiredDescriptionName YesThe name for the DB Subnet Group. This value is stored as a lowercase string. This parameter can also be set using --db-subnet-group-name value Type: String Default: None Constraints: Must contain visible characters only. Must contain no more than 255 alphanumeric characters or hyphens. Must not be default. Example: --db-subnet-group-name mysubnetgroup DBSubnetGroupName YesThe description for the database subnet group. Type: String Default: None Constraints: Must not exceed 255 characters. Example: -d "This is my DB Subnet group" -d value --db-subnet-group-description value YesA list of one or more subnets to add to this DB subnet group. Type: String Default: None Constraints: Must be existing subnets. Example: -s subnet1, subnet2 -s value, value, ... --db-subnet-list value, value, ... Output The command returns the following information: · NameÐDB Subnet Group name API Version 2012-09-17 47 Amazon Relational Database Service Command Line Interface Reference rds-create-db-subnet-group · DescriptionÐDB Subnet Group description · StatusÐThe status of the DB Subnet Group. · Subnet IdentifierÐ Subnet Group identifier · Subnet Availability ZoneÐ The Subnet Availability Zone · StatusÐThe status of the subnet Examples Create a Database Security Group This example creates a new database security group. PROMPT> rds-create-db-subnet-group --db-subnet-group-name mygroup --db-subnet- group-description "My Subnet Group" --db-subnet-list subnet1, subnet2, subnet3 Related Operations · rds-delete-db-subnet-group (p. 58) · rds-modify-db-subnet-group (p. 103) · rds-describe-db-subnet-groups (p. 74) API Version 2012-09-17 48 Amazon Relational Database Service Command Line Interface Reference Examples rds-create-option-group Description Creates an option group. Syntax rds-create-option-group name --engine-name value --major-engine-version value --description "value" [General Options] Options RequiredDescriptionName YesName of the option group to be created.name YesThe name of the DB engine that the option applies to, for example, oracle-ee. --engine-name -e YesThe major version of the DB engine.--major-engine-version -v YesA brief description of the option group for display purposes. --description -d Output The command returns the following information: · Group nameÐThe name of the option group. · EngineÐThe name of the DB engine that the option group is associated with. · Major engine versionÐThe major version ID of the DB engine. · DescriptionÐThe description of the option group. Example This example creates an option group named TestOptionGroup, which is associated with the Oracle Enterprise Edition DB engine. PROMPT> rds-create-option-group TestOptionGroup --engine-name oracle-ee --major- API Version 2012-09-17 49 Amazon Relational Database Service Command Line Interface Reference rds-create-option-group engine-version 11.2 --description "Oracle Database Manager Database Control" OPTIONGROUP testoptiongroup oracle-ee 11.2 Oracle Database Manager Database Control API Version 2012-09-17 50 Amazon Relational Database Service Command Line Interface Reference Example rds-delete-db-instance Description Deletes a DB Instance. Once started, the process cannot be stopped, and the DB Instance will no longer be accessible. Syntax rds-delete-db-instance DBInstanceIdentifier [-f (--force) ] [--final-db-snapshot-identifier value ] [--skip-final-snapshot ] [General Options] Options RequiredDescriptionName YesDB Instance identifier.DBInstanceIdentifier NoForces no confirmation prompt for the delete operation. -f value --force NoName for the final DB Snapshot. This option is not permitted if the --skip-final-snapshot option is specified, and must be provided if --skip-final-snapshot is not specified. Constraints: Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. --final-db-snapshot-identifier value NoSpecifies that no final DB Snapshot should be made of the DB Instance before it is deleted. This parameter must not be specified if the --final-db-snapshot parameter is provided. --skip-final-snapshot Output The command returns the following information: · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · CreatedÐWhen the instance was created, in UTC · ClassÐThe compute and memory capacity of the Amazon RDS instance · EngineÐName of the database engine to be used for this DB Instance · StorageÐInitially allocated storage size specified in GBs API Version 2012-09-17 51 Amazon Relational Database Service Command Line Interface Reference rds-delete-db-instance · Master UsernameÐThe master username for the instance · StatusÐStatus of the DB Snapshot. Valid values: creating | available | deleting · Endpoint AddressÐAddress of the DB Instance · PortÐThe original port of the database from which the DB Snapshot was taken. This column appears only with the --show-long-view command option · AZÐThe original Availability Zone of the database. This column appears only in the --show-long view · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified. · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance · PendingStorageÐThe storage size to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · VersionÐThe version number of the database engine. · Auto Minor Version UpgradeÐIndicates that minor version upgrades will be applied to the DB Instance during the maintenance window. This column appears only in the --show-long view. · DB NameÐName of the initial database created when the instance was created (for the MySQL engine) or the Oracle System ID (SID) of the created DB Instance (for the Oracle engine).This column appears only in the --show-long view · Maintenance WindowÐThe period during which patching and instance modifications will be performed. This column appears only in the --show-long view · NameÐSecurity Group name · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · Group NameÐName of DB Parameter Group applied to · Apply StatusÐStatus of applying the parameter group. Valid values: in-sync | pending-reboot | applying Examples Delete a Database Instance with No Final DB Snapshot This example deletes a DB Instance, forcing data deletion so no final DB Snapshot is created. PROMPT> rds-delete-db-instance databaseInstance1 --skip-final-snapshot Once you begin deleting this database, it will no longer be able to accept connections. Are you sure you want to delete this database? [Ny]y Delete a Database Instance, Allowing a Final DB Snapshot This example deletes a database, but specifies a final DB Snapshot. PROMPT> rds-delete-db-instance databaseInstance1 --final-db-snapshot-identifier myfinalsnapshot API Version 2012-09-17 52 Amazon Relational Database Service Command Line Interface Reference Examples Once you begin deleting this database, it will no longer be able to accept connections. Are you sure you want to delete this database? [Ny]y Output Example with Column Headers This example shows command output with column headers. DBINSTANCE DBInstanceId Created Class Engine Storage Master Username Status Endpoint Address Port AZ PendingClass PendingCredentials DBINSTANCE simcoprod01 2009-05-15 22:13:39.559 db.m1.large MySQL5.1 10GB master available mydbinstance.kldusfasddog.us-east- 1.rds.am...us-east-1c SECGROUP Name Status SECGROUP Default authorized PARAMGRP Group Name Apply Status PARAMGRP mydbconfig in-sync Related Operations · rds-create-db-instance (p. 20) · rds-describe-db-instances (p. 60) · rds-delete-db-instance (p. 51) API Version 2012-09-17 53 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-delete-db-parameter-group Description Deletes a DB Parameter Group. The specified DB Parameter Group cannot be associated with any DB Instances. Syntax rds-delete-db-parameter-group DBParameterGroupName [General Options] Options RequiredDescriptionName YesDB Parameter Group identifier. This value can also be passed using the --db-parameter-group-name named parameter. Constraints: Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. DBParameterGroupName Examples Delete a DB Parameter Group This example deletes a DB Parameter Group. PROMPT> rds-delete-db-parameter-group mydbparametergroup1 Related Operations · rds-create-db-parameter-group (p. 41) · rds-describe-db-parameter-groups (p. 63) · rds-modify-db-parameter-group (p. 101) API Version 2012-09-17 54 Amazon Relational Database Service Command Line Interface Reference rds-delete-db-parameter-group rds-delete-db-security-group Description Deletes a database security group. The specified security group cannot be in use by any DB Instances. Syntax rds-delete-db-security-group DBSecurityGroupName [General Options] Options RequiredDescriptionName YesDatabase security group identifier. This value can also be passed using the --db-security-group-name named parameter. Constraints: Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. DBSecurityGroupName Examples Delete a DB Security Group This example deletes a database security group. PROMPT> rds-delete-db-security-group mysecuritygroup Once you begin deleting this security group, it will no longer be available for setting access permissions on your DB Instances. Are you sure you want to delete this security group [Ny] Related Operations · rds-create-db-security-group (p. 43) · rds-describe-db-security-groups (p. 67) API Version 2012-09-17 55 Amazon Relational Database Service Command Line Interface Reference rds-delete-db-security-group rds-delete-db-snapshot Description Deletes a DB Snapshot. Syntax rds-delete-db-snapshot DBSnapshotIdentifier [General Options] Options RequiredDescriptionName YesDB Snapshot identifier. This value can also be passed using the --db-snapshot-identifier named parameter. Constraints: Must contain 1 to 63 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. DBSnapshotIdentifier Output The command returns the following information: · DBSnapshotIdÐName of the DB Snapshot · Snapshot CreatedÐThe time (UTC) when the DB Snapshot was taken · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · Instance CreatedÐThe date and time when the DB Instance was created · EngineÐThe name and version of the database used · StorageÐThe size of the DB Snapshot©s allocated storage (GB) · StatusÐStatus of the DB Snapshot. Valid values: creating | available · Master UsernameÐThe login name of the database©s master user · AZÐThe original Availability Zone of the database from which the DB Snapshot was taken.This column appears only in the --show-long view. · PortÐThe original port of the database from which the DB Snapshot was taken. This column appears only in the --show-long view. Examples Delete a Database Snapshot This example deletes a DB Snapshot. API Version 2012-09-17 56 Amazon Relational Database Service Command Line Interface Reference rds-delete-db-snapshot PROMPT> rds-delete-db-snapshot mysnapshot Once you begin deleting this snapshot, it will no longer be available for db instance restoration. Are you sure you want to delete this snapshot [Ny] Output Example This example shows detailed output with column headers. DBSNAPSHOT DBSnapshotId Snapshot Created DBInstanceId Instance Created Engine Storage Status Master Username DBSNAPSHOT mysnapshot 2009-09-03 19:08:13.710 mydbinstance 2009-08- 2721:56:55.034 MySQL5.1 10GB deleted sa Related Operations · rds-create-db-snapshot (p. 45) · rds-describe-db-snapshots (p. 69) API Version 2012-09-17 57 Amazon Relational Database Service Command Line Interface Reference Output Example rds-delete-db-subnet-group Description Deletes a db subnet group. The specified subnet group cannot be in use. Syntax rds-delete-db-subnet-group DBSubnetGroupName [General Options] Options RequiredDescriptionName YesDatabase subnet group identifier. This value can also be passed using the --db-security-group-name named parameter. Constraints: Must contain 1 to 255 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. DBSubnetGroupName Examples Delete a DB Security Group This example deletes a database security group. PROMPT> rds-delete-db-security-group mysecuritygroup Once you begin deleting this security group, it will no longer be available for setting access permissions on your DB Instances. Are you sure you want to delete this security group [Ny] Related Operations · rds-create-db-subnet-group (p. 47) · rds-modify-db-subnet-group (p. 103) · rds-describe-db-subnet-groups (p. 74) API Version 2012-09-17 58 Amazon Relational Database Service Command Line Interface Reference rds-delete-db-subnet-group rds-delete-option-group Description Deletes an option group.You can delete an option group only if it is not associated with any DB Instance. Syntax rds-delete-option-group name [--force] [General Options] Options RequiredDescriptionName YesName of the option group to be deleted.name NoIf specified, forces the deletion to proceed without a confirmation prompt. --force -f Example This example deletes an option group named TestOptionGroup. PROMPT> rds-delete-option-group TestOptionGroup Once you delete this option group, it will no longer be available for use. Are you sure you want to delete this option group [Ny] API Version 2012-09-17 59 Amazon Relational Database Service Command Line Interface Reference rds-delete-option-group rds-describe-db-instances Description Returns information about all DB Instances for an account if no DB Instance identifier is displayed, or displays information about a specific DB Instance. Note This command returns only active DB Instances in the current default region.To see DB Instances created in another region, you can change the region using the --region parameter or pass in the URL of the regional endpoint using the --url parameter. Syntax rds-describe-db-instances [DBInstanceIdentifier ] [--max-records value ] [General Options] Options RequiredDescriptionName NoDB Instance identifier. This is the unique key that identifies an DB Instance. Stored as a lowercase string. Type: String Default: None Constraints: 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. Example: myinstance DBInstanceIdentifier Output The command returns the following information: · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · CreatedÐWhen the instance was created, in UTC · ClassÐThe compute and memory capacity of the DB Instance · EngineÐName of the database engine used for this DB Instance · StorageÐInitially allocated storage size specified in GBs · Master UsernameÐThe master username for the instance · StatusÐThe current status of the instance. Valid values: available | backing-up | creating | deleted | deleting | failed | incompatible-restore | incompatible-parameters | modifying | rebooting | resetting-master-credentials | storage-full | incompatible-parameters | incompatible-restore API Version 2012-09-17 60 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-instances · Endpoint AddressÐAddress of the DB Instance · PortÐPort used to connect to the DB Instance · AZÐThe instance©s Availability Zone · Backup RetentionÐThe number of days that automated backups are retained before deletion · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified. · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance. · PendingVersionÐ The pending database engine version number. This column appears only in the --show-long view. · DB NameÐName of the initial database created when the instance was created (for the MySQL engine) or the Oracle System ID (SID) of the created DB Instance (for the Oracle engine).This column appears only in the --show-long view · Maintenance WindowÐThe period during which patching and instance modifications will be performed. This column appears only in the --show-long view. · Backup WindowÐThe daily period during which automated backups are created.This column appears only in the --show-long view. · VersionÐThe version number of the database engine. · IopsÐThe provisioned storage IOPS, expressed as I/O operations per second. · Auto Minor Version UpgradeÐIndicates that minor version upgrades will be applied to the DB Instance during the maintenance window. This column appears only in the --show-long view. · NameÐDB Security Group name. · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · Group NameÐName of DB Parameter Group applied to. · Apply StatusÐStatus of applying the DB Parameter Group.Valid values: in-sync | pending-reboot | applying · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐDatabase engine version number. Examples Get a Description of All Database Instances This example returns a description of all DB Instances for the account. PROMPT> rds-describe-db-instances DBINSTANCE mydbinstance 2010-08-04T23:27:36.420Z db.m1.small mysql 50 sa available mydbinstance.ab7c2d4uz396.us-east-1.rds.amazonaws.com 3306 us-east-1a 3 n 5.1.49 SECGROUP default active PARAMGRP default.mysql5.1 in-sync DBINSTANCE simcoprod01 2010-08-06T07:51:10.154Z db.m1.large mysql 10 master available simcoprod01.cu7u2t4uz396.us-east-1.rds.amazonaws.com 3306 us-east-1a 1 n 5.1.49 API Version 2012-09-17 61 Amazon Relational Database Service Command Line Interface Reference Examples SECGROUP default active PARAMGRP default.mysql5.1 in-sync Get a Description of a Specific Database Instance, Showing Headers This example returns a full description of a specific DB Instance and shows table headers PROMPT> rds-describe-db-instances simcoprod01 --show-long --headers DBINSTANCE,DBInstanceId,Created,Class,Engine,Storage,Master Username,Status, Endpoint Address,Port,AZ,Backup Retention,PendingBackupRetention,PendingClass, PendingCredentials,PendingStorage,PendingMulti-AZ,PendingVersion,DB Name, Maintenance Window,Backup Window,Latest Restorable Time,Multi-AZ,Version, Auto Minor Version Upgrade DBINSTANCE,simcoprod01,2010-07-16T00:06:59.107Z,db.m1.large,mysql,60,master,avai lable,simcoprod01.cu7u2z4zz123.us-east-1.rds.amazonaws.com,3306,us-east -1d,1,(nil),(nil),(nil),(nil),(nil),(nil),(nil),sun:05:00-sun:09:00,23:00-01:00, 2010-08-05T00:00:00Z,n,5.1.47,n SECGROUP,Name,Status SECGROUP,default,active PARAMGRP,Group Name,Apply Status PARAMGRP,default.mysql5.1,in-sync Related Operations · rds-create-db-instance (p. 20) · rds-delete-db-instance (p. 51) · rds-modify-db-instance (p. 94) API Version 2012-09-17 62 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-db-parameter-groups Description Returns information about all DB Parameter Groups for an account if no database parameter group name is supplied, or displays information about a specific named DB Parameter Group. Syntax rds-describe-db-parameter-groups [DBParameterGroupName ] [--max-records value ] [General Options] Options RequiredDescriptionName NoDB Parameter Group name. This value can also be supplied using the --db-parameter-group-name parameter. Type: String Default: None DBParameterGroupName Output The command returns the following information: · Group NameÐUser-supplied DB Parameter Group name. · Parameter Group FamilyÐParameter group family to which this group applies. · DescriptionÐDescription of the DB Parameter Group. Examples Get a Description of All DB Parameter Groups This example returns a description of all DB Parameter Groups for the account, with column headers. PROMPT> rds-describe-db-parameter-groups DBPARAMETERGROUP Group Name Parameter Group Family Description DBPARAMETERGROUP default.MySQL5.1 MySQL5.1 The default database configuration for MySQL5.1 API Version 2012-09-17 63 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-parameter-groups Related Operations · rds-create-db-parameter-group (p. 41) · rds-delete-db-parameter-group (p. 54) · rds-modify-db-parameter-group (p. 101) API Version 2012-09-17 64 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-db-parameters Description Returns information about parameters that are part of a parameter group.You can optionally request only parameters from a specific source. Syntax rds-describe-db-parameters DBParameterGroupName [--max-records value ] [--source value ] [General Options] Options RequiredDescriptionName YesDB Parameter Group name. This value can also be supplied using the --db-parameter-group-name parameter. Type: String Default: None DBParameterGroupName NoSpecifies which parameter types to return. Type: String Default: None Valid values: user | system | engine-default --source value Output The command returns the following information: · Parameter NameÐThe name of the parameter. · Parameter ValueÐThe current value of the parameter. · DescriptionÐA short description of the parameter. · SourceÐWhether this parameter was set by the database engine, Amazon RDS (system), or the user. Valid values: user | system | engine-default · Data TypeÐThe data type of the parameter.. · Apply TypeÐThe type of parameter: Can be either static or dynamic. · Is ModifiableÐIndicates whether a given parameter is modifiable or not. · Allowed ValuesÐThe allowed values for this parameter.This column appears only in the --show-long view. · Minimum VersionÐThe earliest engine version to which the parameter can apply. API Version 2012-09-17 65 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-parameters Examples Retrieve the Parameters for a Specified DB Parameter Group This example retrieves the parameters for the named parameter group, showing column headers on the output. PROMPT> rds-describe-db-parameters mydbparamgrp --headers CONFIGPARAMETERS Parameter Name Parameter Value Description Source Apply Type Is Modifiable CONFIGPARAMETERS max_allowed_packet 2M The largest possible packet that can ... user dynamic true CONFIGPARAMETERS log-error /rdsdblog/error/m...specify where mysqld writes the error... engine-default static false Related Operations · rds-create-db-parameter-group (p. 41) · rds-describe-db-parameter-groups (p. 63) · rds-delete-db-parameter-group (p. 54) API Version 2012-09-17 66 Amazon Relational Database Service Command Line Interface Reference Examples rds-describe-db-security-groups Description Returns information about all database security groups for an account if no database security group name is supplied, or displays information about a specific named database security group. Syntax rds-describe-db-security-groups [DBSecurityGroupName ] [--max-records value ] [General Options] Options RequiredDescriptionName NoDatabase security group name. This value can also be supplied using the --db-security-group-name parameter. Type: String Default: None DBSecurityGroupName Output The command returns the following information: · NameÐSecurity group name · DescriptionÐDescription of the database security group · EC2 Group NameÐEC2 Security Group name · EC2 Owner IdÐEC2 Security Group owner · StatusÐStatus of security group authorization. Valid values: adding | active | removing · IP RangeÐthe CIDR IP range allowed access to the security group · StatusÐStatus of authorization for the IP Range.Valid values: authorizing | authorized | revoking Examples Get a Description of All Security Groups This example returns a description of all database security groups for the account, with column headers. PROMPT> rds-describe-db-security-groups -H SECGROUP Name Description API Version 2012-09-17 67 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-security-groups SECGROUP Default Default EC2-SECGROUP EC2 Group Name EC2 Owner Id Status EC2-SECGROUP mytestgroup 210987654321 authorized IP-RANGE IP Range Status IP-RANGE 12.23.34.45/30 authorized IP-RANGE 1.2.3.4/32 authorized Related Operations · rds-create-db-security-group (p. 43) · rds-delete-db-security-group (p. 55) · rds-authorize-db-security-group-ingress (p. 15) · rds-revoke-db-security-group-ingress (p. 128) API Version 2012-09-17 68 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-db-snapshots Description Returns information about the DB Snapshots for this account. If you pass in a DBInstanceIdentifier, it will return information only about DB Snapshots taken for that instance. If you pass in a DBSnapshotIdentifier, it will return information only about the specified DB Snapshot. If you omit both DBInstanceIdentifier and DBSnapshotIdentifier, it will return all snapshot information for all instances, up to --max-records. Passing both DBInstanceIdentifier and DBSnapshotIdentifier will result in an error. Syntax rds-describe-db-snapshots [--db-instance-identifier] value [--db-snapshot-identifier] value [--max-records ] value [General Options] Options RequiredDescriptionName NoThe unique identifier for the DB Instance. Type: String Default: None Constraints: Must contain 1 to 63 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: --db-instance-identifier mydbinstance --db-instance-identifier value --i value NoThe unique identifier for the DB Snapshot. Stored as a lowercase string. Type: String Default: None Constraints: 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: --db-snapshot-identifier m1233123-123 --db-snapshot-identifier value --s value Output The command returns the following information: · DBSnapshotIdÐName of the DB Snapshot · Snapshot CreatedÐThe time (UTC) when the DB Snapshot was taken API Version 2012-09-17 69 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-snapshots · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · Instance CreatedÐThe date and time when the DB Instance was created · EngineÐThe name of the database engine used · StorageÐThe size of the DB Snapshot©s allocated storage (GB) · IopsÐThe provisioned storage IOPS, expressed as I/O operations per second. · StatusÐStatus of the DB Snapshot. Valid values: creating | available | deleting · Master UsernameÐThe login name of the database©s master user · AZÐThe original Availability Zone of the database from which the DB Snapshot was taken.This column appears only in the --show-long view · PortÐThe original port of the database from which the DB Snapshot was taken. This column appears only in the --show-long view · EngineVersionÐDatabase engine version number. Examples Get a Description of All Database Snapshots This example returns a description of all DB Snapshots for the account, with column headers. PROMPT> rds-describe-db-snapshots -H DBSNAPSHOT DBSnapshotId Snapshot Created DBInstanceId Instance Created Engine Storage Status Master Username Version DBSNAPSHOT mysnapshot1 mydbinstance 2010-08- 04T23:27:36.420Z mysql 50 creating sa 5.1.49 DBSNAPSHOT mysnapshot2 2010-08-05T00:15:51.815Z simcoprod01 2010-07- 16T00:06:59.107Z mysql 60 available master 5.1.47 Related Operations · rds-create-db-snapshot (p. 45) · rds-delete-db-snapshot (p. 56) · rds-restore-db-instance-from-db-snapshot (p. 116) API Version 2012-09-17 70 Amazon Relational Database Service Command Line Interface Reference Examples rds-describe-db-engine-versions Description Returns information about available database engine versions. Syntax rds-describe-db-engine-versions [-d (--default-only) ] [-e (--engine) value ] [-f (--db-parameter-group-family) value ] [-v (--engine-version) value ] [-cs (--list-supported-character-sets) value ] [General Options] Options RequiredDescriptionName NoDB parameter group family filter value. Type: String Default: None Example: -f mysql5.1 -f --db-parameter-group-family value NoIndicates that only the default version of the specified engine or engine and major version combination is returned. Type: Switch flag Example: --default-only -d --default-only NoDatabase engine filter value. Type: String Example: -e mysql -e --engine value NoThe version number of the database engine. Type: String Example: -v 5.1.42 -v --engine-version value NoGenerates a list of supported Oracle character sets.-cs --list-supported-character-sets Output The command returns a table with the following information: · EngineÐname of the database engine. API Version 2012-09-17 71 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-engine-versions · EngineVersionÐdatabase engine version number. · Parameter Group FamilyÐthe version©s parameter group family. · EngineVersionÐdatabase engine version number. · Engine DescriptionÐfull name of the database engine. · Engine Version DescriptionÐfull version information of the database engine. · Default Character SetÐthe default character set for the database engine. Examples Describing Engine Versions This example returns descriptions for all available versions of all available database engines. PROMPT> rds-describe-db-engine-versions VERSION Engine Version Parameter Group Family Engine Description Engine Version Description Default Character Set VERSION mysql 5.1.42 mysql5.1 MySQL Version 5.1.42 VERSION mysql 5.1.45 mysql5.1 MySQL Version 5.1.45 VERSION mysql 5.1.47 mysql5.1 MySQL Version 5.1.47 VERSION oracle-ee 11.2.0.2.v3 oracle-ee-11.2 Oracle Database Server EE Oracle EE 11.2.0.2.v3 AL32UTF8 Describing Engine Versions for a Specific Engine This example describes all available versions of the MySQL database engine. PROMPT> rds-describe-db-engine-versions --engine mysql --show-long --header VERSION Engine Version Parameter Group Family VERSION mysql 5.1.42 mysql5.1 VERSION mysql 5.1.45 mysql5.1 VERSION mysql 5.1.47 mysql5.1 VERSION mysql 5.1.48 mysql5.1 VERSION mysql 5.1.49 mysql5.1 VERSION mysql 5.1.50 mysql5.1 VERSION mysql 5.5.8 mysql5.5 API Version 2012-09-17 72 Amazon Relational Database Service Command Line Interface Reference Examples Related Operations · rds-modify-db-instance (p. 94) · rds-create-db-parameter-group (p. 41) API Version 2012-09-17 73 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-db-subnet-groups Description Returns information about all DB Subnet Groups for an account if no DB Subnet Group name is supplied, or displays information about a specific named DB Subnet group. Syntax rds-describe-db-subnet-groups [DBSubnetGroupName ] [--max-records value ] [General Options] Options RequiredDescriptionName NoDatabase Subnet Group name. This value can also be supplied using the --db-subnet-group-name parameter. Type: String Default: None DBSubnetGroupName Output The command returns the following information: · NameÐThe name of the DB subnet group that was modified. · DescriptionÐThe description of the DB subnet group that was modified. · StatusÐThe status of the DB subnet group that was modified. · Subnet IdentifierÐThe identifier of a contained subnet. · Subnet Availability ZoneÐThe Availability Zone of the contained subnet. · StatusÐThe status of the contained subnet. Examples Get a Description of All Security Groups This example returns a description of all database security groups for the account, with column headers. PROMPT> rds-describe-db-subnet-groups -H SUBNETGROUP Name Description Staus SUBNETGROUP mygroup my group desc Active API Version 2012-09-17 74 Amazon Relational Database Service Command Line Interface Reference rds-describe-db-subnet-groups SUBNET Subnet Identifier Subnet Availability Zone Status SUBNET mytestgroup us-east-1c Active Related Operations · rds-create-db-subnet-group (p. 47) · rds-modify-db-subnet-group (p. 103) · rds-delete-db-subnet-group (p. 58) API Version 2012-09-17 75 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-events Description Returns information about events related to your DB Instances, DB Security Groups or DB Parameter Groups. Syntax rds-describe-events [--duration value ] [--start-time value ] [--end-time value ] [--source-identifier value ] [--source-type value ] [--max-records value ] [General Options] Options RequiredDescriptionName NoThe number of minutes for which to retrieve events. Type: Integer Default: 60 Example: Retrieve the last 90 minutes worth of events: --duration 90 --duration value NoThe beginning of the time interval to retrieve events, specified in ISO8601 format. For more information about ISO 8601, go to the ISO8601 format Wikipedia page. Type: Date Default: none Example: --start-time 2009-03-31T10:00:00 --start-time value NoThe end of the time interval to retrieve events, specified in ISO8601 format. For more information about ISO 8601, go to the ISO8601 format Wikipedia page. Type: Date Default: none Example: --start-time 2009-03-31T12:00:00 --end-time value API Version 2012-09-17 76 Amazon Relational Database Service Command Line Interface Reference rds-describe-events RequiredDescriptionName NoSpecifies the event source for which to retrieve events. Type: String Valid values: db-instance, db-security-group, db-parameter-group, db-snapshot Example: --source-type db-instance --source-type value NoUsed with the --source-type parameter to restrict returned events to a specific named source. Type: String Default: 60 Example: --source-type db-instance --source-identifier mydbinstance --source-identifier value Output The command returns the following information: · Source TypeÐType of event source · DateÐDatabase event date/time, in UTC · Source IdÐIdentifier of the event source · MessageÐEvent description Examples Describe All Events This example returns all events with column headers. PROMPT> rds-describe-events --headers Source Type Date Source Id Message db-instance 2009-03-27 00:28:44 test002 Database instance test002 deleted db-instance 2009-03-27 00:30:08 test003 Database instance test003 deleted db-instance 2009-03-27 00:37:59 test001 Database instance test001 created db-instance 2009-03-27 00:39:05 test0010 Database instance test0010 created db-security-group 2009-03-27 00:39:12 Default Finished applying changes to security group db-security-group 2009-03-27 00:40:22 Default The security group mysourcegroup owned by XXXXXX does not exist; revoking authorization db-security-group 2009-03-27 00:44:44 Default Finished applying changes to security group db-instance 2009-03-27 01:07:53 test0010 Database instance test0010 deleted db-instance 2009-03-27 01:09:09 test02 Database instance API Version 2012-09-17 77 Amazon Relational Database Service Command Line Interface Reference Output test02 deleted db-instance 2009-03-27 01:09:22 test004 Database instance test004 deleted db-instance 2009-03-27 01:09:58 test001 Database instance test001 deleted db-parameter-group 2009-03-27 00:39:12 myconfig DBParameterGroup updated with parameter max_binlog_size to 4096 with apply method Immediate db-snapshot 2009-03-27 01:09:58 snapshotid Deleted user snapshot: snapshotid Describe Events for a Specified Instance This example returns only events for a specific DB Instance. PROMPT> rds-describe-events --source-type db-instance --source-identifier test001 Source Type Date Source Id Message db-instance 2009-03-27 00:37:59 test001 Database instance test001 created db-instance 2009-03-27 01:09:58 test001 Database instance test001 deleted Describe Events for a Specified Time Interval This example returns only events for a specific time interval. PROMPT> rds-describe-events --start-time 2009-03-20T00:00:00-08:00 --end-time 2009-03-20T23:59:59-08:00 Related Operations · rds-describe-db-instances (p. 60) · rds-describe-db-snapshots (p. 69) · rds-describe-db-parameter-groups (p. 63) · rds-describe-db-security-groups (p. 67) API Version 2012-09-17 78 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-engine-default-parameters Description Returns a description of the default parameters used for the DB Parameter Group Family. Syntax rds-describe-engine-default-parameters ParameterGroupFamily [--max-records ] value [General Options] Options RequiredDescriptionName YesContains the name of the DB Parameter Group Family for which to list defaults. This value can also be set using the --db-parameter-group-family named parameter. Type: String Default: None ParameterGroupFamily Output The command returns a table containing the following information: · Parameter NameÐThe name of the parameter. · Parameter ValueÐValue of the parameter. · DescriptionÐA short description of the parameter. · SourceÐIndicates the source of the parameter. System indicates the parameter source is the Amazon RDS service; EngineDefault indicates the parameter source is the database engine; User indicates the parameter source is the user. · Apply TypeÐIndicates the type of parameter. Valid values: static | dynamic · Is ModifiableÐIndicates whether a given parameter can be modified. · Minimum VersionÐThe earliest engine version to which the parameter can apply. Examples Display Parameter Values for the Default DBParameterGroup This example shows how to display the default DBParameterGroup parameter values for a specific DB Parameter Group family and return the results displaying table headers. PROMPT> rds-describe-engine-default-parameters MySQL5.1 --headers API Version 2012-09-17 79 Amazon Relational Database Service Command Line Interface Reference rds-describe-engine-default-parameters Related Operations · rds-describe-db-parameters (p. 65) · rds-modify-db-parameter-group (p. 101) · rds-reset-db-parameter-group (p. 114) API Version 2012-09-17 80 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-option-group-options Description Provides a list of options that can be added to option groups that are associated with the specified DB engine. Syntax rds-describe-option-group-options --engine-name value [--major-engine-version value] [General Options] Options RequiredDescriptionName YesName of the DB engine.--engine-name -e NoA filter that limits option groups described to those associated with the specified major version of the DB engine. Default is all versions. --major-engine-version -v Output The command returns the following information for each available option: · OptionÐThe name of the option. · EngineÐThe name of the DB engine that the option requires. · Minimum required engine versionÐThe minimum major version ID of the DB engine that the option requires. · Port requiredÐIf y, the option requires a port. · Default portÐThe default port that is used by the option. · DescriptionÐA description of the option. · NameÐThe name of the associated option group. · StatusÐThe status of the option group membership. For example, the status could be in-sync, applying, pending, or pending-maintenance. Example This example describes options that require Oracle Enterprise Edition: PROMPT> rds-describe-option-group-options --engine-name oracle-ee API Version 2012-09-17 81 Amazon Relational Database Service Command Line Interface Reference rds-describe-option-group-options OPTION Option Name Engine Minimum Required Engine Version Port Required Default Port Description OPTION OEM oracle-ee 11.2.0.2v3 y 1158 Oracle Enterprise Manager This example describes options that require Oracle Enterprise Edition 11.2: PROMPT> rds-describe-option-group-options --engine-name oracle-ee --major-en gine-version 11.2 OPTION Option Name Engine Minimum Required Engine Version Port Required Default Port Description OPTION OEM oracle-ee 11.2.0.2v3 y 1158 Oracle Enterprise Manager API Version 2012-09-17 82 Amazon Relational Database Service Command Line Interface Reference Example rds-describe-option-groups Description Provides information about a specific option group or about all option groups that are described with the command. By default, all option groups are described. Syntax rds-describe-option-groups [--option-group-name value] [--engine-name value] [--major-engine-version value] [General Options] Options RequiredDescriptionName NoName of the option group to be described. Default is all option groups. --option-group-name -g NoA filter that limits option groups described to those associated with the specified DB engine. Default is all DB engines. --engine-name -e NoA filter that limits option groups described to those associated with the specified major version of the DB engine. Default is all major versions. --major-engine-version -v Output The command returns the following information: · Group nameÐThe name of the option group. · EngineÐThe name of the DB engine that the option group is associated with. · Major engine versionÐThe major version ID of the DB engine. · DescriptionÐThe description of the option group. · VPC SpecificÐIndicates if both VPC and non-VPC instances can join this option group. · VPCÐIndicates if only instances in this VPC can join this option group. · NameÐThe name of the option. · PortÐThe port used by this option, if applicable. · DescriptionÐThe description of the option. · NameÐThe security group name. · StatusÐThe status of authorization. API Version 2012-09-17 83 Amazon Relational Database Service Command Line Interface Reference rds-describe-option-groups Example This example describes all option groups that are associated with Oracle Enterprise Edition version 11.2: PROMPT> rds-describe-option-groups --engine-name oracle-ee --major-engine-version 11.2 OPTIONGROUP default:oracle-ee-11-2 oracle-ee 11.2 Default option group for oracle-ee 11.2 OPTIONGROUP testoptiongroup oracle-ee 11.2 Oracle Database Manager Database Control API Version 2012-09-17 84 Amazon Relational Database Service Command Line Interface Reference Example rds-describe-orderable-db-instance-options Description Returns information about available orderable DB Instance options. Syntax rds-describe-orderable-db-instance-options -e (--engine) [-c (--db-instance-class) value ] [-lm (--license-model) value ] [-v (--engine-version) value ] [--vpc ] value [General Options] Options RequiredDescriptionName YesThe name of the engine to retrieve DB Instance options for. Type: String Default: None Example: -e mysql -e value --engine value NoThe DB Instance class filter value. Specify this parameter to show only the available offerings that match the specified DB Instance class. Type: String Default: None Example: -c db.m1.xlarge -c --db-instance-class value NoThe license model filter value. Specify this parameter to show only the available offerings that match the specified license model. Type: String Default: None Example: --license-model bring-your-own-license -lm --license-model value NoThe engine version filter value. Specify this parameter to show only the available offerings matching the specified engine version. Type: String Default: None Example: -v 5.1.50 -v --engine-version value API Version 2012-09-17 85 Amazon Relational Database Service Command Line Interface Reference rds-describe-orderable-db-instance-options RequiredDescriptionName NoThe VPC filter value. Specify this parameter to filter by VPC or non-VPC orderable database instance options. --vpc value Output The command returns a table with the following information: · EngineÐthe database engine name. · VersionÐthe database engine version. · ClassÐthe DB Instance class. · LicenseÐthe license model. · Multi-AZÐindicates if the configuration is Multi-AZ capable. · ReadReplicaÐindicates if the configuration is Read Replica capable. · NameÐthe name of the availability zone. · VpcÐindicates if the configuration has VPC offered. Examples Describing All Orderable DB Instance Options This example returns descriptions of all orderable database instance options. PROMPT> rds-describe-orderable-db-instance-options Describing Orderable DB Instance Options for MySQL This example returns descriptions of all orderable database instance options for the MySQL database engine. PROMPT> rds-describe-orderable-db-instance-options --engine mysql Related Operations · rds-create-db-instance (p. 20) API Version 2012-09-17 86 Amazon Relational Database Service Command Line Interface Reference Output rds-describe-reserved-db-instances Description Returns information about reserved DB Instances for this account, or about a specified reserved DB Instance. Syntax rds-describe-reserved-db-instances ReservedDBInstanceID [-c (--db-instance-class) value ] [-d (--duration) value ] [-m (--multi-az) value ] [-p (--product-description) value ] [-o (--reserved-db-instances-offering-id) value ] [--max-records ] value [General Options] Options RequiredDescriptionName NoReserved DB Instance identifier. Provide this parameter to return only information about a specific reserved DB Instance. You can also set this value using the --reserved-db-instance-id parameter. Type: String Default: None Example: --reserved-db-instance-id myreserveddbinstance ReservedDBInstance --reserved-db-instance-id value NoDB Instance class filter value. Specify this parameter to show only reservations matching the specified DB Instances class. Type: String Default: None Example: -c db.m1.xlarge -c --db-instance-class value NoDuration filter value, specified in years. Specify this parameter to show only reservations for this duration. Type: String Default: None Example: -d 3y -d --duration value API Version 2012-09-17 87 Amazon Relational Database Service Command Line Interface Reference rds-describe-reserved-db-instances RequiredDescriptionName NoMulti-AZ filter value. Specify this parameter to show only reservations matching the specified multi-AZ parameter. Type: Boolean Default: None Example: -m true -m --multi-az value NoProduct description filter value. Specify this parameter to show only reservations matching the specified product description. Type: String Default: None Example: -p mysql -p --product-description value NoOffering identifier filter value. Specify this parameter to show only reservations matching the specified offering identifier. Type: String Default: None Example: --reserved-db-instances-offering-id SampleReservationID -o --reserved-db-instances-offering-id value Output The command returns a table with the following information: · ReservationIdÐthe unique identifier for the reservation. · OfferingIDÐthe offering identifier (only appears when the --show-long parameter is specified). · ClassÐthe DB instance class for the reservation. · Multi-AZÐindicates if the reservation applies to Multi-AZ deployments. · Start TimeÐthe time the reservation started · DurationÐthe duration of the reservation in years · Fixed PriceÐthe fixed price charged for each DB Instance in this reservation (only appears when the --show-long parameter is specified). · Usage PriceÐthe hourly price to run each reserved DB Instance (only appears when the --show-long parameter is specified). · CountÐthe number of database instances reserved. · StatusÐthe status of the reservation. · DescriptionÐthe database engine used by the reservation. Examples Describing Reserved Instances This example returns descriptions of all of your database instance reservations API Version 2012-09-17 88 Amazon Relational Database Service Command Line Interface Reference Output PROMPT> rds-describe-reserved-db-instances Describing a Specific Reserved Instance This example returns information about a specific reserved DB Instance. PROMPT> rds-describe-reserved-db-instances reservation1 --show-long --header Related Operations · rds-describe-reserved-db-instances-offerings (p. 90) · rds-purchase-reserved-db-instances-offering (p. 107) API Version 2012-09-17 89 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-describe-reserved-db-instances-offerings Description Returns information about available reserved DB Instance offerings. Syntax rds-describe-reserved-db-instances-offerings ReservedDBInstancesOfferingId [--reserved-db-instances-offering-id value ] [-c (--db-instance-class) value ] [-d (--duration) value ] [-m (--multi-az) value ] [-p (--product-description) value ] [--max-records ] value [General Options] Options RequiredDescriptionName NoOffering identifier filter value. Specify this parameter to show only the available offering that matches the specified Reserved DB Instances Offering.This value can also be supplied using the --reserved-db-instances-offering-id parameter. Type: String Default: None Example: --reserved-db-instances-offering-id 438012d3-4052-4cc7-b2e3-8d3372e0e706 ReservedDBInstancesOfferingId value NoDB Instance class filter value. Specify this parameter to show only the available offerings matching specified DB Instances class. Type: String Default: None Example: -c db.m1.xlarge -c --db-instance-class value NoDuration filter value, specified in years. Specify this parameter to show only the available offerings for this duration. Type: String Default: None Example: -d 3 -d --duration value API Version 2012-09-17 90 Amazon Relational Database Service Command Line Interface Reference rds-describe-reserved-db-instances-offerings RequiredDescriptionName NoMulti-AZ filter value. Specify this parameter to show only available offerings matching the specified Multi-AZ parameter. Type: Boolean Default: None Example: -m true -m --multi-az value NoProduct description filter value. Specify this parameter to show only available offerings matching the specified product description. Type: Boolean Default: None Example: -p mysql -p --product-description value Output The command returns a table with the following information: · OfferingIdÐthe unique identifier for the offering. · ClassÐthe DB instance class for the offering. · Multi-AZÐindicates if the offering applies to Multi-AZ deployments. · DurationÐthe length of the duration in years · Fixed PriceÐthe fixed price charged to reserve each DB Instance. · Usage PriceÐthe hourly price to run each reserved DB Instance. · DescriptionÐthe database engine used by the offering. Examples Describing Reserved Instances Offerings This example returns descriptions of all reserved database instance offerings. PROMPT> rds-describe-reserved-db-instances-offerings Describing a Specific Reserved Instance Offering This example returns information about a specific reserved DB Instance offering. PROMPT> rds-describe-reserved-db-instances-offerings offering-id --headers API Version 2012-09-17 91 Amazon Relational Database Service Command Line Interface Reference Output Describing Only Multi-AZ Reserved Instance Offerings This example returns information about Multi-AZ reserved DB Instance offerings. PROMPT> rds-describe-reserved-db-instances-offerings --multi-az true Related Operations · rds-describe-reserved-db-instances (p. 87) · rds-purchase-reserved-db-instances-offering (p. 107) API Version 2012-09-17 92 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-list-tags-for-resource Description Lists all tags associated with a DB Instance. Syntax rds-list-tags-for-resource resourcename [General Options] Options RequiredDescriptionName YesThe name of the DB Instance of which associated tags will be listed. resourcename Output This command returns a table that contains the following information: · keyÐThe name (key) of the tag. · valueÐThe value of the tag. Example This example lists the tags of a DB Instance. PROMPT> rds-list-tags-for-resource arn:aws:rds:us-east-1:0123456789:db:my-db- instance TAG project trinity TAG cost-center 5092 API Version 2012-09-17 93 Amazon Relational Database Service Command Line Interface Reference rds-list-tags-for-resource rds-modify-db-instance Description Changes the settings of an existing DB Instance. Syntax rds-modify-db-instance DBInstanceIdentifier [--allow-major-version-upgrade value ] [-au (--auto-minor-version-upgrade) value ] [-v (--engine-version) value ] [-s (--allocated-storage) value ] [--apply-immediately ] [-r (--backup-retention-period) value ] [-c (--db-instance-class) value ] [-g (--db-parameter-group-name) value ] [-a (--db-security-groups) value[,value...] ] [--iops value ] [-p (--master-user-password) value ] [-m (--multi-az) value] [-w (--preferred-maintenance-window) value ] [-b (--preferred-backup-window) value ] [General Options] Options RequiredDescriptionName YesDB Instance identifier. This is the unique key that identifies an DB Instance. Stored as a lowercase string. Type: String Default: None Constraints: Must contain 1 to 63 (1 to 15 for SQL Server) alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: myinstance DBInstanceIdentifier API Version 2012-09-17 94 Amazon Relational Database Service Command Line Interface Reference rds-modify-db-instance RequiredDescriptionName ConditionalIndicates that major version upgrades are allowed. Type: Boolean Constraints: This parameter must be set to true when specifying a value for the --engine-version parameter that is a different major version than the DB Instance©s current version. --allow-major-version-upgrade value NoIndicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window. Type: Boolean Example: --au true -au value --auto-minor-version-upgrade value NoVersion number of the database engine to use. Note For major version upgrades, if a non-default DBParameterGroup is currently in use, a new DBParameterGroup in the DBParameterGroupFamily for the new engine version must be specified. The new DBParameterGroup can be the default for that DBParameterGroupFamily. Type: String Example: --engine-version 5.1.42 -v value --engine-version value NoIf this option is included, the database modifications will be applied immediately. If this option is omitted, the modifications will be applied during the preferred maintenance window. Modifications that can be postponed until the preferred maintenance window currently include: changing the instance class, changing the allocated storage, and changing the database engine version. Type: Boolean Default: False Valid values: True | False --apply-immediately API Version 2012-09-17 95 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoThe number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this options to 0 disables automatic backups. Type: Integer Default: 1 Constraints: · Must be a value from 0 to 35. · Cannot be specified if the DB Instance is a read replica. · Cannot be set to 0 if the DB Instance is a master instance with Read Replicas. -r value --backup-retention-period value NoContains the compute and memory capacity of the DB Instance. Different instance classes are available for different database engines. For information about valid values for a particular engine, use the rds-describe-orderable-db-instance-options (p. 85) command. Type: String Default: None Valid values: db.t1.micro | db.m1.small | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge Example: --db-instance-class db.m1.xlarge Note Amazon RDS does not support db.t1.micro instances in a virtual private cloud (VPC). -c value --db-instance-class value NoName of the DB Parameter Group to associate with this DB Instance. Type: String Example: --db-parameter-group-name MyDBParameterGroup --g value --db-parameter-group-name value NoA list of one or more DB Security Groups to associate with this DB Instance. Type: String[] Example: --db-security-groups mysecuritygroup1, mysecuritygroup2 -a value [,value...] --db-security-groups value [,value...] API Version 2012-09-17 96 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoPassword for the master database user. Type: String MySQL Constraints: Must contain from 8 to 41 alphanumeric characters. Type: String Oracle Constraints: Must contain from 8 to 30 alphanumeric characters. Type: String SQL Server Constraints: Must contain from 8 to 128 alphanumeric characters. Example: --master-user-password mysecretpassword01 -p value --master-user-password value NoSpecifies the new amount of provisioned IOPS for the DB Instance, expressed in I/O operations per second. This option can only be specified if the database instance was created with iops specified. The iops and allocated-storage options cannot both be specified in the same request. To set or remove the iops option, or to change the iops-to-storage ratio, create a new database instance and then restore a database instance from a snapshot or to a point-in-time restore. Constraints: Must be an integer greater than 1000. --iops value NoSpecifies if this is a Multi-AZ deployment. Note At this time, multi-AZ deployments are not supported for the Microsoft SQL Server database engine. Type: Boolean Default: false Valid values: true | false Constraints: Cannot be specified if the DB Instance is a Read Replica. -m value --multi-az value API Version 2012-09-17 97 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoAmount of storage to be initially allocated for the DB Instance, in gigabytes. MySQL Type: Integer Must be an integer from 5 to 1024. Oracle Type: Integer Must be an integer from 10 to 1024. SQL Server Type: Integer Must be an integer from 200 to 1024 (sqlserver-se and sqlserver-ee) or from 30 to 1024 (sqlserver-ex and sqlserver-web). Example: --allocated-storage 20 -s value --allocated-storage value NoPreferred maintenance window for the DB Instance. Type: String Constraints: Must be in the format ddd:hh24:mi-ddd:hh24:mi.Times should be 24-hour Universal Time Coordinated (UTC). Must be at least 30 minutes. See example below. Example: rds-modify-db-instance myinstance --preferred-maintenance-window Tue:04:00-Tue:04:30 -w value --preferred-maintenance-window value NoThe daily time range during which automated backups are created if backups are enabled (using the --backup-retention-period). Type: String Constraints: Must be in the format hh24:mi-hh24:mi. Must be at least 30 minutes. Times should be 24-hour Universal Time Coordinated (UTC). Must not conflict with the --preferred-maintenance-window. --preferred-backup-window value -b value Output The command returns a table that contains the following information: · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance. · CreatedÐWhen the instance was created, in UTC · ClassÐThe compute and memory capacity of the DB Instance · EngineÐName of the database engine to be used for this DB Instance · StorageÐInitially allocated storage size specified in GBs · Master UsernameÐThe master username for the instance · StatusÐThe current status of the instance. Valid values: available | backing-up | creating | deleted | deleting | failed | modifying | rebooting | resetting-master-credentials API Version 2012-09-17 98 Amazon Relational Database Service Command Line Interface Reference Output · Endpoint AddressÐAddress of the DB Instance · PortÐPort used to connect to the DB Instance · AZÐThe instance©s Availability Zone · IopsÐThe provisioned storage allocated, exspressed as I/O operations per second. · Backup RetentionÐThe number of days that automated backups are retained before deletion · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified. · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance. · PendingVersionÐ The pending database engine version number. This column appears only in the --show-long view. · DB NameÐName of the initial database created when the instance was created (for the MySQL engine) or the Oracle System ID (SID) of the created DB Instance (for the Oracle engine). For SQL Server, will always be null. This column appears only in the --show-long view. · Maintenance WindowÐThe period during which patching and instance modifications will be performed. This column appears only in the --show-long view. · Backup WindowÐThe daily period during which automated backups are created.This column appears only in the --show-long view. · VersionÐThe version number of the database engine. · Auto Minor Version UpgradeÐIndicates that minor version upgrades will be applied to the DB Instance during the maintenance window. This column appears only in the --show-long view. · LicenseÐThe license model used for this DB Instance. · NameÐDB Security Group name. · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · Group NameÐName of DB Parameter Group applied to. · Apply StatusÐStatus of applying the DB Parameter Group.Valid values: in-sync | pending-reboot | applying · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐDatabase engine version number. · Read Replica Source IdentifierÐThe identifier of the source DB Instance for which this DB Instance acts as a Read Replica. · NameÐSubnet group name · DescriptionÐSubnet group description · StatusÐSubnet group status · VpcIdÐIdentifier of the VPC associated with the subnet group · Subnet identifierÐSubnet group identifier · Subnet Availability ZoneÐAvailability Zone of the subnet · StatusÐStatus of the subnet Examples Associate a Security Group with a Database Instance This example shows how to associate a DB Security Group with the specified DB Instance. PROMPT> rds-modify-db-instance mydbinstance --db-security-groups mycoworkers API Version 2012-09-17 99 Amazon Relational Database Service Command Line Interface Reference Examples Immediately Upgrade the Instance Class of a Database Instance This example shows how to immediately change the instance class of a DB Instance to db.m1.xlarge, with the change to take place immediately. PROMPT> rds-modify-db-instance mydbinstance -c db.m1.xlarge --apply-immediately Modify the Maintenance Window for a Database Instance This shows how to change the weekly preferred maintenance window for the DB Instance to be the minimum four hour window starting Sundays at 11:15 PM, and ending Mondays at 3:15 AM. PROMPT> rds-modify-db-instance mydbinstance -w Sun:23:15-Mon:03:15 Change the Master Password for the Database Instance This example shows how to change the master password for a DB Instance. PROMPT> rds-modify-db-instance mydbinstance -p a1b2c3d4 Change the Allocated Storage for a Database Instance This example shows how to change the allocated storage for a DB Instance to 20 GB. PROMPT> rds-modify-db-instance mydbinstance -s 20 Related Operations · rds-create-db-instance (p. 20) · rds-delete-db-instance (p. 51) · rds-describe-db-instances (p. 60) API Version 2012-09-17 100 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-modify-db-parameter-group Description Updates the parameters in a parameter group.You can update up to 20 values per call. Note Amazon RDS does not support passing multiple comma-delimited parameter values for a single parameter. Syntax rds-modify-db-parameter-group DBParameterGroupName -p (--parameters) "name=value, value=value, method=value"[, "name=value, value=value, method=value"][, ...] [General Options] Options RequiredDescriptionName YesDB Parameter Group identifier. Stored as a lowercase string. This value can also be passed using the --db-parameter-group-name named parameter. Constraints: 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. DBParameterGroupName API Version 2012-09-17 101 Amazon Relational Database Service Command Line Interface Reference rds-modify-db-parameter-group RequiredDescriptionName YesA string containing a series of parameter names, values, and the update method for the parameter update.The first --parameters argument is required; subsequent arguments are optional. A maximum of 20 parameters may be updated in a single call to the rds-modify-parameter-group command. To obtain a list of the parameters that make up a parameter group, with their values, use the rds-describe-db-parameters (p.65) command. Only parameters that are marked as modifiable can be changed. Valid values (method): immediate | pending-reboot. If immediate, the change takes effect immediately. If pending-reboot, the change takes effect the next time that the DB Instance is rebooted. The immediate method can be used only for dynamic parameters; the pending-reboot method can be used with MySQL and Oracle DB Instances for either dynamic or static parameters. For Microsoft SQL Server DB Instances, the pending-reboot parameter can be used only for static parameters. -p --parameters "name=value, value=value, method=value" Output The command returns the following information: · Group NameÐThe name of the parameter group that was modified. Examples Modify Parameters in a Parameter Group This example shows how to modify a group of parameters in a parameter group. PROMPT> rds-modify-db-parameter-group mydbparametergroup --parameters "name=max_user_connections, value=24, method=pending-reboot" "name=max_al lowed_packet, value=1024, method=immediate" Related Operations · rds-create-db-parameter-group (p. 41) · rds-delete-db-parameter-group (p. 54) · rds-describe-db-parameter-groups (p. 63) API Version 2012-09-17 102 Amazon Relational Database Service Command Line Interface Reference Output rds-modify-db-subnet-group Description Updates an existing DB Subnet Group. Syntax rds-modify-db-subnet-group DBSubnetGroupName -d (--db-subnet-group-description) value -s (--db-subnet-list) "value" [,value,...]] [General Options] Options RequiredDescriptionName YesDB Subnet Group identifier. This value can also be passed using the --db-subnet-group-name parameter. Constraints: 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. DBSubnetGroupName NoThe description of the DB Subnet Group Constraints: Cannot contain more than 255 characters. -d --db-subnet-group-description value NoA comma-delimited list of of subnets to include in this DB Subnet Group. Constraints: Cannot contain more than 255 characters. -s --db-subnet-group-list value[,value, value...] Output The command returns the following information: · NameÐThe name of the DB subnet group that was modified. · DescriptionÐThe description of the DB subnet group that was modified. · StatusÐThe status of the DB subnet group that was modified. · Subnet IdentifierÐThe identifier of a contained subnet. · Subnet Availability ZoneÐThe Availability Zone of the contained subnet. · StatusÐThe status of the contained subnet. API Version 2012-09-17 103 Amazon Relational Database Service Command Line Interface Reference rds-modify-db-subnet-group Examples Modify Parameters in a Parameter Group This example shows how to modify a DB subnet group. PROMPT> rds-modify-db-subnet-group --db-subnet-group-name mygroup --db-subnet- group-description "My Subnet Group" --db-subnet-list subnet1,subnet2,subnet3 SUBNETGROUP Name Description Staus SUBNETGROUP mygroup my group desc Active SUBNET Subnet Identifier Subnet Availability Zone Status SUBNET mytestgroup us-east-1c Active Related Operations · rds-create-db-subnet-group (p. 47) · rds-delete-db-subnet-group (p. 58) · rds-describe-db-subnet-groups (p. 74) API Version 2012-09-17 104 Amazon Relational Database Service Command Line Interface Reference Examples rds-promote-read-replica Description Creates a new DB Instance from a Read Replica. Syntax rds-promote-read-replica DBInstanceIdentifier [-r (--backup-retention-period) value ] [-b (--preferred-backup-window) value ] [General Options] Options RequiredDescriptionName YesThe database instance identifier of the Read Replica to be promoted. The identifier consists of 1 to 63 alphanumeric characters or hyphens, is case insensitive, and is not case preserving. DBInstanceIdentifier NoThe number of days automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables backups. Type: Integer Default: 1 Constraints: Must be a value from 0 to 35. --backup-retention-period -r NoWeekly time range (in UTC) during which system maintenance can occur. Type: String 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. --preferred-backup-window -b Output This command does not return any output. Example This example shows how to promote a Read Replica to be a DB Instance. No output is returned. API Version 2012-09-17 105 Amazon Relational Database Service Command Line Interface Reference rds-promote-read-replica PROMPT> rds-promote-read-replica mydbinstance This example shows shows how to promote read replica instance and set backup retention to 1 day with the preferred backup window for the db to be 1 hour starting daily at 9:15 PM and ending at 10:15 AM PROMPT> rds-promote-read-replica mydbinstance -r 1 -b 21:15-22:15 API Version 2012-09-17 106 Amazon Relational Database Service Command Line Interface Reference Example rds-purchase-reserved-db-instances-offering Description Purchases a reserved DB Instance offering. Syntax rds-purchase-reserved-db-instance-offering ReservedDBInstancesOfferingId [-c (--instance-count) value ] [-i (--reserved-db-instance-id) value ] [General Options] Options RequiredDescriptionName YesThe ID of the Reserved DB Instance offering to purchase. You can also set this value using the --reserved-db-instances-offering-id parameter. Type: String Default: None Example: --reserved-db-instances-offering-id myreserveddbinstance ReservedDBInstancesOfferingId NoThe number of DB Instances to reserve. Type: Integer Default: 1 Example: -c 3 -c --instance-count value NoOptional unique identifier for the purchased reservation. If this parameter is not specified, an identifier is automatically generated for the reservation. Type: String Default: None Example: -i myreservationID -i --reserved-db-instance-id value Output The command returns a table with the following information: · ReservationIdÐthe unique identifier for the reservation. · OfferingIDÐthe offering identifier (only appears when the --show-long parameter is specified). API Version 2012-09-17 107 Amazon Relational Database Service Command Line Interface Reference rds-purchase-reserved-db-instances-offering · ClassÐthe DB instance class for the reservation. · Multi-AZÐindicates if the reservation applies to Multi-AZ deployments. · Start TimeÐthe time the reservation started · DurationÐthe length of the duration in years. · Fixed PriceÐthe fixed price charged for each DB Instance in this reservation (only appears when the --show-long parameter is specified). · Usage PriceÐthe hourly price to run each reserved DB Instance (only appears when the --show-long parameter is specified). · CountÐthe number of database instances reserved. · StateÐthe payment status of the reservation. · DescriptionÐthe database engine used by the reservation. Examples Reserve a Database Instance This example reserves a single database instance from offering 438012d3-4052-4cc7-b2e3-8d3372e0e706. PROMPT> rds-purchase-reserved-db-instances-offering 438012d3-4052-4cc7-b2e3- 8d3372e0e706 -i myreservationID Reserve Multiple Database Instances This example reserves five database instances from offering 438012d3-4052-4cc7-b2e3-8d3372e0e706. PROMPT> rds-purchase-reserved-db-instances-offering 438012d3-4052-4cc7-b2e3- 8d3372e0e706 -i myreservationID -c 5 Related Operations · rds-describe-reserved-db-instances (p. 87) · rds-describe-reserved-db-instances-offerings (p. 90) API Version 2012-09-17 108 Amazon Relational Database Service Command Line Interface Reference Examples rds-reboot-db-instance Description Reboots a DB Instance. Once started, the process cannot be stopped, and the DB Instance is unavailable until the reboot is completed. Syntax rds-reboot-db-instance DBInstanceIdentifier [-f (--force-failover) value ][General Options] Options RequiredDescriptionName YesDB Instance identifier. Constraints: Must contain 1 to 63 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. DBInstanceIdentifier NoWhen true, specifies that the reboot will be conducted through a Multi-AZ failover.You cannot specify true if the DB Instance is not configured for Multi-AZ. Type: Boolean Default: false Example: --force-failover true -f value --force-failover value Output The command returns the following information: · DBInstanceIdÐUser-supplied database identifier; this is the unique key that identifies a DB Instance · CreatedÐWhen the instance was created, in UTC · ClassÐThe compute and memory capacity of the DB Instance · EngineÐName of the database engine to be used for this DB Instance · StorageÐInitially allocated storage size specified in GBs · Master UsernameÐThe master username for the instance · StatusÐThe current status of the instance. Valid values: available | backing-up | creating | deleted | deleting | failed | modifying | rebooting | resetting-master-credentials · Endpoint AddressÐAddress of the DB Instance · PortÐPort used to connect to the DB Instance · AZÐThe instance©s Availability Zone · Backup RetentionÐThe number of days that automated backups are retained before deletion · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified. · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance. API Version 2012-09-17 109 Amazon Relational Database Service Command Line Interface Reference rds-reboot-db-instance · PendingVersionÐ The pending database engine version number. This column appears only in the --show-long view. · DB NameÐName of the initial database created when the instance was created (for the MySQL engine) or the Oracle System ID (SID) of the created DB Instance (for the Oracle engine).This column appears only in the --show-long view · Maintenance WindowÐThe period during which patching and instance modifications will be performed. This column appears only in the --show-long view. · Backup WindowÐThe daily period during which automated backups are created.This column appears only in the --show-long view. · VersionÐThe version number of the database engine. · Auto Minor Version UpgradeÐIndicates that minor version upgrades will be applied to the DB Instance during the maintenance window. This column appears only in the --show-long view. · NameÐDB Security Group name. · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · Group NameÐName of DB Parameter Group applied to. · Apply StatusÐStatus of applying the DB Parameter Group.Valid values: in-sync | pending-reboot | applying · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐDatabase engine version number. Examples Reboot a Database Instance This example reboots a DB Instance. PROMPT> rds-reboot-db-instance databaseInstance1 Related Operations · rds-delete-db-instance (p. 51) · rds-describe-db-instances (p. 60) API Version 2012-09-17 110 Amazon Relational Database Service Command Line Interface Reference Examples rds-remove-option-from-option-group Description Removes one or more specified options from an option group. Syntax rds-remove-option-from-option-group optionGroupName --options value[,value 2][,...] [--apply-immediately] " Options RequiredDescriptionName YesName of the option group that the specified option or options will be removed from. optionGroupName YesA comma-separated list of options that will be removed. --options -o NoIf supplied, the options will be immediately disabled for all associated DB Instances; otherwise, the options will be disabled for each DB Instance at its next maintenance window. --apply-immediately Output The command returns the following information: · Group nameÐThe name of the option group that options will be removed from. · EngineÐThe DB engine that the option group is associated with · Major engine versionÐThe major version of the DB engine. · DescriptionÐThe description of the option group. · VPC SpecificÐIndicates if both VPC and non-VPC instances can join this option group. · VPCÐIndicates if only instances in this VPC can join this option group. · NameÐThe name of the option. · PortÐThe port used by this option, if applicable. · DescriptionÐThe description of the option. · NameÐThe security group name. · StatusÐThe status of authorization. The following example removes the Oracle Enterprise Manager Database Control option from an option group named TestOptionGroup. For DB Instances that use TestOptionGroup, the option will be removed at the next maintenance window for each instance: API Version 2012-09-17 111 Amazon Relational Database Service Command Line Interface Reference rds-remove-option-from-option-group PROMPT> rds-remove-option-from-option-group TestOptionGroup --options OEM OPTIONGROUP testoptiongroup oracle-ee 11.2 Oracle Enterprise Manager Database Control API Version 2012-09-17 112 Amazon Relational Database Service Command Line Interface Reference Output rds-remove-tags-from-resource Description Removes a tag for each key specified from a DB Instance. Syntax rds-remove-tags-for-resource resourcename -k (--keys) value[,value2...] [General Options] Options RequiredDescriptionName YesThe name of the DB Instance that has the tag to be removed. resourcename YesThe keys of the tags to be deleted.--keys -k Output This command does not return any output. Example This example deletes tags that have the keys "project" and "cost-center." No output is returned. PROMPT> rds-remove-tags-from-resource arn:aws:rds:us-east-1:0123456789:db:my- db-instance -k project,cost-center API Version 2012-09-17 113 Amazon Relational Database Service Command Line Interface Reference rds-remove-tags-from-resource rds-reset-db-parameter-group Description Resets individual parameters or all parameters in a parameter group to engine defaults. Syntax rds-reset-db-parameter-group DBParameterGroupName [-p (--parameters) "name=value, method=value" ...]] [--reset-all-parameters ] [General Options] Options RequiredDescriptionName YesDB Parameter Group identifier. This value can also be passed using the --db-parameter-group-name named parameter. Constraints: 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. DBParameterGroupName ConditionalA string containing a series of parameter names and apply methods. A maximum of 20 parameters may be reset in a single call to the rds-reset-db-parameter-group command. Valid values (for apply method): immediate | pending-reboot Constraints: Cannot be specified if --reset-all-parameters is specified. -p --parameters "name=value, value=value" ConditionalSpecifies that all parameters in the group should be reset to their defaults. Constraints: Cannot be specified if --parameters string is specified. --reset-all-parameters Output The command returns the following information: · Group NameÐthe name of the parameter group that was modified. API Version 2012-09-17 114 Amazon Relational Database Service Command Line Interface Reference rds-reset-db-parameter-group Examples Reset Parameters in a Parameter Group This example shows how to reset some parameters in a parameter group. PROMPT> rds-reset-db-parameter-group mydbparametergroup --parameters "name=max_user_connections, method=pending-reboot" "name=max_allowed_packet, method=immediate" Reset Parameters in a Parameter Group This example shows how to reset all parameters in a parameter group. PROMPT> rds-reset-db-parameter-group mydbparamgrp --reset-all-parameters Related Operations · rds-create-db-parameter-group (p. 41) · rds-delete-db-parameter-group (p. 54) · rds-describe-db-parameter-groups (p. 63) API Version 2012-09-17 115 Amazon Relational Database Service Command Line Interface Reference Examples rds-restore-db-instance-from-db-snapshot Description Creates a new DB Instance from a DB Snapshot of an existing DB Instance, effectively replicating the existing instance at the time the DB Snapshot was taken. Some characteristics of the new DB Instance can be modified using optional parameters; if these are omitted, the new restored DB Instance defaults to the characteristics of the DB Instance from which the snapshot was taken. Note This operation is not supported for Read Replica DB Instances. Syntax rds-restore-db-instance-from-db-snapshot DBInstanceIdentifier -s (--db-snapshot-identifier) value [-e (--engine) value ] [-lm (--license model) value ] [-z (--availability-zone) value ] [-c (--db-instance-class) value ] [--iops value ] [-m (--multi-az) value] [-sn (--db-subnet-group-name) value ] [-n (--db-name) value ] [-p (--port) value ] [-au (--auto-minor-version-upgrade) value ] [General Options] Options RequiredDescriptionName YesDB Instance identifier. This is the unique key that identifies a DB Instance. Stored as a lowercase string. Type: String Default: None Constraints: Must contain 1 to 63 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: myinstance DBInstanceIdentifier API Version 2012-09-17 116 Amazon Relational Database Service Command Line Interface Reference rds-restore-db-instance-from-db-snapshot RequiredDescriptionName NoThe EC2 Availability Zone that the DB Instance will be created in. Type: String Default: A random, system-chosen Availability Zone. Example: -z us-east-1c -z value --availability-zone value YesThe identifier for an existing DB Snapshot. Type: String Default: None 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: -s my-snapshot-id -s value --db-snapshot-identifier value YesName of the database engine to use for the new DB Instance. Type: String Default: Same as the source DB Instance. Valid values: MySQL | oracle-se1 | oracle-se | oracle-ee -e value --engine value NoContains the compute and memory capacity of the DB Instance. Different instance classes are available for different database engines. For information about valid values for a particular engine, use the rds-describe-orderable-db-instance-options (p. 85) command. Type: String Default: None Valid values: db.t1.micro | db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge Example: --db-instance-class db.m1.xlarge Note Amazon RDS does not support db.t1.micro instances in a virtual private cloud (VPC). -c value --db-instance-class value API Version 2012-09-17 117 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoLicense model for the new DB Instance. Type: String Default: Same as the source DB Instance. Valid values: license-included | bring-your-own-license | general-public-license Example: --license-model bring-your-own-license -lm --license-model value NoThe name of the DB Subnet Group to retore into. Specifying a DB Subnet Group will restore to a DB Instance in the named VPC. Note You can restore a DB Instance from a VPC to a DB Instance in another VPC, or from a non-VPC DB Instance into a DB Instance in a VPC.You cannot restore from a VPC to a DB Instance that is not in a VPC. Type: String Default: none Constraints: Must be the name of an existing DB Subnet Group. Example: --db-subnet-group-name mydbsubnetgroup -sn value --db-subnet-group value NoSpecifies the amount of provisioned IOPS for the DB Instance, expressed in I/O operations per second. If this parameter is not specified, the IOPS value will be taken from the backup. If this parameter is set to 0, the new instance will not have provisioned IOPS. Constraints: Must be an integer greater than 1000. --iops value NoSpecifies if the new DB Instance is a Multi-AZ deployment. Type: Boolean Default: false Valid values: true | false Constraints: The --availability-zone parameter cannot be set if the --multi-az parameter is set to true. -m value --multi-az value API Version 2012-09-17 118 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoThe meaning of this parameter differs according to the database engine you use. MySQL Name of a database to create when the DB Instance is created. If this parameter is not specified, no database is created in the instance. Constraints: · Cannot be empty. · Must contain 1 to 64 alphanumeric characters. · Cannot be a word reserved by the specified database engine. Type: String Example: --db-name MyDatabase Oracle The Oracle System ID (SID) of the created DB Instance. Constraints: · Cannot be longer than 8 characters. Type: String Example: --db-name MYORACLE -n value --db-name value NoPort number that the DB Instance uses for connections. Type: Integer Default: The value used in the DB Snapshot Example: --port 1234 -p value --port value NoIndicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window. Type: Boolean Example: --au true -au value --auto-minor-version-upgrade value Output The command returns a table that contains the following information: · DBInstanceIDÐthe user-supplied database identifier · CreatedÐthe data and time the instance was created, in UTC · ClassÐThe compute and memory capacity of the DB Instance · EngineÐName of the database engine to be used for this DB Instance · StorageÐInitially allocated storage size specified in GBs API Version 2012-09-17 119 Amazon Relational Database Service Command Line Interface Reference Output · IopsÐThe provisioned storage IOPS, expressed as I/O operations per second. · Master UsernameÐThe master username for the DB Instance · StatusÐThe current status of the instance. Valid values: available | backing-up | creating | deleted | deleting | failed | modifying | rebooting | resetting-master-credentials · Endpoint AddressÐAddress of the DB Instance · PortÐPort used to connect to the DB Instance · AZÐThe instance©s Availability Zone · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance · PendingStorageÐThe storage size to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified · DB NameÐName of the initial database created when the instance was created (for the MySQL engine) or the Oracle System ID (SID) of the created DB Instance (for the Oracle engine).This column appears only in the --show-long view · Maintenance WindowÐThe window during which patching and instance modifications will be performed. This column appears only in the --show-long view · NameÐSecurity Group name · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · NameÐDB Subnet Group name · DescriptionÐDB Subnet Group description · Group NameÐName of DB Parameter Group applied to · Apply StatusÐStatus of applying the parameter group. Valid values: in-sync | pending-reboot | applying · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐDatabase engine version number. Examples Restore a Database from a Snapshot with Minimal Parameters This example restores a database from a DB Snapshot with the minimal set of parameters. PROMPT> rds-restore-db-instance-from-db-snapshot mynewrestoreddatabase -s myex istingsnapshot Restore a Database from a Snapshot, Specifying a New Availability Zone This example restores a database from a DB Snapshot with a new Availability Zone. PROMPT> rds-restore-db-instance-from-db-snapshot mynewrestoreddatabase -s myex API Version 2012-09-17 120 Amazon Relational Database Service Command Line Interface Reference Examples istingsnapshot -c db.m1.large -p 3501 -z us-east-1a Related Operations · rds-delete-db-snapshot (p. 56) · rds-describe-db-snapshots (p. 69) API Version 2012-09-17 121 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-restore-db-instance-to-point-in-time Description Restores a DB Instance to a specified point in time, creating a new DB Instance. Some characteristics of the new DB Instance can be modified using optional parameters; if these are omitted, the new DB Instance defaults to the characteristics of the DB Instance from which the DB Snapshot was created. Note This operation is not supported for Read Replica DB Instances. Syntax rds-restore-db-instance-to-point-in-time TargetDBInstanceIdentifier -s (--source-db-instance-identifier) value [-l (--use-latest-restorable-time) ] [-e (--engine) value ] [-lm (--license model) value ] [-r (--restore-time) value ] [-z (--availability-zone) value ] [-c (--db-instance-class) value ] [-p (--port) value ] [--iops value ] [-m (--multi-az) value] [-au (--auto-minor-version-upgrade) value ] [-sn (--db-subnet-group-name) value ] [General Options] API Version 2012-09-17 122 Amazon Relational Database Service Command Line Interface Reference rds-restore-db-instance-to-point-in-time Options RequiredDescriptionName YesDB Instance identifier. This is the unique key that identifies a DB Instance. Type: String Default: None Constraints: Must contain 1 to 63 alphanumeric characters or hyphens. First character must be a letter. Cannot end with a hyphen or contain two consecutive hyphens. Example: mydbinstance TargetDBInstanceIdentifier YesUser-supplied identifier of the DB Instance from which to restore. This instance must be available and must have automated backups enabled. Type: String -s value --source-db-instance-identifier value ConditionalSpecifies that the DB Instance is restored from the latest backup time. Type: Boolean Default: False Constraints: Cannot be specified if RestoreTime parameter is provided. -l --use-latest-restorable-time NoLicense model for the new DB Instance. Type: String Default: Same as the source DB Instance. Valid values: license-included | bring-your-own-license | general-public-license Example: --license-model bring-your-own -lm --license-model value ConditionalThe date and time from to restore from. Type: Date Default: none Valid Values: Value must be a UTC time Constraints: · Time specified must be after the creation of the oldest system snapshot available for SourceDBInstanceIdentifier. · Cannot be after the latest restorable time for the DB Instance. · Cannot be specified if UseLatestRestorableTime parameter is true. Example: 2009-09-07T23:45:00Z -r value --restore-time value API Version 2012-09-17 123 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoThe EC2 Availability Zone that the DB Instance will be created in. Type: String Default: The Availability Zone of the source DB Instance. Example: -z us-east-1c -z value --availability-zone value NoContains the compute and memory capacity of the DB Instance. Type: String Default: The instance class of the source DB Instance. Different instance classes are available for different database engines. For information about valid values for a particular engine, use the rds-describe-orderable-db-instance-options (p. 85) command. Valid values: db.t1.micro | db.m1.small | db.m1.large | db.m1.xlarge | db.m2.2xlarge | db.m2.4xlarge Example: --db-instance-class db.m1.xlarge -c value --db-instance-class value YesName of the database engine to use for the new DB Instance. Type: String Default: Same as the source DB Instance. Valid values: MySQL | oracle-se1 | oracle-se | oracle-ee -e value --engine value NoPort number that the DB Instance uses for connections. Type: Integer Default: The port of the source DB Instance. Example: --port 1234 -p value --port value NoSpecifies the amount of provisioned IOPS for the DB Instance, expressed in I/O operations per second. If this parameter is not specified, the IOPS value will be taken from the original instance. If this parameter is set to 0, the new instance will not have provisioned IOPS. Constraints: Must be an integer greater than 1000. --iops value API Version 2012-09-17 124 Amazon Relational Database Service Command Line Interface Reference Options RequiredDescriptionName NoSpecifies if the new DB Instance is a Multi-AZ deployment. Type: Boolean Default: false Valid values: true | false Constraints: The --availability-zone parameter cannot be set if the --multi-az parameter is set to true. -m value --multi-az value NoIndicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window. Type: Boolean Example: --au true -au value --auto-minor-version-upgrade value NoThe name of the DB Subnet Group to retore into. Specifying a DB Subnet Group will restore to a DB Instance in the named VPC. Note You can restore a DB Instance from a VPC to a DB Instance in another VPC, or from a non-VPC DB Instance into a DB Instance in a VPC.You cannot restore from a VPC to a DB Instance that is not in a VPC. Type: String Default: none Constraints: Must be the name of an existing DB Subnet Group. Example: --db-subnet-group-name mydbsubnetgroup -sn value --db-subnet-group value Output The command returns a table that contains the following information: · DBInstanceIDÐthe user-supplied database identifier · CreatedÐthe data and time the instance was created, in UTC · ClassÐThe compute and memory capacity of the instance · EngineÐName of the database engine to be used for this DB Instance · StorageÐInitially allocated storage size specified in GBs · IopsÐThe provisioned storage IOPS, expressed as I/O operations per second. · Master UsernameÐThe master username for the instance · StatusÐThe current status of the instance. Valid values: available | backing-up | creating | deleted | deleting | failed | modifying | rebooting | resetting-master-credentials · Endpoint AddressÐAddress of the DB Instance. · PortÐPort used to connect to the DB Instance. API Version 2012-09-17 125 Amazon Relational Database Service Command Line Interface Reference Output · AZÐThe instance©s Availability Zone. · Backup RetentionÐThe number of days that automated backups are retained before deletion. · PendingBackupRetentionÐThe backup retention period which will be applied at the next maintenance window, or which is currently being applied if the --apply-immediately option was specified. · PendingClassÐThe class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified. · PendingCredentialsÐThe (hidden) master user password that will be applied to the DB Instance. · PendingStorageÐThe storage size to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified. · DB NameÐName of the initial database created when the instance was created.This column appears only in the --show-long view. · Maintenance WindowÐThe window during which patching and instance modifications will be performed. This column appears only in the --show-long view. · Backup WindowÐThe period during which daily automated backups are created.This column appears only in the --show-long view. · NameÐSecurity Group name. · StatusÐStatus of authorization. Valid values: authorizing | authorized | revoking · NameÐDB Subnet Group name. · DescriptionÐDB Subnet Group description. · Group NameÐName of DB Parameter Group applied to. · Apply StatusÐStatus of applying the parameter group. It can be either in-sync or pending-reboot. · Multi-AZÐIndicates if this is a Multi-AZ DB Instance. · EngineVersionÐDatabase engine version number. Examples Restore a Database to a Specified Time with Minimal Parameters This example restores a database to a specified time with the minimal set of parameters. PROMPT> rds-restore-db-instance-to-point-in-time restored-db -s original-db -r 2009-07-31T13:00:00Z Restore a Database to a Specified Time, Specifying a New Availability Zone This example restores a database to a specified time with a new Availability Zone. PROMPT> rds-restore-db-instance-to-point-in-time restored-db -s original-db -r 2009-07-31T13:00:00Z -z us-east-1b API Version 2012-09-17 126 Amazon Relational Database Service Command Line Interface Reference Examples Related Operations · rds-create-db-instance (p. 20) · rds-describe-db-instances (p. 60) API Version 2012-09-17 127 Amazon Relational Database Service Command Line Interface Reference Related Operations rds-revoke-db-security-group-ingress Description Revokes ingress to a DBSecurityGroup for previously authorized IP ranges or EC2 Security Groups. Syntax rds-revoke-db-security-group-ingress DBSecurityGroupName [-s (--ec2-security-group-id) ] value [-g (--ec2-security-group-name) ] value [-i (--cidr-ip) value ] [-o (--ec2-security-group-owner) value ] [General Options] Options RequiredDescriptionName YesThe name of the DB security group. This can also be passed as a named parameter using --db-security-group-name value Type: String Default: None Example: --db-security-group-name mydbsecuritygroup DBSecurityGroupName --db-security-group-name value NoIdentifier of the EC2 Security Group to authorize. Type: String Default: None Constraints: This parameter must be specified if the DB Security Group is for a VPC. Example: -g myec2securitygroup -s --ec2-security-group-id value NoThe name of the EC2 security group. Type: String Default: None Example: -g myec2securitygroup -g --ec2-security-group-name value NoThe IP range to allow access. Type: String Constraints: Must be a valid Classless Inter-Domain Routing (CIDR) range, in the format ddd.ddd.ddd.ddd/dd. For more information, see CIDR Notation. Default: None Example: -i 192.168.100.100/0 -i --cidr-ip-value value API Version 2012-09-17 128 Amazon Relational Database Service Command Line Interface Reference rds-revoke-db-security-group-ingress Output The command returns a table with the following information: · NameÐthe security group name · DescriptionÐthe security group description · EC2 Group NameÐthe name of the EC2 security group/ · EC2 Group IdÐIdentifier of the EC2 security group./ · EC2 Owner IDÐthe owner of the EC2 security group · IP RangeÐthe CIDR range for the authorized Amazon RDS DB security group · StatusÐthe status of the authorization Examples Authorizing Access to an EC2 Security Group This example revokes authorization for an IP range PROMPT> rds-revoke-db-security-group-ingress Default --cidr-ip 192.168.100.100/0 Authorizing Access to a CIDR range This example revokes authorization for an Amazon EC2 security group. PROMPT> rds-revoke-db-security-group-ingress Default --ec2-security-group-name secgrp --owner-id 666666666666 Related Operations · rds-authorize-db-security-group-ingress (p. 15) · rds-describe-db-security-groups (p. 67) · rds-create-db-security-group (p. 43) · rds-delete-db-security-group (p. 55) API Version 2012-09-17 129 Amazon Relational Database Service Command Line Interface Reference Output rds-version Description Returns the current version of the Amazon RDS Command Line Interface. Syntax rds-version Options None. Output This command returns a string containing the version of the Amazon RDS Command Line Interface. Examples Example Request This example returns the version of the Amazon RDS Command Line Interface. PROMPT>rds-version Relational Database Service CLI version 1.2.000 (API 2010-06-28) Related Operations · List of Command Line Operations by Function (p. 10) API Version 2012-09-17 130 Amazon Relational Database Service Command Line Interface Reference rds-version Document History This What©s New is associated with the 2012-09-17 version of the Amazon Relational Database Service. This guide was last updated on 9-17-2012. The following table describes the important changes since the last release of the Amazon Relational Database Service Command Line Reference. Release DateDescriptionChange 11 October 2012Updated to support Read Replica promotion.New feature 20 September 2012Updated to support Provisioned IOPS. API version 2012-09-17. New API and features 08 August 2012Updated to support resource tagging.New features 29 May 2012Updated to support option groups. First option group supported is Oracle Enterprise Manager Database Control. New features 8 May 2012Updated for Microsoft SQL Server support.New features 2 May 2012Updated for support for forced failover, Multi-AZ deployment for Oracle DB Instances, and nondefault character sets for Oracle DB Instances New features 16 March 2012Updated for Amazon Virtual Private Cloud (VPC) Support.New feature 19 December 2011Updated for new Reserved Instance types.Updated content 29 December 2011Adds support for new Reserved DB Instance types.New feature 23 May 2011Added support for the Oracle database engine.New feature 11 January 2011Added support for MySQL 5.5.New feature 04 October 2010Added support for Read Replicas.New feature 16 August 2010Added support for DB Engine Version Management.New feature 16 August 2010Added support for Reserved DB Instances.New feature 17 May 2010Added command line arguments for new Multi-AZ deployment feature. New feature API Version 2012-09-17 131 Amazon Relational Database Service Command Line Interface Reference Release DateDescriptionChange 13 April 2010Added new --region common parameter.Added content 26 October 2009This is the first release of Amazon Relational Database Service Command Line Reference. Future updates and changes will be noted here. New Service API Version 2012-09-17 132 Amazon Relational Database Service Command Line Interface Reference
还剩134页未读

继续阅读

下载pdf到电脑,查找使用更方便

pdf的实际排版效果,会与网站的显示效果略有不同!!

需要 6 金币 [ 分享pdf获得金币 ] 0 人已下载

下载pdf