Domain name for API request: postgres.intl.tencentcloudapi.com.
This API (DescribeDBInstanceHConfig) is used to query instance HA configuration information. The HA configuration information 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 | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| DBInstanceId | Yes | String | Instance ID. can be obtained through the DescribeDBInstances api (https://www.tencentcloud.com/document/api/409/16773?from_cn_redirect=1). |
| Parameter Name | Type | Description |
|---|---|---|
| SyncMode | String | Primary-Standby sync mode. |
| MaxStandbyLatency | Integer | Specifies the maximum delayed data volume of the high-availability standby server. the backup node can switchover to the primary node when its latency data volume is less than or equal to this value and its delay time is less than or equal to MaxStandbyLag. |
| MaxStandbyLag | Integer | Maximum delay time of the high-availability standby server. the secondary node can be switched to the primary node when the backup node latency is less than or equal to this value and the delayed data volume is less than or equal to MaxStandbyLatency. |
| 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 of an instance based on its ID, which uses async replication.
POST / HTTP/1.1
Host: postgres.intl.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 HA configuration by instance ID, where the instance uses semi-synchronous replication and allows degradation to asynchronous replication.
POST / HTTP/1.1
Host: postgres.intl.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 HA configuration by instance ID. The instance uses semi-sync replication and cannot degrade to asynchronous replication.
POST / HTTP/1.1
Host: postgres.intl.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. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários