Domain name for API request: postgres.tencentcloudapi.com.
This API is used to query the HA configuration of an instance, which includes:
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeDBInstanceHAConfig. |
Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
Region | No | String | Common Params. This parameter is not required for this API. |
DBInstanceId | Yes | String | Instance ID |
Parameter Name | Type | Description |
---|---|---|
SyncMode | String | Primary-standby sync mode. Valid values:Semi-sync Async |
MaxStandbyLatency | Integer | Maximum data lag for high-availability standby server. The standby node can be promoted to the primary node when its data lag and the delay time are both less than the value of MaxStandbyLatency and MaxStandbyLag respectively. |
MaxStandbyLag | Integer | The maximum delay for high-availability standby server The standby node can be promoted to the primary node when its data lag and the delay time are both less than or equals to the value of MaxStandbyLatency and MaxStandbyLag respectively. |
MaxSyncStandbyLatency | Integer | Maximum data sync lag for standby server. If data lag of the standby node and the delay time are both less than or equals to the values of MaxSyncStandbyLatency and MaxSyncStandbyLag respectively, the standby server adopts semi-sync replication; if not, it adopts async replication.This value is only valid for the instance with SyncMode set to Semi-sync .This field returns null for async instance and semi-sync (non-downgradable to async) instance. Note: This field may return null, indicating that no valid values can be obtained. |
MaxSyncStandbyLag | Integer | Maximum sync delay time for standby server. If the delay time for standby server and the data lag are both less than or equals to the values of MaxSyncStandbyLag and MaxSyncStandbyLatency respectively, the standby server adopts sync replication mode; if not, it adopts async replication.This value is only valid for the instance with SyncMode set to Semi-sync .This field will not return for async instance and semi-sync (non-downgradable to async) instance. Note: This field may return null, indicating that no valid values can be obtained. |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to query the HA configuration by ID of the instance that adopts async replication.
POST / HTTP/1.1
Host: postgres.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBInstanceHAConfig
<Common request parameters>
{
"DBInstanceId": "postgres-32d4mmv9"
}
{
"Response": {
"MaxStandbyLag": 10,
"MaxStandbyLatency": 10737418240,
"MaxSyncStandbyLag": null,
"MaxSyncStandbyLatency": null,
"RequestId": "730627a4-547d-422b-8aac-239041b12212",
"SyncMode": "Async"
}
}
This example shows you how to query the HA configuration by ID of the instance that adopts semi-sync (downgradable to async) replication.
POST / HTTP/1.1
Host: postgres.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBInstanceHAConfig
<Common request parameters>
{
"DBInstanceId": "postgres-32d4mmv9"
}
{
"Response": {
"MaxStandbyLag": 10,
"MaxStandbyLatency": 10737418240,
"MaxSyncStandbyLag": 5,
"MaxSyncStandbyLatency": 1073741824,
"RequestId": "897783db-0451-479b-a205-b2b0e48d29a8",
"SyncMode": "Semi-sync"
}
}
This example shows you how to query the HA configuration by ID of the instance that adopts semi-sync (non-downgradable to async) replication.
POST / HTTP/1.1
Host: postgres.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDBInstanceHAConfig
<Common request parameters>
{
"DBInstanceId": "postgres-32d4mmv9"
}
{
"Response": {
"MaxStandbyLag": 10,
"MaxStandbyLatency": 10737418240,
"MaxSyncStandbyLag": null,
"MaxSyncStandbyLatency": null,
"RequestId": "a5399d5a-c77b-4c57-9a17-790e9c61ab33",
"SyncMode": "Semi-sync"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation.DatabaseAccessError | Failed to access database management service. Please try again later. If the problem persists, please contact customer service. |
FailedOperation.DatabaseAffectedError | Data operation failed. Please contact customer service. |
FailedOperation.FailedOperationError | Operation failed. Please try again later. |
InvalidParameter.ParameterCheckError | Failed to check the parameter. |
InvalidParameterValue.InvalidParameterValueError | Incorrect parameter value |
OperationDenied.CamDeniedError | This operation cannot be performed. |
OperationDenied.InstanceStatusLimitError | This operation cannot be performed on an instance in this status. |
ResourceNotFound.InstanceNotFoundError | The instance does not exist. |
本页内容是否解决了您的问题?