213 lines
18 KiB
ReStructuredText
213 lines
18 KiB
ReStructuredText
:original_name: dcs-api-0312040.html
|
|
|
|
.. _dcs-api-0312040:
|
|
|
|
Querying Service Specifications
|
|
===============================
|
|
|
|
Function
|
|
--------
|
|
|
|
This API is used to query the product ID (parameter **product_id**) which indicates the specifications of the DCS service you created.
|
|
|
|
URI
|
|
---
|
|
|
|
GET /v1.0/products
|
|
|
|
Request
|
|
-------
|
|
|
|
**Request parameters**
|
|
|
|
None.
|
|
|
|
**Example request**
|
|
|
|
None.
|
|
|
|
Response
|
|
--------
|
|
|
|
**Response parameters**
|
|
|
|
:ref:`Table 1 <dcs-api-0312040__table18437193323916>` describes the response parameters.
|
|
|
|
.. _dcs-api-0312040__table18437193323916:
|
|
|
|
.. table:: **Table 1** Parameter description
|
|
|
|
+-----------+-------+-----------------------------------------------------------------------+
|
|
| Parameter | Type | Description |
|
|
+===========+=======+=======================================================================+
|
|
| products | Array | List of specifications of the DCS service to which you can subscribe. |
|
|
+-----------+-------+-----------------------------------------------------------------------+
|
|
|
|
.. table:: **Table 2** products parameter description
|
|
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| Parameter | Type | Description |
|
|
+==========================+=======================+============================================================================================================================+
|
|
| product_id | String | Product ID used to differentiate DCS specifications. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| spec_code | String | DCS instance specification code. |
|
|
| | | |
|
|
| | | - **dcs.single_node** |
|
|
| | | - **dcs.master_standby** |
|
|
| | | - **dcs.cluster** |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| cache_mode | String | DCS instance type. Options: |
|
|
| | | |
|
|
| | | - **single**: single-node |
|
|
| | | - **ha**: master/standby |
|
|
| | | - **cluster**: Redis Cluster |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| product_type | String | Edition of DCS for Redis. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| cpu_type | String | CPU architecture. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| storage_type | String | Storage type. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| details | Array | Details of the specifications. :ref:`Table 3 <dcs-api-0312040__table830249172716>` describes the parameters in this array. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| engine | String | Cache engine. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| engine_versions | String | Cache engine version. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| spec_details | String | DCS specifications. The value subjects to the returned specifications. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| spec_details2 | String | Detailed DCS specifications, including the maximum number of connections and maximum memory size. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| charging_type | String | Billing mode. Value: **Hourly**. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| price | doubule | Price of the DCS service to which you can subscribe. (This parameter has been abandoned.) |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| currency | String | Currency. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| prod_type | String | Product type. |
|
|
| | | |
|
|
| | | Options: **instance** and **obs_space**. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| cloud_service_type_code | String | Cloud service type code. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| cloud_resource_type_code | String | Cloud resource type code. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
| flavors | Array | AZs with available resources. :ref:`Table 4 <dcs-api-0312040__table1979512328317>` describes the parameters in this array. |
|
|
+--------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. _dcs-api-0312040__table830249172716:
|
|
|
|
.. table:: **Table 3** details parameter description
|
|
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| Parameter | Type | Description |
|
|
+==================+========+================================================================================================================================================================================+
|
|
| capacity | String | Specification (total memory) of the DCS instance. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| max_bandwidth | String | Maximum bandwidth supported by the specification. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| max_clients | String | Maximum number of clients supported by the specification, which is usually equal to the maximum number of connections. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| max_connections | String | Maximum number of connections supported by the specification. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| max_in_bandwidth | String | Maximum inbound bandwidth supported by the specification, which is usually equal to the maximum bandwidth. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| max_memory | String | Maximum available memory. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| tenant_ip_count | String | Number of tenant IP addresses corresponding to the specifications. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| sharding_num | String | Number of shards supported by the specifications. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| proxy_num | String | Number of proxies supported by Proxy Cluster instances of the specified specifications. If the instance is not a Proxy Cluster instance, the value of this parameter is **0**. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| db_number | String | Number of DBs of the specifications. |
|
|
+------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. _dcs-api-0312040__table1979512328317:
|
|
|
|
.. table:: **Table 4** flavors parameter description
|
|
|
|
=============== ====== =================================================
|
|
Parameter Type Description
|
|
=============== ====== =================================================
|
|
capacity String Specification (total memory) of the DCS instance.
|
|
unit String Memory unit.
|
|
available_zones Array AZ ID.
|
|
=============== ====== =================================================
|
|
|
|
**Example response**
|
|
|
|
.. code-block::
|
|
|
|
{
|
|
"products": [
|
|
{
|
|
"details": {
|
|
"capacity": 64,
|
|
"max_memory": 64,
|
|
"max_connections": 20000,
|
|
"max_clients": 80000,
|
|
"max_bandwidth": 2000,
|
|
"max_in_bandwidth": 600,
|
|
"proc_num": 8
|
|
},
|
|
"engine": "redis",
|
|
"price": 0.04,
|
|
"currency": "1",
|
|
"flavors": [
|
|
{
|
|
"capacity": "64",
|
|
"unit": "GB",
|
|
"available_zones": [
|
|
"ae04cf9d61544df3806a3feeb401b204",
|
|
"882f6e449e3245dbb8c1c0fafa494c89"
|
|
]
|
|
},
|
|
{
|
|
"capacity": "128",
|
|
"unit": "GB",
|
|
"available_zones": [
|
|
"ae04cf9d61544df3806a3feeb401b204",
|
|
"882f6e449e3245dbb8c1c0fafa494c89"
|
|
]
|
|
},
|
|
{
|
|
"capacity": "256",
|
|
"unit": "GB",
|
|
"available_zones": [
|
|
"ae04cf9d61544df3806a3feeb401b204",
|
|
"882f6e449e3245dbb8c1c0fafa494c89"
|
|
]
|
|
}
|
|
],
|
|
"product_id": "00301-30112-0--0",
|
|
"spec_code": "dcs.cluster",
|
|
"cache_mode": "cluster",
|
|
"product_type": "generic",
|
|
"cpu_type": "x86_64",
|
|
"storage_type": "DRAM",
|
|
"engine_versions": "3.0",
|
|
"spec_details": "[{\"mem\":\"64,128,256\"}]",
|
|
"spec_details2": "[{\"capacity\": 64,\"max_memory\": 64,\"max_connections\": 20000,\"max_clients\":80000,\"max_bandwidth\": 2000,\"max_in_bandwidth\": 600,\"proc_num\":8},{\"capacity\": 128,\"max_memory\": 128,\"max_connections\": 20000,\"max_clients\":160000,\"max_bandwidth\": 2000,\"max_in_bandwidth\": 600,\"proc_num\":16},{\"capacity\": 256,\"max_memory\": 256,\"max_connections\": 20000,\"max_clients\":160000,\"max_bandwidth\": 2000,\"max_in_bandwidth\": 600,\"proc_num\":32},{\"capacity\": 512,\"max_memory\": 512,\"max_connections\": 20000,\"max_clients\":160000,\"max_bandwidth\": 2000,\"max_in_bandwidth\": 600,\"proc_num\":64},{\"capacity\": 1024,\"max_memory\": 1024,\"max_connections\": 20000,\"max_clients\":160000,\"max_bandwidth\": 2000,\"max_in_bandwidth\": 600,\"proc_num\":128}]",
|
|
"charging_type": "Hourly",
|
|
"prod_type": "instance",
|
|
"cloud_service_type_code": "XXXX",
|
|
"cloud_resource_type_code": "XXXX"
|
|
},
|
|
}
|
|
|
|
Status Code
|
|
-----------
|
|
|
|
:ref:`Table 5 <dcs-api-0312040__table11875348101316>` describes the status code of successful operations. For details about other status codes, see :ref:`Table 1 <dcs-api-0312043__table5210141351517>`.
|
|
|
|
.. _dcs-api-0312040__table11875348101316:
|
|
|
|
.. table:: **Table 5** Status code
|
|
|
|
=========== ============================================
|
|
Status Code Description
|
|
=========== ============================================
|
|
200 Service specifications queried successfully.
|
|
=========== ============================================
|