diff --git a/api-ref/source/backup_and_restoration_apis/deleting_backup_files.rst b/api-ref/source/backup_and_restoration_apis/deleting_backup_files.rst index f324168..2b443db 100644 --- a/api-ref/source/backup_and_restoration_apis/deleting_backup_files.rst +++ b/api-ref/source/backup_and_restoration_apis/deleting_backup_files.rst @@ -38,6 +38,8 @@ None **Example request** +Request URL: + .. code-block:: text DELETE https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}/backups/{backup_id} diff --git a/api-ref/source/backup_and_restoration_apis/restoring_a_dcs_instance.rst b/api-ref/source/backup_and_restoration_apis/restoring_a_dcs_instance.rst index a784cb6..25424f8 100644 --- a/api-ref/source/backup_and_restoration_apis/restoring_a_dcs_instance.rst +++ b/api-ref/source/backup_and_restoration_apis/restoring_a_dcs_instance.rst @@ -52,10 +52,14 @@ Request **Example request** +Request URL: + .. code-block:: text POST https://{dcs_endpoint}/v1.0/{project_id}/instances/{instance_id}/restores +Example: + .. code-block:: { diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst index 7a61dd9..d04ddcc 100644 --- a/api-ref/source/change_history.rst +++ b/api-ref/source/change_history.rst @@ -10,10 +10,17 @@ Change History +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Released On | What's New | +===================================+====================================================================================================================================================================================================================================================================================================================================+ + | 2022-12-13 | Modified the following content: | + | | | + | | - In section :ref:`Querying All DCS Instances of a Tenant `, added the **include_failure** parameter and deleted the **isExactMatchName** parameter. | + | | - In section :ref:`Querying DCS Instance Status `, added parameters such as **redis**, and changed the **includeFailure** parameter to **include_failure**. | + | | - Updated the example request format in section :ref:`Deleting Backup Files `. | + | | - In section :ref:`Querying AZ Information `, changed the **regionID** parameter to **region_id**. | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2022-10-12 | Modified the following content: | | | | | | - Changed the type of the **private_ips** parameter to **Array of strings** in :ref:`Scaling Up a DCS Instance `. | - | | - Deleted the **includeFailure** parameter from :ref:`Querying All DCS Instances of a Tenant `. | + | | - In section :ref:`Querying All DCS Instances of a Tenant `, deleted the **includeFailure** parameter. | | | - Modified the description of the **maxmemory-policy** parameter in :ref:`Parameter Management APIs `. | +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2022-08-04 | Modified the following content: | @@ -50,11 +57,11 @@ Change History | | | | | - Changed API categorization into lifecycle management APIs, instance management APIs, parameter management APIs, backup and restoration APIs, and other APIs. | | | - Added description about creating DCS Redis 4.0 and 5.0 instances in section :ref:`Creating a DCS Instance `. | - | | - Optimized :ref:`Error Codes `. | + | | - Optimized section "Error Code." | +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2020-06-16 | Modified the following content: | | | | - | | Added error codes such as 111400102 in section :ref:`Error Codes `. | + | | Added error codes such as 111400102 in the **Error Codes** section. | +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2020-03-25 | Modified the following content: | | | | diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index d39e2b6..5b7c21a 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -94,9 +94,6 @@ html_title = "Distributed Cache Service - API Reference" # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] -# Do not include sources into the rendered results -html_copy_source = False - # -- Options for PDF output -------------------------------------------------- latex_documents = [ ('index', diff --git a/api-ref/source/instance_management_apis/querying_dcs_instance_status.rst b/api-ref/source/instance_management_apis/querying_dcs_instance_status.rst index db9c29c..906057d 100644 --- a/api-ref/source/instance_management_apis/querying_dcs_instance_status.rst +++ b/api-ref/source/instance_management_apis/querying_dcs_instance_status.rst @@ -13,7 +13,7 @@ This API is used to query the number of instances in different states. URI --- -GET /v1.0/{project_id}/instances/status?includeFailure={includeFailure} +GET /v1.0/{project_id}/instances/status?include_failure={include_failure} :ref:`Table 1 ` describes the parameters. @@ -26,7 +26,7 @@ GET /v1.0/{project_id}/instances/status?includeFailure={includeFailure} +=================+=================+=================+============================================================================================================================+ | project_id | String | Yes | Project ID. | +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------+ - | includeFailure | String | No | An indicator of whether the number of DCS instances that failed to be created will be returned to the API caller. Options: | + | include_failure | String | No | An indicator of whether the number of DCS instances that failed to be created will be returned to the API caller. Options: | | | | | | | | | | - **true**: The number of DCS instances that failed to be created will be returned to the API caller. | | | | | - **false** or others: The number of DCS instances that failed to be created will not be returned to the API caller. | @@ -43,7 +43,7 @@ None .. code-block:: text - GET https://{dcs_endpoint}/v1.0/{project_id}/instances/status?includeFailure=true + GET https://{dcs_endpoint}/v1.0/{project_id}/instances/status?include_failure=true Response -------- @@ -56,60 +56,117 @@ Response .. table:: **Table 2** Parameter description + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | Parameter | Type | Description | + +====================+===========================================================================+================================================================+ + | redis | :ref:`StatusStatistic ` object | Redis instance quantity statistics. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | creating_count | Integer | Number of instances that are being created. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | deleting_count | Integer | Number of instances that are being deleted. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | running_count | Integer | Number of running instances. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | error_count | Integer | Number of abnormal instances. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | restarting_count | Integer | Number of instances that are being restarted. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | createfailed_count | Integer | Number of instances that fail to be created. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | extending_count | Integer | Number of instances that are being scaled up. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | upgrading_count | Integer | Number of instances that are being upgraded. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | paying_count | Integer | Number of instances for which payment is in progress. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | migrating_count | Integer | Number of instances on which data migration is in progress. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | flushing_count | Integer | Number of instances whose data is being cleared. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | closed_count | Integer | Number of instances that have been stopped. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | starting_count | Integer | Number of instances that are being started. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | closing_count | Integer | Number of instances that are being stopped. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + | restoring_count | Integer | Number of instances for which data restoration is in progress. | + +--------------------+---------------------------------------------------------------------------+----------------------------------------------------------------+ + +.. _dcs-api-0312016__response_statusstatistic: + +.. table:: **Table 3** StatusStatistic + +--------------------+---------+----------------------------------------------------------------+ | Parameter | Type | Description | +====================+=========+================================================================+ - | creating_count | Integer | Number of instances that are being created. | - +--------------------+---------+----------------------------------------------------------------+ - | deleting_count | Integer | Number of instances that are being deleted. | - +--------------------+---------+----------------------------------------------------------------+ - | running_count | Integer | Number of running instances. | - +--------------------+---------+----------------------------------------------------------------+ - | error_count | Integer | Number of abnormal instances. | - +--------------------+---------+----------------------------------------------------------------+ - | restarting_count | Integer | Number of instances that are being restarted. | - +--------------------+---------+----------------------------------------------------------------+ - | createfailed_count | Integer | Number of instances that fail to be created. | - +--------------------+---------+----------------------------------------------------------------+ - | extending_count | Integer | Number of instances that are being scaled up. | - +--------------------+---------+----------------------------------------------------------------+ - | upgrading_count | Integer | Number of instances that are being upgraded. | - +--------------------+---------+----------------------------------------------------------------+ | paying_count | Integer | Number of instances for which payment is in progress. | +--------------------+---------+----------------------------------------------------------------+ | migrating_count | Integer | Number of instances on which data migration is in progress. | +--------------------+---------+----------------------------------------------------------------+ | flushing_count | Integer | Number of instances whose data is being cleared. | +--------------------+---------+----------------------------------------------------------------+ - | closed_count | Integer | Number of instances that have been stopped. | - +--------------------+---------+----------------------------------------------------------------+ - | starting_count | Integer | Number of instances that are being started. | - +--------------------+---------+----------------------------------------------------------------+ - | closing_count | Integer | Number of instances that are being stopped. | + | upgrading_count | Integer | Number of instances that are being upgraded. | +--------------------+---------+----------------------------------------------------------------+ | restoring_count | Integer | Number of instances for which data restoration is in progress. | +--------------------+---------+----------------------------------------------------------------+ + | extending_count | Integer | Number of instances that are being scaled up. | + +--------------------+---------+----------------------------------------------------------------+ + | creating_count | Integer | Number of instances that are being created. | + +--------------------+---------+----------------------------------------------------------------+ + | running_count | Integer | Number of running instances. | + +--------------------+---------+----------------------------------------------------------------+ + | error_count | Integer | Number of abnormal instances. | + +--------------------+---------+----------------------------------------------------------------+ + | createfailed_count | Integer | Number of instances that fail to be created. | + +--------------------+---------+----------------------------------------------------------------+ + | restarting_count | Integer | Number of instances that are being restarted. | + +--------------------+---------+----------------------------------------------------------------+ + +**Status code: 400** + +.. table:: **Table 4** Response body parameters + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+======================================================================================+ + | error_msg | String | Error message. | + | | | | + | | | Maximum length: 1024 characters | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + | error_code | String | Error code. | + | | | | + | | | Maximum length: 9 characters | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + | error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. | + | | | | + | | | Maximum length: 1024 characters | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + +**Status code: 500** + +.. table:: **Table 5** Response body parameters + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+======================================================================================+ + | error_msg | String | Error message. | + | | | | + | | | Maximum length: 1024 characters | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + | error_code | String | Error code. | + | | | | + | | | Maximum length: 9 characters | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ + | error_ext_msg | String | Extended error information. This parameter is not used currently and is set to null. | + | | | | + | | | Maximum length: 1024 characters | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------+ **Example response** .. code-block:: - {"memcached":{ - "paying_count":0, - "migrating_count":0, - "error_count":0, - "restarting_count":0, - "createfailed_count":0, - "flushing_count":0, - "closed_count":0, - "extending_count":0, - "creating_count":0, - "starting_count":0, - "closing_count":0, - "running_count":0, - "upgrading_count":0, - "restoring_count":0 - }, + { "paying_count":0, "migrating_count":0, "error_count":0, @@ -145,14 +202,18 @@ Response Status Code ----------- -:ref:`Table 3 ` describes the status code of successful operations. For details about other status codes, see :ref:`Table 1 `. +:ref:`Table 6 ` describes the status code of successful operations. For details about other status codes, see :ref:`Table 1 `. .. _dcs-api-0312016__table36591653133: -.. table:: **Table 3** Status code +.. table:: **Table 6** Status code +-------------+-------------------------------------------------------------------------+ | Status Code | Description | +=============+=========================================================================+ | 200 | Quantities of DCS instances in different statuses queried successfully. | +-------------+-------------------------------------------------------------------------+ + | 400 | The request is invalid. | + +-------------+-------------------------------------------------------------------------+ + | 500 | Internal service error. | + +-------------+-------------------------------------------------------------------------+ diff --git a/api-ref/source/lifecycle_management_apis/querying_all_dcs_instances_of_a_tenant.rst b/api-ref/source/lifecycle_management_apis/querying_all_dcs_instances_of_a_tenant.rst index 6ad1e0d..168424c 100644 --- a/api-ref/source/lifecycle_management_apis/querying_all_dcs_instances_of_a_tenant.rst +++ b/api-ref/source/lifecycle_management_apis/querying_all_dcs_instances_of_a_tenant.rst @@ -13,7 +13,7 @@ This API is used to query DCS instances of a tenant, and allows you to specify q URI --- -GET /v1.0/{project_id}/instances?start={start}&limit={limit}&name={name}&status={status}&id={id}&isExactMatchName={isExactMatchName}&ip={ip}&tags={key}={value} +GET /v1.0/{project_id}/instances?start={start}&limit={limit}&name={name}&status={status}&id={id}&include_failure={include_failure}&ip={ip}&tags={key}={value} :ref:`Table 1 ` describes the parameters. @@ -21,50 +21,48 @@ GET /v1.0/{project_id}/instances?start={start}&limit={limit}&name={name}&status= .. table:: **Table 1** Parameter description - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Mandatory | Description | - +==================+==================+=================+======================================================================================================================+ - | project_id | String | Yes | Project ID. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | start | Integer | No | Start number for querying DCS instances. It cannot be lower than 1. | - | | | | | - | | | | By default, the start number is 1. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | limit | Integer | No | Number of DCS instances displayed on each page. | - | | | | | - | | | | Minimum value: **1** | - | | | | | - | | | | Maximum value: **2000** | - | | | | | - | | | | If this parameter is left unspecified, a maximum of 1000 DCS instances are displayed on each page. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | name | String | No | DCS instance name. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | id | String | No | Instance ID. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | status | String | No | DCS instance status. For details about status, see :ref:`DCS Instance Statuses `. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | ip | String | No | IP address for connecting to the DCS instance | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | isExactMatchName | String | No | An indicator of whether to perform an exact or fuzzy match based on instance name. | - | | | | | - | | | | Options: | - | | | | | - | | | | - **true**: exact match | - | | | | - **false**: fuzzy match | - | | | | | - | | | | Default value: **false**. | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ - | tags | Array of Objects | No | Query based on the instance tag key and value. *{key}* indicates the tag key, and *{value}* indicates the tag value. | - | | | | | - | | | | To query instances with multiple tag keys and values, separate key-value pairs with commas (,). | - +------------------+------------------+-----------------+----------------------------------------------------------------------------------------------------------------------+ + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+==================+=================+=======================================================================================================================+ + | project_id | String | Yes | Project ID. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | start | Integer | No | Start number for querying DCS instances. It cannot be lower than 1. | + | | | | | + | | | | By default, the start number is 1. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | limit | Integer | No | Number of DCS instances displayed on each page. | + | | | | | + | | | | Minimum value: **1** | + | | | | | + | | | | Maximum value: **2000** | + | | | | | + | | | | If this parameter is left unspecified, a maximum of 1000 DCS instances are displayed on each page. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | name | String | No | DCS instance name. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | id | String | No | Instance ID. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | status | String | No | DCS instance status. For details about status, see :ref:`DCS Instance Statuses `. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | ip | String | No | IP address for connecting to the DCS instance | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | include_failure | String | No | An indicator of whether the number of DCS instances that failed to be created will be returned to the API caller. | + | | | | | + | | | | Options: | + | | | | | + | | | | - **true**: The number of DCS instances that failed to be created will be returned to the API caller. | + | | | | - **false** or others: The number of DCS instances that failed to be created will not be returned to the API caller. | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ + | tags | Array of Objects | No | Query based on the instance tag key and value. *{key}* indicates the tag key, and *{value}* indicates the tag value. | + | | | | | + | | | | To query instances with multiple tag keys and values, separate key-value pairs with commas (,). | + +-----------------+------------------+-----------------+-----------------------------------------------------------------------------------------------------------------------+ **Example** .. code-block:: text - GET https://{dcs_endpoint}/v1.0/bd6b78e2ff9e4e47bc260803ddcc7a21/instances?start=1&limit=10&name=&status=&id=&isExactMatchName=false + GET https://{dcs_endpoint}/v1.0/bd6b78e2ff9e4e47bc260803ddcc7a21/instances?start=1&limit=10&name=&status=&id=&include_failure=true Request ------- @@ -95,7 +93,7 @@ Response instance_num Integer Number of DCS instances. ============ ======= ============================== -.. table:: **Table 3** Parameter description of the instance array +.. table:: **Table 3** instances parameters +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | diff --git a/api-ref/source/other_apis/querying_az_information.rst b/api-ref/source/other_apis/querying_az_information.rst index c844b4f..621f3ae 100644 --- a/api-ref/source/other_apis/querying_az_information.rst +++ b/api-ref/source/other_apis/querying_az_information.rst @@ -40,7 +40,7 @@ Response +-----------------+--------+---------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=================+========+=======================================================================================+ - | regionId | String | Region ID. | + | region_id | String | Region ID. | +-----------------+--------+---------------------------------------------------------------------------------------+ | available_zones | Array | Array of AZs. For details, see :ref:`Table 2 `. | +-----------------+--------+---------------------------------------------------------------------------------------+