Menu
Amazon Relational Database Service
API Reference (API Version 2014-10-31)

PromoteReadReplica

Promotes a Read Replica DB instance to a standalone DB instance.

Note

We recommend that you enable automated backups on your Read Replica before promoting the Read Replica. This ensures that no backup is taken during the promotion process. Once the instance is promoted to a primary instance, backups are taken based on your backup settings.

Request Parameters

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

BackupRetentionPeriod

The number of days to retain automated backups. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.

Default: 1

Constraints:

  • Must be a value from 0 to 8

Type: Integer

Required: No

DBInstanceIdentifier

The DB instance identifier. This value is stored as a lowercase string.

Constraints:

  • Must match the identifier of an existing Read Replica DB instance.

Example: mydbinstance

Type: String

Required: Yes

PreferredBackupWindow

The daily time range during which automated backups are created if automated backups are enabled, using the BackupRetentionPeriod parameter.

Default: A 30-minute window selected at random from an 8-hour block of time per AWS Region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.

Constraints:

  • Must be in the format hh24:mi-hh24:mi.

  • Times should be in Universal Coordinated Time (UTC).

  • Must not conflict with the preferred maintenance window.

  • Must be at least 30 minutes.

Type: String

Required: No

Response Elements

The following element is returned by the service.

DBInstance

Contains the result of a successful invocation of the following actions:

This data type is used as a response element in the DescribeDBInstances action.

Type: DBInstance object

Errors

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

DBInstanceNotFound

DBInstanceIdentifier does not refer to an existing DB instance.

HTTP Status Code: 404

InvalidDBInstanceState

The specified DB instance is not in the available state.

HTTP Status Code: 400

Example

Sample Request


https://rds.us-east-1.amazonaws.com/
   ?Action=PromoteReadReplica
   &BackupRetentionPeriod=7
   &DBInstanceIdentifier=mysqldb-rr
   &SignatureMethod=HmacSHA256
   &SignatureVersion=4
   &Version=2014-09-01
   &X-Amz-Algorithm=AWS4-HMAC-SHA256
   &X-Amz-Credential=AKIADQKE4SARGYLE/20140428/us-east-1/rds/aws4_request
   &X-Amz-Date=20140428T221536Z
   &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
   &X-Amz-Signature=c0b2cfc3db8334b6ef86922f664e05ab306754e30e408d9fd3c8e58069a9b386

Sample Response


<PromoteReadReplicaResponse xmlns="http://rds.amazonaws.com/doc/2014-09-01/">
  <PromoteReadReplicaResult>
    <DBInstance>
      <BackupRetentionPeriod>0</BackupRetentionPeriod>
      <DBInstanceStatus>modifying</DBInstanceStatus>
      <MultiAZ>false</MultiAZ>
      <VpcSecurityGroups/>
      <DBInstanceIdentifier>mysqldb-rr</DBInstanceIdentifier>
      <PreferredBackupWindow>08:25-08:55</PreferredBackupWindow>
      <PreferredMaintenanceWindow>fri:04:50-fri:05:20</PreferredMaintenanceWindow>
      <StatusInfos>
        <DBInstanceStatusInfo>
          <Status>replicating</Status>
          <StatusType>read replication</StatusType>
          <Normal>true</Normal>
        </DBInstanceStatusInfo>
      </StatusInfos>
      <AvailabilityZone>us-east-1a</AvailabilityZone>
      <ReadReplicaDBInstanceIdentifiers/>
      <Engine>mysql</Engine>
      <PendingModifiedValues>
        <BackupRetentionPeriod>7</BackupRetentionPeriod>
      </PendingModifiedValues>
      <LicenseModel>general-public-license</LicenseModel>
      <DBParameterGroups>
        <DBParameterGroup>
          <ParameterApplyStatus>in-sync</ParameterApplyStatus>
          <DBParameterGroupName>default.mysql5.6</DBParameterGroupName>
        </DBParameterGroup>
      </DBParameterGroups>
      <Endpoint>
        <Port>3306</Port>
        <Address>mysqldb-rr.cg029hpkxcjt.us-east-1.rds.amazonaws.com</Address>
      </Endpoint>
      <EngineVersion>5.6.13</EngineVersion>
      <ReadReplicaSourceDBInstanceIdentifier>mysqldb</ReadReplicaSourceDBInstanceIdentifier>
      <OptionGroupMemberships>
        <OptionGroupMembership>
          <OptionGroupName>default:mysql-5-6</OptionGroupName>
          <Status>in-sync</Status>
        </OptionGroupMembership>
      </OptionGroupMemberships>
      <PubliclyAccessible>true</PubliclyAccessible>
      <DBSecurityGroups>
        <DBSecurityGroup>
          <Status>active</Status>
          <DBSecurityGroupName>default</DBSecurityGroupName>
        </DBSecurityGroup>
      </DBSecurityGroups>
      <AutoMinorVersionUpgrade>true</AutoMinorVersionUpgrade>
      <DBName>mysqldb</DBName>
      <InstanceCreateTime>2014-04-25T17:12:34.460Z</InstanceCreateTime>
      <AllocatedStorage>100</AllocatedStorage>
      <DBInstanceClass>db.m1.medium</DBInstanceClass>
      <MasterUsername>myawsuser</MasterUsername>
    </DBInstance>
  </PromoteReadReplicaResult>
  <ResponseMetadata>
    <RequestId>8e8c0d64-be21-11d3-a71c-13dc2f771e41</RequestId>
  </ResponseMetadata>
</PromoteReadReplicaResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: