Amazon Relational Database Service
Command Line Interface Reference (API Version 2012-04-23)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

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...] ]

[-p (--master-user-password) value ]

[-m (--multi-az) value]

[-w (--preferred-maintenance-window) value ]

[-b (--preferred-backup-window) value ]

[General Options]

Options

NameDescriptionRequired

DBInstanceIdentifier

DB 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

Yes

--allow-major-version-upgrade value

Indicates 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.

Conditional

-au value

--auto-minor-version-upgrade value

Indicates that minor version upgrades will be applied automatically to the DB Instance during the maintenance window.

Type: Boolean

Example: --au true

No

-v value

--engine-version value

Version number of the database engine to use.

[Note]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

No

--apply-immediately

If 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

No

-r value

--backup-retention-period value

The 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.

No

-c value

--db-instance-class value

Contains 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 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

No

--g value

--db-parameter-group-name value

Name of the DB Parameter Group to associate with this DB Instance.

Type: String

Example: --db-parameter-group-name MyDBParameterGroup

No

-a value [,value...]

--db-security-groups value [,value...]

A list of one or more DB Security Groups to associate with this DB Instance.

Type: String[]

Example: --db-security-groups mysecuritygroup1, mysecuritygroup2

No

-p value

--master-user-password value

Password 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

No

-m value

--multi-az value

Specifies if this is a Multi-AZ deployment.

[Note]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.

No

-s value

--allocated-storage value

Amount 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

No

-w value

--preferred-maintenance-window value

Preferred 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

No

--preferred-backup-window value

-b value

The 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.

No

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

  • 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). 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 

            

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