Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
22 KiB
Querying Database Proxy Specifications
Function
This API is used to query database proxy specifications of a DB instance.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Constraints
This operation cannot be performed when the instance is in the abnormal or frozen state.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/proxy/flavors?offset={offset}&limit={limit}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Specifies the project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
String
Specifies the DB instance ID.
offset
No
Integer
Index offset. The query starts from the next piece of data indexed by this parameter.
The value must be a non-negative number.
The default value is 0, indicating that the query starts from the first data record.
limit
No
Integer
Number of records to be queried.
The value ranges from 1 (inclusive) to 100 (inclusive).
The default value is 100.
Request
- Request parameters
Table 2 Request header parameters Parameter
Mandatory
Type
Description
X-Auth-Token
Yes
String
Specifies the user token.
The user token is a response to the API used to obtain a user token.
- URI example
GET https://rds.eu-de.otc.t-systems.com/v3/23a50154cf494ec9ad6883979a12db0a/instances/ba0fd7c13cca4655820e0f858d5d467bin01/proxy/flavors?offset=0&limit=100
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
compute_flavor_groups
Array of objects
Specification group information.
For details, see Table 4.
Table 4 compute_flavor_groups element structure description Parameter
Type
Description
group_type
String
Specification group type.
- X86
- ARM
compute_flavors
Array of objects
Specification information.
For details, see Table 5.
Table 5 compute_flavors element structure description Parameter
Type
Description
id
String
Specification ID of the database proxy.
code
String
Specification code of the database proxy.
cpu
String
Number of vCPUs.
For example, the value 1 indicates one vCPU.
mem
String
Memory size in GB.
db_type
String
Only specifications whose database type is database proxy are returned. The return value is Proxy.
az_status
Object
AZ information. key indicates the AZ associated with the specification, and value indicates the specification status in the AZ. Only the specification status in the AZ where the primary instance is located is displayed.
- normal: The specification is normal.
- abandon: The specification is abandoned.
- Example normal response
{ "compute_flavor_groups" : [ { "group_type" : "X86", "compute_flavors" : [ { "id" : "3208f282-7815-4ff8-9466-90a6fedd6b52", "code" : "rds.proxy.large.2", "cpu" : "2", "mem" : "4", "db_type" : "Proxy", "az_status" : { "aaa" : "normal" } } ] } ] } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.