API Actions: PromoteDbReplicaToPrimaryStatus
Returns the progress of the PromoteDbReplicaToPrimary API call.
Request Syntax:
JSON
POST /api/PromoteDbReplicaToPrimaryStatus HTTP/1.1
Host: use.your.host.name:82
X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Content-Type: application/json
X-Amz-Date: 20171115T202130Z
Authorization: AWS4-HMAC-SHA256 Credential= UQOPWUVNBALABCABCABC/20171115/us-east-1/cloudbasic/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=995374189c189e8e68ed3de82c1764ca11971711fb5179eeab2b19edd883dd74
{
"replicationId": "XXXXXXXX-9211-4dac-b90b-196fd1d17993"
}
Request Parameters
| Parameter | Description | Required |
|---|---|---|
| ReplicationId | A GUID value that uniquely identifies a Replication. | Yes |
| Type: String Default: None |
Request Headers
This implementation uses only request headers that are common to all operations. For more information please see the section Common Request Headers
Response Syntax:
JSON
HTTP/1.1 200
status: 200
{
"replicationId": "998acaec-9211-4dac-b90b-196fd1d17993"
"status": "Running",
"progress":"10%",
"logs":""
}
{
"ReplicationId": "XXXXXXX-057f-4b73-95dc-e99bce7cd70b",
"Status": "Success",
"Progress": "100%",
"Logs": "\r\n6/6/2023 2:14:36 AM>>***\r\n6/6/2023 2:14:36 AM>>API User API1 agreed to initiate Promote DB Replica [myDB] to Primary with following options:
IgnoreInaccessibleSourceConnection=true,
IgnoreDbDiscrepancies=true
CancelRunningCtProcess=true
TurnOffDataReplication=true
EnableConstraintsWithCheck=true\r\n6/6/2023 2:14:36 AM>>*****\r\n6/6/2023 2:14:36 AM>>BEGIN\r\n6/6/2023 2:14:36 AM>>Promoting to Primary initiated for database [myDB]: Activating FKs, constraints and triggers.\r\n6/6/2023 2:14:36 AM>>Source is accessible. Retrieving structure from source database.\r\n6/6/2023 2:14:36 AM>>0 constraints found.\r\n6/6/2023 2:14:36 AM>>0 table triggers found.\r\n6/6/2023 2:14:36 AM>>0 database triggers found.\r\n6/6/2023 2:14:36 AM>>No scripts to execute\r\n6/6/2023 2:14:36 AM>>Successfully promoted database [myDB] to primary, Time elapsed:0 hours 0 mins 0.692 secs\r\n6/6/2023 2:14:36 AM>>END\r\n"
}
Response Parameters
| Parameter | Description | Optional |
|---|---|---|
| Id | The requested GUID value that uniquely identifies a Replication. | No |
| Status | Possible values include:
|
No |
| Progress | The progress, in percents, of the Replication. When the Status is Success, this parameter will return 100. | Yes |
| Logs | Detailed progress logs of the PromoteToPrimary process. | Yes |
Error Response Syntax:
JSON
HTTP/1.1 400
status: 400
{
"errors": [
"Failed to retrieve status"
],
"requestId": 21
}
