Amazon Relational Database Service
API Reference (API Version 2013-02-12)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

CreateDBInstanceReadReplica

Description

Creates a DB Instance that acts as a Read Replica of a source DB Instance.

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 as specified below.

Important

The source DB Instance must have backup retention enabled.

Request Parameters

For information about the common parameters that all actions use, see Common Parameters.

AutoMinorVersionUpgrade

Indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window.

Default: Inherits from the source DB Instance

Type: Boolean

Required: No

AvailabilityZone

The Amazon EC2 Availability Zone that the Read Replica will be created in.

Default: A random, system-chosen Availability Zone in the endpoint's region.

Example: us-east-1d

Type: String

Required: No

DBInstanceClass

The compute and memory capacity of the Read Replica.

Valid Values: db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge

Default: Inherits from the source DB Instance.

Type: String

Required: No

DBInstanceIdentifier

The DB Instance identifier of the Read Replica. This is the unique key that identifies a DB Instance. This parameter is stored as a lowercase string.

Type: String

Required: Yes

Iops

The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for the DB Instance.

Type: Integer

Required: No

OptionGroupName

The option group the DB instance will be associated with. If omitted, the default Option Group for the engine specified will be used.

Type: String

Required: No

Port

The port number that the DB Instance uses for connections.

Default: Inherits from the source DB Instance

Valid Values: 1150-65535

Type: Integer

Required: No

PubliclyAccessible

Specifies the accessibility options for the DB Instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.

Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.

  • Default VPC:true
  • VPC:false

If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.

Type: Boolean

Required: No

SourceDBInstanceIdentifier

The identifier of the DB Instance that will act as the source for the Read Replica. Each DB Instance can have up to five Read Replicas.

Constraints: Must be the identifier of an existing DB Instance that is not already a Read Replica DB Instance.

Type: String

Required: Yes

Response Elements

The following elements are returned in a DBInstance structure.

AllocatedStorage

Specifies the allocated storage size specified in gigabytes.

Type: Integer

AutoMinorVersionUpgrade

Indicates that minor version patches are applied automatically.

Type: Boolean

AvailabilityZone

Specifies the name of the Availability Zone the DB Instance is located in.

Type: String

BackupRetentionPeriod

Specifies the number of days for which automatic DB Snapshots are retained.

Type: Integer

CharacterSetName

If present, specifies the name of the character set that this instance is associated with.

Type: String

DBInstanceClass

Contains the name of the compute and memory capacity class of the DB Instance.

Type: String

DBInstanceIdentifier

Contains a user-supplied database identifier. This is the unique key that identifies a DB Instance.

Type: String

DBInstanceStatus

Specifies the current state of this database.

Type: String

DBName

The meaning of this parameter differs according to the database engine you use.

MySQL

Contains the name of the initial database of this instance that was provided at create time, if one was specified when the DB Instance was created. This same name is returned for the life of the DB Instance.

Type: String

Oracle

Contains the Oracle System ID (SID) of the created DB Instance.

Type: String

DBParameterGroups

Provides the list of DB Parameter Groups applied to this DB Instance.

Type: DBParameterGroupStatus list

DBSecurityGroups

Provides List of DB Security Group elements containing only DBSecurityGroup.Name and DBSecurityGroup.Status subelements.

Type: DBSecurityGroupMembership list

DBSubnetGroup

Provides the inforamtion of the subnet group associated with the DB instance, including the name, descrption and subnets in the subnet group.

Type: DBSubnetGroup

Endpoint

Specifies the connection endpoint.

Type: Endpoint

Engine

Provides the name of the database engine to be used for this DB Instance.

Type: String

EngineVersion

Indicates the database engine version.

Type: String

InstanceCreateTime

Provides the date and time the DB Instance was created.

Type: DateTime

Iops

Specifies the Provisioned IOPS (I/O operations per second) value.

Type: Integer

LatestRestorableTime

Specifies the latest time to which a database can be restored with point-in-time restore.

Type: DateTime

LicenseModel

License model information for this DB Instance.

Type: String

MasterUsername

Contains the master username for the DB Instance.

Type: String

MultiAZ

Specifies if the DB Instance is a Multi-AZ deployment.

Type: Boolean

OptionGroupMemberships

Provides the list of option group memberships for this DB Instance.

Type: OptionGroupMembership list

PendingModifiedValues

Specifies that changes to the DB Instance are pending. This element is only included when changes are pending. Specific changes are identified by subelements.

Type: PendingModifiedValues

PreferredBackupWindow

Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.

Type: String

PreferredMaintenanceWindow

Specifies the weekly time range (in UTC) during which system maintenance can occur.

Type: String

PubliclyAccessible

Specifies the accessibility options for the DB Instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.

Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.

  • Default VPC:true
  • VPC:false

If no DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.

Type: Boolean

ReadReplicaDBInstanceIdentifiers

Contains one or more identifiers of the Read Replicas associated with this DB Instance.

Type: String list

ReadReplicaSourceDBInstanceIdentifier

Contains the identifier of the source DB Instance if this DB Instance is a Read Replica.

Type: String

SecondaryAvailabilityZone

If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.

Type: String

VpcSecurityGroups

Provides List of VPC security group elements that the DB Instance belongs to.

Type: VpcSecurityGroupMembership list

Errors

For information about the errors that are common to all actions, see Common Errors.

DBInstanceAlreadyExists

User already has a DB Instance with the given identifier.

HTTP Status Code: 400

DBInstanceNotFound

DBInstanceIdentifier does not refer to an existing DB Instance.

HTTP Status Code: 404

DBParameterGroupNotFound

DBParameterGroupName does not refer to an existing DB Parameter Group.

HTTP Status Code: 404

DBSecurityGroupNotFound

DBSecurityGroupName does not refer to an existing DB Security Group.

HTTP Status Code: 404

DBSubnetGroupDoesNotCoverEnoughAZs

Subnets in the DB subnet group should cover at least 2 availability zones unless there's'only 1 available zone.

HTTP Status Code: 400

DBSubnetGroupNotFound

DBSubnetGroupName does not refer to an existing DB Subnet Group.

HTTP Status Code: 400

InstanceQuotaExceeded

Request would result in user exceeding the allowed number of DB Instances.

HTTP Status Code: 400

InsufficientDBInstanceCapacity

Specified DB Instance class is not available in the specified Availability Zone.

HTTP Status Code: 400

InvalidDBInstanceState

The specified DB Instance is not in the available state.

HTTP Status Code: 400

InvalidSubnet

Request subnet is valid, or all subnets are not in common Vpc.

HTTP Status Code: 400

InvalidVPCNetworkState

DB Subnet Group does not cover all availability zones after it is created because users' change.

HTTP Status Code: 400

OptionGroupNotFound

The specified option group could not be found.

HTTP Status Code: 400

ProvisionedIopsNotAvailableInAZ

Provisioned IOPS not available in the specified Availability Zone.

HTTP Status Code: 400

StorageQuotaExceeded

Request would result in user exceeding the allowed amount of storage available across all DB Instances.

HTTP Status Code: 400

Examples

Sample Request

https://rds.amazonaws.com/
   ?Action=CreateDBInstanceReadReplica
   &DBInstanceIdentifier=myreadreplica
   &SourceDBInstanceIdentifier=mydbinstance
   &Version=2013-02-12
   &SignatureVersion=2
   &SignatureMethod=HmacSHA256
   &Timestamp=2011-05-15T23%3A35%3A07.325Z
   &AWSAccessKeyId=<AWS Access Key ID>
   &Signature=<Signature>

Sample Response

<CreateDBInstanceReadReplicaResponse xmlns="http://rds.amazonaws.com/doc/2013-02-12/">
  <CreateDBInstanceReadReplicaResult>
    <DBInstance>
      <ReadReplicaDBInstanceIdentifiers/>
      <Engine>mysql</Engine>
      <PendingModifiedValues/>
      <BackupRetentionPeriod>0</BackupRetentionPeriod>
      <MultiAZ>false</MultiAZ>
      <LicenseModel>general-public-license</LicenseModel>
      <DBInstanceStatus>creating</DBInstanceStatus>
      <EngineVersion>5.1.50</EngineVersion>
      <DBInstanceIdentifier>myreadreplica</DBInstanceIdentifier>
      <DBParameterGroups>
        <DBParameterGroup>
          <ParameterApplyStatus>in-sync</ParameterApplyStatus>
          <DBParameterGroupName>default.mysql5.1</DBParameterGroupName>
        </DBParameterGroup>
      </DBParameterGroups>
      <ReadReplicaSourceDBInstanceIdentifier>mydbinstance</ReadReplicaSourceDBInstanceIdentifier>
      <DBSecurityGroups>
        <DBSecurityGroup>
          <Status>active</Status>
          <DBSecurityGroupName>default</DBSecurityGroupName>
        </DBSecurityGroup>
      </DBSecurityGroups>
      <PreferredBackupWindow>23:00-01:00</PreferredBackupWindow>
      <AutoMinorVersionUpgrade>true</AutoMinorVersionUpgrade>
      <PreferredMaintenanceWindow>sun:05:00-sun:09:00</PreferredMaintenanceWindow>
      <AllocatedStorage>10</AllocatedStorage>
      <DBInstanceClass>db.m1.small</DBInstanceClass>
      <MasterUsername>master</MasterUsername>
    </DBInstance>
  </CreateDBInstanceReadReplicaResult>
  <ResponseMetadata>
    <RequestId>3e24c5cd-c6e2-11df-8463-4f0c49644cb7</RequestId>
  </ResponseMetadata>
</CreateDBInstanceReadReplicaResponse>