tencent cloud

DescribeClasses
Last updated: 2024-06-17 14:25:50
DescribeClasses
Last updated: 2024-06-17 14:25:50

1. API Description

Domain name for API request: postgres.tencentcloudapi.com.

This API is used to query purchasable instance specifications.

A maximum of 1000 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: DescribeClasses.
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.
Zone Yes String AZ ID, which can be obtained through the DescribeZones API.
DBEngine Yes String Database engines. Valid values:
1. postgresql (TencentDB for PostgreSQL)
2. mssql_compatible (MSSQL compatible-TencentDB for PostgreSQL)
DBMajorVersion Yes String Major version of a database, such as 12 or 13, which can be obtained through the DescribeDBVersions API.

3. Output Parameters

Parameter Name Type Description
ClassInfoSet Array of ClassInfo List of database specifications
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.

4. Example

Example1 Querying the list of specifications

This example shows you how to query the list of purchasable specifications.

Input Example

POST / HTTP/1.1
Host: postgres.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeClasses
<Common request parameters>

{
    "DBEngine": "postgresql",
    "DBMajorVersion": "12",
    "Zone": "ap-guangzhou-3"
}

Output Example

{
    "Response": {
        "ClassInfoSet": [
            {
                "CPU": 16,
                "MaxStorage": 3000,
                "Memory": 131072,
                "MinStorage": 1000,
                "QPS": 79000,
                "SpecCode": "cdb.pg.sh1.128g"
            },
            {
                "CPU": 48,
                "MaxStorage": 6000,
                "Memory": 491520,
                "MinStorage": 1000,
                "QPS": 238000,
                "SpecCode": "cdb.pg.sh1.480g"
            }
        ],
        "RequestId": "012ed950-e375-4a2e-a7f8-15ec9fcd1d48"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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.CamSigAndAuthError Authentication failed. Please try again later. If the problem persists, please contact customer service.
FailedOperation.DatabaseAffectedError Data operation failed. Please contact customer service.
FailedOperation.WhitelistConnectError Failed to query the allowlist. Try again later. If the problem persists, contact customer service.
InternalError.InternalHttpServerError An exception occurred while executing the request.
InvalidParameter.ParameterCheckError Failed to check the parameter.
InvalidParameterValue.InvalidParameterValueError Incorrect parameter value
InvalidParameterValue.InvalidZoneIdError Invalid availability zone.
OperationDenied.CamDeniedError This operation cannot be performed.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback