diff --git a/api-ref/source/_static/images/en-us_image_0208249507.png b/api-ref/source/_static/images/en-us_image_0000001336985362.png similarity index 100% rename from api-ref/source/_static/images/en-us_image_0208249507.png rename to api-ref/source/_static/images/en-us_image_0000001336985362.png diff --git a/api-ref/source/_static/images/en-us_image_0208249570.jpg b/api-ref/source/_static/images/en-us_image_0000001387625321.jpg similarity index 100% rename from api-ref/source/_static/images/en-us_image_0208249570.jpg rename to api-ref/source/_static/images/en-us_image_0000001387625321.jpg diff --git a/api-ref/source/api_calling/example.rst b/api-ref/source/api_calling/example.rst index 4741241..415d624 100644 --- a/api-ref/source/api_calling/example.rst +++ b/api-ref/source/api_calling/example.rst @@ -22,7 +22,7 @@ If you use a token for authentication, you must obtain the user's token and add Procedure --------- -#. Obtain the token by following instructions in section :ref:`Token Authentication `. +#. Obtain the token by following instructions in section :ref:`Authentication `. #. Send **POST https://DDS endpoint/v3/{project_id}/instances**. @@ -42,7 +42,7 @@ Procedure "name": "test-cluster", //DB instance name "datastore": { "type": "DDS-Community", // Database type and version - "version": "3.4", //Database version + "version": "4.0", //Database version "storage_engine": "wiredTiger" //Storage engine }, "region": "aaa", //Region name @@ -50,7 +50,7 @@ Procedure "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", //VPC ID "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", //Subnet ID "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", //Security group ID - "password": "Test@123", //Administrator password + "password": "******", //Administrator password "disk_encryption_id": "d4825f1b-5e47-4ff7-8ca9-0960da1770b1", //Key ID for encrypting disks "mode": "Sharding", //Sharded-cluster instance type "flavor": [ @@ -75,7 +75,7 @@ Procedure } ], "backup_strategy": { - "start_time": "08:15-09:15", //Backup time window + "start_time": "23:00-00:00", //Backup period "keep_days": "8" //Retention days of backup files }, "ssl_option":"1" @@ -90,7 +90,7 @@ Procedure "name": "test-cluster", "datastore": { "type": "DDS-Community", - "version": "3.4", + "version": "4.0", "storage_engine": "wiredTiger" }, "created": "2019-01-14 08:50:27", @@ -122,9 +122,10 @@ Procedure } ], "backup_strategy": { - "start_time": "08:15-09:15", + "start_time": "23:00-00:00", "keep_days": "8" }, + "enterprise_project_id": "", "ssl_option":"1", "job_id": "c0c606b6-470a-48c7-97a2-6c7f146014d4" } diff --git a/api-ref/source/api_calling/rest_apis.rst b/api-ref/source/api_calling/rest_apis.rst index fdbfb6e..efcc28b 100644 --- a/api-ref/source/api_calling/rest_apis.rst +++ b/api-ref/source/api_calling/rest_apis.rst @@ -87,7 +87,7 @@ You can also add additional fields to the request header, for example, the field A request body is generally sent in a structured format (for example, JSON or XML), corresponding to **Content-Type** in the request header, and is used to transfer content other than the request header. -If the request body contains Chinese characters, convert the Chinese characters into the UTF-8 encoding format. +If the request body contains full-width characters, convert the full-width characters into the UTF-8 encoding format. Response Headers ---------------- diff --git a/api-ref/source/api_calling/scenarios.rst b/api-ref/source/api_calling/scenarios.rst index 3f9c842..51c35de 100644 --- a/api-ref/source/api_calling/scenarios.rst +++ b/api-ref/source/api_calling/scenarios.rst @@ -8,7 +8,7 @@ Scenarios DDS open APIs allow users to create, view, or delete DB instances, query API versions, DB engines, DB engine versions, and DB instance class supported by the system. The application scenarios are shown as follows. -.. figure:: /_static/images/en-us_image_0208249507.png +.. figure:: /_static/images/en-us_image_0000001336985362.png :alt: **Figure 1** Scenarios **Figure 1** Scenarios diff --git a/api-ref/source/api_description/db_instance_management/creating_a_db_instance.rst b/api-ref/source/api_description/db_instance_management/creating_a_db_instance.rst deleted file mode 100644 index f4bb3f4..0000000 --- a/api-ref/source/api_description/db_instance_management/creating_a_db_instance.rst +++ /dev/null @@ -1,410 +0,0 @@ -:original_name: dds_api_0020.html - -.. _dds_api_0020: - -Creating a DB Instance -====================== - -Function --------- - -This API is used to create cluster, replica set instances. - -URI ---- - -- URI format - - POST /v3/{project_id}/instances - -- Parameter description - - .. table:: **Table 1** Parameter description - - ========== ========= ================================================= - Name Mandatory Description - ========== ========= ================================================= - project_id Yes Specifies the project ID of a tenant in a region. - ========== ========= ================================================= - -Requests --------- - -- Parameter description - - .. table:: **Table 2** Parameter description - - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Type | Description | - +====================+=================+==================+=================================================================================================================================================================================================================+ - | name | Yes | String | Specifies the DB instance name. The DB instance name of the same DB engine is unique for the same tenant. | - | | | | | - | | | | The value must be 4 to 64 characters in length and start with a letter (from A to Z or from a to z). It is case-sensitive and can contain only letters, digits (from 0 to 9), hyphens (-), and underscores (_). | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | datastore | Yes | Object | Specifies the database information. For more information, see :ref:`Table 3 `. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | region | Yes | String | Specifies the region ID. | - | | | | | - | | | | The value cannot be empty. For details about how to obtain this parameter value, see `Regions and Endpoints `__. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone | Yes | String | Specifies the AZ ID. | - | | | | | - | | | | The value cannot be empty. For details about how to obtain this parameter value, see `Regions and Endpoints `__. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | vpc_id | Yes | String | Specifies the VPC ID. For details about how to obtain this parameter value, see section "Virtual Private Cloud" in the *Virtual Private Cloud API Reference*. | - | | | | | - | | | | The value cannot be empty. The string length and whether the string complying with UUID regular expression rules are verified. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | subnet_id | Yes | String | Specifies the subnet ID. For details about how to obtain this parameter value, see section "Subnet" in the *Virtual Private Cloud API Reference*. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | security_group_id | Yes | String | Specifies the ID of the security group where a specified DB instance belongs to. | - | | | | | - | | | | For details about how to obtain this parameter value, see section "Security Group" in the *Virtual Private Cloud API Reference*. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | password | Yes | String | Specifies the database password. | - | | | | | - | | | | The value must be 8 to 32 characters in length and contain uppercase letters (A to Z), lowercase letters (a to z), digits (0 to 9), and special characters, such as ``~!@#%^*-_=+?`` | - | | | | | - | | | | You are advised to enter a strong password to improve security, preventing security risks such as brute force cracking. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | disk_encryption_id | No | String | Specifies the key ID used for disk encryption. The string must comply with UUID regular expression rules. | - | | | | | - | | | | If this parameter is not transferred, disk encryption is not performed. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | mode | Yes | String | Specifies the instance type. Cluster, replica set instances are supported. | - | | | | | - | | | | Valid value: | - | | | | | - | | | | - Sharding | - | | | | - ReplicaSet | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | flavor | Yes | Array of objects | Specifies the instance specifications. For more information, see :ref:`Table 4 `. | - | | | | | - | | | | For details about how to obtain the value, see the response values of **flavor** in :ref:`Querying All DB Instance Specifications `. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | backup_strategy | No | Object | Specifies the advanced backup policy. For more information, see :ref:`Table 5 `. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ssl_option | No | String | Specifies whether to enable SSL. | - | | | | | - | | | | Valid value: | - | | | | | - | | | | - The value **0** indicates that SSL is disabled by default. | - | | | | - The value **1** indicates that SSL is enabled by default. | - | | | | - If this parameter is not transferred, SSL is enabled by default. | - +--------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0020__table228903751753: - - .. table:: **Table 3** datastore field data structure description - - +----------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Type | Description | - +================+===========+========+===================================================================================================================+ - | type | Yes | String | Specifies the database type. DDS Community Edition is supported. The value is **DDS-Community**. | - +----------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------+ - | version | Yes | String | Specifies the database version. The value is **3.2** or **3.4**. | - +----------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------+ - | storage_engine | Yes | String | Specifies the storage engine. Currently, DDS supports the WiredTiger storage engine. The value is **wiredTiger**. | - +----------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0020__table94791241013: - - .. table:: **Table 4** flavor field data structure description - - +-----------------+----------------------------------------------------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Type | Description | - +=================+==========================================================================================================+=================+=================================================================================================================================================================================================================================================+ - | type | Yes | String | Specifies the node type. | - | | | | | - | | | | Valid value: | - | | | | | - | | | | - For a cluster instance, the value can be **mongos**, **shard**, or **config**. | - | | | | - For a replica set instance, the value is **replica**. | - +-----------------+----------------------------------------------------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | num | Yes | Integer | Specifies node quantity. | - | | | | | - | | | | Valid value: | - | | | | | - | | | | - mongos: The value ranges from 2 to 16. | - | | | | - shard: The value ranges from 2 to 16. | - | | | | - config: The value is **1**. | - | | | | - replica: The value is **1**. | - +-----------------+----------------------------------------------------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | storage | This parameter is optional for all nodes except mongos. This parameter is invalid for the mongos nodes. | String | Specifies the disk type. | - | | | | | - | | | | Valid value: ULTRAHIGH, which indicates the type SSD. | - | | | | | - | | | | This parameter is valid for the shard and config nodes of a community edition cluster instance, replica set instances. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | - +-----------------+----------------------------------------------------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | size | This parameter is mandatory for all nodes except mongos. This parameter is invalid for the mongos nodes. | Integer | Specifies the disk size. | - | | | | | - | | | | The value must be a multiple of 10. The unit is GB. | - | | | | | - | | | | - For a cluster instance, the storage space of a shard node can be 10 to 1000 GB, and the config storage space is 20 GB. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | - | | | | - For a replica set instance, the value ranges from 10 to 2000. | - +-----------------+----------------------------------------------------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | spec_code | Yes | String | Specifies the resource specification code. For details about how to obtain the value, see the response values of **spec_code** in :ref:`Querying All DB Instance Specifications `. | - +-----------------+----------------------------------------------------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0020__table15990419397: - - .. table:: **Table 5** backup_strategy field data structure description - - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Type | Description | - +=================+=================+=================+================================================================================================================================================+ - | start_time | Yes | String | Specifies the backup time window. Automated backups will be triggered during the backup time window. | - | | | | | - | | | | The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format. | - | | | | | - | | | | - The **HH** value must be 1 greater than the **hh** value. | - | | | | - The values of **mm** and **MM** must be the same and must be set to any of the following: **00**, **15**, **30**, or **45**. | - | | | | | - | | | | Example value: | - | | | | | - | | | | - 08:15-09:15 | - | | | | - 23:00-00:00 | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | keep_days | No | String | Specifies the number of days to retain the generated backup files. | - | | | | | - | | | | The value range is from 0 to 732. | - | | | | | - | | | | - If this parameter is set to **0**, the automated backup policy is not set. | - | | | | - If this parameter is not transferred, the automated backup policy is enabled by default. Backup files are stored for seven days by default. | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - -.. note:: - - The values of **region** and **availability_zone** are used as examples. - -- Request header - - .. code-block:: text - - POST https://DDS endpoint/v3/{project_id}/instances. - -- Example request - - Create a cluster instance. - - .. code-block:: text - - { - "name": "test-cluster-01", - "datastore": { - "type": "DDS-Community", - "version": "3.4", - "storage_engine": "wiredTiger" - }, - "region": "aaa", - "availability_zone": "bbb", - "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", - "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", - "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", - "password": "Test@123", - "mode": "Sharding", - "flavor": [ - { - "type": "mongos", - "num": 2, - "spec_code": "dds.mongodb.s2.medium.4.mongos" - }, - { - "type": "shard", - "num": 2, - "storage": "ULTRAHIGH", - "size": 20, - "spec_code": "dds.mongodb.s2.medium.4.shard" - }, - { - "type": "config", - "num": 1, - "storage": "ULTRAHIGH", - "size": 20, - "spec_code": "dds.mongodb.s2.large.2.config" - } - ], - "backup_strategy": { - "start_time": "08:15-09:15", - "keep_days": "8" - }, - "ssl_option":"1" - } - - Create a replica set instance. - - .. code-block:: text - - { - "name": "test-replicaset", - "datastore": { - "type": "DDS-Community", - "version": "3.4", - "storage_engine": "wiredTiger" - }, - "region": "aaa", - "availability_zone": "bbb", - "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", - "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", - "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", - "password": "Test@123", - "mode": "ReplicaSet", - "flavor": [ - { - "type": "replica", - "num": 1, - "storage": "ULTRAHIGH", - "size": 30, - "spec_code": "dds.mongodb.s2.medium.4.repset" - } - ], - "backup_strategy": { - "start_time": "08:15-09:15", - "keep_days": "8" - }, - "ssl_option":"1" - } - -Responses ---------- - -- Parameter description - - .. table:: **Table 6** Parameter description - - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +====================+==================+==============================================================================================================================================================+ - | id | String | Indicates the DB instance ID. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | String | Same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | datastore | Object | Indicates the database information, which is the same as the request parameter. For more information, see :ref:`Table 3 `. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | created | String | Indicates the creation time in the following format: yyyy-mm-dd hh:mm:ss. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | status | String | Indicates the DB instance status. The value is **creating**. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | region | String | Indicates the region ID, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone | String | Indicates the AZ ID, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | vpc_id | String | Indicates the VPC ID, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | subnet_id | String | Indicates the subnet ID, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | security_group_id | String | Indicates the ID of the security group to which the instance belongs, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | disk_encryption_id | String | Indicates the ID of the disk encryption key, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | mode | String | Indicates the instance type, which is the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | flavor | Array of objects | Indicates the instance specification, which is the same as the request parameter. For more information, see :ref:`Table 4 `. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | backup_strategy | Object | Indicates the advanced backup policy, which is the same as the request parameter. For more information, see :ref:`Table 5 `. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | ssl_option | String | Indicates whether to enable SSL, which functions the same as the request parameter. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | job_id | String | Indicates the ID of the workflow for creating a DB instance. | - +--------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -.. note:: - - The values of **region** and **availability_zone** are used as examples. - -- Response example - - Cluster instance: - - .. code-block:: text - - { - "id": "39b6a1a278844ac48119d86512e0000bin02", - "name": "test-cluster-01", - "datastore": { - "type": "DDS-Community", - "version": "3.4", - "storage_engine": "wiredTiger" - }, - "created": "2019-01-16 09:34:36", - "status": "creating", - "region": "aaa", - "availability_zone": "bbb", - "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", - "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", - "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", - "disk_encryption_id": "", - "mode": "Sharding", - "flavor": [ - { - "type": "mongos", - "num": 2, - "spec_code": "dds.mongodb.s2.medium.4.mongos" - }, - { - "type": "shard", - "num": 2, - "spec_code": "dds.mongodb.s2.medium.4.shard", - "size": 20 - }, - { - "type": "config", - "num": 1, - "spec_code": "dds.mongodb.s2.large.2.config", - "size": 20 - } - ], - "backup_strategy": { - "start_time": "08:15-09:15", - "keep_days": "8" - }, - "ssl_option":"1", - "job_id": "c010abd0-48cf-4fa8-8cbc-090f093eaa2f" - } - - Replica set instance: - - .. code-block:: text - - { - "id": "46dfadfd2b674585a430217f23606cd7in02", - "name": "test-replicaset", - "datastore": { - "type": "DDS-Community", - "version": "3.4", - "storage_engine": "wiredTiger" - }, - "created": "2019-01-16 09:33:08", - "status": "creating", - "region": "aaa", - "availability_zone": "bbb", - "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", - "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", - "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", - "disk_encryption_id": "", - "mode": "ReplicaSet", - "flavor": [ - { - "type": "replica", - "num": 1, - "spec_code": "dds.mongodb.s2.medium.4.repset", - "size": 30 - } - ], - "backup_strategy": { - "start_time": "08:15-09:15", - "keep_days": "7" - }, - "ssl_option":"1", - "job_id": "2408417d-fd4b-40ae-bec6-e09ce594eb5f" - } - -**Status Code** ---------------- - -For more information, see :ref:`Status Code `. - -Error Code ----------- - -For more information, see :ref:`Error Code `. diff --git a/api-ref/source/api_description/db_instance_management/deleting_a_db_instance.rst b/api-ref/source/api_description/db_instance_management/deleting_a_db_instance.rst deleted file mode 100644 index 86e2b11..0000000 --- a/api-ref/source/api_description/db_instance_management/deleting_a_db_instance.rst +++ /dev/null @@ -1,73 +0,0 @@ -:original_name: dds_api_0022.html - -.. _dds_api_0022: - -Deleting a DB Instance -====================== - -Function --------- - -This API is used to delete a DB instance. - -URI ---- - -- URI format - - DELETE /v3/{project_id}/instances/{instance_id} - -- Parameter description - - .. table:: **Table 1** Parameter description - - =========== ========= ================================================= - Name Mandatory Description - =========== ========= ================================================= - project_id Yes Specifies the project ID of a tenant in a region. - instance_id Yes Specifies the DB instance ID. - =========== ========= ================================================= - -Requests --------- - -- Request header - - .. code-block:: text - - DELETE https://DDS endpoint/v3/{project_id}/instances/{instance_id} - -- Request body - - N/A - -Responses ---------- - -- Parameter description - - .. table:: **Table 2** Parameter description - - ====== ====== ========================== - Name Type Description - ====== ====== ========================== - job_id String Indicates the workflow ID. - ====== ====== ========================== - -- Response example - - .. code-block:: text - - { - "job_id": "252f11f1-2912-4c06-be55-1999bde659c5" - } - -**Status Code** ---------------- - -For more information, see :ref:`Status Code `. - -Error Code ----------- - -For more information, see :ref:`Error Code `. diff --git a/api-ref/source/api_description/db_instance_management/index.rst b/api-ref/source/api_description/db_instance_management/index.rst deleted file mode 100644 index 0d88c6e..0000000 --- a/api-ref/source/api_description/db_instance_management/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -:original_name: dds_instance_mgmt.html - -.. _dds_instance_mgmt: - -DB Instance Management -====================== - -- :ref:`Creating a DB Instance ` -- :ref:`Deleting a DB Instance ` -- :ref:`Querying DB Instances ` - -.. toctree:: - :maxdepth: 1 - :hidden: - - creating_a_db_instance - deleting_a_db_instance - querying_db_instances diff --git a/api-ref/source/api_description/db_instance_management/querying_db_instances.rst b/api-ref/source/api_description/db_instance_management/querying_db_instances.rst deleted file mode 100644 index d498957..0000000 --- a/api-ref/source/api_description/db_instance_management/querying_db_instances.rst +++ /dev/null @@ -1,512 +0,0 @@ -:original_name: dds_api_0023.html - -.. _dds_api_0023: - -Querying DB Instances -===================== - -Function --------- - -This API is used to query DB instances based on specified conditions. - -URI ---- - -- URI format - - GET /v3/{project_id}/instances?id={id}&name={name}&mode={mode}&datastore_type={datastore_type}&vpc_id={vpc_id}&subnet_id={subnet_id}&offset={offset}&limit={limit} - -- Parameter description - - .. table:: **Table 1** Parameter description - - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Type | Description | - +=================+=================+=================+======================================================================================================================================================================================================================+ - | project_id | Yes | String | Specifies the project ID of a tenant in a region. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | id | No | String | Specifies the DB instance ID. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | No | String | Specifies the DB instance name. | - | | | | | - | | | | If you use asterisk (``*``) at the beginning of the name, fuzzy search results are returned. Otherwise, the exact results are returned. | - | | | | | - | | | | .. note:: | - | | | | | - | | | | The asterisk (``*``) is a reserved character in the system and cannot be used alone. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | mode | No | String | Specifies the instance type. | - | | | | | - | | | | - **Sharding** indicates the cluster instance. | - | | | | - **ReplicaSet** indicate the replica set instance. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | datastore_type | No | String | Specifies the database type. The value is **DDS-Community**. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | vpc_id | No | String | Specifies the VPC ID. You can log in to the VPC console and obtain the ID of the VPC where the DDS instance is located. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | subnet_id | No | String | Specifies the network ID of the subnet. You can log in to the VPC console and obtain the network ID of the subnet in the VPC where the DDS instance is located. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | offset | No | Integer | Specifies the index position. The query starts from the next instance creation time indexed by this parameter under a specified project. If offset is set to N, the resource query starts from the N+1 piece of data | - | | | | | - | | | | The value must be greater than or equal to **0**. If this parameter is not transferred, offset is set to **0** by default, indicating that the query starts from the latest created DB instance. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | limit | No | Integer | Specifies the maximum allowed number of DB instances. | - | | | | | - | | | | The value ranges from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default. | - +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Requests --------- - -- Request header - - Query all DB instances. - - .. code-block:: text - - GET https://DDS endpoint/v3/0483b6b16e954cb88930a360d2c4e663/instances - - Query DB instances based on specified conditions. - - .. code-block:: text - - GET https://DDS endpoint/v3/0483b6b16e954cb88930a360d2c4e663/instances?offset=0&limit=10&id=ed7cc6166ec24360a5ed5c5c9c2ed726in02&name=hy&mode=ReplicaSet&datastore_type=DDS-Community&vpc_id=19e5d45d-70fd-4a91-87e9-b27e71c9891f&subnet_id=bd51fb45-2dcb-4296-8783-8623bfe89bb7 - -- Request body - - N/A - -Responses ---------- - -- Parameter description - - .. table:: **Table 2** Parameter description - - +-------------+------------------+---------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +=============+==================+=====================================================================================================================+ - | instances | Array of objects | Indicates the DB instance information. For more information, see :ref:`Table 3 `. | - +-------------+------------------+---------------------------------------------------------------------------------------------------------------------+ - | total_count | Integer | Indicates the total number of queried records. | - +-------------+------------------+---------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0023__table4062895917262: - - .. table:: **Table 3** instances field data structure description - - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +=======================+=======================+==================================================================================================================+ - | id | String | Indicates the DB instance ID. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | name | String | Indicates the DB instance name. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | status | String | Indicates the DB instance status. | - | | | | - | | | Valid value: | - | | | | - | | | - **normal**: indicates that the instance is running properly. | - | | | - **abnormal**: indicates that the instance is abnormal. | - | | | - **creating**: indicates that the instance is being created. | - | | | - **data_disk_full**: indicates that the instance disk is full. | - | | | - **createfail**: indicates that the instance failed to be created. | - | | | - **enlargefail**: indicates that nodes failed to be added to the instance. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | port | Integer | Indicates the database port number. The port range is 2100 to 9500. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | mode | String | Indicates the instance type, which is the same as the request parameter. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | region | String | Indicates the region where the DB instance is deployed. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | datastore | Object | Indicates the database information. For more information, see :ref:`Table 4 `. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | engine | String | Indicates the storage engine. The value is **wiredTiger**. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | created | String | Indicates the DB instance creation time. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | updated | String | Indicates the time when a DB instance is updated. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | db_user_name | String | Indicates the default username. The value is **rwuser**. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | ssl | Integer | Indicates that SSL is enabled or not. | - | | | | - | | | - **1**: indicate that SSL is enabled. | - | | | - **0**: indicate that SSL is disabled. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | vpc_id | String | Indicates the VPC ID. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | subnet_id | String | Indicates the subnet ID. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | security_group_id | String | Indicates the security group ID. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | backup_strategy | Object | Indicates the backup policy. For more information, see :ref:`Table 5 `. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | pay_mode | String | Indicates the billing mode. **0**: indicates the pay-per-use billing mode. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | maintenance_window | String | Indicates the maintenance time window. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | groups | Array of objects | Indicates group information. For more information, see :ref:`Table 6 `. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | disk_encryption_id | String | Indicates the disk encryption key ID. This parameter is returned only when the instance disk is encrypted. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | time_zone | String | Indicates the time zone. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - | actions | Array of strings | Indicates the operation that is executed on the DB instance. | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0023__table5636104310403: - - .. table:: **Table 4** datastore field data structure description - - ======= ====== =============================== - Name Type Description - ======= ====== =============================== - type String Indicates the DB engine. - version String Indicates the database version. - ======= ====== =============================== - - .. _dds_api_0023__table50876711173859: - - .. table:: **Table 5** backup_strategy field data structure description - - +------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +============+=========+========================================================================================================================================+ - | start_time | String | Indicates the backup time window. Automated backups will be triggered during the backup time window. The current time is the UTC time. | - +------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+ - | keep_days | Integer | Indicates the number of days to retain the generated backup files. The value range is from 0 to 732. | - +------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0023__table0581104824211: - - .. table:: **Table 6** groups field data structure description - - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +=======================+=======================+===========================================================================================================================================================================================+ - | type | String | Indicates the node type. | - | | | | - | | | Valid value: | - | | | | - | | | - shard | - | | | - config | - | | | - mongos | - | | | - replica | - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | id | String | Indicates the group ID. This parameter is valid only when the node type is shard or config. | - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | String | Indicates the group name. This parameter is valid only when the node type is shard or config. | - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | status | String | Indicates the group status. This parameter is valid only when the node type is shard or config. | - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | volume | Object | Indicates the volume information. For more information, see :ref:`Table 7 `. This parameter is valid only when the node type is shard, config, replica. | - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | nodes | Array of objects | Indicates node information. For more information, see :ref:`Table 8 `. | - +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - - .. _dds_api_0023__table1149918231246: - - .. table:: **Table 7** volume field data structure description - - ==== ====== ================================== - Name Type Description - ==== ====== ================================== - size String Indicates the disk size. Unit: GB - used String Indicates the disk usage. Unit: GB - ==== ====== ================================== - - .. _dds_api_0023__table3426155424213: - - .. table:: **Table 8** nodes field data structure description - - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +=======================+=======================+=================================================================================================================================================================================================================================+ - | id | String | Indicates the node ID. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | String | Indicates the node name. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | status | String | Indicates the node status. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | role | String | Indicates the node role. | - | | | | - | | | Valid value: | - | | | | - | | | - **master**: This value is returned for the mongos node. | - | | | - **Primary**: This value is returned for the primary node of shards, primary node of configs, primary node of a replica set. | - | | | - **Secondary**: This value is returned for the secondary node of shards, secondary node of configs, and secondary node of a replica set. | - | | | - **Hidden**: This value is returned for the hidden node of shards, hidden node of configs, and hidden node of a replica set. | - | | | - **unknown**. This value is returned when the node is abnormal. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | private_ip | String | Indicates the private IP address of a node. This parameter is valid only for mongos nodes, replica set instances. The value exists only after ECSs are created successfully. Otherwise, the value is **""**. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | public_ip | String | Indicates the EIP that has been bound. This parameter is valid only for mongos nodes of cluster instances, primary nodes and secondary nodes of replica set instances. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | spec_code | String | Indicates the resource specifications code. For details about the instance specifications, see the value of the **flavors.spec_code** parameter in :ref:`Querying All DB Instance Specifications `. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone | String | Indicates the AZ. | - +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - - .. note:: - - The values of **region** and **availability_zone** are used as examples. - -- Response example - - Query all DB instances. - - .. code-block:: text - - { - "instances": [ - { - "id": "8436a91546294036b75931e879882200in02", - "name": "dds-efa6", - "status": "normal", - "port": "8635", - "mode": "ReplicaSet", - "region": "aaa", - "datastore": { - "type": "DDS-Community", - "version": "3.4" - }, - "engine": "wiredTiger", - "created": "2019-01-17T07:05:52", - "updated": "2019-01-17T07:05:47", - "db_user_name": "rwuser", - "ssl": "1", - "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", - "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", - "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", - "backup_strategy": { - "start_time": "16:00-17:00", - "keep_days": 7 - }, - "pay_mode": "0", - "maintenance_window": "02:00-06:00", - "groups": [ - { - "type": "replica", - "volume": { - "size": "10", - "used": "0.33" - }, - "nodes": [ - { - "id": "233eaac9c6f245c0bb9c2d21eea12d1bno02", - "name": "dds-efa6_replica_node_2", - "status": "normal", - "role": "Primary", - "private_ip": "192.168.0.174", - "public_ip": "", - "spec_code": "dds.mongodb.s2.medium.4.repset", - "availability_zone": "bbb" - }, - { - "id": "d57d76d6320a4a7b86db82c317550c4ano02", - "name": "dds-efa6_replica_node_1", - "status": "normal", - "role": "Hidden", - "private_ip": "192.168.0.39", - "public_ip": "", - "spec_code": "dds.mongodb.s2.medium.4.repset", - "availability_zone": "bbb" - }, - { - "id": "f46b0a1cf4d9400e9fd7af17f8742d37no02", - "name": "dds-efa6_replica_node_3", - "status": "normal", - "role": "Secondary", - "private_ip": "192.168.0.176", - "public_ip": "", - "spec_code": "dds.mongodb.s2.medium.4.repset", - "availability_zone": "bbb" - } - ] - } - ], - "time_zone": "", - "actions": [ - "CREATE" - ] - }, - { - "id": "9136fd2a9fcd405ea4674276ce36dae8in02", - "name": "dds-32f4", - "status": "normal", - "port": "8635", - "mode": "Sharding", - "region": "aaa", - "datastore": { - "type": "DDS-Community", - "version": "3.4" - }, - "engine": "wiredTiger", - "created": "2019-01-17T07:04:37", - "updated": "2019-01-17T07:04:31", - "db_user_name": "rwuser", - "ssl": "1", - "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", - "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", - "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", - "backup_strategy": { - "start_time": "19:00-20:00", - "keep_days": 7 - }, - "pay_mode": "0", - "maintenance_window": "02:00-06:00", - "groups": [ - { - "type": "mongos", - "nodes": [ - { - "id": "a742c13a284949adad177672e8a0f01cno02", - "name": "dds-32f4_mongos_node_1", - "status": "normal", - "role": "master", - "private_ip": "192.168.0.56", - "public_ip": "", - "spec_code": "dds.mongodb.s2.medium.4.mongos", - "availability_zone": "bbb" - }, - { - "id": "d4f66666b1d64ab28719da0526341c7eno02", - "name": "dds-32f4_mongos_node_2", - "status": "normal", - "role": "master", - "private_ip": "192.168.0.185", - "public_ip": "", - "spec_code": "dds.mongodb.s2.medium.4.mongos", - "availability_zone": "bbb" - } - ] - }, - { - "type": "shard", - "id": "d1b92d2cbd544e85ac7ce6a7f33ba205gr02", - "name": "shard_2", - "status": "normal", - "volume": { - "size": "10", - "used": "0.33" - }, - "nodes": [ - { - "id": "0e9abaebe5974b63a5b221de6ee34cfeno02", - "name": "dds-32f4_shard_2_node_3", - "status": "normal", - "role": "Primary", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "availability_zone": "bbb" - }, - { - "id": "1d7f4c5476c04cc187f920925c2b601fno02", - "name": "dds-32f4_shard_2_node_2", - "status": "normal", - "role": "Hidden", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "availability_zone": "bbb" - }, - { - "id": "3dd2cce03da54fc08f10651cbfea778dno02", - "name": "dds-32f4_shard_2_node_1", - "status": "normal", - "role": "Secondary", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "availability_zone": "bbb" - } - ] - }, - { - "type": "shard", - "id": "06439baa35c146d3a8965af59d370908gr02", - "name": "shard_1", - "status": "normal", - "volume": { - "size": "10", - "used": "0.33" - }, - "nodes": [ - { - "id": "0f6744d7e29f42ff80fc1a36cc145042no02", - "name": "dds-32f4_shard_1_node_1", - "status": "normal", - "role": "Primary", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "availability_zone": "bbb" - }, - { - "id": "3abcb399113b4512bd5a906da54e8753no02", - "name": "dds-32f4_shard_1_node_3", - "status": "normal", - "role": "Hidden", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "availability_zone": "bbb" - }, - { - "id": "c149f70563494501b5706cad225a8ebdno02", - "name": "dds-32f4_shard_1_node_2", - "status": "normal", - "role": "Secondary", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "availability_zone": "bbb" - } - ] - }, - { - "type": "config", - "id": "84e7c96b82aa4fedb3b00f98edd71ba4gr02", - "name": "config", - "status": "normal", - "volume": { - "size": "20", - "used": "0.33" - }, - "nodes": [ - { - "id": "7422f7331b714ac39aa647a1ec968d33no02", - "name": "dds-32f4_config_node_2", - "status": "normal", - "role": "Primary", - "spec_code": "dds.mongodb.s2.large.2.config", - "availability_zone": "bbb" - }, - { - "id": "9e3b343151044eda91ddb8a42ae5cbefno02", - "name": "dds-32f4_config_node_3", - "status": "normal", - "role": "Hidden", - "spec_code": "dds.mongodb.s2.large.2.config", - "availability_zone": "bbb" - }, - { - "id": "c0053ca460ac4889841ffb14a886ec54no02", - "name": "dds-32f4_config_node_1", - "status": "normal", - "role": "Secondary", - "spec_code": "dds.mongodb.s2.large.2.config", - "availability_zone": "bbb" - } - ] - } - ], - "time_zone": "", - "actions": [ - "CREATE" - ] - } - ], - "total_count": 2 - } - -**Status Code** ---------------- - -For more information, see :ref:`Status Code `. - -Error Code ----------- - -For more information, see :ref:`Error Code `. diff --git a/api-ref/source/api_description/index.rst b/api-ref/source/api_description/index.rst deleted file mode 100644 index 77e4cd1..0000000 --- a/api-ref/source/api_description/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -:original_name: dds_api_description.html - -.. _dds_api_description: - -API Description -=============== - -- :ref:`Querying the API Version ` -- :ref:`Querying Database Version Information ` -- :ref:`Querying All DB Instance Specifications ` -- :ref:`DB Instance Management ` - -.. toctree:: - :maxdepth: 1 - :hidden: - - querying_the_api_version/index - querying_database_version_information - querying_all_db_instance_specifications - db_instance_management/index diff --git a/api-ref/source/api_description/querying_all_db_instance_specifications.rst b/api-ref/source/api_description/querying_all_db_instance_specifications.rst deleted file mode 100644 index 4f06d95..0000000 --- a/api-ref/source/api_description/querying_all_db_instance_specifications.rst +++ /dev/null @@ -1,318 +0,0 @@ -:original_name: dds_instance_specification.html - -.. _dds_instance_specification: - -Querying All DB Instance Specifications -======================================= - -Function --------- - -This API is used to query all DB instance specifications in a specified region. - -URI ---- - -- URI format - - GET /v3/{project_id}/flavors?region={region}&engine_name={engine_name} - -- Parameter description - - .. table:: **Table 1** Parameter description - - +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Description | - +=======================+=======================+============================================================================================================================================================================+ - | project_id | Yes | Specifies the project ID of a tenant in a region. | - +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | region | Yes | Specifies the region where the DB instance exists. | - | | | | - | | | Valid value: | - | | | | - | | | The value cannot be empty. For details about how to obtain this parameter value, see `Regions and Endpoints `__. | - +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | engine_name | No | Specifies the database type. The value is **DDS-Community**. | - +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Requests --------- - -- Request header - - .. note:: - - The value of **region** in the following is used as an example. - - .. code-block:: text - - GET https://DDS endpoint/v3/375d8d8fad1f43039e23d3b6c0f60a19/flavors?region=aaa&engine_name=DDS-Community - -- Request body - - N/A - -Responses ---------- - -- Parameter description - - .. table:: **Table 2** Parameter description - - +---------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | Name | Type | Description | - +=========+==================+==================================================================================================================================================+ - | flavors | Array of objects | Indicates the DB instance specifications information list. For more information, see :ref:`Table 3 `. | - +---------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - - .. _dds_instance_specification__table64140254: - - .. table:: **Table 3** flavors field data structure description - - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - | Name | Type | Description | - +=======================+=======================+=========================================================================================+ - | engine_name | String | Indicates the engine name. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - | type | String | Indicates the node type. DDS contains the following types of nodes: | - | | | | - | | | - mongos | - | | | - shard | - | | | - config | - | | | - replica | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - | vcpus | String | Number of vCPUs. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - | ram | String | Indicates the memory size in gigabyte (GB). | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - | spec_code | String | Indicates the resource specifications code. | - | | | | - | | | Example: dds.mongodb.s2.xlarge.4.shard | - | | | | - | | | .. note:: | - | | | | - | | | - **dds.mongodb**: indicates the DDS service. | - | | | - **s2.xlarge.4**: indicates the performance specification, which is high memory. | - | | | - **shard**: indicates the node type. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - | az_status | Object | Indicates the status of specifications in an AZ. Its value can be any of the following: | - | | | | - | | | - normal: indicates that the specifications are on sale. | - | | | - unsupported: indicates that the DB instance specifications are not supported. | - | | | - sellout: indicates the specifications are sold out. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ - -.. note:: - - The value of **az_status** is used as an example. - -- Response example - - .. code-block:: text - - { - "flavors": [ - { - "engine_name": "DDS-Community", - "type": "mongos", - "vcpus": "1", - "ram": "4", - "spec_code": "dds.mongodb.s2.medium.4.mongos", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "mongos", - "vcpus": "2", - "ram": "8", - "spec_code": "dds.mongodb.s2.large.4.mongos", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "mongos", - "vcpus": "4", - "ram": "16", - "spec_code": "dds.mongodb.s2.xlarge.4.mongos", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "mongos", - "vcpus": "8", - "ram": "32", - "spec_code": "dds.mongodb.s2.2xlarge.4.mongos", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "mongos", - "vcpus": "16", - "ram": "64", - "spec_code": "dds.mongodb.s2.4xlarge.4.mongos", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "shard", - "vcpus": "1", - "ram": "4", - "spec_code": "dds.mongodb.s2.medium.4.shard", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "shard", - "vcpus": "2", - "ram": "8", - "spec_code": "dds.mongodb.s2.large.4.shard", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "shard", - "vcpus": "4", - "ram": "16", - "spec_code": "dds.mongodb.s2.xlarge.4.shard", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "shard", - "vcpus": "8", - "ram": "32", - "spec_code": "dds.mongodb.s2.2xlarge.4.shard", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "shard", - "vcpus": "16", - "ram": "64", - "spec_code": "dds.mongodb.s2.4xlarge.4.shard", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "config", - "vcpus": "2", - "ram": "4", - "spec_code": "dds.mongodb.s2.large.2.config", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "replica", - "vcpus": "1", - "ram": "4", - "spec_code": "dds.mongodb.s2.medium.4.repset", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "replica", - "vcpus": "2", - "ram": "8", - "spec_code": "dds.mongodb.s2.large.4.repset", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "replica", - "vcpus": "4", - "ram": "16", - "spec_code": "dds.mongodb.s2.xlarge.4.repset", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "replica", - "vcpus": "8", - "ram": "32", - "spec_code": "dds.mongodb.s2.2xlarge.4.repset", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - }, - { - "engine_name": "DDS-Community", - "type": "replica", - "vcpus": "16", - "ram": "64", - "spec_code": "dds.mongodb.s2.4xlarge.4.repset", - "az_status": [ - "eu-de-01": "normal", - "eu-de-02": "normal", - "eu-de-03": "normal" - ] - } - ] - } - -**Status Code** ---------------- - -For more information, see :ref:`Status Code `. - -Error Code ----------- - -For more information, see :ref:`Error Code `. diff --git a/api-ref/source/api_overview.rst b/api-ref/source/api_overview.rst index 1ed663f..12f4920 100644 --- a/api-ref/source/api_overview.rst +++ b/api-ref/source/api_overview.rst @@ -9,15 +9,27 @@ DDS provides extension APIs, allowing you to perform specific operations using A .. table:: **Table 1** API description - +----------------------------------------+-------------------------------------------------------------------------------+ - | Type | Description | - +========================================+===============================================================================+ - | API Version Queries | - Query all API versions. | - | | - Query a specified API version. | - +----------------------------------------+-------------------------------------------------------------------------------+ - | Database Version Information Queries | Obtain database version information about a specified instance type. | - +----------------------------------------+-------------------------------------------------------------------------------+ - | All DB Instance Specifications Queries | Query all DB instance specifications in a specified region. | - +----------------------------------------+-------------------------------------------------------------------------------+ - | DB Instance Management | Manage DB instances, including creating, deleting, and querying DB instances. | - +----------------------------------------+-------------------------------------------------------------------------------+ + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Type | Description | + +=========================================+======================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | Querying the API Version | - Query all API versions. | + | | - Query a specified API version. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Querying Database Version Information | Obtain database version information about a specified instance type. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Querying All DB Instance Specifications | Query all DB instance specifications in a specified region. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Querying the Database Disk Type | Query the database disk type in the current region. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Managing DB Instances | Create, restart, delete, and query instances, scale up storage, add instance nodes, change instance specifications, switch over primary and standby nodes, enable or disable SSL, change instance names, change database ports, change security groups, and bind or unbind an EIP, change the private network address of an instance, enable the shard/config IP addresses, configure cross-CIDR access, query regions and AZs to which an instance can be migrated. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Managing Connections | Query instance node sessions, terminate instance node sessions, and query the number of instance node connections. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Backing up and Restoring an Instance | Create manual backups, delete manual backups, query backups, query the automated backup policy, set the automated backup policy, restore to a new DB instance, obtain the backup download link, query the restoration time range, obtain the list of databases that can be restored, obtain the list of database collections that can be restored, obtain the current DB instance, and restore a database or table to a specified point in time. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Obtaining Log Information | Query database slow logs, obtain the download link of slow logs, query database error logs, obtain the download link of error logs, set audit log policies, query audit log policies, obtain the audit logs, and obtain the download link of audit logs. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Managing Tags | Manage tags, including querying resources by tag, adding and deleting a tag or tags, and querying resource tags and project tags. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Managing Databases and Accounts | Create a database user, create a database role, query database users and roles, change the database user password, , query the cluster balancing settings, enable or disable cluster balancing, and set the activity time window of cluster balancing, delete database users, delete database roles, and check the database password. | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/creating_a_manual_backup.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/creating_a_manual_backup.rst new file mode 100644 index 0000000..60114d3 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/creating_a_manual_backup.rst @@ -0,0 +1,113 @@ +:original_name: dds_api_0027.html + +.. _dds_api_0027: + +Creating a Manual Backup +======================== + +Function +-------- + +This API is used to create a manual backup for a DB instance. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/backups + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + ========== ========= ================================================= + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +--------+-----------+--------+----------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+========+======================================================================================================================+ + | backup | Yes | Object | Specifies the backup parameter objects For more information, see :ref:`Table 3 `. | + +--------+-----------+--------+----------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0027__table35260043174853: + + .. table:: **Table 3** backup field data structure description + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=================================================================================================================================================================================================================+ + | instance_id | Yes | String | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | Yes | String | Specifies the manual backup name. | + | | | | | + | | | | The value must be 4 to 64 characters in length and start with a letter (from A to Z or from a to z). It is case-sensitive and can contain only letters, digits (from 0 to 9), hyphens (-), and underscores (_). | + | | | | | + | | | | .. caution:: | + | | | | | + | | | | CAUTION: | + | | | | Name of the Backup has to be unique among all other backups on Project. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Specifies the manual backup description. | + | | | | | + | | | | The description must consist of a maximum of 256 characters and cannot contain the following special characters: >!<"&'= | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/backups + + .. code-block:: text + + { + "backup":{ + "instance_id": "a89dab5e39394eccbdb77b19d57b0180in02", + "name": "mybackup1", + "description": "The first Manual backup" + } + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 4** Parameter description + + ========= ====== ============================================== + Name Type Description + ========= ====== ============================================== + job_id String The ID of the asynchronous manual backup task. + backup_id String Manual backup ID + ========= ====== ============================================== + +- Response example + + .. code-block:: text + + { + "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec", + "backup_id": "bf9ee62a7f7044c583c6765c916c36edbr02" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/deleting_a_manual_backup.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/deleting_a_manual_backup.rst new file mode 100644 index 0000000..dd29496 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/deleting_a_manual_backup.rst @@ -0,0 +1,69 @@ +:original_name: dds_api_0028.html + +.. _dds_api_0028: + +Deleting a Manual Backup +======================== + +Function +-------- + +This API is used to delete a manual backup for a DB instance. + +URI +--- + +- URI format + + DELETE https://{Endpoint}/v3/{project_id}/backups/{backup_id} + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + backup_id Yes Specifies the backup file ID. + ========== ========= ================================================= + +Requests +-------- + +- Example request + + DELETE https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/backups/8d9586c40b33449a815518d4635a2cd9br02 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + ====== ====== ====================== + Name Type Description + ====== ====== ====================== + job_id String Indicates the task ID. + ====== ====== ====================== + +- Response example + + .. code-block:: text + + { + "job_id": "fcaab90b-960d-4441-b73d-a5b2532c5ec5" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/index.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/index.rst new file mode 100644 index 0000000..551cf14 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/index.rst @@ -0,0 +1,36 @@ +:original_name: dds_backup_restore.html + +.. _dds_backup_restore: + +Backup and Restoration +====================== + +- :ref:`Creating a Manual Backup ` +- :ref:`Deleting a Manual Backup ` +- :ref:`Querying the Backup List ` +- :ref:`Querying an Automated Backup Policy ` +- :ref:`Setting an Automated Backup Policy ` +- :ref:`Restoring Data to a New DB Instance ` +- :ref:`Obtaining the Link for Downloading a Backup File ` +- :ref:`Querying the Restoration Time Ranges ` +- :ref:`Obtaining the List of Databases That Can Be Restored ` +- :ref:`Obtaining the List of Database Collections That Can Be Restored ` +- :ref:`Restoring Data to the Original DB Instance ` +- :ref:`Restoring Databases and Tables to a Point in Time ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_manual_backup + deleting_a_manual_backup + querying_the_backup_list + querying_an_automated_backup_policy + setting_an_automated_backup_policy + restoring_data_to_a_new_db_instance + obtaining_the_link_for_downloading_a_backup_file + querying_the_restoration_time_ranges + obtaining_the_list_of_databases_that_can_be_restored + obtaining_the_list_of_database_collections_that_can_be_restored + restoring_data_to_the_original_db_instance + restoring_databases_and_tables_to_a_point_in_time diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_link_for_downloading_a_backup_file.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_link_for_downloading_a_backup_file.rst new file mode 100644 index 0000000..8de2ee9 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_link_for_downloading_a_backup_file.rst @@ -0,0 +1,107 @@ +:original_name: dds_api_0059.html + +.. _dds_api_0059: + +Obtaining the Link for Downloading a Backup File +================================================ + +Function +-------- + +This API is used to obtain the link for downloading a backup file. + +Constraints +----------- + +The backup download link is valid within 15 minutes after being updated. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/backups/download-file?instance_id={instance_id}&backup_id={backup_id} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + | | | | + | | | For details about how to obtain the project ID, see :ref:`Obtaining a Project ID `. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_id | Yes | Specifies the backup ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/97b026aa9cc4417888c14c84a1ad9860/backups/download-file?instance_id=befb1cfe1f96403780396b0c54f85d11in02&backup_id=bd062e1af2d248b3bb4cd3dbb4183888br02 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+-------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=========================================================================+ + | files | Array of objects | Indicates the list of backup files. | + | | | | + | | | For more information, see :ref:`Table 3 `. | + +-----------------------+-----------------------+-------------------------------------------------------------------------+ + | bucket | String | Indicates the name of the bucket where the file is located. | + +-----------------------+-----------------------+-------------------------------------------------------------------------+ + + .. _dds_api_0059__table52869820: + + .. table:: **Table 3** files field data structure description + + +-------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===================+========+==============================================================================================================================================================================================================================================================+ + | name | String | Indicates the file name. | + +-------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Long | Indicates the file size in KB. | + +-------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | download_link | String | Indicates the link for downloading the backup file. | + +-------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | link_expired_time | String | Indicates the link expiration time. The format is "yyyy-mm-ddThh:mm:ssZ". **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. For example, the time zone offset of UTC is shown as **+0000**. | + +-------------------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "files": [ + { + "name": "43e4feaab48f11e89039fa163ebaa7e4br02.xxx", + "size": 2803, + "download_link":"https://obs.domainname.com/rdsbucket.username.1/xxxxxx", + "link_expired_time":"2018-08-016T10:15:14+0000" + } + ], + "bucket": "rdsbucket.bucketname" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_list_of_database_collections_that_can_be_restored.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_list_of_database_collections_that_can_be_restored.rst new file mode 100644 index 0000000..c2bfa56 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_list_of_database_collections_that_can_be_restored.rst @@ -0,0 +1,104 @@ +:original_name: dds_api_0082.html + +.. _dds_api_0082: + +Obtaining the List of Database Collections That Can Be Restored +=============================================================== + +Function +-------- + +This API is used to obtain the list of databases collections that can be restored. + +Constraints +----------- + +This API applies only to replica sets. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restore-collection?db_name={db_name}&restore_time={restore_time}&offset={offset}&limit={limit} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | db_name | Yes | Specifies the database name. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | restore_time | Yes | Specifies the restoration time point. | + | | | | + | | | The value is a UNIX timestamp, in milliseconds. The time zone is UTC. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Specifies the index position. | + | | | | + | | | - The value is an integer greater than or equal to 0. | + | | | - If this parameter is not transferred, the value is **0** by default. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Specifies the upper limit of the number of queried records. | + | | | | + | | | - The value ranges from 1 to 100. | + | | | - If this parameter is not transferred, the first 100 records are queried by default. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + Get https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-collection?db_name=mydbx&restore_time=1607689584000&limit=10&offset=0 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------+------------------+-------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+==================+=====================================================================================+ + | collections | Array of objects | Indicates the list of collections. Each element in the list indicates a collection. | + +-------------+------------------+-------------------------------------------------------------------------------------+ + | total_count | Integer | Indicates the total number of collections. | + +-------------+------------------+-------------------------------------------------------------------------------------+ + + .. table:: **Table 3** Parameter description + + ==== ====== ============================== + Name Type Description + ==== ====== ============================== + name String Indicates the collection name. + ==== ====== ============================== + +- Response example + + .. code-block:: text + + { + "collections": [ + "dds-test" + ], + "total_count": 1 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_list_of_databases_that_can_be_restored.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_list_of_databases_that_can_be_restored.rst new file mode 100644 index 0000000..bb75a35 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/obtaining_the_list_of_databases_that_can_be_restored.rst @@ -0,0 +1,94 @@ +:original_name: dds_api_0081.html + +.. _dds_api_0081: + +Obtaining the List of Databases That Can Be Restored +==================================================== + +Function +-------- + +This API is used to obtain the list of databases that can be restored. + +Constraints +----------- + +This API applies only to replica sets. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restore-database?restore_time={restore_time}&offset={offset}&limit={limit} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | restore_time | Yes | Specifies the restoration time point. | + | | | | + | | | The value is a UNIX timestamp, in milliseconds. The time zone is UTC. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Specifies the index position. | + | | | | + | | | - The value must be greater than or equal to **0**. | + | | | - If this parameter is not transferred, the value is **0** by default. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Specifies the upper limit of the number of queried records. | + | | | | + | | | - The value ranges from 1 to 100. | + | | | - If this parameter is not transferred, the first 100 records are queried by default. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-database?restore_time=1607689584000&limit=10&offset=1 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------+-----------------+-----------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+=================+=============================================================================+ + | databases | Array of String | Indicates the database list. Each element in the list indicates a database. | + +-------------+-----------------+-----------------------------------------------------------------------------+ + | total_count | Integer | Indicates the total number of databases. | + +-------------+-----------------+-----------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "databases": [ + "test_db" + ], + "total_count": 1 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_an_automated_backup_policy.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_an_automated_backup_policy.rst new file mode 100644 index 0000000..6762ff0 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_an_automated_backup_policy.rst @@ -0,0 +1,100 @@ +:original_name: dds_api_0030.html + +.. _dds_api_0030: + +Querying an Automated Backup Policy +=================================== + +Function +-------- + +This API is used to query an automated backup policy. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/backups/policy + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/97b026aa9cc4417888c14c84a1ad9860/instances/cc6345c64cec47499182467ea0dd432ain02/backups/policy + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +---------------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===============+========+==============================================================================================================================================================================+ + | backup_policy | Object | Indicates the backup policy object, including the backup retention period (days) and start time. For more information, see :ref:`Table 3 `. | + +---------------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0030__table163715367507: + + .. table:: **Table 3** backup_policy field data structure description + + +------------+---------+-----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+=========+=================================================================================================================+ + | keep_days | Integer | Indicates the number of days to retain the backup files. | + +------------+---------+-----------------------------------------------------------------------------------------------------------------+ + | start_time | String | Indicates the backup time window. Automated backups will be triggered during the backup time window. | + +------------+---------+-----------------------------------------------------------------------------------------------------------------+ + | period | String | Indicates the backup cycle configuration. Data will be automatically backed up on the selected days every week. | + +------------+---------+-----------------------------------------------------------------------------------------------------------------+ + +- Response example + + In case the automated backup policy is enabled: + + .. code-block:: text + + { + "backup_policy": { + "keep_days": 7, + "start_time": "19:00-20:00", + "period": "1,2,4,5,6" + } + } + + In case the automated backup policy is disabled: + + .. code-block:: text + + { + "backup_policy": { + "keep_days": 0 + } + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_the_backup_list.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_the_backup_list.rst new file mode 100644 index 0000000..b71ba36 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_the_backup_list.rst @@ -0,0 +1,177 @@ +:original_name: dds_api_0029.html + +.. _dds_api_0029: + +Querying the Backup List +======================== + +Function +-------- + +This API is used to query backups based on specified conditions. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/backups?instance_id={instance_id}&backup_id={backup_id}&backup_type={backup_type}&offset={offset}&limit={limit}&begin_time={begin_time}&end_time={end_time}&mode={mode} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=======================================================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | No | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_id | No | Specifies the backup ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_type | No | Specifies the backup type. | + | | | | + | | | - **Auto**: indicates automated full backup. | + | | | - **Manual** indicates manual full backup. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Specifies the index position. The query starts from the next instance creation time indexed by this parameter under a specified project. If offset is set to N, the resource query starts from the N+1 piece of data. | + | | | | + | | | The value must be greater than or equal to **0**. If this parameter is not transferred, offset is set to **0** by default, indicating that the query starts from the latest created DB instance. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Specifies the maximum allowed number of backups to be queried. | + | | | | + | | | The value ranges from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | begin_time | No | Specifies the start time of the query. The format is **yyyy-mm-dd hh:mm:ss**. The value is in UTC format. | + | | | | + | | | .. note:: | + | | | | + | | | When **end_time** is not empty, **begin_time** is mandatory. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | end_time | No | Specifies the end time of the query. The format is "yyyy-mm-dd hh:mm:ss". The value is in UTC format. | + | | | | + | | | .. note:: | + | | | | + | | | When **begin_time** is not empty, **end_time** is mandatory. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mode | No | Specifies the DB instance mode. | + | | | | + | | | Valid value: | + | | | | + | | | - Sharding | + | | | - ReplicaSet | + | | | - Single | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/97b026aa9cc4417888c14c84a1ad9860/backups?instance_id=c0c9f155c7b7423a9d30f0175998b63bin01&offset=0&limit=10&begin_time=2018-08-06 10:41:14&end_time=2018-08-16 10:41:14 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------+------------------+----------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+==================+====================================================================================================+ + | backups | Array of objects | Indicates the backup list. For more information, see :ref:`Table 3 `. | + +-------------+------------------+----------------------------------------------------------------------------------------------------+ + | total_count | Integer | Indicates the total number of queried records. | + +-------------+------------------+----------------------------------------------------------------------------------------------------+ + + .. _dds_api_0029__table52869820: + + .. table:: **Table 3** backups field data structure description + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+================================================================================================================================================================================================================================+ + | id | String | Indicates the backup ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Indicates the backup name. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | String | Indicates the ID of the DB instance from which the backup was created. You can obtain the ID by calling the API for querying DB instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_name | String | Indicates the name of the DB instance for which the backup is created. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | datastore | Object | Indicates the database version. For more information, see :ref:`Table 4 `. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | Indicates the backup type. | + | | | | + | | | - **Auto**: indicates automated full backup. | + | | | - **Manual** indicates manual full backup. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | begin_time | String | Indicates the backup start time. The format of the start time is **yyyy-mm-dd hh:mm:ss**. The value is in UTC format. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | end_time | String | Indicates the backup end time. The format of the end time is **yyyy-mm-dd hh:mm:ss**. The value is in UTC format. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the backup status. Valid value: | + | | | | + | | | - BUILDING: Backup in progress | + | | | - COMPLETED: Backup completed | + | | | - FAILED: Backup failed | + | | | - DISABLED: Backup being deleted | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Long | Indicates the backup size in KB. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Indicates the backup description. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0029__table1313585821318: + + .. table:: **Table 4** datastore field data structure description + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+================================================================================================+ + | type | String | Indicates the DB engine. | + | | | | + | | | Valid value: **DDS-Community**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | version | String | Indicates the database of version 3.2, 3.4, or 4.0. The value is **3.2**, **3.4**, or **4.0**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "backups": [ + { + "id": "43e4feaab48f11e89039fa163ebaa7e4br01", + "name": "backup-test", + "instance_id": "43e4feaab48f11e89039fa163ebaa7e4br01", + "instance_name": "cluster-test", + "datastore" : { + "type" : "DDS-Community", + "version" : "4.0" + }, + "type": "auto", + "begin_time": "2018-08-06 12:41:14", + "end_time": "2018-08-06 12:43:14", + "status": "COMPLETED", + "size": 2803, + "description": "backup description" + } + ], + "total_count":1 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_the_restoration_time_ranges.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_the_restoration_time_ranges.rst new file mode 100644 index 0000000..a001a6c --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/querying_the_restoration_time_ranges.rst @@ -0,0 +1,102 @@ +:original_name: dds_api_0080.html + +.. _dds_api_0080: + +Querying the Restoration Time Ranges +==================================== + +Function +-------- + +This API is used to query the restoration time range of a DB instance. + +Constraints +----------- + +Currently, this API only supports replica set instances and cluster instances 4.0. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restore-time?date={yyyy-mm-dd} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | date | Yes | Specifies the date to be queried in UTC time zone. The value is in the yyyy-mm-dd format. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + Get https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore-time?date=2020-12-12 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +--------------+------------------+-------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==============+==================+=============================================================================================================+ + | restore_time | Array of objects | Indicates the restoration time ranges. For details, see :ref:`Table 3 `. | + +--------------+------------------+-------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0080__table15985133144213: + + .. table:: **Table 3** restore_time parameters + + +------------+------+----------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+======+========================================================================================================================================+ + | start_time | Long | Indicates the start time of the restoration time range in the UNIX timestamp format. The unit is millisecond and the time zone is UTC. | + +------------+------+----------------------------------------------------------------------------------------------------------------------------------------+ + | end_time | Long | Indicates the end time of the restoration time range in the UNIX timestamp format. The unit is millisecond and the time zone is UTC. | + +------------+------+----------------------------------------------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "restore_time": [ + { + "start_time": 1607731200000, + "end_time": 1607756414000 + }, + { + "start_time": 1607756825000, + "end_time": 1607761999000 + }, + { + "start_time": 1607762943000, + "end_time": 1607817599000 + } + ] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_data_to_a_new_db_instance.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_data_to_a_new_db_instance.rst new file mode 100644 index 0000000..28f5226 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_data_to_a_new_db_instance.rst @@ -0,0 +1,598 @@ +:original_name: dds_api_0038.html + +.. _dds_api_0038: + +Restoring Data to a New DB Instance +=================================== + +Function +-------- + +This API is used to restore a backup to a new DB instance. + +Constraints +----------- + +- The database type of the destination DB instance must be the same as that of the source DB instance. +- Currently, only replica set instances and cluster instances 4.0 can be restored to a new instance and to any point in time. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + ========== ========= ================================================= + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+==================+========================================================================================================================================================================================================================+ + | name | Yes | String | Specifies the DB instance name. The instance name can be the same as an existing instance name. | + | | | | | + | | | | - The instance name must contain 4 to 64 characters and must start with a letter. It is case sensitive and can contain letters, digits, hyphens (-), and underscores (_). It cannot contain other special characters. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | Yes | String | Specifies the AZ ID. | + | | | | | + | | | | The value cannot be empty. For details about how to obtain this parameter value, see `Regions and Endpoints `__. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | Yes | String | Specifies the VPC ID. | + | | | | | + | | | | For details about how to obtain this parameter value, see section "Virtual Private Cloud" in the *Virtual Private Cloud API Reference*. | + | | | | | + | | | | The value cannot be empty. The string length and whether the string complying with UUID regular expression rules are verified. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | Yes | String | Specifies the subnet ID. | + | | | | | + | | | | For details about how to obtain this parameter value, see section "Subnet" in the *Virtual Private Cloud API Reference*. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | Yes | String | Specifies the ID of the security group where a specified DB instance belongs to. | + | | | | | + | | | | For details about how to obtain this parameter value, see section "Security Group" in the *Virtual Private Cloud API Reference*. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | password | No | String | Specifies the database password. | + | | | | | + | | | | The value must be 8 to 32 characters in length and contain uppercase letters (A to Z), lowercase letters (a to z), digits (0 to 9), and special characters, such as ``~!@#%^*-_=+?`` | + | | | | | + | | | | Enter a strong password to improve security, preventing security risks such as brute force cracking. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | disk_encryption_id | No | String | Specifies the key ID used for disk encryption. The string must comply with UUID regular expression rules. | + | | | | | + | | | | If this parameter is not transferred, disk encryption is not performed. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | flavor | Yes | Array of objects | Specifies the instance specifications. For more information, see :ref:`Table 4 `. | + | | | | | + | | | | For details about how to obtain the value, see the parameter value in :ref:`Querying Database Specifications `. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | restore_point | Yes | Object | Specifies the details about the backup to be restored to a new DB instance. For more information, see :ref:`Table 3 `. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_strategy | No | Object | Specifies the advanced backup policy. For more information, see :ref:`Table 5 `. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | Specifies the enterprise project ID. | + | | | | | + | | | | - This parameter is not transferred for users who have not enabled the enterprise multi-project service. | + | | | | - If this parameter is not transferred for a user who has enabled the enterprise multi-project service, the value is the default enterprise project. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ssl_option | No | String | Specifies whether to enable or disable SSL. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - The value **0** indicates that SSL is disabled by default. | + | | | | - The value **1** indicates that SSL is enabled by default. | + | | | | | + | | | | If this parameter is not transferred, SSL is enabled by default. | + +-----------------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0038__table663124711145: + + .. table:: **Table 3** restore_point field data structure description + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=================================================================================================================================================================================+ + | instance_id | No | String | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + | | | | | + | | | | - This parameter is optional when **type** is set to **backup**. | + | | | | - This parameter is mandatory when **type** is set to **timestamp**. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | No | String | Specifies the recovery mode. The enumerated values are as follows: | + | | | | | + | | | | - **backup**: indicates restoration from backup files. In this mode, **backup_id** is mandatory when **type** is optional. | + | | | | - **timestamp**: indicates point-in-time restoration. In this mode, **restore_time** is mandatory when **type** is mandatory. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_id | No | String | Specifies the ID of the backup to be restored. This parameter must be specified when the backup file is used for restoration. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | When **type** is not mandatory, **backup_id** is mandatory. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | restore_time | No | Integer | Specifies the time point of data restoration in the UNIX timestamp. The unit is millisecond and the time zone is UTC. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | When **type** is mandatory, **restore_time** is mandatory. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0038__table206664717143: + + .. table:: **Table 4** flavor field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=============================================================================================================================================================================================================================================================================================================+ + | type | Yes | String | Specifies the node type. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - For a cluster instance, the value can be **mongos**, **shard**, or **config**. | + | | | | - For a replica set instance, the value is **replica**. | + | | | | - For a single node instance, the value is **single**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | num | Yes | Integer | Specifies node quantity. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - This parameter is not transferred for shard nodes. | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - config: The value is **1**. | + | | | | - replica: The value is **1**. | + | | | | - single: The value is **1**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | No | String | Specifies the disk size. | + | | | | | + | | | | The value must be a multiple of 10. The unit is GB. | + | | | | | + | | | | - In a cluster instance, the shard size ranges from 10 GB to 2000 GB and must be greater than or equal to the disk size of the original instance. The config size can only be 20 GB. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + | | | | - In a replica set instance, the disk size ranges from 10 GB to 2000 GB and must be greater than or equal to the disk size of the original instance. | + | | | | - In a single node instance, the disk size ranges from 10 GB to 1000 GB and must be greater than or equal to the disk size of the original instance. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | Yes | String | Specifies the resource specification code. For details about how to obtain the value, see the parameter value in :ref:`Querying Database Specifications `. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0038__table289547161412: + + .. table:: **Table 5** backup_strategy field data structure description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+================================================================================================================================================+ + | start_time | Yes | String | Specifies the backup time window. Automated backups will be triggered during the backup time window. | + | | | | | + | | | | The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format. | + | | | | | + | | | | - The **HH** value must be 1 greater than the **hh** value. | + | | | | - The values of **mm** and **MM** must be the same and must be set to **00**. | + | | | | | + | | | | Example value: | + | | | | | + | | | | 23:00-00:00 | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | keep_days | No | String | Specifies the number of days to retain the generated backup files. | + | | | | | + | | | | The value range is from 0 to 732. | + | | | | | + | | | | - If this parameter is set to **0**, the automated backup policy is not set. | + | | | | - If this parameter is not transferred, the automated backup policy is enabled by default. Backup files are stored for seven days by default. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: + + The values of **region** and **availability_zone** are used as examples. + +- Request example + + POST https://dds.eu-de.otc.t-systems.com/v3/97b026aa9cc4417888c14c84a1ad9860/instances + + Restoring a backup to a new cluster instance: + + .. code-block:: text + + { + "name": "test-cluster-01", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "password": "Test#%0_", + "restore_point": { + "backup_id": "8f643d252d834a4c916b2db4322f99552734" + }, + "flavor": [{ + "type": "mongos", + "num": 2, + "spec_code": "dds.mongodb.c3.medium.4.mongos" + }, + { + "type": "shard", + "size": "40", + "spec_code": "dds.mongodb.c3.medium.4.shard" + }, + { + "type": "config", + "num": 1, + "size": "20", + "spec_code": "dds.mongodb.c3.large.2.config" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + } + } + + Restoring a backup to a new replica set instance: + + .. code-block:: text + + { + "name": "test-replicaset", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "password": "Test#%0_", + "restore_point": { + "backup_id": "8f643d252d834a4c916b2db4322f99552734" + }, + "flavor": [ + { + "type": "replica", + "num": 1, + "spec_code": "dds.mongodb.s2.medium.4.repset" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + } + } + + Restoring a backup to a new single node instance: + + .. code-block:: text + + { + "name": "test-singlenode", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "password": "Test#%0_", + "restore_point": { + "backup_id": "8f643d252d834a4c916b2db4322f99552734" + }, + "flavor": [ + { + "type": "single", + "num": 1, + "spec_code": "dds.mongodb.c3.medium.4.single" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + } + } + + Restoring a backup to a new replica set instance at a point in time: + + .. code-block:: text + + { + "name": "replica-liuyunj1", + "availability_zone": "az1xahz", + "vpc_id": "dcdadabc-efed-4518-8b34-4af66fcd97e7", + "subnet_id": "4a9348f2-f232-4700-a440-2f1641d80960", + "security_group_id": "c57b9db2-cccb-4c0d-b058-7ea51dda0c99", + "flavor": [ + { + "type": "replica", + "num": 1, + "size": "100", + "spec_code": "dds.mongodb.c3.large.2.repset" + } + ], + "backup_strategy": { + "start_time": "08:00-09:00", + "keep_days": "8" + }, + "restore_point": { + "instance_id": "d5833c2854a4486cb7960f829269e211in02", + "type": "timestamp", + "restore_time": 1607689584000 + }, + "ssl_option": "1" + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 6** Parameter description + + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+==================+===============================================================================================================================================================+ + | id | String | Indicates the DB instance ID, | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | datastore | Object | Indicates the database information, which is the same as the request parameter. For more information, see :ref:`Table 7 `. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created | String | Indicates the creation time in the following format: yyyy-mm-dd hh:mm:ss. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the DB instance status. The value is **creating**. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | region | String | Indicates the region ID, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | Indicates the AZ ID, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Indicates the VPC ID, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Indicates the subnet ID, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Indicates the ID of the security group to which the instance belongs, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | disk_encryption_id | String | Indicates the ID of the disk encryption key, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mode | String | Indicates the instance type, which is the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | flavor | Array of objects | Indicates the instance specification, which is the same as the request parameter. For more information, see :ref:`Table 8 `. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_strategy | Object | Indicates the advanced backup policy, which is the same as the request parameter. For more information, see :ref:`Table 9 `. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | Indicates the enterprise project ID. If the value is **0**, the resource belongs to the default enterprise project. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | job_id | String | Indicates the ID of the workflow for creating a DB instance. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ssl_option | String | Indicates whether to enable SSL, which functions the same as the request parameter. | + +-----------------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0038__table149461548134: + + .. table:: **Table 7** datastore field data structure description + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================================+ + | type | Yes | String | Specifies the database type. The value is **DDS-Community**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | version | Yes | String | Specifies the database version. Versions 4.2, 4.0, and 3.4 are supported. The value can be **4.2**, **4.0**, or **3.4**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | storage_engine | Yes | String | Specifies the storage engine. DDS supports the WiredTiger and RocksDB storage engines. | + | | | | | + | | | | - If the database version is 4.2 and the storage engine is RocksDB, the value is **rocksDB**. | + | | | | - If the database version is 4.0 or 3.4 and the storage engine is WiredTiger, the value is **wiredTiger**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0038__table119482048538: + + .. table:: **Table 8** flavor field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================================================================================================================================+ + | type | Yes | String | Specifies the node type. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - For a cluster instance, the value can be **mongos**, **shard**, or **config**. | + | | | | - For a replica set instance, the value is **replica**. | + | | | | - For a single node instance, the value is **single**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | num | Yes | String | Specifies node quantity. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - config: The value is **1**. | + | | | | - replica: The number of nodes can be 3, 5, or 7. | + | | | | - single: The value is **1**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | storage | No | String | Specifies the disk type. | + | | | | | + | | | | Valid value: ULTRAHIGH, which indicates the type SSD. | + | | | | | + | | | | This parameter is valid for the shard and config nodes of a cluster instance, replica set instances, and single node instances. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | No | String | Specifies the disk size. | + | | | | | + | | | | This parameter is mandatory for all nodes except mongos. This parameter is invalid for the mongos nodes. | + | | | | | + | | | | The value must be a multiple of 10. The unit is GB. | + | | | | | + | | | | - For a cluster instance, the storage space of a shard node can be 10 to 2000 GB, and the config storage space is 20 GB. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + | | | | - For a replica set instance, the value ranges from 10 to 2000. | + | | | | - For a single node instance, the value ranges from 10 to 1000. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | Yes | String | Specifies the resource specification code. For details about how to obtain the value, see the response values of **spec_code** in :ref:`Querying Database Specifications `. | + | | | | | + | | | | In a cluster instance, multiple specifications need to be specified. All specifications must be of the same series, that is, general-purpose (s6), enhanced (c3), or enhanced II (c6). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0038__table59521648930: + + .. table:: **Table 9** backup_strategy field data structure description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+================================================================================================================================================+ + | start_time | Yes | String | Specifies the backup time window. Automated backups will be triggered during the backup time window. | + | | | | | + | | | | The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format. | + | | | | | + | | | | - The **HH** value must be 1 greater than the **hh** value. | + | | | | - The values of **mm** and **MM** must be the same and must be set to **00**. | + | | | | - If this parameter is not transferred, the default backup time window is set to **00:00-01:00**. | + | | | | | + | | | | Example value: | + | | | | | + | | | | 23:00-00:00 | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | keep_days | No | String | Specifies the number of days to retain the generated backup files. | + | | | | | + | | | | The value range is from 0 to 732. | + | | | | | + | | | | - If this parameter is set to **0**, the automated backup policy is not set. | + | | | | - If this parameter is not transferred, the automated backup policy is enabled by default. Backup files are stored for seven days by default. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: + + The values of **region** and **availability_zone** are used as examples. + +- Response example + + Cluster instance: + + .. code-block:: text + + { + "id": "39b6a1a278844ac48119d86512e0000bin02", + "name": "test-cluster-01", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "created": "2019-01-16 09:34:36", + "status": "creating", + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "disk_encryption_id": "", + "mode": "Sharding", + "flavor": [ + { + "type": "mongos", + "num": "2", + "spec_code": "dds.mongodb.c3.medium.4.mongos" + }, + { + "type": "shard", + "num": "2", + "spec_code": "dds.mongodb.c3.medium.4.shard", + "size": "20" + }, + { + "type": "config", + "num": "1", + "spec_code": "dds.mongodb.c3.large.2.config", + "size": "20" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + }, + "enterprise_project_id": "", + "ssl_option":"1", + "job_id": "c010abd0-48cf-4fa8-8cbc-090f093eaa2f" + } + + Replica set instance: + + .. code-block:: text + + { + "id": "46dfadfd2b674585a430217f23606cd7in02", + "name": "test-replicaset", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "created": "2019-01-16 09:33:08", + "status": "creating", + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "disk_encryption_id": "", + "mode": "ReplicaSet", + "flavor": [ + { + "type": "replica", + "num": "1", + "spec_code": "dds.mongodb.s2.medium.4.repset", + "size": "30" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "7" + }, + "enterprise_project_id": "", + "ssl_option":"1", + "job_id": "2408417d-fd4b-40ae-bec6-e09ce594eb5f" + } + + Single node instance: + + .. code-block:: text + + { + "id": "520c58ba00a3497e97ce0b9604874dd6in02", + "name": "test-singlenode", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "created": "2019-01-15 12:08:11", + "status": "creating", + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "disk_encryption_id": "", + "mode": "Single", + "flavor": [ + { + "type": "single", + "num": "1", + "spec_code": "dds.mongodb.c3.medium.4.single", + "size": "30" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "7" + }, + "enterprise_project_id": "", + "ssl_option":"1", + "job_id": "46b65a13-3d52-4c58-a29b-4085d563dc9b" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_data_to_the_original_db_instance.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_data_to_the_original_db_instance.rst new file mode 100644 index 0000000..491c2cc --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_data_to_the_original_db_instance.rst @@ -0,0 +1,147 @@ +:original_name: dds_api_0083.html + +.. _dds_api_0083: + +Restoring Data to the Original DB Instance +========================================== + +Function +-------- + +This API is used to restore data to the original DB instance. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/recovery + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + ========== ========= ================================================= + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================+ + | source | Yes | Object | Specifies the instance from which the backup was created | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------+ + | target | Yes | Object | Specifies the instance to which the backup is restored. | + | | | | | + | | | | For details, see :ref:`Table 4 `. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------+ + + .. _dds_api_0083__table163715367507: + + .. table:: **Table 3** source field data structure description + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=================================================================================================================================================================================+ + | instance_id | Yes | String | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | No | String | Specifies the restoration mode. Enumerated values include: | + | | | | | + | | | | - **backup**: indicates using backup files for restoration. In this mode, **type** is optional and **backup_id** is mandatory. | + | | | | - **timestamp**: indicates the point-in-time restoration mode. In this mode, **type** is mandatory and **restore_time** is mandatory. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_id | No | String | Specifies the ID of the backup to be restored. This parameter must be specified when the backup file is used for restoration. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | restore_time | No | String | Specifies the time point of data restoration in the UNIX timestamp. The unit is millisecond and the time zone is UTC. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter takes effect only for replica set instances. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0083__table168109911: + + .. table:: **Table 4** target field data structure description + + +-------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=============+===========+========+================================================================================================================================================================================================================================+ + | instance_id | Yes | String | Specifies ID of the DB instance to be restored from a backup. You can call the API for querying DB Instances to obtain the DB instance ID. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Request example + + POST https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/recovery + + - Restoring a backup: + + .. code-block:: text + + { + "source": { + "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02", + "type": "backup", + "backup_id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe" + }, + "target": { + "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02" + } + } + + - Restoring to a point in time (applicable to replica set instances and cluster instances 4.0) + + .. code-block:: text + + { + "source": { + "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02", + "type": "timestamp", + "restore_time": 1532001446987 + }, + "target": { + "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin02" + } + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 5** Parameter description + + ====== ====== ====================================================== + Name Type Description + ====== ====== ====================================================== + job_id String ID of the asynchronous task for the restore operation. + ====== ====== ====================================================== + +- Response example + + .. code-block:: text + + { + "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_databases_and_tables_to_a_point_in_time.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_databases_and_tables_to_a_point_in_time.rst new file mode 100644 index 0000000..a6115a1 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/restoring_databases_and_tables_to_a_point_in_time.rst @@ -0,0 +1,158 @@ +:original_name: dds_api_0084.html + +.. _dds_api_0084: + +Restoring Databases and Tables to a Point in Time +================================================= + +Function +-------- + +This API is used to restore databases and tables at a point in time. + +Constraints +----------- + +This API applies only to replica sets. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restore/collections + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +---------------------+-----------------+------------------+--------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=====================+=================+==================+====================================================================+ + | restore_collections | Yes | Array of objects | Specifies the database information. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +---------------------+-----------------+------------------+--------------------------------------------------------------------+ + + .. _dds_api_0084__table163715367507: + + .. table:: **Table 3** restore_collections data structure description + + +-----------------------+-----------------+------------------+-----------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+==================+=======================================================================+ + | database | Yes | String | Specifies the database name. | + +-----------------------+-----------------+------------------+-----------------------------------------------------------------------+ + | collections | No | Array of objects | Specifies the collection information. | + | | | | | + | | | | For details, see :ref:`Table 4 `. | + +-----------------------+-----------------+------------------+-----------------------------------------------------------------------+ + | restore_database_time | No | String | Specifies the database restoration time point. | + | | | | | + | | | | This parameter is mandatory for database-level restoration, | + | | | | | + | | | | The value is a UNIX timestamp, in milliseconds. The time zone is UTC. | + +-----------------------+-----------------+------------------+-----------------------------------------------------------------------+ + + .. _dds_api_0084__table168109911: + + .. table:: **Table 4** collections data structure description + + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=========================+=================+=================+=======================================================================+ + | old_name | Yes | String | Specifies the original table name before the restoration. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------+ + | new_name | No | String | Specifies the table name after the restoration. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------+ + | restore_collection_time | Yes | String | Specifies the collection restoration time point. | + | | | | | + | | | | The value is a UNIX timestamp, in milliseconds. The time zone is UTC. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------+ + +- Request example + + POST https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/d5833c2854a4486cb7960f829269e211in02/restore/collections. + + - Database-level restoration + + .. code-block:: text + + { + "restore_collections": [ + { + "database": "test", + "restore_database_time": 1607762955000 + } + ] + } + + - Collection-level restoration + + .. code-block:: text + + { + "restore_collections": [ + { + "database": "test", + "collections": [ + { + "old_name": "test", + "restore_collection_time": 1607762955000 + } + ] + } + ] + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 5** Parameter description + + ====== ====== ====================================================== + Name Type Description + ====== ====== ====================================================== + job_id String ID of the asynchronous task for the restore operation. + ====== ====== ====================================================== + +- Response example + + .. code-block:: text + + { + "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec" + } + +- Abnormal Response + + For details, see :ref:`Abnormal Request Results `. + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/backup_and_restoration/setting_an_automated_backup_policy.rst b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/setting_an_automated_backup_policy.rst new file mode 100644 index 0000000..7de4e6f --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/backup_and_restoration/setting_an_automated_backup_policy.rst @@ -0,0 +1,117 @@ +:original_name: dds_api_0031.html + +.. _dds_api_0031: + +Setting an Automated Backup Policy +================================== + +Function +-------- + +This API is used to set an automated backup policy. + +URI +--- + +- URI format + + PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/backups/policy + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +---------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===============+===========+========+==============================================================================================================================================================================+ + | backup_policy | Yes | Object | Specifies the backup policy object, including the backup retention period (days) and start time. For more information, see :ref:`Table 3 `. | + +---------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0031__table163715367507: + + .. table:: **Table 3** backup_policy field data structure description + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+===========================================================================================================================================================================================================================================================+ + | keep_days | Yes | String | Specifies the number of days to retain the generated backup files. | + | | | | | + | | | | The value range is from 0 to 732. The value **0** indicates that the automated backup policy is disabled. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | start_time | No | String | Specifies the backup time window. Automated backups will be triggered during the backup time window. This parameter is mandatory if the automated backup policy is enabled. This parameter is not transferred if the automated backup policy is disabled. | + | | | | | + | | | | The value must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format. | + | | | | | + | | | | - The **HH** value must be 1 greater than the **hh** value. | + | | | | - The values of **mm** and **MM** must be the same and must be set to **00**. | + | | | | | + | | | | Example value: | + | | | | | + | | | | 23:00-00:00 | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | period | No | String | Specifies the backup cycle configuration. Data will be automatically backed up on the selected days every week. | + | | | | | + | | | | Value range: The value is a number separated by DBS case commas (,). The number indicates the week. The restrictions on the backup retention period are as follows: | + | | | | | + | | | | - This parameter is not transferred if its value is set to **0**. | + | | | | - If you set the retention period to 1 to 6 days, data is automatically backed up each day of the week. Set the parameter value to **1,2,3,4,5,6,7**. | + | | | | - If you set the retention period to 7 to 732 days, select at least one day of the week for the backup cycle. Example value: **1,2,3,4** | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + PUT https://dds.eu-de.otc.t-systems.com/v3/97b026aa9cc4417888c14c84a1ad9860/instances/cc6345c64cec47499182467ea0dd432ain02/backups/policy + + .. code-block:: text + + { + "backup_policy": { + "keep_days": 9, + "start_time": "23:00-00:00", + "period": "1,4,5,6,7" + } + } + + Disable an automated backup policy. + + .. code-block:: text + + { + "backup_policy": { + "keep_days": 0 + } + } + +Responses +--------- + +.. code-block:: text + + {} + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/connection_management/index.rst b/api-ref/source/apis_v3.0_recommended/connection_management/index.rst new file mode 100644 index 0000000..7701541 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/connection_management/index.rst @@ -0,0 +1,18 @@ +:original_name: dds_connect_0001.html + +.. _dds_connect_0001: + +Connection Management +===================== + +- :ref:`Querying Sessions of an Instance Node ` +- :ref:`Killing Sessions of an Instance Node ` +- :ref:`Querying the Number of Connections to an Instance Node ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_sessions_of_an_instance_node + killing_sessions_of_an_instance_node + querying_the_number_of_connections_to_an_instance_node diff --git a/api-ref/source/apis_v3.0_recommended/connection_management/killing_sessions_of_an_instance_node.rst b/api-ref/source/apis_v3.0_recommended/connection_management/killing_sessions_of_an_instance_node.rst new file mode 100644 index 0000000..96fa9cc --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/connection_management/killing_sessions_of_an_instance_node.rst @@ -0,0 +1,86 @@ +:original_name: dds_connect_0003.html + +.. _dds_connect_0003: + +Killing Sessions of an Instance Node +==================================== + +Function +-------- + +This API is used to kill sessions of an instance node. + +Constraints +----------- + +- Community Edition 3.4 and 4.0 instances are supported. +- Inactive sessions cannot be terminated. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/nodes/{node_id}/session + +- Parameter description + + .. table:: **Table 1** Path parameters + + +------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+========+=====================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID of a tenant in a region. | + +------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id | Yes | String | Specifies the node ID. The following nodes can be queried: mongos nodes in the cluster, and all nodes in the replica set and single node instances. | + +------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Request body parameters + + +-----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+===================================================================================================+ + | sessions | Yes | Array of strings | Specifies the IDs of sessions to be terminated. | + | | | | | + | | | | For details, see the session ID returned in :ref:`Table 4 `. | + +-----------------+-----------------+------------------+---------------------------------------------------------------------------------------------------+ + +- Request example + + .. code-block:: text + + POST https://dds.eu-de.otc.t-systems.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/nodes/520c58ba00a3497e97ce0b9604874dd6no02/session + { + "sessions" : [ "34631", "34703" ] + } + +- Example request + + .. code-block:: text + + POST https://dds.eu-de.otc.t-systems.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/nodes/520c58ba00a3497e97ce0b9604874dd6no02/session + { + "sessions" : [ "34631", "34703" ] + } + +Responses +--------- + +{} + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/connection_management/querying_sessions_of_an_instance_node.rst b/api-ref/source/apis_v3.0_recommended/connection_management/querying_sessions_of_an_instance_node.rst new file mode 100644 index 0000000..e55b59b --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/connection_management/querying_sessions_of_an_instance_node.rst @@ -0,0 +1,135 @@ +:original_name: dds_connect_0002.html + +.. _dds_connect_0002: + +Querying Sessions of an Instance Node +===================================== + +Function +-------- + +This API is used to query sessions of instance nodes. + +Constraints +----------- + +Community Edition 3.4 and 4.0 instances are supported. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/nodes/{node_id}/sessions?offset={offset}&limit={limit}&plan_summary={plan_summary}&type={type}&namespace={namespace}&cost_time={cost_time} + +- Parameter description + + .. table:: **Table 1** Path parameters + + +------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+========+=====================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID of a tenant in a region. | + +------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id | Yes | String | Specifies the node ID. The following nodes can be queried: mongos nodes in the cluster, and all nodes in the replica set and single node instances. | + +------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. table:: **Table 2** Query parameters + + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==============+===========+=========+=================================================================================================================================================================================================================================================================================================================+ + | offset | No | Integer | Specifies the index position. If **offset** is set to *N*, the resource query starts from the N+1 piece of data. The value is **0** by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. | + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records to be queried. The value range is [1, 20]. The default value is **10**, indicating that 10 records are returned. | + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | plan_summary | No | String | Specifies the execution plan description. If this parameter is left empty, sessions in which **plan_summary** is empty are queried. You can also specify an execution plan, for example, **COLLSCAN IXSCAN FETCH SORT LIMIT SKIP COUNT COUNT_SCAN TEXT PROJECTION** | + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | No | String | Specifies the operation type. If this parameter is left empty, sessions in which **type** is empty are queried. You can also specify an operation type, for example, none update insert query command getmore remove killcursors. | + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | namespace | No | String | Specifies the namespace. If this parameter is left blank, the sessions in which **namespace** is empty are queried. You can also specify the value based on the service requirements. | + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cost_time | No | Integer | Specifies the duration. The unit is us. If this parameter is left empty, the sessions in which **cost_time** is empty are queried. You can also set this parameter based on the service requirements, indicating that the sessions in which the value of **cost_time** exceeds the specified value are queried. | + +--------------+-----------+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/054e292c9880d4992f02c0196d3ea468/nodes/520c58ba00a3497e97ce0b9604874dd6no02/sessions + +Response Parameters +------------------- + +- Parameter description + + .. table:: **Table 3** Response body parameters + + +-------------+------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=============+==================+===============================================================================================================================+ + | total_count | Integer | Indicates the total number of records. | + +-------------+------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | sessions | Array of objects | Indicates detailed information. For details, see the :ref:`QuerySessionResponse ` table. | + +-------------+------------------+-------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_connect_0002__table599818593239: + + .. table:: **Table 4** QuerySessionResponse + + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +==============+=========+================================================================================================================================================================+ + | id | String | Indicates the session ID. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | active | Boolean | Indicates that whether the current session is active. If the value is **"true"**, the session is active. If the value is **"false"**, the session is inactive. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | operation | String | Indicates the operation. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | Indicates the operation type. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cost_time | String | Specifies the duration. The unit is us. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | plan_summary | String | Indicates the execution plan description. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host | String | Indicates the host. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | client | String | Indicates the client address. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Indicates the connection description. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | namespace | String | Indicates the namespace. | + +--------------+---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "total_count" : 1, + "sessions" : [ { + "id" : "shard_1:7201646", + "active" : true, + "operation" : "{\"getMore\":4.9473050217983027E18,\"collection\":\"$cmd.aggregate\",\"batchSize\":101.0,\"lsid\":{\"id\":{\"$binary\":{\"base64\":\"9FhcBFVeTzafCH8BUZrLjQ\\=\\=\",\"subType\":\"03\"}},\"uid\":{\"$binary\":{\"base64\":\"O0CMtIVItQN4IsEOsJdrPL8s7jv5xwh5a/A5Qfvs2A8\\=\",\"subType\":\"00\"}}},\"$clusterTime\":{\"clusterTime\":{\"$timestamp\":{\"t\":1.614047961E9,\"i\":1.0}},\"signature\":{\"hash\":{\"$binary\":{\"base64\":\"HxUWu68VyfvQFivWjHQDdJj/3YQ\\=\",\"subType\":\"00\"}},\"keyId\":6.9312672235666801E18}},\"$client\":{\"driver\":{\"name\":\"PyMongo\",\"version\":\"3.6.1\"},\"os\":{\"type\":\"Linux\",\"name\":\"Linux\",\"architecture\":\"x86_64\",\"version\":\"4.18.0-147.5.1.0.h269.eulerosv2r9.x86_64\"},\"platform\":\"CPython 3.7.4.final.0\",\"mongos\":{\"host\":\"host-172-16-61-110:8635\",\"client\":\"127.0.0.1:33420\",\"version\":\"4.0.3\"}},\"$configServerState\":{\"opTime\":{\"ts\":{\"$timestamp\":{\"t\":1.614047961E9,\"i\":1.0}},\"t\":2.0}},\"$db\":\"admin\"}", + "type" : "getmore", + "cost_time" : "25", + "plan_summary" : "COLLSCAN", + "host" : "host-172-16-27-182:8635", + "client" : "172.16.41.233:50700", + "description" : "conn20", + "namespace" : "admin.$cmd.aggregate" + } ] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/connection_management/querying_the_number_of_connections_to_an_instance_node.rst b/api-ref/source/apis_v3.0_recommended/connection_management/querying_the_number_of_connections_to_an_instance_node.rst new file mode 100644 index 0000000..d85eb80 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/connection_management/querying_the_number_of_connections_to_an_instance_node.rst @@ -0,0 +1,117 @@ +:original_name: dds_connect_0004.html + +.. _dds_connect_0004: + +Querying the Number of Connections to an Instance Node +====================================================== + +Function +-------- + +This API is used to query the number of connections from each client to DDS DB instances. + +Constraints +----------- + +Frozen instances do not support this operation. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/conn-statistics?node_id={node_id} + +- Parameter description + + .. table:: **Table 1** Path parameters + + +-------------+-----------+--------+---------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+===================================================+ + | project_id | Yes | String | Specifies the project ID of a tenant in a region. | + +-------------+-----------+--------+---------------------------------------------------+ + | instance_id | Yes | String | Specifies the DB instance ID. | + +-------------+-----------+--------+---------------------------------------------------+ + + .. table:: **Table 2** Query parameters + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+===========================================================================================================================+ + | node_id | No | String | Specifies the node ID. | + | | | | | + | | | | If this parameter is left blank, the number of connections of all nodes that can be connected in the instance is queried. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/cc6345c64cec47499182467ea0dd432ain02/conn-statistics?node_id=51a90da2cfc846688abcdd23861077b5no02 + +Responses +--------- + +- Response parameters + + .. table:: **Table 3** Response body parameters + + +-------------------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+==================+=============================================================================================================================================================+ + | total_connections | Integer | Indicates the total number of connections, including internal and external connections. | + +-------------------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | total_inner_connections | Integer | Indicates the total number of internal connections. | + +-------------------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | total_outer_connections | Integer | Indicates the total number of external connections. | + +-------------------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | inner_connections | Array of objects | Indicates the internal connection statistics array. Up to 200 records are supported. For details, see :ref:`Table 4 `. | + +-------------------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | outer_connections | Array of objects | Indicates the external connection statistics array. Up to 200 records are supported. For details, see :ref:`Table 4 `. | + +-------------------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_connect_0004__table599818593239: + + .. table:: **Table 4** QueryConnectionsResponse + + +-----------+---------+---------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=========+===========================================================================+ + | client_ip | String | Indicates the IP address of the client connected to the instance or node. | + +-----------+---------+---------------------------------------------------------------------------+ + | count | Integer | Indicates the number of connections corresponding to the IP address. | + +-----------+---------+---------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "total_connections": 75, + "total_inner_connections": 50, + "total_outer_connections": 25, + "inner_connections": [ + {"client_ip": "10.10.10.24", "count": 19}, + {"client_ip": "9.3.185.42", "count": 6}, + {"client_ip": "10.10.4.156", "count": 3} + ], + "outer_connections": [ + {"client_ip": "10.10.10.25", "count": 11}, + {"client_ip": "9.3.185.46", "count": 8}, + {"client_ip": "10.10.4.157", "count": 4} + ] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/adding_nodes_for_a_cluster_instance.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/adding_nodes_for_a_cluster_instance.rst new file mode 100644 index 0000000..d1eef33 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/adding_nodes_for_a_cluster_instance.rst @@ -0,0 +1,135 @@ +:original_name: dds_api_0025.html + +.. _dds_api_0025: + +Adding Nodes for a Cluster Instance +=================================== + +Function +-------- + +This API is used to add nodes for a specified cluster instance. + +Constraints +----------- + +- Only the mongos and shard nodes can be added. +- The specifications of the new node must be the same as those of the existing nodes in the instance. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/enlarge + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+==============================================================================================================================================================================================================================+ + | type | Yes | String | Specifies the object to be scaled. | + | | | | | + | | | | - Set the value to **mongos** if mongos nodes are to be added. | + | | | | - Set the value to **shard** if shard nodes are to be added. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | Yes | String | Specifies the resource specification code. For details about how to obtain the resource specification code, see the **flavors.spec_code** parameter in :ref:`Querying Database Specifications `. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | num | Yes | String | Specifies the number of mongos or shard nodes to be added. A cluster instance supports up to 32 mongos nodes and 32 shard nodes. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | volume | No | Object | Specifies the volume information. For more information, see :ref:`Table 3 `. | + | | | | | + | | | | - This parameter is not transferred when the mongos nodes are to be added. | + | | | | - This parameter is mandatory when the shard nodes are to be added. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | If multiple shards are added at a time, the shards must have the same specifications and disk capacity. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0025__table62051323653: + + .. table:: **Table 3** volume field data structure description + + +------+-----------+--------+------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+========+==========================================================================================+ + | size | Yes | String | Specifies the disk capacity of all new shards. The value range is from 10 GB to 2000 GB. | + +------+-----------+--------+------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/enlarge + + Number of mongos nodes to be added: + + .. code-block:: text + + { + "type": "mongos", + "spec_code":"dds.mongodb.c3.medium.4.mongos", + "num": 1 + } + + Number of shard nodes to be added: + + .. code-block:: text + + { + "type": "shard", + "spec_code":"dds.mongodb.c3.medium.4.shard", + "num": 1, + "volume": { + "size": 330 + } + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 4** Parameter description + + ====== ====== ====================== + Name Type Description + ====== ====== ====================== + job_id String Indicates the task ID. + ====== ====== ====================== + +- Response example + + .. code-block:: text + + { + "job_id": "4008c8914b624785a02ab7966d4d" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/binding_an_eip.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/binding_an_eip.rst new file mode 100644 index 0000000..719b00c --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/binding_an_eip.rst @@ -0,0 +1,107 @@ +:original_name: dds_api_0056.html + +.. _dds_api_0056: + +Binding an EIP +============== + +Function +-------- + +This API is used to bind an EIP to a node in a DB instance. + +Constraints +----------- + +- This operation cannot be performed on frozen or abnormal instances. +- Hidden nodes do not support this operation. +- Multiple EIPs cannot be bound to the same node. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/nodes/{node_id}/bind-eip + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+--------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+====================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+--------------------------------------------------------------------+ + | node_id | Yes | Specifies the ID of the node to which the EIP is to be bound. | + | | | | + | | | - Select the mongos node in a cluster instance | + | | | - Select the primary or secondary node in a replica set instance. | + | | | - Select the primary node in a single node instance | + +-----------------------+-----------------------+--------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + ============ ========= ====== ============================ + Name Mandatory Type Description + ============ ========= ====== ============================ + public_ip_id Yes String Specifies the ID of the EIP. + public_ip Yes String Specifies the EIP. + ============ ========= ====== ============================ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/nodes/4709a6332ce348718b5675aadb5e2bccno02/bind-eip + + .. code-block:: text + + { + "public_ip": "10.145.51.128", + "public_ip_id": "45da4782-e0c8-4aa4-a290-b8740014f710" + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + ============ ====== ============================ + Name Type Description + ============ ====== ============================ + job_id String Indicates the workflow ID. + node_name String Indicates the node name. + node_id String Indicates the node ID. + public_ip_id String Indicates the ID of the EIP. + public_ip String Indicates the EIP. + ============ ====== ============================ + +- Response example + + .. code-block:: text + + { + "job_id":"3711e2ad-5787-49bc-a47f-3f0b066af9f5", + "node_id":"52a4c096bb1f455d8d866956a959519eno02", + "node_name":"mongodb-8977_mongos_node_1", + "public_ip":"10.145.51.128", + "public_ip_id":"45da4782-e0c8-4aa4-a290-b8740014f710" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_database_port.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_database_port.rst new file mode 100644 index 0000000..ce222ff --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_database_port.rst @@ -0,0 +1,94 @@ +:original_name: dds_api_0054.html + +.. _dds_api_0054: + +Changing a Database Port +======================== + +Function +-------- + +This API is used to change a database port. + +Constraints +----------- + +- This operation cannot be performed on frozen or abnormal instances. +- The DB instance must be restarted to make port number modifications take effect. Exercise caution when modifying the database port. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/modify-port + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +------+-----------+---------+------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+=========+==========================================================================================+ + | port | Yes | Integer | Specifies the port number. The port is in range 2100 to 9500, or 27017, 27018, or 27019. | + +------+-----------+---------+------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/modify-port + + .. code-block:: text + + { + "port": 8888 + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + ====== ======= ========================== + Name Type Description + ====== ======= ========================== + job_id String Indicates the workflow ID. + port Integer Indicates the port number. + ====== ======= ========================== + +- Response example + + .. code-block:: text + + { + "job_id":"3711e2ad-5787-49bc-a47f-3f0b066af9f5", + "port":"8888" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_private_ip_address.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_private_ip_address.rst new file mode 100644 index 0000000..5a915fa --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_private_ip_address.rst @@ -0,0 +1,102 @@ +:original_name: dds_api_0058.html + +.. _dds_api_0058: + +Changing a Private IP Address +============================= + +Function +-------- + +This API is used to change the private IP address of a DB instance. + +Constraints +----------- + +- This operation cannot be performed on frozen or abnormal instances. +- An in-use IP address cannot be used as the new private IP address of a DB instance. +- Changing the private IP address will cause the original database connection address to become invalid. If an EIP has been bound to the DB instance, do not unbind the EIP when the private IP address is being changed. +- This operation is not allowed if connection address switchover is enabled. +- Currently, only the IPv4 address is supported. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/modify-internal-ip + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +---------+-----------+--------+-----------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=========+===========+========+=====================================================================================================+ + | new_ip | Yes | String | Specifies the new IP address, which must be in an available VPC CIDR block. Only IPv4 is supported. | + +---------+-----------+--------+-----------------------------------------------------------------------------------------------------+ + | node_id | Yes | String | Specifies the node ID. | + +---------+-----------+--------+-----------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/modify-internal-ip + + .. code-block:: text + + { + "node_id": "52a4c096bb1f455d8d866956a959519eno02", + "new_ip": "192.168.0.133" + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + ======= ====== ===================================== + Name Type Description + ======= ====== ===================================== + job_id String Indicates the workflow ID. + node_id String Indicates the node ID. + new_ip String Indicates the new private IP address. + ======= ====== ===================================== + +- Response example + + .. code-block:: text + + { + "job_id":"3711e2ad-5787-49bc-a47f-3f0b066af9f5", + "node_id":"52a4c096bb1f455d8d866956a959519eno02", + "new_ip":"192.168.0.133" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_security_group.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_security_group.rst new file mode 100644 index 0000000..7881ba2 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/changing_a_security_group.rst @@ -0,0 +1,94 @@ +:original_name: dds_api_0055.html + +.. _dds_api_0055: + +Changing a Security Group +========================= + +Function +-------- + +This API is used to change the security group associated with a DB instance. + +Constraints +----------- + +- Abnormal instances do not support this operation. +- Please confirm the modified security group policy. This policy may affect the current instance connection, causing the connection interruption. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/modify-security-group + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------------+-----------+--------+---------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+===========+========+=============================================+ + | security_group_id | Yes | String | Specifies the ID of the new security group. | + +-------------------+-----------+--------+---------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/modify-security-group + + .. code-block:: text + + { + "security_group_id": "73bed21a-708b-4985-b697-a96d0e0d2b39" + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + ================= ====== =========================================== + Name Type Description + ================= ====== =========================================== + job_id String Indicates the workflow ID. + security_group_id String Indicates the ID of the new security group. + ================= ====== =========================================== + +- Response example + + .. code-block:: text + + { + "job_id":"3711e2ad-5787-49bc-a47f-3f0b066af9f5", + "security_group_id":"73bed21a-708b-4985-b697-a96d0e0d2b39" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/creating_a_db_instance.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/creating_a_db_instance.rst new file mode 100644 index 0000000..6f9837e --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/creating_a_db_instance.rst @@ -0,0 +1,716 @@ +:original_name: dds_api_0020.html + +.. _dds_api_0020: + +Creating a DB Instance +====================== + +Function +-------- + +This API is used to create cluster, replica set, and single node instances. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + ========== ========= ================================================= + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+==================+===========================================================================================================================================================================================================================================+ + | name | Yes | String | Specifies the DB instance name. Instance name, which can be the same as an existing name. | + | | | | | + | | | | - The instance name must contain 4 to 64 characters and must start with a letter. It is case sensitive and can contain letters, digits, hyphens (-), and underscores (_). It cannot contain other special characters. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | datastore | Yes | Object | Specifies the database information. For more information, see :ref:`Table 3 `. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | region | Yes | String | Specifies the region ID. | + | | | | | + | | | | The value cannot be empty. For details about how to obtain this parameter value, see `Regions and Endpoints `__. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | Yes | String | Specifies the AZ ID. You can select multiple AZs to create a cross-AZ cluster based on **az_status** returned by the API described in :ref:`Querying Database Specifications `. | + | | | | | + | | | | The value cannot be empty. For details about how to obtain this parameter value, see `Regions and Endpoints `__. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | Yes | String | Specifies the VPC ID. To obtain this parameter value, use either of the following methods: | + | | | | | + | | | | - Method 1: Log in to VPC console and view the VPC ID on the VPC details page. | + | | | | - Method 2: See the "Querying VPCs" section in the *Virtual Private Cloud API Reference*. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | Yes | String | Specifies the network ID of the subnet. To obtain this parameter value, use either of the following methods: | + | | | | | + | | | | - Method 1: Log in to VPC console and click the target subnet on the **Subnets** page. You can view the network ID on the displayed page. | + | | | | - Method 2: See the "Querying Subnets" section in the *Virtual Private Cloud API Reference*. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | Yes | String | Specifies the security group ID. To obtain the security group ID, perform either of the following methods: | + | | | | | + | | | | - Method 1: Log in to VPC console. Choose **Access Control** > **Security Groups** in the navigation pane on the left. On the displayed page, click the target security group. You can view the security group ID on the displayed page. | + | | | | - Method 2: See the "Querying Security Groups" section in the *Virtual Private Cloud API Reference*. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port | No | String | Database access port | + | | | | | + | | | | Value range: 2100-9500, 27017, 27018, and 27019. | + | | | | | + | | | | If this parameter is not transferred, the port of the created DB instance is 8635 by default. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | password | No | String | Specifies the database password. | + | | | | | + | | | | The value must be 8 to 32 characters in length and contain uppercase letters (A to Z), lowercase letters (a to z), digits (0 to 9), and special characters, such as ``~!@#%^*-_=+?`` | + | | | | | + | | | | Enter a strong password to improve security, preventing security risks such as brute force cracking. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | disk_encryption_id | No | String | Specifies the key ID used for disk encryption. The string must comply with UUID regular expression rules. | + | | | | | + | | | | If this parameter is not transferred, disk encryption is not performed. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mode | Yes | String | Specifies the instance type. Cluster, replica set, and single node instances are supported. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - Sharding | + | | | | - ReplicaSet | + | | | | - Single | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | flavor | Yes | Array of objects | Specifies the instance specifications. For more information, see :ref:`Table 4 `. | + | | | | | + | | | | For details about how to obtain the value, see the response values of **flavor** in :ref:`Querying Database Specifications `. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_strategy | No | Object | Specifies the advanced backup policy. For more information, see :ref:`Table 5 `. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | Specifies the enterprise project ID. | + | | | | | + | | | | - This parameter is not transferred for users who have not enabled the enterprise multi-project service. | + | | | | - If this parameter is not transferred for a user who has enabled the enterprise multi-project service, the value is the default enterprise project. | + | | | | | + | | | | To obtain the enterprise project ID, see the **id** value in the **enterprise_project field data structure** table in section "Querying the Enterprise Project List" of the *Enterprise Management API Reference*. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ssl_option | No | String | Specifies whether to enable or disable SSL. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - The value **0** indicates that SSL is disabled by default. | + | | | | - The value **1** indicates that SSL is enabled by default. | + | | | | - If this parameter is not transferred, SSL is enabled by default. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | Array of objects | Tag list | + | | | | | + | | | | A maximum of 20 tags can be added for each instance. For details, see :ref:`Table 6 `. | + +-----------------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table228903751753: + + .. table:: **Table 3** datastore field data structure description + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================================+ + | type | Yes | String | Specifies the database type. The value is **DDS-Community**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | version | Yes | String | Specifies the database version. Versions 4.2, 4.0, and 3.4 are supported. The value can be **4.2**, **4.0**, or **3.4**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | storage_engine | Yes | String | Specifies the storage engine. DDS supports the WiredTiger and RocksDB storage engines. | + | | | | | + | | | | - If the database version is 4.2 and the storage engine is RocksDB, the value is **rocksDB**. | + | | | | - If the database version is 4.0 or 3.4 and the storage engine is WiredTiger, the value is **wiredTiger**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table94791241013: + + .. table:: **Table 4** flavor field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================================================================================================================================+ + | type | Yes | String | Specifies the node type. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - For a cluster instance, the value can be **mongos**, **shard**, or **config**. | + | | | | - For a replica set instance, the value is **replica**. | + | | | | - For a single node instance, the value is **single**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | num | Yes | Integer | Specifies node quantity. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - config: The value is **1**. | + | | | | - replica: The number of nodes can be 3, 5, or 7. | + | | | | - single: The value is **1**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | storage | No | String | Specifies the disk type. | + | | | | | + | | | | Valid value: ULTRAHIGH, which indicates the type SSD. | + | | | | | + | | | | This parameter is valid for the shard and config nodes of a cluster instance, replica set instances, and single node instances. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | No | String | Specifies the disk size. | + | | | | | + | | | | This parameter is mandatory for all nodes except mongos. This parameter is invalid for the mongos nodes. | + | | | | | + | | | | The value must be a multiple of 10. The unit is GB. | + | | | | | + | | | | - For a cluster instance, the storage space of a shard node can be 10 to 2000 GB, and the config storage space is 20 GB. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + | | | | - For a replica set instance, the value ranges from 10 to 2000. | + | | | | - For a single node instance, the value ranges from 10 to 1000. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | Yes | String | Specifies the resource specification code. For details about how to obtain the value, see the response values of **spec_code** in :ref:`Querying Database Specifications `. | + | | | | | + | | | | In a cluster instance, multiple specifications need to be specified. All specifications must be of the same series, that is, general-purpose (s6), enhanced (c3), or enhanced II (c6). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table15990419397: + + .. table:: **Table 5** backup_strategy field data structure description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+================================================================================================================================================+ + | start_time | Yes | String | Specifies the backup time window. Automated backups will be triggered during the backup time window. | + | | | | | + | | | | The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format. | + | | | | | + | | | | - The **HH** value must be 1 greater than the **hh** value. | + | | | | - The values of **mm** and **MM** must be the same and must be set to **00**. | + | | | | - If this parameter is not transferred, the default backup time window is set to **00:00-01:00**. | + | | | | | + | | | | Example value: | + | | | | | + | | | | 23:00-00:00 | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | keep_days | No | String | Specifies the number of days to retain the generated backup files. | + | | | | | + | | | | The value range is from 0 to 732. | + | | | | | + | | | | - If this parameter is set to **0**, the automated backup policy is not set. | + | | | | - If this parameter is not transferred, the automated backup policy is enabled by default. Backup files are stored for seven days by default. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table1030225523118: + + .. table:: **Table 6** tags field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=========================================================================================================================+ + | key | Yes | String | Tag key. The value can contain a maximum of 36 unicode characters. | + | | | | | + | | | | The key cannot be left blank or an empty string. | + | | | | | + | | | | The character set is as follows: A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\\u4E00-\\u9FFF). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | Tag value. It contains a maximum of 43 Unicode characters. The value can be an empty string. | + | | | | | + | | | | The character set is as follows: A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\\u4E00-\\u9FFF). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+ + +.. note:: + + The values of **region** and **availability_zone** are used as examples. + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances + + Create a cluster instance: + + .. code-block:: text + + { + "name": "test-cluster-01", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "password": "******", + "mode": "Sharding", + "flavor": [ + { + "type": "mongos", + "num": 2, + "spec_code": "dds.mongodb.s2.medium.4.mongos" + }, + { + "type": "shard", + "num": 2, + "storage": "ULTRAHIGH", + "size": "20", + "spec_code": "dds.mongodb.s2.medium.4.shard" + }, + { + "type": "config", + "num": 1, + "storage": "ULTRAHIGH", + "size": "20", + "spec_code": "dds.mongodb.s2.large.2.config" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + }, + "ssl_option":"1", + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + Create a cluster instance: + { + "name": "test-cluster-01", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "mode": "Sharding", + "flavor": [ + { + "type": "mongos", + "num": 2, + "spec_code": "dds.mongodb.s2.medium.4.mongos" + }, + { + "type": "shard", + "num": 2, + "storage": "ULTRAHIGH", + "size": "20", + "spec_code": "dds.mongodb.s2.medium.4.shard" + }, + { + "type": "config", + "num": 1, + "storage": "ULTRAHIGH", + "size": "20", + "spec_code": "dds.mongodb.s2.large.2.config" + } + ] + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + + Create a replica set instance. + + .. code-block:: text + + { + "name": "test-replicaset", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "password": "******", + "mode": "ReplicaSet", + "flavor": [ + { + "type": "replica", + "num": 1, + "storage": "ULTRAHIGH", + "size": "30", + "spec_code": "dds.mongodb.s2.medium.4.repset" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + }, + "ssl_option":"1", + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + + Create a single node instance. + + .. code-block:: text + + { + "name": "test-singlenode", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "password": "******", + "mode": "Single", + "flavor": [ + { + "type": "single", + "num": 1, + "storage": "ULTRAHIGH", + "size": "30", + "spec_code": "dds.mongodb.s2.medium.4.single" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + }, + "ssl_option":"1", + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 7** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+===============================================================================================================================================================+ + | id | String | Indicates the DB instance ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | datastore | Object | Indicates the database information, which is the same as the request parameter. For more information, see :ref:`Table 8 `. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created | String | Indicates the creation time in the following format: yyyy-mm-dd hh:mm:ss. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the DB instance status. The value is **creating**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | region | String | Indicates the region ID, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | Indicates the AZ ID, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Indicates the VPC ID, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Indicates the network ID of the subnet, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Indicates the security group ID, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port | Integer | Indicates the database port. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | disk_encryption_id | String | Indicates the ID of the disk encryption key, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mode | String | Indicates the instance type, which is the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | flavor | Array of objects | Indicates the instance specification, which is the same as the request parameter. For more information, see :ref:`Table 9 `. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_strategy | Object | Indicates the advanced backup policy, which is the same as the request parameter. For more information, see :ref:`Table 10 `. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | Indicates the enterprise project ID. If the value is **0**, the resource belongs to the default enterprise project. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ssl_option | String | Indicates whether to enable SSL, which functions the same as the request parameter. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | job_id | String | Indicates the ID of the workflow for creating a DB instance. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of objects | Tag list, which is the same as the request parameter. | + | | | | + | | | For details, see :ref:`Table 11 `. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table149461548134: + + .. table:: **Table 8** datastore field data structure description + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================================+ + | type | Yes | String | Specifies the database type. The value is **DDS-Community**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | version | Yes | String | Specifies the database version. Versions 4.2, 4.0, and 3.4 are supported. The value can be **4.2**, **4.0**, or **3.4**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | storage_engine | Yes | String | Specifies the storage engine. DDS supports the WiredTiger and RocksDB storage engines. | + | | | | | + | | | | - If the database version is 4.2 and the storage engine is RocksDB, the value is **rocksDB**. | + | | | | - If the database version is 4.0 or 3.4 and the storage engine is WiredTiger, the value is **wiredTiger**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table119482048538: + + .. table:: **Table 9** flavor field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================================================================================================================================+ + | type | Yes | String | Specifies the node type. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - For a cluster instance, the value can be **mongos**, **shard**, or **config**. | + | | | | - For a replica set instance, the value is **replica**. | + | | | | - For a single node instance, the value is **single**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | num | Yes | String | Specifies node quantity. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - mongos: The value ranges from 2 to 32. | + | | | | - config: The value is **1**. | + | | | | - replica: The number of nodes can be 3, 5, or 7. | + | | | | - single: The value is **1**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | storage | No | String | Specifies the disk type. | + | | | | | + | | | | Valid value: ULTRAHIGH, which indicates the type SSD. | + | | | | | + | | | | This parameter is valid for the shard and config nodes of a cluster instance, replica set instances, and single node instances. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | No | String | Specifies the disk size. | + | | | | | + | | | | This parameter is mandatory for all nodes except mongos. This parameter is invalid for the mongos nodes. | + | | | | | + | | | | The value must be a multiple of 10. The unit is GB. | + | | | | | + | | | | - For a cluster instance, the storage space of a shard node can be 10 to 2000 GB, and the config storage space is 20 GB. This parameter is invalid for mongos nodes. Therefore, you do not need to specify the storage space for mongos nodes. | + | | | | - For a replica set instance, the value ranges from 10 to 2000. | + | | | | - For a single node instance, the value ranges from 10 to 1000. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | Yes | String | Specifies the resource specification code. For details about how to obtain the value, see the response values of **spec_code** in :ref:`Querying Database Specifications `. | + | | | | | + | | | | In a cluster instance, multiple specifications need to be specified. All specifications must be of the same series, that is, general-purpose (s6), enhanced (c3), or enhanced II (c6). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table59521648930: + + .. table:: **Table 10** backup_strategy field data structure description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+================================================================================================================================================+ + | start_time | Yes | String | Specifies the backup time window. Automated backups will be triggered during the backup time window. | + | | | | | + | | | | The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format. | + | | | | | + | | | | - The **HH** value must be 1 greater than the **hh** value. | + | | | | - The values of **mm** and **MM** must be the same and must be set to **00**. | + | | | | - If this parameter is not transferred, the default backup time window is set to **00:00-01:00**. | + | | | | | + | | | | Example value: | + | | | | | + | | | | 23:00-00:00 | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | keep_days | No | String | Specifies the number of days to retain the generated backup files. | + | | | | | + | | | | The value range is from 0 to 732. | + | | | | | + | | | | - If this parameter is set to **0**, the automated backup policy is not set. | + | | | | - If this parameter is not transferred, the automated backup policy is enabled by default. Backup files are stored for seven days by default. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0020__table1695414482318: + + .. table:: **Table 11** tags field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=========================================================================================================================+ + | key | Yes | String | Tag key. The value can contain a maximum of 36 unicode characters. | + | | | | | + | | | | The key cannot be left blank or an empty string. | + | | | | | + | | | | The character set is as follows: A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\\u4E00-\\u9FFF). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | Tag value. It contains a maximum of 43 Unicode characters. The value can be an empty string. | + | | | | | + | | | | The character set is as follows: A-Z, a-z, 0-9, hyphens (-), underscores (_), and Unicode characters (\\u4E00-\\u9FFF). | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------+ + +.. note:: + + The values of **region** and **availability_zone** are used as examples. + +- Response example + + Cluster instance: + + .. code-block:: text + + { + "id": "39b6a1a278844ac48119d86512e0000bin02", + "name": "test-cluster-01", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "created": "2019-01-16 09:34:36", + "status": "creating", + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "port": 8365, + "disk_encryption_id": "", + "mode": "Sharding", + "flavor": [ + { + "type": "mongos", + "num": "2", + "spec_code": "dds.mongodb.s2.medium.4.mongos" + }, + { + "type": "shard", + "num": "2", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "size": "20" + }, + { + "type": "config", + "num": "1", + "spec_code": "dds.mongodb.s2.large.2.config", + "size": "20" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "8" + }, + "enterprise_project_id": "", + "ssl_option":"1", + "job_id": "c010abd0-48cf-4fa8-8cbc-090f093eaa2f", + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + + Replica set instance: + + .. code-block:: text + + { + "id": "46dfadfd2b674585a430217f23606cd7in02", + "name": "test-replicaset", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "created": "2019-01-16 09:33:08", + "status": "creating", + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "port": 8365, + "disk_encryption_id": "", + "mode": "ReplicaSet", + "flavor": [ + { + "type": "replica", + "num": "1", + "spec_code": "dds.mongodb.s2.medium.4.repset", + "size": "30" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "7" + }, + "enterprise_project_id": "", + "ssl_option":"1", + "job_id": "2408417d-fd4b-40ae-bec6-e09ce594eb5f", + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + + Single node instance: + + .. code-block:: text + + { + "id": "520c58ba00a3497e97ce0b9604874dd6in02", + "name": "test-singlenode", + "datastore": { + "type": "DDS-Community", + "version": "4.0", + "storage_engine": "wiredTiger" + }, + "created": "2019-01-15 12:08:11", + "status": "creating", + "region": "aaa", + "availability_zone": "bbb", + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "port": 8365, + "disk_encryption_id": "", + "mode": "Single", + "flavor": [ + { + "type": "single", + "num": "1", + "spec_code": "dds.mongodb.s2.medium.4.single", + "size": "30" + } + ], + "backup_strategy": { + "start_time": "23:00-00:00", + "keep_days": "7" + }, + "enterprise_project_id": "", + "ssl_option":"1", + "job_id": "46b65a13-3d52-4c58-a29b-4085d563dc9b", + "tags" : [{ + "key" : "dds001", + "value" : "dds001" + }] + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/deleting_a_db_instance.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/deleting_a_db_instance.rst new file mode 100644 index 0000000..67a5f23 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/deleting_a_db_instance.rst @@ -0,0 +1,70 @@ +:original_name: dds_api_0022.html + +.. _dds_api_0022: + +Deleting a DB Instance +====================== + +Function +-------- + +This API is used to delete a DB instance. + +URI +--- + +- URI format + + DELETE https://{Endpoint}/v3/{project_id}/instances/{instance_id} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + DELETE https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + ====== ====== ========================== + Name Type Description + ====== ====== ========================== + job_id String Indicates the workflow ID. + ====== ====== ========================== + +- Response example + + .. code-block:: text + + { + "job_id": "252f11f1-2912-4c06-be55-1999bde659c5" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/enabling_or_disabling_ssl.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/enabling_or_disabling_ssl.rst new file mode 100644 index 0000000..c0bac0a --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/enabling_or_disabling_ssl.rst @@ -0,0 +1,105 @@ +:original_name: dds_api_0051.html + +.. _dds_api_0051: + +Enabling or Disabling SSL +========================= + +Function +-------- + +This API is used to enable or disable SSL. + +Constraints +----------- + +- This operation cannot be performed on frozen or abnormal instances. +- The DB instance must be restarted to make port number modifications take effect. Exercise caution when enabling or disabling SSL. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/switch-ssl + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================+ + | ssl_option | Yes | String | Specifies whether to enable or disable SSL. | + | | | | | + | | | | Valid value: | + | | | | | + | | | | - The value **0** indicates that SSL is requested to be disabled. | + | | | | - The value **1** indicates that SSL is requested to be enabled. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/switch-ssl + + .. code-block:: text + + { + "ssl_option": "0" + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + +-----------------------+-----------------------+--------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+====================================================================+ + | job_id | String | Indicates the workflow ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------+ + | ssl_option | String | Indicates whether to enable or disable SSL. | + | | | | + | | | Valid value: | + | | | | + | | | - The value **0** indicates that SSL is requested to be disabled. | + | | | - The value **1** indicates that SSL is requested to be enabled. | + +-----------------------+-----------------------+--------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5", + "ssl_option": "0" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/enabling_shard_or_config_ip_addresses.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/enabling_shard_or_config_ip_addresses.rst new file mode 100644 index 0000000..2d853c9 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/enabling_shard_or_config_ip_addresses.rst @@ -0,0 +1,111 @@ +:original_name: dds_api_0120.html + +.. _dds_api_0120: + +Enabling Shard or Config IP Addresses +===================================== + +Function +-------- + +This API is used to enable the IP addresses of shard or config nodes. + +Constraints +----------- + +- Frozen instances do not support this operation. +- DB instances associated with the IPv6 subnet do not support this operation. +- If the IP address is enabled, restart the nodes for the setting to take effect. +- Cluster instances of Community Edition 3.4 and 4.0 are supported. +- This function cannot be disabled after being enabled. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/create-ip + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=========================================================================================================================================================================================+ + | type | Yes | String | Specifies the type of the object for which the IP address is to be enabled. | + | | | | | + | | | | - To enable IP addresses for shard nodes, set the value to **shard**. | + | | | | - To enable IP addresses for config nodes, set the value to **config**. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | target_id | No | String | Specifies the ID of the group whose IP addresses are to be enabled. | + | | | | | + | | | | - For shard nodes, the value is the shard ID. | + | | | | - For config nodes, the value is the config ID. | + | | | | - If this parameter is left blank, enable all IP addresses of the same node type in the instance. | + | | | | | + | | | | .. caution:: | + | | | | | + | | | | CAUTION: | + | | | | | + | | | | - If the IP address is enabled for the first time, leave this parameter empty. | + | | | | - If the IP address is enabled, this parameter cannot be delivered repeatedly. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | password | Yes | String | Specifies the password for enabling this function for a cluster. | + | | | | | + | | | | - The value must be 8 to 32 characters in length and contain uppercase letters (A to Z), lowercase letters (a to z), digits (0 to 9), and special characters, such as ``~!@#%^*-_=+?`` | + | | | | - Enter a strong password to improve security, preventing security risks such as brute force cracking. | + | | | | | + | | | | .. caution:: | + | | | | | + | | | | CAUTION: | + | | | | This password cannot be changed. Exercise caution when performing this operation. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Request example + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/create-ip + + .. code-block:: text + + { + "type": "shard", + "target_id": "91bac9f23ead42e19013333e05f44829gr02", + "password": "******" + } + +Responses +--------- + +- Response example + + .. code-block:: text + + {} + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/index.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/index.rst new file mode 100644 index 0000000..30952b8 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/index.rst @@ -0,0 +1,44 @@ +:original_name: dds_instance_mgmt.html + +.. _dds_instance_mgmt: + +DB Instance Management +====================== + +- :ref:`Creating a DB Instance ` +- :ref:`Restarting a DB Instance ` +- :ref:`Deleting a DB Instance ` +- :ref:`Querying Instances and Details ` +- :ref:`Scaling Up Storage Space ` +- :ref:`Adding Nodes for a Cluster Instance ` +- :ref:`Modifying DB Instance Specifications ` +- :ref:`Performing a Primary/Secondary Switchover in a Replica Set Instance ` +- :ref:`Enabling or Disabling SSL ` +- :ref:`Modifying a DB Instance Name ` +- :ref:`Changing a Database Port ` +- :ref:`Changing a Security Group ` +- :ref:`Binding an EIP ` +- :ref:`Unbinding an EIP ` +- :ref:`Changing a Private IP Address ` +- :ref:`Enabling Shard or Config IP Addresses ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_db_instance + restarting_a_db_instance + deleting_a_db_instance + querying_instances_and_details + scaling_up_storage_space + adding_nodes_for_a_cluster_instance + modifying_db_instance_specifications + performing_a_primary_secondary_switchover_in_a_replica_set_instance + enabling_or_disabling_ssl + modifying_a_db_instance_name + changing_a_database_port + changing_a_security_group + binding_an_eip + unbinding_an_eip + changing_a_private_ip_address + enabling_shard_or_config_ip_addresses diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/modifying_a_db_instance_name.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/modifying_a_db_instance_name.rst new file mode 100644 index 0000000..f18b734 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/modifying_a_db_instance_name.rst @@ -0,0 +1,81 @@ +:original_name: dds_api_0053.html + +.. _dds_api_0053: + +Modifying a DB Instance Name +============================ + +Function +-------- + +This API is used to modify a DB instance name. + +Constraints +----------- + +The name of the DB instance that is being created or fails to be created cannot be modified. + +URI +--- + +- URI format + + PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/modify-name + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+=================+=================+========================================================================================================================================================================================================================+ + | new_instance_name | Yes | String | Specifies the DB instance name. The instance name can be the same as an existing instance name. | + | | | | | + | | | | - The instance name must contain 4 to 64 characters and must start with a letter. It is case sensitive and can contain letters, digits, hyphens (-), and underscores (_). It cannot contain other special characters. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + PUT https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/modify-name + + .. code-block:: text + + { + "new_instance_name": "myNewName" + } + +Responses +--------- + +- Response example + + .. code-block:: text + + {} + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/modifying_db_instance_specifications.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/modifying_db_instance_specifications.rst new file mode 100644 index 0000000..ca79d24 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/modifying_db_instance_specifications.rst @@ -0,0 +1,158 @@ +:original_name: dds_api_0026.html + +.. _dds_api_0026: + +Modifying DB Instance Specifications +==================================== + +Function +-------- + +This API is used to modify the instance specifications. + +.. important:: + + Services will be interrupted for 5 to 10 minutes when you modify DB instance specifications. Exercise caution when performing this operation. + +Constraints +----------- + +- If you want to change the specifications to other specifications of the same series, the new specifications cannot be the same as the original specifications. +- Specifications can be modified only when the DB instance status is normal. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/resize + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +--------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+========+=======================================================================================================================+ + | resize | Yes | Object | Specifies the specification information. For more information, see :ref:`Table 3 `. | + +--------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0026__table5971833216954: + + .. table:: **Table 3** resize field data structure description + + +------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +==================+=================+=================+==========================================================================================================================================================================================================================================+ + | target_type | No | String | Specifies the object type: | + | | | | | + | | | | - This parameter is mandatory for a cluster instance. If you modify the specifications of a mongos node, the value is **mongos**. If you modify the specifications of a shard node, the value is **shard**. | + | | | | - This parameter is not transferred for replica set and single node instances. | + +------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | target_id | Yes | String | Specifies the ID of the node or instance whose specifications are to be modified. You can obtain the ID by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + | | | | | + | | | | - If you modify the specifications of a mongos node, the value is the mongos node ID. If you modify the specifications of a shard node, the value is the shard node ID. | + | | | | - For a replica set instance, the value is the DB instance ID. | + | | | | - For a single node instance, the value is the DB instance ID. | + +------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | target_spec_code | Yes | String | Specifies the resource specification code of the new specification. For details about how to obtain the value, see the response values of **flavors.spec_code** in :ref:`Querying Database Specifications `. | + +------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/resize + + Modify the mongos node specifications. + + .. code-block:: text + + { + "resize": { + "target_type": "mongos", + "target_id": "a742c13a284949adad177672e8a0f01cno02", + "target_spec_code": "dds.mongodb.c3.large.4.mongos" + } + } + + Modify the shard node specifications. + + .. code-block:: text + + { + "resize": { + "target_type": "shard", + "target_id": "aeeb40a704904977ad78993d138ec942gr02", + "target_spec_code": "dds.momgodb.c3.large.4.shard" + } + } + + Modify the config node specifications. + + .. code-block:: text + + { + "resize": { + "target_type": "config", + "target_id": "10a1c330537b42c1a9b3f7a5ebcda35egr02", + "target_spec_code": "dds.momgodb.c3.xlarge.2.config" + } + } + + Modify specifications of a replica set or a single node instance. + + .. code-block:: text + + { + "resize": { + "target_id": "aeeb40a704904977ad78993d138ec942in02", + "target_spec_code": "dds.mongodb.c3.medium.4.repset" + } + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 4** Parameter description + + ====== ====== ====================== + Name Type Description + ====== ====== ====================== + job_id String Indicates the task ID. + ====== ====== ====================== + +- Response example + + .. code-block:: text + + { + "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/performing_a_primary_secondary_switchover_in_a_replica_set_instance.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/performing_a_primary_secondary_switchover_in_a_replica_set_instance.rst new file mode 100644 index 0000000..1749ea7 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/performing_a_primary_secondary_switchover_in_a_replica_set_instance.rst @@ -0,0 +1,76 @@ +:original_name: dds_api_0050.html + +.. _dds_api_0050: + +Performing a Primary/Secondary Switchover in a Replica Set Instance +=================================================================== + +Function +-------- + +This API is used to perform a primary/secondary switchover in a replica set instance. + +Constraints +----------- + +- This API supports only DDS replica sets. +- This operation cannot be performed on frozen or abnormal instances. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/switchover + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/switchover + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + ====== ====== ====================== + Name Type Description + ====== ====== ====================== + job_id String Indicates the task ID. + ====== ====== ====================== + +- Response example + + .. code-block:: text + + { + "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/querying_instances_and_details.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/querying_instances_and_details.rst new file mode 100644 index 0000000..9f7affb --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/querying_instances_and_details.rst @@ -0,0 +1,666 @@ +:original_name: dds_api_0023.html + +.. _dds_api_0023: + +Querying Instances and Details +============================== + +Function +-------- + +This API is used to query instances and details based on specified conditions. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances?id={id}&name={name}&mode={mode}&datastore_type={datastore_type}&vpc_id={vpc_id}&subnet_id={subnet_id}&offset={offset}&limit={limit}&tags={key}={value},{key}={value} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID of a tenant in a region. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | No | String | Specifies the instance ID, which can be obtained by calling the API for querying instances and details. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies the DB instance name. | + | | | | | + | | | | If you use asterisk (``*``) at the beginning of the name, fuzzy search results are returned. Otherwise, the exact results are returned. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The asterisk (``*``) is a reserved character in the system and cannot be used alone. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mode | No | String | Specifies the instance type. | + | | | | | + | | | | - **Sharding** indicates the cluster instance. | + | | | | - **ReplicaSet** indicate the replica set instance. | + | | | | - **Single** indicates the single node instance. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | datastore_type | No | String | Specifies the database type. The value is **DDS-Community**. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | No | String | Specifies the VPC ID. To obtain this parameter value, use either of the following methods: | + | | | | | + | | | | - Method 1: Log in to VPC console and view the VPC ID on the VPC details page. | + | | | | - Method 2: See the "Querying VPCs" section in the *Virtual Private Cloud API Reference*. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | No | String | Specifies the network ID of the subnet. To obtain this parameter value, use either of the following methods: | + | | | | | + | | | | - Method 1: Log in to VPC console and click the target subnet on the **Subnets** page. You can view the network ID on the displayed page. | + | | | | - Method 2: See the "Querying Subnets" section in the *Virtual Private Cloud API Reference*. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Integer | Specifies the index position. The query starts from the next instance creation time indexed by this parameter under a specified project. If offset is set to N, the resource query starts from the N+1 piece of data. | + | | | | | + | | | | The value must be greater than or equal to **0**. If this parameter is not transferred, offset is set to **0** by default, indicating that the query starts from the latest created DB instance. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the maximum allowed number of DB instances. | + | | | | | + | | | | The value ranges from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | String | Query based on the instance tag key and value. | + | | | | | + | | | | {*key*} indicates the tag key, and {*value*} indicates the tag value. A maximum of 20 key-value pairs are supported. The key cannot be empty or duplicate, but the value can be empty. | + | | | | | + | | | | To query instances with multiple tag keys and values, separate key-value pairs with commas (,). | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + - Querying all instances and details + + GET https://dds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances + + - Querying instances and details based on search criteria + + GET https://dds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances?offset=0&limit=10&id=ed7cc6166ec24360a5ed5c5c9c2ed726in02&name=hy&mode=ReplicaSet&datastore_type=DDS-Community&vpc_id=19e5d45d-70fd-4a91-87e9-b27e71c9891f&subnet_id=bd51fb45-2dcb-4296-8783-8623bfe89bb7&tags=key1=value1,key2=value2 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==============================================================================+ + | instances | Array of objects | Indicates the DB instance information. | + | | | | + | | | For more information, see :ref:`Table 3 `. | + +-----------------------+-----------------------+------------------------------------------------------------------------------+ + | total_count | Integer | Indicates the total number of queried records. | + +-----------------------+-----------------------+------------------------------------------------------------------------------+ + + .. _dds_api_0023__table4062895917262: + + .. table:: **Table 3** instances field data structure description + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+========================================================================================================================================================================================+ + | id | String | Indicates the DB instance ID. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Indicates the DB instance name. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remark | String | Instance remarks | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the DB instance status. | + | | | | + | | | Valid value: | + | | | | + | | | - **normal**: indicates that the instance is running properly. | + | | | - **abnormal**: indicates that the instance is abnormal. | + | | | - **creating**: indicates that the instance is being created. | + | | | - **data_disk_full**: The storage space is full. | + | | | - **createfail**: indicates that the instance failed to be created. | + | | | - **enlargefail**: indicates that nodes failed to be added to the instance. | + | | | | + | | | .. note:: | + | | | | + | | | Actions that are being executed on an instance, for example, rebooting, which are essentially different from the instance status. For details, see the actions field in this table. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port | String | Indicates the database port number. The port range is 2100 to 9500. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mode | String | Indicates the instance type, which is the same as the request parameter. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | region | String | Indicates the region where the DB instance is deployed. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | datastore | Object | Indicates the database information. | + | | | | + | | | For more information, see :ref:`Table 4 `. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | engine | String | Indicates the storage engine. The value is **wiredTiger**. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created | String | Indicates the DB instance creation time. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated | String | Indicates the time when a DB instance is updated. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | db_user_name | String | Indicates the default username. The value is **rwuser**. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ssl | Integer | Indicates that SSL is enabled or not. | + | | | | + | | | - **1**: indicate that SSL is enabled. | + | | | - **0**: indicate that SSL is disabled. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Indicates the VPC ID. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Indicates the network ID of the subnet. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Indicates the security group ID. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_strategy | Object | Indicates the backup policy. | + | | | | + | | | For more information, see :ref:`Table 5 `. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | pay_mode | String | The value is set to **"0"**. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | maintenance_window | String | Indicates the maintenance time window. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | groups | Array of objects | Indicates group information. | + | | | | + | | | For more information, see :ref:`Table 6 `. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | disk_encryption_id | String | Indicates the disk encryption key ID. This parameter is returned only when the instance disk is encrypted. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | Indicates the enterprise project ID. | + | | | | + | | | If the value is **0**, the resource belongs to the default enterprise project. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | time_zone | String | Indicates the time zone. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | actions | Array of strings | Action that is being executed on an instance. | + | | | | + | | | Valid value: | + | | | | + | | | - **RESTARTING**: The instance is being restarted. | + | | | - RESTORE: restoring. | + | | | - RESIZE_FLAVOR: The specifications are being changed. | + | | | - **RESTORE_TO_NEW_INSTANCE**: The instance is being restored. | + | | | - **MODIFY_VPC_PEER**: Cross-subnet access is being configured. | + | | | - CREATE: creating | + | | | - FROZEN: The account is frozen. | + | | | - RESIZE_VOLUME: The storage is being scaled up. | + | | | - RESTORE_CHECK: The restoration is being checked. | + | | | - RESTORE_FAILED_HANGUP: The restoration failed. | + | | | - CLOSE_AUDIT_LOG: Disabling audit log. | + | | | - OPEN_AUDIT_LOG: Enabling audit log. | + | | | - CREATE_IP_SHARD: The shard IP address is being enabled. | + | | | - CREATE_IP_CONFIG: The config IP address is being enabled. | + | | | - GROWING: The node is being scaled up. | + | | | - **SET_CONFIGURATION**: Parameters are being modified. | + | | | - RESTORE_TABLE: The database is being backed up. | + | | | - **MODIFY_SECURITYGROUP**: A security group is being changed. | + | | | - BIND_EIP: The EIP is being changed. | + | | | - UNBIND_EIP: The EIP is being unbound. | + | | | - SWITCH_SSL: The SSL is being switched. | + | | | - SWITCH_PRIMARY: A primary/standby switchover is being performed. | + | | | - **CHANGE_DBUSER_PASSWORD**: The password is being changed. | + | | | - **MODIFY_PORT**: The port is being changed. | + | | | - MODIFY_IP: The private IP address is being changed. | + | | | - DELETE_INSTANCE: The instance is being deleted. | + | | | - REBOOT: The system is restarting. | + | | | - BACKUP: The backup is in progress. | + | | | - MIGRATE_AZ: The AZ is being changed. | + | | | - **RESTORING**: The backup is in progress. | + | | | - **PWD_RESETING**: The password is being reset. | + | | | - **UPGRADE_DATABASE**: The patch is being upgraded. | + | | | - **DATA_MIGRATION**: Data is being migrated. | + | | | - **SHARD_GROWING**: The shard is being scaled out. | + | | | - **APPLY_CONFIGURATION**: A parameter group is being changed. | + | | | - **RESET_PASSWORD**: The password is being reset. | + | | | - **GROWING_REVERT**: Nodes are being deleted. | + | | | - **SHARD_GROWING_REVERT**: Shards are being deleted. | + | | | - **LOG_PLAINTEXT_SWITCH**: The slow query log configuration is being modified. | + | | | - **CREATE_DATABASE_USER**: The database user is being created. | + | | | - **CREATE_DATABASE_ROLE**: The database role is being created. | + | | | - **MODIFY_NAME**: The name is being changed. | + | | | - **MODIFY_PRIVATE_DNS**: The private zone is being modified. | + | | | - **MODIFY_OP_LOG_SIZE**: The oplog size is being changed. | + | | | - **ADD_READONLY_NODES**: Read replicas are being scaled up. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of objects | Tag list | + | | | | + | | | For details, see :ref:`Table 9 `. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0023__table5636104310403: + + .. table:: **Table 4** datastore field data structure description + + ======= ====== =============================== + Name Type Description + ======= ====== =============================== + type String Indicates the DB engine. + version String Indicates the database version. + ======= ====== =============================== + + .. _dds_api_0023__table50876711173859: + + .. table:: **Table 5** backup_strategy field data structure description + + +------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+=========+========================================================================================================================================+ + | start_time | String | Indicates the backup time window. Automated backups will be triggered during the backup time window. The current time is the UTC time. | + +------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+ + | keep_days | Integer | Indicates the number of days to retain the generated backup files. The value range is from 0 to 732. | + +------------+---------+----------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0023__table0581104824211: + + .. table:: **Table 6** groups field data structure description + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+======================================================================================================================================================================================================+ + | type | String | Indicates the node type. | + | | | | + | | | Valid value: | + | | | | + | | | - shard | + | | | - config | + | | | - mongos | + | | | - replica | + | | | - single | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | volume | Object | Indicates the volume information. For more information, see :ref:`Table 7 `. This parameter is valid only when the node type is shard, config, replica, or single. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | nodes | Array of objects | Indicates node information. For more information, see :ref:`Table 8 `. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0023__table1149918231246: + + .. table:: **Table 7** volume field data structure description + + ==== ====== ================================== + Name Type Description + ==== ====== ================================== + size String Indicates the disk size. Unit: GB + used String Indicates the disk usage. Unit: GB + ==== ====== ================================== + + .. _dds_api_0023__table3426155424213: + + .. table:: **Table 8** nodes field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================================================================================================================================================================================================+ + | id | String | Indicates the node ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Indicates the node name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the node status. | + | | | | + | | | Valid value: | + | | | | + | | | - **normal**: The instance is running properly. | + | | | - **abnormal**: The instance is abnormal. | + | | | - **backup**: The instance is being backed up. | + | | | - **frozen**: The instance has been frozen. | + | | | - **unfrozen**: The instance is being unfrozen. | + | | | - **restore_table**: Database- and table-level backup and restoration are being performed for the DB instance. | + | | | - **reboot**: The instance is being restarted. | + | | | - **upgrade_database**: The instance version is being upgraded. | + | | | - **resize_flavor**: The instance class is being changed. | + | | | - **resize_volume**: The instance storage is being scaled up. | + | | | - **restore**: The instance is being restored. | + | | | - **bind_eip**: An EIP is being bound to the instance. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | role | String | Indicates the node role. | + | | | | + | | | Valid value: | + | | | | + | | | - **master**: This value is returned for the mongos node. | + | | | - **Primary**: This value is returned for the primary shard and config nodes, the primary node of a replica set, and a single node. | + | | | - **Secondary**: This value is returned for the secondary shard and config nodes, and the secondary node of a replica set. | + | | | - **Hidden**: This value is returned for the hidden shard and config nodes, and the hidden node of a replica set. | + | | | - **unknown**. This value is returned when the node is abnormal. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | private_ip | String | Indicates the private IP address of a node. By default, this parameter is valid only for mongos nodes, replica set instances, and single node instances. The value exists only after ECSs are created successfully. Otherwise, the value is **""**. | + | | | | + | | | .. caution:: | + | | | | + | | | CAUTION: | + | | | After the shard or config IP address is enabled, private IP addresses are assigned to the primary and secondary shard or config nodes of the cluster instance. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | public_ip | String | Indicates the EIP that has been bound. This parameter is valid only for mongos nodes of cluster instances, primary nodes and secondary nodes of replica set instances, and single node instances. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | String | Indicates the resource specification code. For details about the instance specifications, see the value of the **flavors.spec_code** parameter in :ref:`Querying Database Specifications `. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | Indicates the AZ. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0023__table155101048155817: + + .. table:: **Table 9** Description of the tag field + + ===== ====== =========== + Name Type Description + ===== ====== =========== + key String Tag key + value String Tag value + ===== ====== =========== + + .. note:: + + The values of **region** and **availability_zone** are used as examples. + +- Response example + + Query all instances and details. + + .. code-block:: text + + { + "instances": [ + { + "id": "8436a91546294036b75931e879882200in02", + "name": "dds-efa6", + "status": "normal", + "port": "8635", + "mode": "ReplicaSet", + "region": "aaa", + "datastore": { + "type": "DDS-Community", + "version": "4.0" + }, + "engine": "wiredTiger", + "created": "2019-01-17T07:05:52", + "updated": "2019-01-17T07:05:47", + "db_user_name": "rwuser", + "ssl": 1, + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "backup_strategy": { + "start_time": "16:00-17:00", + "keep_days": 7 + }, + "pay_mode": "0", + "maintenance_window": "02:00-06:00", + "groups": [ + { + "type": "replica", + "volume": { + "size": "10", + "used": "0.33" + }, + "nodes": [ + { + "id": "233eaac9c6f245c0bb9c2d21eea12d1bno02", + "name": "dds-efa6_replica_node_2", + "status": "normal", + "role": "Primary", + "private_ip": "192.168.0.174", + "public_ip": "", + "spec_code": "dds.mongodb.s2.medium.4.repset", + "availability_zone": "bbb" + }, + { + "id": "d57d76d6320a4a7b86db82c317550c4ano02", + "name": "dds-efa6_replica_node_1", + "status": "normal", + "role": "Hidden", + "private_ip": "192.168.0.39", + "public_ip": "", + "spec_code": "dds.mongodb.s2.medium.4.repset", + "availability_zone": "bbb" + }, + { + "id": "f46b0a1cf4d9400e9fd7af17f8742d37no02", + "name": "dds-efa6_replica_node_3", + "status": "normal", + "role": "Secondary", + "private_ip": "192.168.0.176", + "public_ip": "", + "spec_code": "dds.mongodb.s2.medium.4.repset", + "availability_zone": "bbb" + } + ] + } + ], + "time_zone": "", + "actions": [ + "CREATE" + ] + }, + { + "id": "d77905385f114217b75ae7d6ab9a7588in02", + "name": "dds-5699", + "status": "normal", + "port": "8635", + "mode": "Single", + "region": "aaa", + "datastore": { + "type": "DDS-Community", + "version": "4.0" + }, + "engine": "wiredTiger", + "created": "2019-01-17T07:04:39", + "updated": "2019-01-17T07:04:33", + "db_user_name": "rwuser", + "ssl": 1, + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "backup_strategy": { + "start_time": "17:00-18:00", + "keep_days": 7 + }, + "pay_mode": "0", + "maintenance_window": "02:00-06:00", + "groups": [ + { + "type": "single", + "volume": { + "size": "10", + "used": "0.33" + }, + "nodes": [ + { + "id": "bd4dccbd53ae48d5bd3046bebf715079no02", + "name": "dds-5699_single_node_1", + "status": "normal", + "role": "Primary", + "private_ip": "192.168.0.9", + "public_ip": "", + "spec_code": "dds.mongodb.s2.medium.4.single", + "availability_zone": "bbb" + } + ] + } + ], + "time_zone": "", + "actions": [ + "CREATE" + ] + }, + { + "id": "9136fd2a9fcd405ea4674276ce36dae8in02", + "name": "dds-32f4", + "status": "normal", + "port": "8635", + "mode": "Sharding", + "region": "aaa", + "datastore": { + "type": "DDS-Community", + "version": "4.0" + }, + "engine": "wiredTiger", + "created": "2019-01-17T07:04:37", + "updated": "2019-01-17T07:04:31", + "db_user_name": "rwuser", + "ssl": 1, + "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961", + "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b", + "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58", + "backup_strategy": { + "start_time": "19:00-20:00", + "keep_days": 7 + }, + "pay_mode": "0", + "maintenance_window": "02:00-06:00", + "groups": [ + { + "type": "mongos", + "nodes": [ + { + "id": "a742c13a284949adad177672e8a0f01cno02", + "name": "dds-32f4_mongos_node_1", + "status": "normal", + "role": "master", + "private_ip": "192.168.0.56", + "public_ip": "", + "spec_code": "dds.mongodb.s2.medium.4.mongos", + "availability_zone": "bbb" + }, + { + "id": "d4f66666b1d64ab28719da0526341c7eno02", + "name": "dds-32f4_mongos_node_2", + "status": "normal", + "role": "master", + "private_ip": "192.168.0.185", + "public_ip": "", + "spec_code": "dds.mongodb.s2.medium.4.mongos", + "availability_zone": "bbb" + } + ] + }, + { + "type": "shard", + "id": "d1b92d2cbd544e85ac7ce6a7f33ba205gr02", + "name": "shard_2", + "status": "normal", + "volume": { + "size": "10", + "used": "0.33" + }, + "nodes": [ + { + "id": "0e9abaebe5974b63a5b221de6ee34cfeno02", + "name": "dds-32f4_shard_2_node_3", + "status": "normal", + "role": "Primary", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "availability_zone": "bbb" + }, + { + "id": "1d7f4c5476c04cc187f920925c2b601fno02", + "name": "dds-32f4_shard_2_node_2", + "status": "normal", + "role": "Hidden", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "availability_zone": "bbb" + }, + { + "id": "3dd2cce03da54fc08f10651cbfea778dno02", + "name": "dds-32f4_shard_2_node_1", + "status": "normal", + "role": "Secondary", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "availability_zone": "bbb" + } + ] + }, + { + "type": "shard", + "id": "06439baa35c146d3a8965af59d370908gr02", + "name": "shard_1", + "status": "normal", + "volume": { + "size": "10", + "used": "0.33" + }, + "nodes": [ + { + "id": "0f6744d7e29f42ff80fc1a36cc145042no02", + "name": "dds-32f4_shard_1_node_1", + "status": "normal", + "role": "Primary", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "availability_zone": "bbb" + }, + { + "id": "3abcb399113b4512bd5a906da54e8753no02", + "name": "dds-32f4_shard_1_node_3", + "status": "normal", + "role": "Hidden", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "availability_zone": "bbb" + }, + { + "id": "c149f70563494501b5706cad225a8ebdno02", + "name": "dds-32f4_shard_1_node_2", + "status": "normal", + "role": "Secondary", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "availability_zone": "bbb" + } + ] + }, + { + "type": "config", + "id": "84e7c96b82aa4fedb3b00f98edd71ba4gr02", + "name": "config", + "status": "normal", + "volume": { + "size": "20", + "used": "0.33" + }, + "nodes": [ + { + "id": "7422f7331b714ac39aa647a1ec968d33no02", + "name": "dds-32f4_config_node_2", + "status": "normal", + "role": "Primary", + "spec_code": "dds.mongodb.s2.large.2.config", + "availability_zone": "bbb" + }, + { + "id": "9e3b343151044eda91ddb8a42ae5cbefno02", + "name": "dds-32f4_config_node_3", + "status": "normal", + "role": "Hidden", + "spec_code": "dds.mongodb.s2.large.2.config", + "availability_zone": "bbb" + }, + { + "id": "c0053ca460ac4889841ffb14a886ec54no02", + "name": "dds-32f4_config_node_1", + "status": "normal", + "role": "Secondary", + "spec_code": "dds.mongodb.s2.large.2.config", + "availability_zone": "bbb" + } + ] + } + ], + "time_zone": "", + "actions": [ + "CREATE" + ] + } + ], + "total_count": 2 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/restarting_a_db_instance.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/restarting_a_db_instance.rst new file mode 100644 index 0000000..a28857a --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/restarting_a_db_instance.rst @@ -0,0 +1,137 @@ +:original_name: dds_api_0021.html + +.. _dds_api_0021: + +Restarting a DB Instance +======================== + +Function +-------- + +This API is used to restart a DB instance. + +.. important:: + + The DDS DB instance will be unavailable during the restart process. Exercise caution when performing this operation. + +Constraints +----------- + +If the instance status is not normal, the instance cannot be restarted. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restart + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=========================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API to create an instance. | + +-------------+-----------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+======================================================================================================================================================================================================+ + | target_type | No | String | Specifies the type of the object to restart. | + | | | | | + | | | | - This parameter is mandatory when you restart one or more nodes of a cluster instance. | + | | | | | + | | | | - Set the value to **mongos** if mongos nodes are restarted. | + | | | | - Set the value to **shard** if shard nodes are restarted. | + | | | | - Set the value to **config** if config nodes are restarted. | + | | | | | + | | | | - This parameter is not transferred when the DB instance is restarted. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | target_id | Yes | String | Specifies the ID of the object to be restarted, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + | | | | | + | | | | - In a cluster instance, the value is the ID of the node to restart. | + | | | | - When you restart the entire DB instance, the value is the DB instance ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/restart + + Restart the DB instance. + + .. code-block:: text + + { + "target_id":"9136fd2a9fcd405ea4674276ce36dae8in02" + } + + Restart shards. + + .. code-block:: text + + { + "target_type":"shard", + "target_id":"84e7c96b82aa4fedb3b00f98edd71ba4gr02" + } + + Restart configs. + + .. code-block:: text + + { + "target_type":"config", + "target_id":"06439baa35c146d3a8965af59d370908gr02" + } + + Restart mongos. + + .. code-block:: text + + { + "target_type":"mongos", + "target_id":"bd4dccbd53ae48d5bd3046bebf715079no02" + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + ====== ====== ========================== + Name Type Description + ====== ====== ========================== + job_id String Indicates the workflow ID. + ====== ====== ========================== + +- Response example + + .. code-block:: text + + { + "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/scaling_up_storage_space.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/scaling_up_storage_space.rst new file mode 100644 index 0000000..10f36e8 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/scaling_up_storage_space.rst @@ -0,0 +1,133 @@ +:original_name: dds_api_0024.html + +.. _dds_api_0024: + +Scaling Up Storage Space +======================== + +Function +-------- + +This API is used to scale up the storage space of a DB instance. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/enlarge-volume + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +--------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+========+=======================================================================================================================================+ + | volume | Yes | Object | Specifies detailed information about the volume request. For more information, see :ref:`Table 3 `. | + +--------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0024__table3840102812918: + + .. table:: **Table 3** volume field data structure description + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================================+ + | group_id | No | String | Specifies the role ID. | + | | | | | + | | | | - For a cluster instance, this parameter is set to the ID of the shard group. | + | | | | - This parameter is not transferred for replica set and single node instances. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Yes | String | Specifies the requested disk capacity. The value must be an integer multiple of 10 and greater than the current storage space. | + | | | | | + | | | | - In a cluster instance, this parameter indicates the storage space of shard nodes. The value range is from 10 GB to 2000 GB. | + | | | | - In a replica set instance, this parameter indicates the disk capacity of the DB instance to be expanded. The value range is from 10 GB to 2000 GB. | + | | | | - In a single node instance, this parameter indicates the disk capacity of the DB instance to be expanded. The value range is from 10 GB to 1000 GB. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/enlarge-volume + + Clusters: + + .. code-block:: text + + { + "volume": + { + "group_id":"1b0c008adbcb495c81a3d5762a02a2abgr02", + "size":20 + } + } + + Replica sets: + + .. code-block:: text + + { + "volume": + { + "size":20 + } + } + + Single nodes: + + .. code-block:: text + + { + "volume": + { + "size":20 + } + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 4** Parameter description + + ====== ====== ====================== + Name Type Description + ====== ====== ====================== + job_id String Indicates the task ID. + ====== ====== ====================== + +- Response example + + .. code-block:: text + + { + "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5" + } + +Status Code +----------- + +Status Code:202. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/db_instance_management/unbinding_an_eip.rst b/api-ref/source/apis_v3.0_recommended/db_instance_management/unbinding_an_eip.rst new file mode 100644 index 0000000..1ba5e8e --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/db_instance_management/unbinding_an_eip.rst @@ -0,0 +1,80 @@ +:original_name: dds_api_0057.html + +.. _dds_api_0057: + +Unbinding an EIP +================ + +Function +-------- + +This API is used to unbind an EIP from a node in a DB instance. + +Constraints +----------- + +- Frozen instances do not support this operation. +- This operation can be performed only on a node with an EIP assigned. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/nodes/{node_id}/unbind-eip + +- Parameter description + + .. table:: **Table 1** Parameter description + + +------------+-----------+-------------------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+===================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +------------+-----------+-------------------------------------------------------------------+ + | node_id | Yes | Specifies the ID of the node from which the EIP is to be unbound. | + +------------+-----------+-------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/nodes/4709a6332ce348718b5675aadb5e2bccno02/unbind-eip + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + ========= ====== ========================== + Name Type Description + ========= ====== ========================== + job_id String Indicates the workflow ID. + node_name String Indicates the node name. + node_id String Indicates the node ID. + ========= ====== ========================== + +- Response example + + .. code-block:: text + + { + "job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5", + "node_id": "52a4c096bb1f455d8d866956a959519eno02", + "node_name": "mongodb-8977_mongos_node_1" + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/index.rst b/api-ref/source/apis_v3.0_recommended/index.rst new file mode 100644 index 0000000..7a96364 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/index.rst @@ -0,0 +1,32 @@ +:original_name: dds_api_description.html + +.. _dds_api_description: + +APIs V3.0 (Recommended) +======================= + +- :ref:`Querying the API Version ` +- :ref:`Querying Database Version Information ` +- :ref:`Querying Database Specifications ` +- :ref:`Querying the Database Disk Type ` +- :ref:`DB Instance Management ` +- :ref:`Connection Management ` +- :ref:`Backup and Restoration ` +- :ref:`Log Information Queries ` +- :ref:`Tag Management ` +- :ref:`Task Management ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_the_api_version/index + querying_database_version_information + querying_database_specifications + querying_the_database_disk_type + db_instance_management/index + connection_management/index + backup_and_restoration/index + log_information_queries/index + tag_management/index + task_management/index diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/index.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/index.rst new file mode 100644 index 0000000..dcf6769 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/index.rst @@ -0,0 +1,28 @@ +:original_name: dds_api_0092.html + +.. _dds_api_0092: + +Log Information Queries +======================= + +- :ref:`Querying Database Slow Logs ` +- :ref:`Obtaining Links for Downloading Slow Query Logs ` +- :ref:`Querying Database Error Logs ` +- :ref:`Obtaining Links for Downloading Error Logs ` +- :ref:`Setting SQL Audit ` +- :ref:`Querying SQL Audit Policy ` +- :ref:`Obtaining the Audit Log List ` +- :ref:`Obtaining Links for Downloading Audit Logs ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_database_slow_logs + obtaining_links_for_downloading_slow_query_logs + querying_database_error_logs + obtaining_links_for_downloading_error_logs + setting_sql_audit + querying_sql_audit_policy + obtaining_the_audit_log_list + obtaining_links_for_downloading_audit_logs diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_audit_logs.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_audit_logs.rst new file mode 100644 index 0000000..bac8524 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_audit_logs.rst @@ -0,0 +1,86 @@ +:original_name: dds_api_0100.html + +.. _dds_api_0100: + +Obtaining Links for Downloading Audit Logs +========================================== + +Function +-------- + +This API is used to obtain the link for downloading audit logs. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog-links + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +------+-----------+------------------+------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+==================+==========================================================================================+ + | ids | Yes | Array of strings | Specifies the list of audit logs. A maximum of 50 audit log IDs are allowed in the list. | + +------+-----------+------------------+------------------------------------------------------------------------------------------+ + +- Request example + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/2870a411522849aa901cd4351c96a3b7in02/auditlog-links + + .. code-block:: text + + { + "ids": ["10190012aae94b38a10269b8ad025fc1no02_1607681849871", "12390012aae94b38a10269b8ad025fc1no02_1607681849871"] + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 3** Parameter description + + +-------+------------------+-----------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======+==================+===================================================================================+ + | links | Array of strings | Indicates the list of audit log download links. The validity period is 5 minutes. | + +-------+------------------+-----------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "links": ["https://obs.domainname.com/ddsbucket.username.1/xxxxxx", "https://obs.domainname.com/ddsbucket.username.2/xxxxxx"] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_error_logs.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_error_logs.rst new file mode 100644 index 0000000..3fd7d4f --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_error_logs.rst @@ -0,0 +1,239 @@ +:original_name: dds_api_0096.html + +.. _dds_api_0096: + +Obtaining Links for Downloading Error Logs +========================================== + +Function +-------- + +This API is used to obtain the download link of error logs. + +Constraints +----------- + +The link for downloading error logs is valid within 15 minutes after being updated. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/errorlog-download + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+========================================================================================================================================================================================================================+ + | file_name_list | No | Array of strings | Specifies the list of the names of the files to be downloaded. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | You can upload an empty request body to export error logs of all nodes and return all file names and download links. You can also specify the name of the file to be downloaded based on the preceding information. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id_list | No | Array of strings | Specifies the node ID list. If this parameter is left blank, all nodes in the instance can be queried. | + | | | | | + | | | | For details, see the **id** value in the **nodes data structure** table in section "Querying Instances" in the *DDS API Reference*. | + | | | | | + | | | | Nodes that can be queried: | + | | | | | + | | | | - mongos, shard, and config nodes in a cluster. | + | | | | - All nodes in a replica set or single node instance. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Request example + + 1. If the body parameter is not specified, the error log file links of all instance nodes are returned. + + POST https://dds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/errorlog-download + + .. code-block:: text + + { + } + + 2. If the body parameter is specified, the error log file link of the current node is returned. + + POST https://dds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/errorlog-download + + .. code-block:: text + + { + "file_name_list": [ + "0541c9f81e80d2201fccc00b92ad6ec0_052f8a12dfed43fbb27c2020e3c3c507no02_errorlog_20201117104809" + ], + "node_id_list": [ + "052f8a12dfed43fbb27c2020e3c3c507no02" + ] + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================================+ + | list | List | Indicates the list of error log download links. | + | | | | + | | | For details, see :ref:`Table 3 `. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + | status | String | Indicates the status of the error log download link. | + | | | | + | | | - **FINISH**: The download link has been generated. | + | | | - **CREATING**: A file is being generated and the download link is to be prepared. | + | | | - **FAILED**: Log files fail to be prepared. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + | count | Integer | Indicates the number of error log links. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + + .. _dds_api_0096__table17888141175915: + + .. table:: **Table 3** list field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+===============================================================================================================================================+ + | node_name | String | Indicates the node name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | file_name | String | Indicates the name of the generated file for downloading error logs. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the status of the current link. | + | | | | + | | | - **SUCCESS**: The download link has been generated. | + | | | - **EXPORTING**: A file is being generated and the download link is to be prepared. | + | | | - **FAILED**: Log files fail to be prepared. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | file_size | String | Indicates the file size in KB. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | file_link | String | Indicates the download link. | + | | | | + | | | .. note:: | + | | | | + | | | The download link is valid within 15 minutes after being updated. After the update time expires, the download link will be obtained again. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | update_at | Long | Indicates the update time. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +- Response example + + 1. If the body parameter is not specified, the following information is returned: + + .. code-block:: text + + { + "list": [ + { + "node_name": "dds-4ff4_replica_node_1", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_599fd21891264a348822db4c6fd7e6f7no02_errorlog_20221028152158", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://obs.cn-datebase-ssh.myhuaweicloud.com:443/dbsbucket.cn.datebase.ssh.a5b2d082b6264f249283eed2b612e934/88f9e7914ab149049bbb57bc83b3f296_599fd21891264a348822db4c6fd7e6f7no02_errorlog_20221028152158?AWSAccessKeyId=IUMLNBNX6IDB9ERZTLBR&Expires=1666942048&response-cache-control=no-cache%2Cno-store&Signature=Ljs5eeelvgzI86sKd1OPbeMjonQ%3D", + "updated_at": 1666941725839 + }, + { + "node_name": "dds-4ff4_replica_node_2", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_8fa3da0256e14f8ab6ca118463f308bfno02_errorlog_20221028152158", + "status": "SUCCESS", + "file_size": "3.59", + "file_link": "https://obs.cn-datebase-ssh.myhuaweicloud.com:443/dbsbucket.cn.datebase.ssh.a5b2d082b6264f249283eed2b612e934/88f9e7914ab149049bbb57bc83b3f296_8fa3da0256e14f8ab6ca118463f308bfno02_errorlog_20221028152158?AWSAccessKeyId=IUMLNBNX6IDB9ERZTLBR&Expires=1666942048&response-cache-control=no-cache%2Cno-store&Signature=6RTLq%2BmyGhzziTBGIK62L9KrWLU%3D", + "updated_at": 1666941726237 + }, + { + "node_name": "dds-4ff4_replica_node_3", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_af6b1afbbc7b4453a2cfb5bcc1d0a587no02_errorlog_20221028152158", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://obs.cn-datebase-ssh.myhuaweicloud.com:443/dbsbucket.cn.datebase.ssh.a5b2d082b6264f249283eed2b612e934/88f9e7914ab149049bbb57bc83b3f296_af6b1afbbc7b4453a2cfb5bcc1d0a587no02_errorlog_20221028152158?AWSAccessKeyId=IUMLNBNX6IDB9ERZTLBR&Expires=1666942048&response-cache-control=no-cache%2Cno-store&Signature=W0ZB%2BwBEwM1DoDKZEPhSVl%2BDT%2Bo%3D", + "updated_at": 1666941738832 + } + ], + "status": "FINISH", + "count": 3 + } + + 2. If the body parameter is specified, the following information is returned: + + .. code-block:: text + + { + "list": [ + { + "node_name": "node_1", + "file_name": "054bc9c1f680d55c1f36c006e5a9f67b_errorlog_download_20200515080614589", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://rdsbucket.opxxx.svc.rds.xxxxx.cnxianhz1.ur.obs.cn-xianhz-1.myhuaweicloud.com:443/054bc9c1f680d55c1f36c006e5a9f67b_errorlog_download_20200515080614589?AWSAccessKeyId=1BQ38TBCQHAVQXBUMUTC&Expires=1589530200&response-cache-control=no-cache%2Cno-store&Signature=Fgi4%2BLOJ9frAXyOkz5hRoW5O%2BUM%3D", + " updated_at ": 1589529991385 + } + ], + "status": "FINISH", + "count": 1 + } + + 3. If the download link expires, you will receive the following response: + + .. code-block:: text + + { + "list": [ + { + "node_name": "dds-4ff4_replica_node_1", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_599fd21891264a348822db4c6fd7e6f7no02_errorlog_20221028152158", + "status": "EXPORTING", + "file_size": null, + "file_link": null, + "updated_at": 1666941725839 + }, + { + "node_name": "dds-4ff4_replica_node_2", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_8fa3da0256e14f8ab6ca118463f308bfno02_errorlog_20221028152158", + "status": "EXPORTING", + "file_size": null, + "file_link": null, + "updated_at": 1666941726237 + }, + { + "node_name": "dds-4ff4_replica_node_3", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_af6b1afbbc7b4453a2cfb5bcc1d0a587no02_errorlog_20221028152158", + "status": "EXPORTING", + "file_size": null, + "file_link": null, + "updated_at": 1666941738832 + } + ], + "status": "CREATING", + "count": 3 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_slow_query_logs.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_slow_query_logs.rst new file mode 100644 index 0000000..dddfaae --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_links_for_downloading_slow_query_logs.rst @@ -0,0 +1,235 @@ +:original_name: dds_api_0094.html + +.. _dds_api_0094: + +Obtaining Links for Downloading Slow Query Logs +=============================================== + +Function +-------- + +This API is used to obtain links for downloading slow query logs. + +Constraints +----------- + +The link for downloading slow query logs is valid within 15 minutes after being updated. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/slowlog-download + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+=============================================================================================================================================================================================================================+ + | file_name_list | No | Array of strings | Specifies the list of the names of the files to be downloaded. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | You can upload an empty request body to export slow query logs of all nodes and return all file names and download links. You can also specify the name of the file to be downloaded based on the preceding information. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id_list | No | Array of strings | Specifies the node ID list. If this parameter is left blank, all nodes in the instance can be queried. | + | | | | | + | | | | For details, see the **id** value in the **nodes data structure** table in section "Querying Instances" in the *DDS API Reference*. | + | | | | | + | | | | Nodes that can be queried: | + | | | | | + | | | | - Shard nodes in a cluster. | + | | | | - All nodes in a replica set or single node instance. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Request example + + 1. If the body parameter is not specified, the slow query log file links of all instance nodes are returned. + + POST https://dds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/slowlog-download + + .. code-block:: text + + { + } + + 2. If the body parameter is specified, the slow query log file link of the current node is returned. + + POST https://dds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/slowlog-download + + .. code-block:: text + + { + "file_name_list":["0541c9f81e80d2201fccc00b92ad6ec0_052f8a12dfed43fbb27c2020e3c3c507no02_slowlog_20201117104809"], + "node_id_list":["052f8a12dfed43fbb27c2020e3c3c507no02"] + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================================+ + | list | List | Indicates the download links of slow query logs. | + | | | | + | | | For details, see :ref:`Table 3 `. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + | status | String | Indicates the status of links for downloading slow query logs. | + | | | | + | | | - **FINISH**: The download link has been generated. | + | | | - **CREATING**: A file is being generated and the download link is to be prepared. | + | | | - **FAILED**: Log files fail to be prepared. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + | count | Integer | Indicates the number of links for downloading slow query logs. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------+ + + .. _dds_api_0094__table08911252403: + + .. table:: **Table 3** list field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+===============================================================================================================================================+ + | node_name | String | Indicates the node name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | file_name | String | Indicates the name of the generated file for downloading slow query logs. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Indicates the status of the current link. | + | | | | + | | | - **SUCCESS**: The download link has been generated. | + | | | - **EXPORTING**: A file is being generated and the download link is to be prepared. | + | | | - **FAILED**: Log files fail to be prepared. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | file_size | String | Indicates the file size in KB. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | file_link | String | Indicates the download link. | + | | | | + | | | .. note:: | + | | | | + | | | The download link is valid within 15 minutes after being updated. After the update time expires, the download link will be exported again. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | update_at | Long | Indicates the update time. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +- Response example + + 1. If the body parameter is not specified, the following information is returned: + + .. code-block:: text + + { + "list": [ + { + "node_name": "dds-4ff4_replica_node_1", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_599fd21891264a348822db4c6fd7e6f7no02_slowlog_20221028070301", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://obs.cn-datebase-ssh.myhuaweicloud.com:443/dbsbucket.cn.datebase.ssh.a5b2d082b6264f249283eed2b612e934/88f9e7914ab149049bbb57bc83b3f296_599fd21891264a348822db4c6fd7e6f7no02_slowlog_20221028070301?AWSAccessKeyId=IUMLNBNX6IDB9ERZTLBR&Expires=1666941149&response-cache-control=no-cache%2Cno-store&Signature=t%2FZCh1%2BNufd6tsg%2BG1KtPdW3c%2FE%3D", + "updated_at": 1666940603596 + }, + { + "node_name": "dds-4ff4_replica_node_2", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_8fa3da0256e14f8ab6ca118463f308bfno02_slowlog_20221028070301", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://obs.cn-datebase-ssh.myhuaweicloud.com:443/dbsbucket.cn.datebase.ssh.a5b2d082b6264f249283eed2b612e934/88f9e7914ab149049bbb57bc83b3f296_8fa3da0256e14f8ab6ca118463f308bfno02_slowlog_20221028070301?AWSAccessKeyId=IUMLNBNX6IDB9ERZTLBR&Expires=1666941149&response-cache-control=no-cache%2Cno-store&Signature=NIjwbCBbiffqHFP7086vaxeLPgs%3D", + "updated_at": 1666940606118 + }, + { + "node_name": "dds-4ff4_replica_node_3", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_af6b1afbbc7b4453a2cfb5bcc1d0a587no02_slowlog_20221028070301", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://obs.cn-datebase-ssh.myhuaweicloud.com:443/dbsbucket.cn.datebase.ssh.a5b2d082b6264f249283eed2b612e934/88f9e7914ab149049bbb57bc83b3f296_af6b1afbbc7b4453a2cfb5bcc1d0a587no02_slowlog_20221028070301?AWSAccessKeyId=IUMLNBNX6IDB9ERZTLBR&Expires=1666941149&response-cache-control=no-cache%2Cno-store&Signature=LpdZPw0UTk9mm1QdNBcBTeLJ4c0%3D", + "updated_at": 1666940591261 + } + ], + "status": "FINISH", + "count": 3 + } + + 2. If the body parameter is specified, the following information is returned: + + .. code-block:: text + + { + "list": [ + { + "node_name": "node_1", + "file_name": "054bc9c1f680d55c1f36c006e5a9f67b_slowlog_download_20200515080614589", + "status": "SUCCESS", + "file_size": "0", + "file_link": "https://rdsbucket.opxxx.svc.rds.xxxxx.cnxianhz1.ur.obs.cn-xianhz-1.myhuaweicloud.com:443/054bc9c1f680d55c1f36c006e5a9f67b_slowlog_download_20200515080614589?AWSAccessKeyId=1BQ38TBCQHAVQXBUMUTC&Expires=1589530200&response-cache-control=no-cache%2Cno-store&Signature=Fgi4%2BLOJ9frAXyOkz5hRoW5O%2BUM%3D", + " updated_at ": 1589529991385 + } + ], + "status": "FINISH", + "count": 1 + } + + 3. If the download link expires, you will receive the following response: + + .. code-block:: text + + { + "list": [ + { + "node_name": "dds-4ff4_replica_node_1", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_599fd21891264a348822db4c6fd7e6f7no02_slowlog_20221028070301", + "status": "EXPORTING", + "file_size": null, + "file_link": null, + "updated_at": 1666940603596 + }, + { + "node_name": "dds-4ff4_replica_node_2", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_8fa3da0256e14f8ab6ca118463f308bfno02_slowlog_20221028070301", + "status": "EXPORTING", + "file_size": null, + "file_link": null, + "updated_at": 1666940606118 + }, + { + "node_name": "dds-4ff4_replica_node_3", + "file_name": "88f9e7914ab149049bbb57bc83b3f296_af6b1afbbc7b4453a2cfb5bcc1d0a587no02_slowlog_20221028070301", + "status": "EXPORTING", + "file_size": null, + "file_link": null, + "updated_at": 1666940591261 + } + ], + "status": "CREATING", + "count": 3 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_the_audit_log_list.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_the_audit_log_list.rst new file mode 100644 index 0000000..ec6274f --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/obtaining_the_audit_log_list.rst @@ -0,0 +1,127 @@ +:original_name: dds_api_0099.html + +.. _dds_api_0099: + +Obtaining the Audit Log List +============================ + +Function +-------- + +This API is used to obtain an audit log list. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog?start_time={start_time}&end_time={end_time}&offset={offset}&limit={limit} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=========================================================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id | No | Specifies the ID of the node whose audit logs are to be queried. | + | | | | + | | | If this parameter is not transferred, the audit logs of all nodes are queried by default. The audit logs of cluster instances are distributed on mongos nodes. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | start_time | Yes | Specifies the start time. The format of the start time is "yyyy-mm-ddThh:mm:ssZ". | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | end_time | Yes | Specifies the end time. The format of the end time is "yyyy-mm-ddThh:mm:ssZ" and the end time must be later than the start time. The time span cannot be longer than 30 days. | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Specifies the index position. | + | | | | + | | | If **offset** is set to *N*, the resource query starts from the N+1 piece of data. The value is **0** by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Specifies the number of records to be queried. | + | | | | + | | | - The value ranges from 1 to 100. | + | | | - If this parameter is not transferred, the first 100 DB instances are queried by default. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/056538411200d4cd2f79c003c7606412/instances/65d3fe0c50984b35bc1a36e9b7c7de98in02/auditlog?start_time=2020-12-06T09:00:00+0800&end_time=2020-12-10T18:00:15+0800&offset=0&limit=33 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +--------------+------------------+------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==============+==================+========================================================================================================================+ + | audit_logs | Array of objects | Indicates the audit log details. For details about audit logs, see :ref:`Table 3 `. | + +--------------+------------------+------------------------------------------------------------------------------------------------------------------------+ + | total_record | Integer | Indicates the total number of records. | + +--------------+------------------+------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0099__table15702194615294: + + .. table:: **Table 3** audit_logs parameters + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+====================================================================================================================+ + | node_id | String | Indicates the node ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | id | String | Indicates the audit log ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Indicates the audit log file name. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | size | Long | Indicates the size of the audit log in byte. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | start_time | String | Indicates the start time of the audit log. The format is "yyyy-mm-ddThh:mm:ssZ". | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | end_time | String | Indicates the end time of the audit log. The format is "yyyy-mm-ddThh:mm:ssZ". | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "audit_logs": [ + { + "id": "10190012aae94b38a10269b8ad025fc1no02_1607681849871", + "name": "0a84b6e97780d3271fd0c00f2db42932_audit_log_65d3fe0c50984b35bc1a36e9b7c7de98in02_10190012aae94b38a10269b8ad025fc1no02_1607681849871", + "size": 24735174, + "node_id": "10190012aae94b38a10269b8ad025fc1no02", + "start_time": "2020-12-11T18:14:49+0800", + "end_time": "2020-12-11T18:17:25+0800" + } + ], + "total_record": 1 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_database_error_logs.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_database_error_logs.rst new file mode 100644 index 0000000..8db109e --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_database_error_logs.rst @@ -0,0 +1,148 @@ +:original_name: dds_api_0095.html + +.. _dds_api_0095: + +Querying Database Error Logs +============================ + +Function +-------- + +This API is used to query database error logs. + +Constraints +----------- + +A maximum of 2000 records can be queried within the period specified by **start_date** and **end_date**. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/errorlog?offset={offset}&limit={limit}&start_date={start_date}&end_date={end_date}&type={type}&node_id={node_id} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=========================================================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | start_date | Yes | Specifies the start time in the "yyyy-mm-ddThh:mm:ssZ" format. | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + | | | | + | | | .. caution:: | + | | | | + | | | CAUTION: | + | | | The start time is 31 days earlier than the current time. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | end_date | Yes | Specifies the end time in the "yyyy-mm-ddThh:mm:ssZ" format. | + | | | | + | | | - **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + | | | - Only error logs generated within the last month can be queried. | + | | | | + | | | .. note:: | + | | | | + | | | The end time cannot be later than the current time. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id | No | Specifies the node ID. For details, see :ref:`Table 8 `. | + | | | | + | | | If this parameter is left blank, all nodes in the instance can be queried. | + | | | | + | | | Nodes that can be queried: | + | | | | + | | | - mongos, shard, and config nodes in a cluster instance. | + | | | - All nodes in a replica set or single node instance. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | No | Specifies the statement type. If it is left blank, all statement types are queried. Valid value: | + | | | | + | | | - WARNING | + | | | - ERROR | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Specifies the index position. Its value range is **[0, 1999]**. | + | | | | + | | | If **offset** is set to *N*, the resource query starts from the N+1 piece of data. The value is **0** by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Specifies the number of resources to be queried. The value ranges from 1 to 100. The default value is **10**, indicating that 10 records are returned by default. | + | | | | + | | | .. note:: | + | | | | + | | | The sum of **limit** and **offset** values must be less than or equal to 2000. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + - Querying database error logs. + + GET https://dds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/errorlog?start_date=2018-08-06T10:41:14+0800&end_date=2018-08-07T10:41:14+0800 + + - Querying database error logs based on specified conditions. + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/6ade8143870047b8999aba8f1891b48ein02/errorlog?type=WARNING&offset=1&limit=20&node_id=a7c84462483642798cf159237343135fno06&start_date=2018-08-06T10:41:14+0800&end_date=2018-08-07T10:41:14+0800 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+----------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+======================================================================+ + | error_log_list | Array of objects | Indicates detailed information. | + | | | | + | | | For details, see :ref:`Table 3 `. | + +-----------------------+-----------------------+----------------------------------------------------------------------+ + | total_record | Integer | Indicates the total number of records. | + +-----------------------+-----------------------+----------------------------------------------------------------------+ + + .. _dds_api_0095__table11544193873211: + + .. table:: **Table 3** error_log_list field data structure description + + ========= ====== ===================================== + Name Type Description + ========= ====== ===================================== + node_name String Indicates the node name. + level String Indicates the log level. + time String Indicates the time in the UTC format. + content String Indicates the log content. + ========= ====== ===================================== + +- Response example + + .. code-block:: text + + { + "error_log_list": [ + { + "node_name": "Test_replica_node_2", + "level": "WARNING", + "time": "2020-12-15T08:53:01.868+0000", + "content": "W NETWORK [LogicalSessionCacheReap] Unable to reach primary for set replica" + } + ], + "total_record": 1 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_database_slow_logs.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_database_slow_logs.rst new file mode 100644 index 0000000..20dc017 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_database_slow_logs.rst @@ -0,0 +1,167 @@ +:original_name: dds_api_0093.html + +.. _dds_api_0093: + +Querying Database Slow Logs +=========================== + +Function +-------- + +This API is used to query database slow logs. + +Constraints +----------- + +A maximum of 2000 records can be queried within the period specified by **start_date** and **end_date**. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/slowlog?offset={offset}&limit={limit}&start_date={start_date}&end_date={end_date}&type={type}&node_id={node_id} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=========================================================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | start_date | Yes | Specifies the start time in the "yyyy-mm-ddThh:mm:ssZ" format. | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + | | | | + | | | .. caution:: | + | | | | + | | | CAUTION: | + | | | The start time is 31 days earlier than the current time. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | end_date | Yes | Specifies the end time in the "yyyy-mm-ddThh:mm:ssZ" format. | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + | | | | + | | | Only slow query logs generated within the last month can be queried. | + | | | | + | | | .. note:: | + | | | | + | | | The end time cannot be later than the current time. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | node_id | No | Specifies the node ID. For details, see :ref:`Table 8 `. | + | | | | + | | | If this parameter is left blank, all nodes in the instance can be queried. | + | | | | + | | | Nodes that can be queried: | + | | | | + | | | Shard nodes in a cluster instance. | + | | | | + | | | All nodes in a replica set or single node instance. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | No | Specifies the statement type. If it is left blank, all statement types are queried. Valid value: | + | | | | + | | | - INSERT | + | | | - QUERY | + | | | - UPDATE | + | | | - REMOVE | + | | | - GETMORE | + | | | - COMMAND | + | | | - KILLCURSORS | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Specifies the index position. Its value range is **[0, 1999]**. | + | | | | + | | | If **offset** is set to *N*, the resource query starts from the N+1 piece of data. The value is **0** by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Specifies the number of resources to be queried. The value ranges from 1 to 100. The default value is **10**, indicating that 10 records are returned by default. | + | | | | + | | | .. note:: | + | | | | + | | | The sum of **limit** and **offset** values must be less than or equal to 2000. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/6ade8143870047b8999aba8f1891b48ein02/slowlog?start_date=2018-08-06T10:41:14+0800&end_date=2018-08-07T10:41:14+0800 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | slow_log_list | Array of objects | Indicates detailed information. | + | | | | + | | | For details, see :ref:`Table 3 `. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | total_record | Integer | Indicates the total number of records. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + + .. _dds_api_0093__table1246710557414: + + .. table:: **Table 3** slow_log_list field data structure description + + +---------------+--------+-------------------------------------------------------+ + | Name | Type | Description | + +===============+========+=======================================================+ + | node_name | String | Indicates the node name. | + +---------------+--------+-------------------------------------------------------+ + | query_sample | String | Indicates the execution syntax. | + +---------------+--------+-------------------------------------------------------+ + | type | String | Indicates the statement type. | + +---------------+--------+-------------------------------------------------------+ + | time | String | Indicates the execution time. | + +---------------+--------+-------------------------------------------------------+ + | lock_time | String | Indicates the lock wait time. | + +---------------+--------+-------------------------------------------------------+ + | rows_sent | String | Indicates the number of sent rows. | + +---------------+--------+-------------------------------------------------------+ + | rows_examined | String | Indicates the number of scanned rows. | + +---------------+--------+-------------------------------------------------------+ + | database | String | Indicates the database which the slow log belongs to. | + +---------------+--------+-------------------------------------------------------+ + | start_time | String | Indicates the time in the UTC format. | + +---------------+--------+-------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "slow_log_list": [ + { + "node_name": "Test_replica_node_2", + "query_sample": "{\"responseLength\": 230, \"ts\": {\"$date\": 1605480486800}, \"ninserted\": 1, \"locks\": {\"oplog\": {\"acquireCount\": {\"w\": 1}}, \"Global\": {\"acquireCount\": {\"r\": 3, \"w\": 2}}, \"Collection\": {\"acquireCount\": {\"w\": 2}}, \"Database\": {\"acquireCount\": {\"w\": 3}}}, \"numYield\": 0, \"ns\": \"geographySpace.tiles\"}", + "type": "REMOVE", + "time": "101 ms", + "lock_time": "10 us", + "rows_sent": "0", + "rows_examined": "0", + "database": "geography", + "start_time": "2020-11-15T22:49:38.643000Z" + } + ], + "total_record": 1 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_sql_audit_policy.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_sql_audit_policy.rst new file mode 100644 index 0000000..bd9a236 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/querying_sql_audit_policy.rst @@ -0,0 +1,76 @@ +:original_name: dds_api_0098.html + +.. _dds_api_0098: + +Querying SQL Audit Policy +========================= + +Function +-------- + +This API is used to query the policy for SQL audit logs. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog-policy + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/5cecca4c20e04146862651b8d385f26ain02/auditlog-policy + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------+------------------+-----------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+==================+=====================================================================================================+ + | keep_days | Integer | Indicates the number of days for storing audit logs. The value is **0** when SQL audit is disabled. | + +-------------+------------------+-----------------------------------------------------------------------------------------------------+ + | audit_scope | String | Indicates the audit scope. | + +-------------+------------------+-----------------------------------------------------------------------------------------------------+ + | audit_types | Array of strings | Indicates the audit type. | + +-------------+------------------+-----------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "keep_days":7, + "audit_scope":"all", + "audit_types":["insert"] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/log_information_queries/setting_sql_audit.rst b/api-ref/source/apis_v3.0_recommended/log_information_queries/setting_sql_audit.rst new file mode 100644 index 0000000..1aff37b --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/log_information_queries/setting_sql_audit.rst @@ -0,0 +1,109 @@ +:original_name: dds_api_0097.html + +.. _dds_api_0097: + +Setting SQL Audit +================= + +Function +-------- + +This API is used to set a policy for SQL audit logs. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog-policy + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+=================+==================+======================================================================================================================================================================================================================+ + | keep_days | Yes | Integer | Specifies the number of days for storing audit logs. The value can be 0 or ranges from 7 to 732. | + | | | | | + | | | | - **0**: indicates that SQL audit is disabled. | + | | | | - **7** to **732**: indicates the retention days for audit logs after SQL audit is enabled. | + +-------------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | reserve_auditlogs | No | String | This parameter is valid only when SQL audit is disabled. | + | | | | | + | | | | - **true** (default value): indicates that historical audit logs are retained when SQL audit is disabled. | + | | | | - **false**: indicates that existing historical audit logs are deleted when SQL audit is disabled. | + +-------------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | audit_scope | No | String | This parameter is valid only when the audit log policy is enabled. If this parameter is left blank or set to **all**, all audit log policies are enabled by default. | + | | | | | + | | | | Audit scope: | + | | | | | + | | | | Enter the database or collection name. Use commas (,) to separate multiple databases or collections. If the name contains a comma (,), add a dollar sign ($) before the comma to distinguish it from the separators. | + | | | | | + | | | | Enter a maximum of 1024 characters. The value cannot contain spaces or the following special characters ``"[]{}():?`` The dollar sign ($) can be used only in escape mode. | + +-------------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | audit_types | No | Array of strings | This parameter is valid only when the audit log policy is enabled. If this parameter is left blank, all audit log policies are enabled by default. | + | | | | | + | | | | Specifies the audit type. The value is **auth**, **insert**, **delete**, **update**, **query**, or **command**. | + +-------------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Request example + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/5cecca4c20e04146862651b8d385f26ain02/auditlog-policy + + - Enabling or updating the audit log policy + + .. code-block:: text + + { + "keep_days": 7, + "audit_scope": "all", + "audit_types": [ + "insert" + ] + } + + - Disabling the policy for SQL audit logs: + + .. code-block:: text + + { + "keep_days": 0, + "reserve_auditlogs": false + } + +Responses +--------- + +Response example + +.. code-block:: text + + {} + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/querying_database_specifications.rst b/api-ref/source/apis_v3.0_recommended/querying_database_specifications.rst new file mode 100644 index 0000000..e307c3a --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/querying_database_specifications.rst @@ -0,0 +1,415 @@ +:original_name: dds_instance_specification.html + +.. _dds_instance_specification: + +Querying Database Specifications +================================ + +Function +-------- + +This API is used to query all instance specifications under a specified condition. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3.1/{project_id}/flavors?engine_name={engine_name}&engine_version={engine_version}&offset={offset}&limit={limit} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | engine_name | No | Specifies the database type. The value is **DDS-Community**. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | engine_version | No | DB version number. To obtain this value, see :ref:`Querying Database Version Information `. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Index offset. | + | | | | + | | | - If offset is set to *N*, the resource query starts from the *N+1* piece of data. The default value is **0**, indicating that the query starts from the first piece of data. | + | | | - The value must be a positive integer. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Maximum number of specifications that can be queried | + | | | | + | | | - Value range: 1-100 | + | | | - If this parameter is not transferred, the first 100 pieces of specification information can be queried by default. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3.1/0549b4a43100d4f32f51c01c2fe4acdb/flavors?engine_name=DDS-Community&engine_version=3.4&offset=1&limit=20 + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+==================+==================================================================================================================================================+ + | flavors | Array of objects | Indicates the DB instance specifications information list. For more information, see :ref:`Table 3 `. | + +-------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | total_count | Integer | Total number of records | + +-------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_instance_specification__table64140254: + + .. table:: **Table 3** flavors field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+===============================================================================================================================================================================================+ + | engine_name | String | Indicates the engine name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | Indicates the node type. DDS contains the following types of nodes: | + | | | | + | | | - mongos | + | | | - shard | + | | | - config | + | | | - replica | + | | | - single | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vcpus | String | Indicates the number of vCPUs. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ram | String | Indicates the memory size in gigabyte (GB). | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | spec_code | String | Indicates the resource specification code. | + | | | | + | | | Example: dds.mongodb.s2.xlarge.4.shard | + | | | | + | | | .. note:: | + | | | | + | | | - **dds.mongodb**: indicates the DDS service. | + | | | - **s2.xlarge.4**: indicates the performance specification, which is high memory. | + | | | - **shard**: indicates the node type. | + | | | - When querying the specifications, check whether the specifications are of the same series. The specification series includes general-purpose (s6), enhanced (c3), and enhanced II (c6). | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | az_status | Object | Indicates the status of specifications in an AZ. Its value can be any of the following: | + | | | | + | | | - **normal**: indicates that the specifications are on sale. | + | | | - **unsupported**: indicates that the DB instance specifications are not supported. | + | | | - **sellout**: indicates the specifications are sold out. | + | | | | + | | | .. note:: | + | | | | + | | | ReplicaSet flavors supports cross AZ creation in case "eu-de-01,eu-de-02,eu-de-03": "normal". | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | engine_versions | Array of strings | Database versions | + | | | | + | | | For example, DDS mongos node, {"3.4", "4.0"} | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. note:: + + The value of **az_status** is used as an example. + +- Response example + + .. code-block:: text + + { + "total_count":21, + "flavors": [ + { + "engine_name": "DDS-Community", + "type": "mongos", + "vcpus": "1", + "ram": "4", + "spec_code": "dds.mongodb.s2.medium.4.mongos", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "mongos", + "vcpus": "2", + "ram": "8", + "spec_code": "dds.mongodb.s2.large.4.mongos", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "mongos", + "vcpus": "4", + "ram": "16", + "spec_code": "dds.mongodb.s2.xlarge.4.mongos", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "mongos", + "vcpus": "8", + "ram": "32", + "spec_code": "dds.mongodb.s2.2xlarge.4.mongos", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "mongos", + "vcpus": "16", + "ram": "64", + "spec_code": "dds.mongodb.s2.4xlarge.4.mongos", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "shard", + "vcpus": "1", + "ram": "4", + "spec_code": "dds.mongodb.s2.medium.4.shard", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "shard", + "vcpus": "2", + "ram": "8", + "spec_code": "dds.mongodb.s2.large.4.shard", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "shard", + "vcpus": "4", + "ram": "16", + "spec_code": "dds.mongodb.s2.xlarge.4.shard", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "shard", + "vcpus": "8", + "ram": "32", + "spec_code": "dds.mongodb.s2.2xlarge.4.shard", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "shard", + "vcpus": "16", + "ram": "64", + "spec_code": "dds.mongodb.s2.4xlarge.4.shard", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "config", + "vcpus": "2", + "ram": "4", + "spec_code": "dds.mongodb.s2.large.2.config", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "replica", + "vcpus": "1", + "ram": "4", + "spec_code": "dds.mongodb.s2.medium.4.repset", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal", + "eu-de-01,eu-de-02,eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "replica", + "vcpus": "2", + "ram": "8", + "spec_code": "dds.mongodb.s2.large.4.repset", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal", + "eu-de-01,eu-de-02,eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "replica", + "vcpus": "4", + "ram": "16", + "spec_code": "dds.mongodb.s2.xlarge.4.repset", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal", + "eu-de-01,eu-de-02,eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "replica", + "vcpus": "8", + "ram": "32", + "spec_code": "dds.mongodb.s2.2xlarge.4.repset", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal", + "eu-de-01,eu-de-02,eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "replica", + "vcpus": "16", + "ram": "64", + "spec_code": "dds.mongodb.s2.4xlarge.4.repset", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal", + "eu-de-01,eu-de-02,eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "single", + "vcpus": "1", + "ram": "4", + "spec_code": "dds.mongodb.s2.medium.4.single", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "single", + "vcpus": "2", + "ram": "8", + "spec_code": "dds.mongodb.s2.large.4.single", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "single", + "vcpus": "4", + "ram": "16", + "spec_code": "dds.mongodb.s2.xlarge.4.single", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "single", + "vcpus": "8", + "ram": "32", + "spec_code": "dds.mongodb.s2.2xlarge.4.single", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + }, + { + "engine_name": "DDS-Community", + "type": "single", + "vcpus": "16", + "ram": "64", + "spec_code": "dds.mongodb.s2.4xlarge.4.single", + "engine_versions":["3.4","4.0"], + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "normal" + } + } + ] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/api_description/querying_database_version_information.rst b/api-ref/source/apis_v3.0_recommended/querying_database_version_information.rst similarity index 59% rename from api-ref/source/api_description/querying_database_version_information.rst rename to api-ref/source/apis_v3.0_recommended/querying_database_version_information.rst index 2682c56..a610167 100644 --- a/api-ref/source/api_description/querying_database_version_information.rst +++ b/api-ref/source/apis_v3.0_recommended/querying_database_version_information.rst @@ -15,32 +15,26 @@ URI - URI format - GET /v3/{project_id}/datastores/{datastore_name}/versions + GET https://{Endpoint}/v3/{project_id}/datastores/{datastore_name}/versions - Parameter description .. table:: **Table 1** Parameter description - +----------------+-----------+--------------------------------------------------------------------------------------------------+ - | Name | Mandatory | Description | - +================+===========+==================================================================================================+ - | project_id | Yes | Specifies the project ID of a tenant in a region. | - +----------------+-----------+--------------------------------------------------------------------------------------------------+ - | datastore_name | Yes | Specifies the database type. DDS Community Edition is supported. The value is **DDS-Community**. | - +----------------+-----------+--------------------------------------------------------------------------------------------------+ + +----------------+-----------+--------------------------------------------------------------+ + | Name | Mandatory | Description | + +================+===========+==============================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +----------------+-----------+--------------------------------------------------------------+ + | datastore_name | Yes | Specifies the database type. The value is **DDS-Community**. | + +----------------+-----------+--------------------------------------------------------------+ Requests -------- -- Request header +- Example request - .. code-block:: text - - GET https://DDS endpoint/v3/{project_id}/datastores/{datastore_name}/versions - -- Request body - - N/A + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/datastores/DDS-Community/versions Responses --------- @@ -49,11 +43,11 @@ Responses .. table:: **Table 2** Parameter description - +----------+------------------+--------------------------------------------------------------------------------+ - | Name | Type | Description | - +==========+==================+================================================================================+ - | versions | Array of strings | Indicates the database version. Currently, versions 3.2 and 3.4 are supported. | - +----------+------------------+--------------------------------------------------------------------------------+ + +----------+------------------+--------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+==================+======================================================================================+ + | versions | Array of strings | Indicates the database version. Currently, versions 3.2, 3.4, and 4.0 are supported. | + +----------+------------------+--------------------------------------------------------------------------------------+ - Response example @@ -62,12 +56,15 @@ Responses { "versions": [ "3.2", - "3.4" + "3.4", + "4.0" ] } -**Status Code** ---------------- +Status Code +----------- + +Status Code:200. For more information, see :ref:`Status Code `. diff --git a/api-ref/source/api_description/querying_the_api_version/index.rst b/api-ref/source/apis_v3.0_recommended/querying_the_api_version/index.rst similarity index 100% rename from api-ref/source/api_description/querying_the_api_version/index.rst rename to api-ref/source/apis_v3.0_recommended/querying_the_api_version/index.rst diff --git a/api-ref/source/api_description/querying_the_api_version/querying_api_version_information.rst b/api-ref/source/apis_v3.0_recommended/querying_the_api_version/querying_api_version_information.rst similarity index 97% rename from api-ref/source/api_description/querying_the_api_version/querying_api_version_information.rst rename to api-ref/source/apis_v3.0_recommended/querying_the_api_version/querying_api_version_information.rst index 39da8a0..a246c51 100644 --- a/api-ref/source/api_description/querying_the_api_version/querying_api_version_information.rst +++ b/api-ref/source/apis_v3.0_recommended/querying_the_api_version/querying_api_version_information.rst @@ -13,22 +13,20 @@ This API is used to query the specified API version. URI --- -URI format +- URI format -GET /v3 + GET https://{Endpoint}/{version} + +- Parameter description + + N/A Requests -------- -- Request header +- Example request - .. code-block:: text - - GET https://DDS endpoint/v3 - -- Request body - - N/A + GET https://dds.eu-de.otc.t-systems.com/v3 Responses --------- @@ -97,8 +95,10 @@ Responses } } -**Status Code** ---------------- +Status Code +----------- + +Status Code:200. For more information, see :ref:`Status Code `. diff --git a/api-ref/source/api_description/querying_the_api_version/querying_the_api_version_list.rst b/api-ref/source/apis_v3.0_recommended/querying_the_api_version/querying_the_api_version_list.rst similarity index 93% rename from api-ref/source/api_description/querying_the_api_version/querying_the_api_version_list.rst rename to api-ref/source/apis_v3.0_recommended/querying_the_api_version/querying_the_api_version_list.rst index 0b4fbb3..cb652d6 100644 --- a/api-ref/source/api_description/querying_the_api_version/querying_the_api_version_list.rst +++ b/api-ref/source/apis_v3.0_recommended/querying_the_api_version/querying_the_api_version_list.rst @@ -15,7 +15,7 @@ URI - URI format - GET / + GET https://{Endpoint}/ - Parameter description @@ -24,15 +24,7 @@ URI Requests -------- -- Request header - - .. code-block:: text - - GET https://DDS endpoint/ - -- Request body - - N/A +None Responses --------- @@ -63,6 +55,8 @@ Responses | | | If the version is **v3**, the value is **[]**. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ | status | String | Indicates the version status. | + | | | | + | | | The value CURRENT indicates that the version has been released. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ | version | String | Indicates the subversion of the API version. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ @@ -103,8 +97,10 @@ Responses ] } -**Status Code** ---------------- +Status Code +----------- + +Status Code:200. For more information, see :ref:`Status Code `. diff --git a/api-ref/source/apis_v3.0_recommended/querying_the_database_disk_type.rst b/api-ref/source/apis_v3.0_recommended/querying_the_database_disk_type.rst new file mode 100644 index 0000000..b4b0b9a --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/querying_the_database_disk_type.rst @@ -0,0 +1,134 @@ +:original_name: dds_api_0039.html + +.. _dds_api_0039: + +Querying the Database Disk Type +=============================== + +Function +-------- + +This API is used to query the database disk type in the current region. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/storage-type?engine_name={engine_name} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+===================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-----------------------+-----------------------+---------------------------------------------------+ + | engine_name | No | Specifies the database type. | + | | | | + | | | The value is **DDS-Community**. | + +-----------------------+-----------------------+---------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/storage-type?engine_name=DDS-Community + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+===================================================================================================================================+ + | storage_type | Array of objects | Indicates the database disk information list. For more information, see :ref:`Table 3 `. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | dss_pool_info | Array of objects | Indicates the dss_pool specifications information list. For more information, see :ref:`Table 4 `. | + | | | | + | | | .. note:: | + | | | | + | | | Only Dedicated Cloud (DeC) users are supported. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0039__table1029958863: + + .. table:: **Table 3** storage_type field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=========================================================================================+ + | name | String | Indicates the storage type. Its value can be: | + | | | | + | | | **ULTRAHIGH**: indicates the SSD type. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | az_status | Object | Indicates the status of specifications in an AZ. Its value can be any of the following: | + | | | | + | | | - **normal**: indicates that the specifications are on sale. | + | | | - **unsupported**: The disk type is not supported. | + | | | - **sellout**: indicates the specifications are sold out. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + + .. _dds_api_0039__table9305198166: + + .. table:: **Table 4** dss_pool_info field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=======================================================================+ + | az_name | String | Indicates the name of the AZ where the dss_pool is located. | + +-----------------------+-----------------------+-----------------------------------------------------------------------+ + | free_capacity_gb | String | Indicates the available capacity of DSS. | + | | | | + | | | Unit: GB | + +-----------------------+-----------------------+-----------------------------------------------------------------------+ + | dss_pool_volume_type | String | Indicates the disk type of DSS storage pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------+ + | dss_pool_id | String | Indicates the DSS pool ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------+ + | dss_pool_status | String | Indicates the dss_pool status. Its value can be any of the following: | + | | | | + | | | - **available** | + | | | - **deploying** | + | | | - **enlarging** | + +-----------------------+-----------------------+-----------------------------------------------------------------------+ + + .. note:: + + The value of **az_status** is used as an example. + +- Response example + + .. code-block:: text + + { + "storage_type": [ + { + "name": "ULTRAHIGH", + "az_status": { + "eu-de-01": "normal", + "eu-de-02": "normal", + "eu-de-03": "unsupported" + } + } + ], + "dsspool_info": [] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/tag_management/adding_or_deleting_resource_tags_in_batches.rst b/api-ref/source/apis_v3.0_recommended/tag_management/adding_or_deleting_resource_tags_in_batches.rst new file mode 100644 index 0000000..0626833 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/tag_management/adding_or_deleting_resource_tags_in_batches.rst @@ -0,0 +1,143 @@ +:original_name: dds_api_0033.html + +.. _dds_api_0033: + +Adding or Deleting Resource Tags in Batches +=========================================== + +Function +-------- + +This API is used to add or delete tags of the specified instance in batches. + +Constraints +----------- + +- A maximum of 20 tags can be added to a DB instance. The tag key must be unique. + + - If the request body contains duplicated keys, an error message will be reported when the API is called. + - If the key in the request body is the same as an existing key in the specified instance, the value of the **value** parameter that corresponds to the existing key is overwritten. + +- If tags to be deleted do not exist, the operation is considered to be successful by default. The character set of the tags will not be checked. The tag structure in the request body cannot be missing, and the key cannot be left blank or an empty string. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/tags/action + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+=======================================================================================================+ + | action | Yes | String | Specifies the operation identifier. Valid value: | + | | | | | + | | | | - **create**: indicates to add tags. | + | | | | - **delete**: indicates to delete tags. | + +-----------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------+ + | tags | Yes | Array of objects | Specifies the tag list. For more information, see :ref:`Table 3 `. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | When you delete tags, do not check the character set of this parameter. | + +-----------------+-----------------+------------------+-------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0033__table19347161295418: + + .. table:: **Table 3** tags field data structure description + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+===========================================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. It contains a maximum of 36 Unicode characters. It cannot be null or an empty string or contain spaces. Before verifying and using **key**, spaces are automatically filtered out. | + | | | | | + | | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | No | String | Specifies the tag value. It contains a maximum of 43 Unicode characters, can be an empty string, and cannot contain spaces. Before verifying or using **value**, spaces are automatically filtered out. | + | | | | | + | | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + | | | | | + | | | | - If **action** is set to **create**, this parameter is mandatory. | + | | | | - If **action** is set to **delete**, this parameter is optional. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | If **value** is specified, tags are deleted by key and value. If **value** is not specified, tags are deleted by key. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/cc6345c64cec47499182467ea0dd432ain02/tags/action + + Add tags. + + .. code-block:: text + + { + "action": "create", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key", + "value": "value3" + } + ] + } + + Delete tags. + + .. code-block:: text + + { + "action": "delete", + "tags": [ + { + "key": "key1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Responses +--------- + +.. code-block:: text + + {} + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/tag_management/index.rst b/api-ref/source/apis_v3.0_recommended/tag_management/index.rst new file mode 100644 index 0000000..3cefd9b --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/tag_management/index.rst @@ -0,0 +1,20 @@ +:original_name: dds_tag_mgmt.html + +.. _dds_tag_mgmt: + +Tag Management +============== + +- :ref:`Querying Resources by Tag ` +- :ref:`Adding or Deleting Resource Tags in Batches ` +- :ref:`Querying Resource Tags ` +- :ref:`Querying Tags in a Specified Project ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_resources_by_tag + adding_or_deleting_resource_tags_in_batches + querying_resource_tags + querying_tags_in_a_specified_project diff --git a/api-ref/source/apis_v3.0_recommended/tag_management/querying_resource_tags.rst b/api-ref/source/apis_v3.0_recommended/tag_management/querying_resource_tags.rst new file mode 100644 index 0000000..173f434 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/tag_management/querying_resource_tags.rst @@ -0,0 +1,100 @@ +:original_name: dds_api_0034.html + +.. _dds_api_0034: + +Querying Resource Tags +====================== + +Function +-------- + +This API is used to query tags of a specified resource. + +Constraints +----------- + +A maximum of 20 tags can be added to a DB instance. The tag key must be unique. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/tags + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=============+===========+=================================================================================================================================================================================+ + | project_id | Yes | Specifies the project ID of a tenant in a region. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_id | Yes | Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +-------------+-----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/cc6345c64cec47499182467ea0dd432ain02/tags + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +------+-----------+------------------+-----------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+==================+=====================================================================================================+ + | tags | Yes | Array of objects | Indicates the tag list. For more information, see :ref:`Table 3 `. | + +------+-----------+------------------+-----------------------------------------------------------------------------------------------------+ + + .. _dds_api_0034__table066514318552: + + .. table:: **Table 3** tags field data structure description + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=================================================================================================================+ + | key | Yes | String | Indicates the tag key. The value contains 36 Unicode characters and cannot be blank. | + | | | | | + | | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | Indicates the tag value. The value contains a maximum of 43 Unicode characters and can also be an empty string. | + | | | | | + | | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value2" + } + ] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/tag_management/querying_resources_by_tag.rst b/api-ref/source/apis_v3.0_recommended/tag_management/querying_resources_by_tag.rst new file mode 100644 index 0000000..51ac03c --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/tag_management/querying_resources_by_tag.rst @@ -0,0 +1,249 @@ +:original_name: dds_api_0032.html + +.. _dds_api_0032: + +Querying Resources by Tag +========================= + +Function +-------- + +This API is used to query the specified DB instances by tag. + +Constraints +----------- + +A maximum of 20 tags can be added to a DB instance. The tag key must be unique. + +URI +--- + +- URI format + + POST https://{Endpoint}/v3/{project_id}/instances/action + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + ========== ========= ================================================= + +Requests +-------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+==========================================================================================================================================================================+ + | offset | No | String | Specifies the index position. The query starts from the next piece of data indexed by this parameter. | + | | | | | + | | | | - If **action** is set to **count**, this parameter is not transferred. | + | | | | - If **action** is set to **filter**, this parameter must be a positive integer. The default value is 0, indicating that the query starts from the first piece of data. | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | String | Specifies the number of resources to be queried. | + | | | | | + | | | | - If **action** is set to **count**, this parameter is not transferred. | + | | | | - If **action** is set to **filter**, the value range is from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default. | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | Yes | String | Specifies the operation identifier. | + | | | | | + | | | | - If **action** is set to **filter**, instances are queried by tag filtering criteria. | + | | | | - If **action** is set to **count**, only the total number of records is returned. | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | No | Array of objects | Specifies the search field. | + | | | | | + | | | | - If the value is left blank, the query is not based on the instance name or instance ID. | + | | | | - If the value is not empty, see :ref:`Table 4 `. | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | Array of objects | Specifies the included tags. Each tag contains a maximum of 20 keys. For more information, see :ref:`Table 3 `. | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0032__teb132a9896b14904b643d3159d0c06eb: + + .. table:: **Table 3** tags field data structure description + + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+============================================================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. It contains a maximum of 36 Unicode characters. **key** cannot be empty, an empty string, or spaces. Before using **key**, delete spaces of single-byte character (SBC) before and after the value. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The character set of this parameter is not verified in the search process. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | Lists the tag values. Each value contains a maximum of 43 Unicode characters and cannot contain spaces. Before using **values**, delete SBC spaces before and after the value. | + | | | | | + | | | | If the values are null, it indicates querying any value. The values are in OR relationship. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0032__table86147511997: + + .. table:: **Table 4** matches field description + + +-------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======+===========+========+=====================================================================================================================================================================================================================================+ + | key | Yes | String | Specifies the query criteria. The value can be **instance_name** or **instance_id**, indicating that the query is based on the instance name or instance ID. | + +-------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | Specifies the name or ID of the DB instance to be matched. You can call the API for querying DB instances to obtain the DB instance name or ID. If you do not have an instance, you can call the API used for creating an instance. | + +-------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/action + + Query specified DB instances by tag. + + .. code-block:: text + + { + "offset": "100", + "limit": "100", + "action": "filter", + "matches": [ + { + "key": "instance_name", + "value": "test-single" + } + ], + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + } + ] + } + + Query the total number of resources. + + .. code-block:: text + + { + "action": "count", + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ], + "matches": [ + { + "key": "instance_name", + "value": "test-single" + }, + { + "key": "instance_id", + "value": "958693039f284d6ebfb177375711072ein02" + } + ] + } + +Responses +--------- + +- Parameter description + + .. table:: **Table 5** Parameter description + + +-------------+------------------+----------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+==================+====================================================================================================+ + | instances | Array of objects | Indicates the instance list. For details, see :ref:`Table 6 `. | + +-------------+------------------+----------------------------------------------------------------------------------------------------+ + | total_count | Integer | Indicates the total number of queried records. | + +-------------+------------------+----------------------------------------------------------------------------------------------------+ + + .. _dds_api_0032__table172571623182113: + + .. table:: **Table 6** instance field data structure description + + +---------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===============+==================+=================================================================================================================================================================================+ + | instance_id | String | Indicates the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance. | + +---------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance_name | String | Indicates the DB instance name. | + +---------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of objects | Indicates the tag list. If there is no tag in the list, **tags** is taken as an empty array. For more information, see :ref:`Table 7 `. | + +---------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0032__table42343062217: + + .. table:: **Table 7** tags field data structure description + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=================================================================================================================+ + | key | String | Indicates the tag key. The value contains 36 Unicode characters and cannot be blank. | + | | | | + | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ + | value | String | Indicates the tag value. The value contains a maximum of 43 Unicode characters and can also be an empty string. | + | | | | + | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------+ + +- Response example + + 1. Return specified DB instances by tag. + + .. code-block:: text + + { + "instances": [ + { + "instance_id": "2acbf2223caf3bac3c33c6153423c3ccin02", + "instance_name": "test-single", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value1" + } + ] + } + ] + } + + 2. Number of returned records. + + .. code-block:: text + + { + "total_count": 4 + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/tag_management/querying_tags_in_a_specified_project.rst b/api-ref/source/apis_v3.0_recommended/tag_management/querying_tags_in_a_specified_project.rst new file mode 100644 index 0000000..55112db --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/tag_management/querying_tags_in_a_specified_project.rst @@ -0,0 +1,99 @@ +:original_name: dds_api_0035.html + +.. _dds_api_0035: + +Querying Tags in a Specified Project +==================================== + +Function +-------- + +This API is used to query all tags of instances in a specified project. + +URI +--- + +- URI format + + GET https://{Endpoint}/v3/{project_id}/tags + +- Parameter description + + .. table:: **Table 1** Parameter description + + ========== ========= ================================================= + Name Mandatory Description + ========== ========= ================================================= + project_id Yes Specifies the project ID of a tenant in a region. + ========== ========= ================================================= + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/tags + +Responses +--------- + +- Parameter description + + .. table:: **Table 2** Parameter description + + +------+-----------+------------------+------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+==================+======================================================================================================+ + | tags | Yes | Array of objects | Indicates the tag list. For more information, see :ref:`Table 3 `. | + +------+-----------+------------------+------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0035__table1429181375610: + + .. table:: **Table 3** tags field data structure description + + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+==============================================================================================================+ + | key | Yes | String | Indicates the tag key. The value contains 36 Unicode characters and cannot be blank. | + | | | | | + | | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | Lists the tag values. The value contains a maximum of 43 Unicode characters and can also be an empty string. | + | | | | | + | | | | Character set: 0-9, A-Z, a-z, "_", "-", and "@". | + +-----------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------+ + +- Response example + + .. code-block:: text + + { + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ] + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/apis_v3.0_recommended/task_management/index.rst b/api-ref/source/apis_v3.0_recommended/task_management/index.rst new file mode 100644 index 0000000..4fbe512 --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/task_management/index.rst @@ -0,0 +1,14 @@ +:original_name: dds_api_0117.html + +.. _dds_api_0117: + +Task Management +=============== + +- :ref:`Obtaining Information About a Task with a Specified ID ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + obtaining_information_about_a_task_with_a_specified_id diff --git a/api-ref/source/apis_v3.0_recommended/task_management/obtaining_information_about_a_task_with_a_specified_id.rst b/api-ref/source/apis_v3.0_recommended/task_management/obtaining_information_about_a_task_with_a_specified_id.rst new file mode 100644 index 0000000..18c1ebb --- /dev/null +++ b/api-ref/source/apis_v3.0_recommended/task_management/obtaining_information_about_a_task_with_a_specified_id.rst @@ -0,0 +1,188 @@ +:original_name: dds_api_0118.html + +.. _dds_api_0118: + +Obtaining Information About a Task with a Specified ID +====================================================== + +Function +-------- + +This API is used to obtain information about a task with a specified ID in the task center. + +Constraints +----------- + +- Currently, only asynchronous tasks in the task center of DDS Community Edition within one month can be queried. +- After a job is generated, it takes several seconds to query the job ID. +- The following asynchronous tasks can be queried: creating an instance (single node, replica set, or cluster), scaling up storage, changing instance class, scaling up a node, restarting a node, performing a primary/standby switchover, changing a private IP address, changing a security group, changing a database port, binding or unbinding an EIP, switching the SSL mode, and changing an AZ, enabling the shard/config IP address, creating a physical backup/snapshot backup, restoration to a new instance using a backup, point-in-time recovery, and database/table-level restoration to a specified time point. + +URI +--- + +- URI format + + GET /v3/{project_id}/jobs?id={id} + +- Parameter description + + .. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+====================================================================================================+ + | project_id | Yes | Project ID of a tenant in a region. | + | | | | + | | | For details about how to obtain the project ID, see :ref:`Obtaining a Project ID `. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------+ + | id | Yes | Task ID | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------+ + +Requests +-------- + +- Example request + + GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/jobs?id=a9767ede-fe0f-4888-9003-e843a4c90514 + +Responses +--------- + +- Normal response + + .. table:: **Table 2** Parameter description + + +------+--------+----------------------------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+========================================================================================+ + | job | Object | Task information. For details, see :ref:`Table 3 `. | + +------+--------+----------------------------------------------------------------------------------------+ + + .. _dds_api_0118__table54571314103317: + + .. table:: **Table 3** job field data structure description + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+================================================================================================================================================================================+ + | id | String | Task ID | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Task name | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Task execution status | + | | | | + | | | Valid value: | + | | | | + | | | - **Running**: The task is being executed. | + | | | - **Completed**: The task is successfully executed. | + | | | - **Failed**: The task fails to be executed. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created | String | Creation time in the "yyyy-mm-ddThh:mm:ssZ" format. | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ended | String | End time in the "yyyy-mm-ddThh:mm:ssZ" format. | + | | | | + | | | **T** is the separator between the calendar and the hourly notation of time. **Z** indicates the time zone offset. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | progress | String | Task execution progress | + | | | | + | | | .. note:: | + | | | | + | | | The execution progress (such as **"60%"**, indicating the task execution progress is 60%) is displayed only when the task is being executed. Otherwise, **""** is returned. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instance | Object | Instance on which the task is executed. | + | | | | + | | | For details, see :ref:`Table 4 `. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fail_reason | String | Task failure information. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _dds_api_0118__table4062895917262: + + .. table:: **Table 4** instance field data structure description + + ==== ====== ================ + Name Type Description + ==== ====== ================ + id String Instance ID + name String DB instance name + ==== ====== ================ + + .. note:: + + In the response example, some tasks in the task center are used as examples. + +- Example normal response + + A task is successfully executed. + + .. code-block:: text + + { + "job": { + "id": "f85104b5-4a9c-4e0f-9505-fc5409d8f7ae", + "name": "Create_MongoDB", + "status": "Completed", + "created": "2021-07-12T09:22:04+0000", + "ended": "2021-07-12T10:10:13+0000", + "progress": "", + "instance": { + "id": "d87f5b33049144ec95f0cab0a5f22cfbin02", + "name": "dds-5ff4-sh" + }, + "fail_reason": null + } + } + + A task is being executed: + + .. code-block:: text + + { + "job": { + "id": "9d10bfd1-affb-49c3-b977-298950a8d6fa", + "name": "Create_MongoDB", + "status": "Running", + "created": "2021-07-13T07:28:43+0000", + "ended": "2021-07-13T07:28:53+0000", + "progress": "9%", + "instance": { + "id": "cf538a2dd8ec4b26860b27060902712fin02", + "name": "dds-3a98-wcc" + }, + "fail_reason": null + } + } + + A task fails to be executed: + + .. code-block:: text + + { + "job": { + "id": "a03b1b8a-b756-467c-8a49-38720c3d23ec", + "name": "Restore_MongoDB_Replica", + "status": "Failed", + "created": "2021-07-13T04:55:58+0000", + "ended": "2021-07-13T05:20:04+0000", + "progress": "", + "instance": { + "id": "7beb15d5db9c4742b7c817789244844ein02", + "name": "lenn-v3-restore-4" + }, + "fail_reason": "Failed to upgrade the DB Agent." + } + } + +Status Code +----------- + +Status Code:200. + +For more information, see :ref:`Status Code `. + +Error Code +---------- + +For more information, see :ref:`Error Code `. diff --git a/api-ref/source/appendix/abnormal_request_results.rst b/api-ref/source/appendix/abnormal_request_results.rst new file mode 100644 index 0000000..d569ca2 --- /dev/null +++ b/api-ref/source/appendix/abnormal_request_results.rst @@ -0,0 +1,27 @@ +:original_name: dds_api_0060.html + +.. _dds_api_0060: + +Abnormal Request Results +======================== + +- Abnormal responses + + .. table:: **Table 1** Parameter description + + +------------+--------+------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========+==========================================================================================+ + | error_code | String | Specifies the error returned when a task submission exception occurs. | + +------------+--------+------------------------------------------------------------------------------------------+ + | error_msg | String | Specifies the description of the error returned when a task submission exception occurs. | + +------------+--------+------------------------------------------------------------------------------------------+ + +- Example abnormal response + + .. code-block:: text + + { + "error_code": "DBS.200001", + "error_msg": "Parameter error" + } diff --git a/api-ref/source/appendix/dds_metrics.rst b/api-ref/source/appendix/dds_metrics.rst index a062b00..143cb29 100644 --- a/api-ref/source/appendix/dds_metrics.rst +++ b/api-ref/source/appendix/dds_metrics.rst @@ -18,391 +18,443 @@ SYS.DDS Monitoring Metrics ------------------ -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| Metrics | Metrics Name | Description | Value Range | Remarks | -+=================================+============================================+==============================================================================================================================+==============+========================================+ -| mongo001_command_ps | COMMAND Statements per Second | Number of COMMAND statements executed per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - DDS DB instance | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo002_delete_ps | DELETE Statements per Second | Number of DELETE statements executed per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - DDS DB instance | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo003_insert_ps | INSERT Statements per Second | Number of INSERT statements executed per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - DDS DB instance | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo004_query_ps | QUERY Statements per Second | Number of QUERY statements executed per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - DDS DB instance | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo005_update_ps | UPDATE Statements per Second | Number of UPDATE statements executed per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - DDS DB instance | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo006_getmore_ps | GETMORE Statements per Second | Number of GETMORE statements executed per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - DDS DB instance | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num1 | Chunks of Shard 1 | Number of chunks in shard 1 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num2 | Chunks of Shard 2 | Number of chunks in shard 2 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num3 | Chunks of Shard 3 | Number of chunks in shard 3 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num4 | Chunks of Shard 4 | Number of chunks in shard 4 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num5 | Chunks of Shard 5 | Number of chunks in shard 5 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num6 | Chunks of Shard 6 | Number of chunks in shard 6 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num7 | Chunks of Shard 7 | Number of chunks in shard 7 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num8 | Chunks of Shard 8 | Number of chunks in shard 8 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num9 | Chunks of Shard 9 | Number of chunks in shard 9 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num10 | Chunks of Shard 10 | Number of chunks in shard 10 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num11 | Chunks of Shard 11 | Number of chunks in shard 11 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_chunk_num12 | Chunks of Shard 12 | Number of chunks in shard 12 | 0-64 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo008_connections | Active Instance Connections | Total number of connections attempting to connect to a DDS DB instance | 0-200 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo009_migFail_num | Chunk Migration Failures in Last 24 hrs | Number of chunk migration failures in the last 24 hours | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: DDS DB instance | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo007_connections | Active Node Connections | Total number of connections attempting to connect to a DDS DB instance node | 0-200 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo008_mem_resident | Resident Memory | Size of resident memory in MB | >= 0 MB | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo009_mem_virtual | Virtual Memory | Size of virtual memory in MB | >= 0 MB | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo010_regular_asserts_ps | Regular Asserts per Second | Number of regular asserts per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo011_warning_asserts_ps | Warning Asserts per Second | Number of warning asserts per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo012_msg_asserts_ps | Message Asserts per Second | Number of message asserts per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo013_user_asserts_ps | User Asserts per Second | Number of user asserts per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo014_queues_total | Operations Queued Waiting for a Lock | Number of operations queued waiting for a lock | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo015_queues_readers | Operations Queued Waiting for a Read Lock | Number of operations queued waiting for a read lock | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo016_queues_writers | Operations Queued Waiting for a Write Lock | Number of operations queued waiting for a write lock | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo017_page_faults | Page Faults | Number of page faults on the monitored nodes | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo018_porfling_num | Slow Queries | Number of slow queries on the monitored nodes | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo019_cursors_open | Current Maintained Cursors | Number of maintained cursors on the monitored nodes | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo020_cursors_timeOut | Timeout Cursors | Number of timed out cursors on the monitored nodes | >= 0 Counts | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo021_wt_cahe_usage | Bytes in WiredTiger Cache | Size of data in the WiredTiger cache in MB | >= 0 MB | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo022_wt_cahe_dirty | Tracked Dirty Bytes in WiredTiger Cache | Size of tracked dirty data in the WiredTiger cache in MB | >= 0 MB | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo023_wInto_wtCache | Bytes Written Into Cache per Second | Bytes written into WiredTiger cache per second | >= 0 bytes/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo024_wFrom_wtCache | Bytes Written From Cache per Second | Bytes written from the WiredTiger cache to the disk per second | >= 0 bytes/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo025_repl_oplog_win | Oplog Window | Available time in hour in the monitored primary node's oplog | >= 0 Hours | Monitored object: database | -| | | | | | -| | | | | Monitored object type: primary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo026_oplog_size_ph | Oplog Growth Rate | Speed in MB/hour at which oplogs are generated on the monitored primary node | >= 0 MB/Hour | Monitored object: database | -| | | | | | -| | | | | Monitored object type: primary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo025_repl_headroom | Replication Headroom | Time difference in seconds between the primary's oplog window and the replication lag of the secondary | >= 0 Seconds | Monitored object: database | -| | | | | | -| | | | | Monitored object type: secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo026_repl_lag | Replication Lag | A delay in seconds between an operation on the primary and the application of that operation from the oplog to the secondary | >= 0 Seconds | Monitored object: database | -| | | | | | -| | | | | Monitored object type: secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo027_repl_command_ps | Replicated COMMAND Statements per Second | Number of replicated COMMAND statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo028_repl_update_ps | Replicated UPDATE Statements per Second | Number of replicated UPDATE statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo029_repl_delete_ps | Replicated DELETE Statements per Second | Number of replicated DELETE statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo030_repl_insert_ps | Replicated INSERT Statements per Second | Number of replicated INSERT statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | -| | | | | | -| | | | | Monitored object type: secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo031_cpu_usage | CPU Usage | CPU usage of the monitored object | 0-1 | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo032_mem_usage | Memory Usage | Memory usage of the monitored object | 0-1 | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo033_bytes_out | Network Output Throughput | Outgoing traffic in bytes per second | >= 0 bytes/s | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo034_bytes_in | Network Input Throughput | Incoming traffic in bytes per second | >= 0 bytes/s | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - mongos node | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo035_disk_usage | Disk Utilization | Disk usage of the monitored object | 0-1 | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo036_iops | IOPS | Average number of I/O requests processed by the system in a specified period | >= 0 Count/s | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo037_read_throughput | Disk Read Throughput | Number of bytes read from the disk per second | >= 0 bytes/s | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo038_write_throughput | Disk Write Throughput | Number of bytes written into the disk per second | >= 0 bytes/s | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo039_avg_disk_sec_per_read | Disk Read Time | Average time required for each disk read in a specified period | >= 0 Seconds | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo040_avg_disk_sec_per_write | Disk Write Time | Average time required for each disk write in a specified period | >= 0 Seconds | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo042_disk_total_size | Total Storage Space | Total storage space of the monitored object | 0-1000 GB | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ -| mongo043_disk_used_size | Used Storage Space | Used storage space of the monitored object | 0-1000 GB | Monitored object: ECS | -| | | | | | -| | | | | Monitored object type: | -| | | | | | -| | | | | - Primary node | -| | | | | - Secondary node | -+---------------------------------+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------+----------------------------------------+ ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| Metrics | Metrics Name | Description | Value Range | Remarks | ++=================================+==================================================+==============================================================================================================================+====================+=========================================+ +| mongo001_command_ps | COMMAND Statements per Second | Number of COMMAND statements executed per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Cluster instance | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo002_delete_ps | DELETE Statements per Second | Number of DELETE statements executed per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Cluster instance | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo003_insert_ps | INSERT Statements per Second | Number of INSERT statements executed per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Cluster instance | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo004_query_ps | QUERY Statements per Second | Number of QUERY statements executed per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Cluster instance | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo005_update_ps | UPDATE Statements per Second | Number of UPDATE statements executed per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Cluster instance | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo006_getmore_ps | GETMORE Statements per Second | Number of GETMORE statements executed per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Cluster instance | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num1 | Chunks of Shard 1 | Number of chunks in shard 1 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num2 | Chunks of Shard 2 | Number of chunks in shard 2 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num3 | Chunks of Shard 3 | Number of chunks in shard 3 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num4 | Chunks of Shard 4 | Number of chunks in shard 4 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num5 | Chunks of Shard 5 | Number of chunks in shard 5 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num6 | Chunks of Shard 6 | Number of chunks in shard 6 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num7 | Chunks of Shard 7 | Number of chunks in shard 7 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num8 | Chunks of Shard 8 | Number of chunks in shard 8 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num9 | Chunks of Shard 9 | Number of chunks in shard 9 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num10 | Chunks of Shard 10 | Number of chunks in shard 10 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num11 | Chunks of Shard 11 | Number of chunks in shard 11 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_chunk_num12 | Chunks of Shard 12 | Number of chunks in shard 12 | 0-64 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo008_connections | Active Instance Connections | Total number of connections attempting to connect to a DDS DB instance | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo009_migFail_num | Chunk Migration Failures in Last 24 hrs | Number of chunk migration failures in the last 24 hours | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: cluster instance | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo007_connections | Active Node Connections | Total number of connections attempting to connect to a DDS DB instance node | 0-200 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo008_mem_resident | Resident Memory | Size of resident memory in MB | >= 0 MB | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo009_mem_virtual | Virtual Memory | Size of virtual memory in MB | >= 0 MB | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo010_regular_asserts_ps | Regular Asserts per Second | Number of regular asserts per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo011_warning_asserts_ps | Warning Asserts per Second | Number of warning asserts per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo012_msg_asserts_ps | Message Asserts per Second | Number of message asserts per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo013_user_asserts_ps | User Asserts per Second | Number of user asserts per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo014_queues_total | Operations Queued Waiting for a Lock | Number of operations queued waiting for a lock | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo015_queues_readers | Operations Queued Waiting for a Read Lock | Number of operations queued waiting for a read lock | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo016_queues_writers | Operations Queued Waiting for a Write Lock | Number of operations queued waiting for a write lock | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo017_page_faults | Page Faults | Number of page faults on the monitored nodes | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo018_porfling_num | Slow Queries | Number of slow queries on the monitored nodes | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo019_cursors_open | Current Maintained Cursors | Number of maintained cursors on the monitored nodes | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo020_cursors_timeOut | Timeout Cursors | Number of timed out cursors on the monitored nodes | >= 0 Counts | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo021_wt_cahe_usage | Bytes in WiredTiger Cache | Size of data in the WiredTiger cache in MB | >= 0 MB | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo022_wt_cahe_dirty | Tracked Dirty Bytes in WiredTiger Cache | Size of tracked dirty data in the WiredTiger cache in MB | >= 0 MB | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo023_wInto_wtCache | Bytes Written Into Cache per Second | Bytes written into WiredTiger cache per second | >= 0 bytes/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo024_wFrom_wtCache | Bytes Written From Cache per Second | Bytes written from the WiredTiger cache to the disk per second | >= 0 bytes/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo025_repl_oplog_win | Oplog Window | Available time in hour in the monitored primary node's oplog | >= 0 Hours | Monitored object: database | +| | | | | | +| | | | | Monitored object type: primary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo026_oplog_size_ph | Oplog Growth Rate | Speed in MB/hour at which oplogs are generated on the monitored primary node | >= 0 MB/Hour | Monitored object: database | +| | | | | | +| | | | | Monitored object type: primary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo025_repl_headroom | Replication Headroom | Time difference in seconds between the primary's oplog window and the replication lag of the secondary | >= 0 Seconds | Monitored object: database | +| | | | | | +| | | | | Monitored object type: secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo026_repl_lag | Replication Lag | A delay in seconds between an operation on the primary and the application of that operation from the oplog to the secondary | >= 0 Seconds | Monitored object: database | +| | | | | | +| | | | | Monitored object type: secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo027_repl_command_ps | Replicated COMMAND Statements per Second | Number of replicated COMMAND statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo028_repl_update_ps | Replicated UPDATE Statements per Second | Number of replicated UPDATE statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo029_repl_delete_ps | Replicated DELETE Statements per Second | Number of replicated DELETE statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo030_repl_insert_ps | Replicated INSERT Statements per Second | Number of replicated INSERT statements executed on the secondary node per second | >= 0 Count/s | Monitored object: database | +| | | | | | +| | | | | Monitored object type: secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo031_cpu_usage | CPU Usage | CPU usage of the monitored object | 0-1 | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo032_mem_usage | Memory Usage | Memory usage of the monitored object | 0-1 | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo033_bytes_out | Network Output Throughput | Outgoing traffic in bytes per second | >= 0 bytes/s | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo034_bytes_in | Network Input Throughput | Incoming traffic in bytes per second | >= 0 bytes/s | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - mongos node | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo035_disk_usage | Disk Utilization | Disk usage of the monitored object | 0-1 | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo036_iops | IOPS | Average number of I/O requests processed by the system in a specified period | >= 0 Count/s | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo037_read_throughput | Disk Read Throughput | Number of bytes read from the disk per second | >= 0 bytes/s | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo038_write_throughput | Disk Write Throughput | Number of bytes written into the disk per second | >= 0 bytes/s | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo039_avg_disk_sec_per_read | Disk Read Time | Average time required for each disk read in a specified period | >= 0 Seconds | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo040_avg_disk_sec_per_write | Disk Write Time | Average time required for each disk write in a specified period | >= 0 Seconds | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo042_disk_total_size | Total Storage Space | Total storage space of the monitored object | 0-1000 GB | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo043_disk_used_size | Used Storage Space | Used storage space of the monitored object | 0-1000 GB | Monitored object: ECS | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo044_swap_usage | SWAP Usage | Swap usage, in percentage | 0~100% | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo050_top_total_time | Total Time Spent on Collections | Mongotop-total time: total time spent on collection operations, in milliseconds. | 0.001~600000.00 ms | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo051_top_read_time | Total Time Spent Reading Collections | Mongotop-read time: total time spent reading collections, in milliseconds. | 0.001~600000.00 ms | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo052_top_write_time | Total Time Spent Writing Collections | Mongotop-write time: total time spent writing collections, in milliseconds. | 0.001~600000.00 ms | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo053_wt_flushes_status | Number of Times that Checkpoints Are Triggered | Number of times that WiredTiger checkpoints are triggered during a polling interval | 0~10000000 Times | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo054_wt_cache_used_percent | Percentage of the Cache Used by WiredTiger | Cache size used by WiredTiger, in percentage | 0~100% | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ +| mongo055_wt_cache_dirty_percent | Percentage of Dirty Data in the WiredTiger Cache | Dirty size in the WiredTiger cache, in percentage | 0~100% | Monitored object: database | +| | | | | | +| | | | | Monitored object type: | +| | | | | | +| | | | | - Primary node | +| | | | | - Secondary node | ++---------------------------------+--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+--------------------+-----------------------------------------+ -Dimension ---------- +Dimensions +---------- +-----------------------------------+----------------------------------------------------------------------------------------------------------------------+ | Key | Value | +===================================+======================================================================================================================+ | mongodb_cluster_id | DDS DB instance ID | | | | -| | Supports cluster and replica set instances. | +| | Supported the cluster, replica set, and single node instance types. | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------+ | mongos_instance_id | mongos node ID | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------+ | mongod_primary_instance_id | Primary node ID | | | | -| | Includes the config and shard primary nodes of cluster instances and the primary nodes of replica set instances. | +| | Includes the primary config and shard nodes of cluster instances and the primary nodes of replica set instances. | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------+ | mongod_secondary_instance_id | Secondary node ID | | | | -| | Includes the config and shard secondary nodes of cluster instances and the secondary nodes of replica set instances. | +| | Includes the secondary config and shard nodes of cluster instances and the secondary nodes of replica set instances. | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +.. note:: + + **mongodb_cluster_id** is used to specify dimension fields when the Cloud Eye API is invoked. Replica sets and single node instance types do not have instance-level metrics. diff --git a/api-ref/source/appendix/error_code.rst b/api-ref/source/appendix/error_code.rst index ca62166..7361def 100644 --- a/api-ref/source/appendix/error_code.rst +++ b/api-ref/source/appendix/error_code.rst @@ -36,238 +36,368 @@ Error Code Description .. table:: **Table 2** Error code description - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | HTTP Status Code | Error Code | Error Information | Handling Measure | - +==================+=================+==========================================================================================================================+=============================================================================================================================================================+ - | 400 | DBS.200001 | Parameter error. | Check whether the transferred parameters or URLs are correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 404 | DBS.200002 | The DB instance does not exist. | Check whether the DB instance and its ID are correct and whether the DB instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200010 | Authentication failed | Check whether the tenant and instance match. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.200011 | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 404 | DBS.200013 | The node does not exist | Check whether the node ID or group ID is correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.200018 | This DB instance is not available. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.200019 | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200024 | The region is unavailable. | Check whether the region name is correct and whether the region is available. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200022 | The DB instance name already exists. | Check whether the DB instance name exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200025 | Invalid AZ. | Check whether the AZ name is correct and whether the AZ is available. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.200028 | The maximum storage space has been reached. | Check whether the storage space exceeds the upper limit. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 404 | DBS.200042 | Invalid DB engine. | Check whether the DB engine is supported by DDS. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200029 | Invalid username and password. | Check whether the username and password match and whether the password meets the password strength requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200047 | Operation cannot be executed in current state of the DB instance or node. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200048 | Invalid VPC. | Check whether the VPC ID and name are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200049 | Invalid subnet. | Check whether the subnet ID and name are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200050 | Invalid security group. | Check whether the security group ID and name are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200052 | Invalid password. | Check whether the username and password match and whether the password meets the password strength requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200053 | The DB instance specifications do not exist. | Check whether the specifications are correct and supported in the current AZ. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200054 | Invalid DB instance specifications. | Check whether the specifications are correct and supported in the current AZ. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200057 | Invalid parameter group. | Check whether the parameter group is correct, whether the parameter group exists, and whether the parameter group matches the instance type. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200075 | Invalid node role. | Check whether the role of the node meets the requirements and whether the instance is normal. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.200076 | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200095 | Parameter error. | Check whether the parameters in the request and URLs are correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200302 | The storage space must be a multiple of 10. | Check whether the storage space is a multiple of 10. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200303 | The maximum number of times that the storage space can be scaled up has been reached. | The maximum number of times that the storage space can be scaled up has been reached. To continue to scale up the storage space, contact technical support. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200304 | The storage space can be scaled up a maximum of four times. | Check whether the instance has been scaled up for multiple times. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200306 | Invalid storage space. | Check whether the storage space is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200311 | Scaling up the storage space is not allowed in current state of the node. | Check whether the node type, instance type, and node ID are correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200434 | Failed to restart the DB instance. | Check whether the DB instance status is normal and whether other operations are being performed on the DB instance. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200470 | Invalid AZ. | Check whether the AZ is correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200501 | The subnet does not exist. | Check whether the subnet ID and name exist and match the VPC. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200502 | The security group does not exist. | Check whether the security group ID and name exist and match the VPC. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200503 | The VPC does not exist. | Check whether the tenant has the VPC. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200506 | The encryption key does not exist. | Check whether the disk encryption key ID exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200507 | The encryption key is not available. | Check whether the disk encryption key is available. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.201000 | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201006 | Parameter error. | Check whether the transferred parameters or URLs are correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.201014 | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.201015 | This operation cannot be performed because another operation is being performed. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201020 | Invalid DB engine. | Check whether the DB engine is supported by DDS. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.201028 | The DB instance does not exist. | Check whether the DB instance belongs to the tenant and whether the DB instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201201 | The backup already exists. | Check whether the backup name or ID already exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201202 | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201204 | The backup file does not exist. | Check whether the backup file exists and matches the instance. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201214 | The backup file does not exist. | Check whether the backup exists and matches the instance. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201319 | Deleting backup file is not allowed because a restoration task is currently in progress. Please wait. | Check whether the backup is being used to restore instances. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201501 | The DB instance does not exist. | Check whether the tenant has the DB instance, whether the DB instance name or ID is correct, and whether the DB instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.201502 | The DB instance does not exist. | Check whether the tenant has the DB instance, whether the DB instance name or ID is correct, and whether the DB instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 404 | DBS.212001 | The security group does not exist or has been deleted. | Check whether the parameter group exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212003 | This operation is not permitted. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212006 | The node associated with this parameter group is not available. | Check whether the node that is associated with the parameter group is normal. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212008 | The database type is not supported. | Check whether the database type is supported | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212013 | This parameter group does not exist. | Check whether the parameter exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212017 | Invalid parameter. | Check whether the transferred parameters or URLs are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212019 | Invalid parameter. | Check whether the transferred parameters or URLs are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212028 | Invalid parameter group description. | Check whether the parameter group description is valid. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212030 | The parameter group name already exists. | Check whether the parameter group name is correct and whether the tenant has created the parameter group. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212031 | Invalid parameter group name. | Check whether the parameter group name meets the requirements: | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.212032 | The operation cannot be performed because this parameter group is applied to one or more DB instance nodes. | Check whether the parameter group has been applied to the instance. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280001 | Parameter error. | Check whether the transferred parameters or URLs are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 500 | DBS.280005 | Server error. Try again later. | Contact technical support engineers. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280015 | Permission denied. | Check whether the token expires and whether the instance matches the tenant. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280016 | Resource not found. | Check whether the transferred parameters are correct and whether the instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.280019 | Account suspended. | Check the account balance. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.280032 | Permission denied. | Check whether the rights of the user group to which the current user belongs allow the corresponding operation. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.280042 | Invalid request. | Check whether the request is allowed by the current instance status and the operations being performed on the instance and whether the request is valid. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 401 | DBS.280056 | Invalid token. | Check whether the instance belongs to the tenant and whether the token has been obtained again. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.280063 | Permission denied. Contact the account administrator for authorization | Check whether the user group to which the current user belongs has the corresponding operation permission. | - | | | | | - | | | .. note:: | | - | | | | | - | | | **xxx** indicates the fine-grained configuration item corresponding to an operation performed on the DDS DB instance. | | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 500 | DBS.280064 | Fine-grained authentication failed. | Contact the customer service. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.200072 | Invalid storage space. | Check whether the storage space exceeds the upper limit. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280110 | The DB instance does not exist. | Check whether the tenant has the DB instance, whether the DB instance name or ID is correct, and whether the DB instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280122 | Invalid DB engine. | Check whether the storage engine matches the instance engine. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280123 | Invalid node number. | Check whether the number of nodes to be added to the instance meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280124 | Invalid backup. | Check whether the backup ID is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280127 | Invalid backup description. | Check whether the backup description is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280200 | The password contains invalid characters. | Check whether the password is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280214 | Invalid retention period. | Check whether the backup retention period is correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280215 | Invalid backup period. | Check whether the backup start time, end time, and backup cycle are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280216 | Invalid backup start time. | Check whether the backup start time meets the requirements and whether the relationship between the backup start time and end time is correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280234 | Invalid DB instance name. | Check whether the instance name is correct and whether the instance exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280235 | Invalid DB engine. | Check whether the DB engine information is correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280236 | Invalid database version. | Check whether the database version is supported. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280239 | Invalid specifications. | Check whether the specification code is correct, whether the specification exists in the current AZ, and whether the specification is supported. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280241 | Invalid storage type. | Check whether the storage type is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280242 | The storage space is out of range. | Check whether the disk size is correct. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280244 | Invalid AZ. | Check whether the parameters of the AZ are correct, whether the AZ exists, and whether the AZ matches the specifications. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280247 | Invalid VPC. | Check whether the VPC ID is correct and whether the VPC exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280248 | Invalid subnet. | Check whether the subnet ID is correct and whether the subnet exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280249 | Invalid security group. | Check whether the security group ID is correct and whether the security group exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280266 | Invalid storage space. | Check whether the storage space is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280267 | Specifications not match. | Check whether the specification information is correct and whether the specification matches the instance. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280277 | Invalid backup name. | Check whether the backup name is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280280 | Invalid DB instance number. | Check whether the number of DB instances is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280284 | Invalid IP address. | Check whether the IP address is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280292 | Invalid username. | Check whether the username is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280311 | Invalid storage space. | Check whether the storage space is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280314 | Invalid storage type. | Check whether the storage type is correct and whether the instance supports the disk type. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280327 | Invalid node type. | Check whether the node type is correct, whether the node type matches the instance, and whether the node type matches the group ID and node ID. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280342 | Invalid DB instance mode. | Check whether the instance mode is correct and whether the instance mode matches the instance ID. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280365 | Invalid payment mode. | Check whether the payment mode is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280404 | Invalid DB instance ID. | Check whether the instance ID is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 403 | DBS.280406 | The DB instance cannot be deleted. | Check whether the DB engine and billing mode support direct deletion of instances. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280408 | Unauthorized tenant ID | Check whether the tenant ID is correct and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280414 | Invalid group type. | Check whether the group type is correct, whether the group type matches the instance, and whether the node type matches the group ID. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280434 | Invalid resource specifications code. | Check whether the resource specifications code exists and meets the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280446 | The database information does not exist. | Check whether the **datastore** field exists. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280438 | Invalid encryption key ID. | Check whether the disk encryption key ID in the request is created and available, and whether the current DB engine supports disk encryption. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280439 | Invalid query limit. | Check whether the value of the **limit** parameter is valid. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280440 | Invalid offset. | Check whether the value of the **offset** parameter is valid. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280441 | Invalid key. | Check whether the tag key is valid. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 429 | DBS.280443 | The maximum number of connections has been reached. | APIs are frequently called by the same tenant. Reduce the frequency of API calls. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.280445 | The DB instance class is not available. | The current DB instance class is unavailable. Select another one. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 400 | DBS.290000 | Parameter error. | Check whether the transferred parameters or URLs are correct and meet the requirements. | - +------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Status Code | Error Code | Error Information | Description | Handling Measure | + +=============+=============+===================================================================================================================================================+==========================================================================================================================+=============================================================================================================================================================+ + | 400 | DBS.200001 | Parameter Error | Parameter error. | Check whether the transferred parameters or URLs are correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 404 | DBS.200002 | The DB instance does not exist. | The DB instance does not exist. | Check whether the DB instance and its ID are correct and whether the DB instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200004 | Operation is illegal. | Invalid operation. | Check whether the operation meets the API requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200010 | Authentication failed. | Authentication failed | Check whether the tenant and instance match. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.200011 | This instance {0} status makes it not be allowed to do this {1} operation now. | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 404 | DBS.200013 | This node does not exist. | The node does not exist | Check whether the node ID or group ID is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.200018 | This instance's status or its node's status makes it not be allowed to do this operation now. | This DB instance is not available. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.200019 | Another operation is being performed on the DB instance or the DB instance is faulty. | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200024 | The region is unavailable. | The region is unavailable. | Check whether the region name is correct and whether the region is available. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200025 | Invalid AZ. | Invalid AZ. | Check whether the AZ name is correct and whether the AZ is available. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.200028 | Volume size reach limit. | The maximum storage space has been reached. | Check whether the storage space exceeds the upper limit. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200029 | Invalid username and password. | Invalid username and password. | Check whether the username and password match and whether the password meets the password strength requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200041 | Invalid datastore version. | Invalid database version. | Check whether the database version is supported. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 404 | DBS.200042 | Invalid database engine. | Invalid DB engine. | Check whether the DB engine is supported by DDS. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200047 | Operation cannot be executed in current state of the DB instance or node. | Operation cannot be executed in current state of the DB instance or node. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200048 | Invalid VPC. | Invalid VPC. | Check whether the VPC ID and name are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200049 | Invalid subnet. | Invalid subnet. | Check whether the subnet ID and name are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200050 | Invalid security group. | Invalid security group. | Check whether the security group ID and name are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200052 | Invalid password. | Invalid password. | Check whether the username and password match and whether the password meets the password strength requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200053 | The DB instance specifications do not exist. | The DB instance specifications do not exist. | Check whether the specifications are correct and supported in the current AZ. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200054 | Invalid DB instance specifications. | Invalid DB instance specifications. | Check whether the specifications are correct and supported in the current AZ. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200057 | Invalid parameter group ID. | Invalid parameter template. | Check whether the parameter template is correct, whether the parameter template exists, and whether the parameter template matches the instance type. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200059 | Invalid database port. | Invalid database port | Check whether the database port is missing or valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200060 | The database port number is out of the specified range. | The database port number is out of the specified range. | Check whether the database port is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200068 | Weak password. | Weak password | Check whether the password meets the requirements. Enter a strong password. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200072 | Invalid storage space. | Invalid storage space. | Check whether the storage space exceeds the upper limit. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200075 | Invalid node role. | Invalid node role. | Check whether the role of the node meets the requirements and whether the instance is normal. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.200076 | Operation cannot be executed in current state of the DB instance. | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200077 | Failed to change the password. | Failed to reset the password. | Check whether the user name is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200091 | Invalid IP address. | Invalid IP address. | Check whether the required IP address is missing or whether the input IP address is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200092 | The IP address already exists. | The IP address already exists. | Check whether the IP address exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200095 | Invalid parameter. | Parameter error. | Check whether the parameters in the request and URLs are correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200302 | The storage space must be a multiple of 10. | The storage space must be a multiple of 10. | Check whether the storage space is a multiple of 10. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200303 | The maximum number of times that the storage space can be scaled up has been reached. | The maximum number of times that the storage space can be scaled up has been reached. | The maximum number of times that the storage space can be scaled up has been reached. To continue to scale up the storage space, contact technical support. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200304 | The storage space can be scaled up for a maximum of four times. | The storage space can be scaled up a maximum of four times. | Check whether the instance has been scaled up for multiple times. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200306 | Invalid storage space. | Invalid storage space. | Check whether the storage space is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200311 | Scaling up storage space is not allowed in current state of the node. | Scaling up the storage space is not allowed in current state of the node. | Check whether the node type, instance type, and node ID are correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200434 | Failed to restart the DB instance. | Failed to restart the DB instance. | Check whether the DB instance status is normal and whether other operations are being performed on the DB instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200451 | The node does not exist. | The node does not exist. | Check whether node ID is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200462 | The database port is the same as the current port. | The database port is the same as the current port. | Check whether the new port number is the same as the original port number. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200470 | Invalid AZ. | Invalid AZ. | Check whether the AZ is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200501 | The subnet does not exist. | The subnet does not exist. | Check whether the subnet ID and name exist and match the VPC. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200502 | The security group does not exist. | The security group does not exist. | Check whether the security group ID and name exist and match the VPC. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200503 | The VPC does not exist. | The VPC does not exist. | Check whether the tenant has the VPC. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200506 | The encryption key does not exist. | The encryption key does not exist. | Check whether the disk encryption key ID exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200507 | The encryption key is not available. | The encryption key is not available. | Check whether the disk encryption key is available. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.200604 | The instance is not owned by the current user. | The instance is not owned by the current user. | Check whether the project ID is subordinate to the instance ID. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200700 | The EIP status does not allow EIP binding. | The EIP is being bound. Not allowed to bind the EIP again. | Check whether the instance is being bound to an EIP. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200701 | The EIP status does not allow EIP unbinding. | Unbinding the EIP is not allowed due to the EIP status. | Check whether the operation is allowed by the EIP status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200702 | The node has been bound to a public IP address and cannot be bound again. | The node has been bound to a public IP address and cannot be bound again. | Check whether a public IP address has been bound to the node. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200816 | Failed to create the database user. | Failed to create a database user. | Check whether the database user name is valid and check the database status and instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200817 | Failed to obtain the database user list. | Failed to obtain the database user list. | Check the database status and instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200818 | Failed to delete the database user. | Failed to delete a database user. | Check the database status and instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200823 | The database does not exist. | The database does not exist. | Check whether the database name is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200824 | The database account does not exist. | The database account does not exist. | Check whether the database username is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200826 | The database name already exists. | The database name already exists. | Check whether the database name is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200827 | The database user already exists. | The database account name already exists. | Check whether the database user is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200828 | Built-in database accounts cannot be edited. | Cannot use database built-in account. | Check whether the database user is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.200998 | The system is busy. Try again later. | The system is busy. Try again later. | The system is busy. Try again later. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.201000 | The status of DB instance {0} does not allow the {1} operation. | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201006 | Parameter error. | Parameter error. | Check whether the transferred parameters or URLs are correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.201014 | Operation cannot be executed in current state of the DB instance. | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.201015 | This operation cannot be performed because another operation is being performed on the DB instance or the DB instance is faulty. Try again later. | This operation cannot be performed because another operation is being performed. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201020 | Invalid DB engine. | Invalid DB engine. | Check whether the DB engine is supported by DDS. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.201028 | The DB instance does not exist. | The DB instance does not exist. | Check whether the DB instance belongs to the tenant and whether the DB instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201201 | The backup already exists. | The backup already exists. | Check whether the backup name or ID exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201202 | Operation cannot be executed in current state of the DB instance. | Operation cannot be executed in current state of the DB instance. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201204 | Operation cannot be executed in current state of the DB instance. | The backup file does not exist. | Check whether the backup file exists and matches the instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201214 | The backup file does not exist. | The backup file does not exist. | Check whether the backup exists and matches the instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201319 | Deleting backup file is not allowed because a restoration task is currently in progress. Please wait. | Deleting backup file is not allowed because a restoration task is currently in progress. Please wait. | Check whether the backup is being used to restore instances. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201501 | The DB instance does not exist. | The DB instance does not exist. | Check whether the tenant has the DB instance, whether the DB instance name or ID is correct, and whether the DB instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.201502 | The DB instance does not exist. | The DB instance does not exist. | Check whether the tenant has the DB instance, whether the DB instance name or ID is correct, and whether the DB instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 404 | DBS.212001 | The parameter group {0} does not exist. | This parameter template does not exist. | Check whether the parameter template exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212003 | This operation is not permitted. | This operation is not permitted. | Check whether the instance status or the ongoing operation on the instance conflicts with the request. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212006 | The node associated with this parameter group is not available. | The node associated with this parameter template is not available. | Check whether the node that is associated with the parameter template is normal. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212008 | The database type does not exist. | The database type is not supported. | Check whether the database type is supported | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212013 | The parameter group does not exist. | This parameter template does not exist. | Check whether the parameter exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212017 | The parameter is invalid. | Invalid parameter. | Check whether the transferred parameters or URLs are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212019 | Invalid parameter. | Invalid parameter. | Check whether the transferred parameters or URLs are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212028 | Invalid description. | Invalid parameter template description. | Check whether the parameter template description is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212030 | The parameter group name already exists. | The parameter group name already exists. | Check whether the parameter template name is correct and whether the tenant has created the parameter template. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212031 | Invalid parameter group name. | Invalid parameter template name. | Check whether the parameter template name meets the requirements: | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.212032 | The operation cannot be performed because this parameter group is being applied to one or more DB instance nodes. | The operation cannot be performed because this parameter template is applied to one or more DB instance nodes. | Check whether the parameter template has been applied to the instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.216026 | The node does not exist. | The node does not exist or has been deleted. | Check whether the input node exists and belongs to the current instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.216030 | The queried node does not belong to the current instance. | The queried node does not belong to the current instance. | Check whether the input node belongs to the current instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 500 | DBS.201509 | Failed to access OBS. | The OBS service system is faulty. | An internal error occurs. Contact the O&M personnel to locate the fault. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.238007 | This operation cannot be performed in the current IP address status. | This operation cannot be performed in the current IP address status. | Check whether the delivered IP address is in use. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239011 | Invalid SSL option. | Invalid SSL option. | Check whether the SSL parameter is missing or whether the SSL option is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239012 | The specifications are improper. | The specifications are improper. | Check whether the specifications are proper when the backup of an Enhanced Edition instance is restored to a new instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239014 | Failed to create the database role. | Failed to create a database role. | Check the database status and instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239015 | Failed to obtain the database role list. | Failed to obtain the database role list. | Check the database status and instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239016 | Invalid database role. | Invalid database role. | Check whether the role meets the requirements and check the database status and instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239017 | The database role name already exists. | The database role name already exists. | Check whether the database role exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239018 | The database role does not exist. | The database role does not exist. | Enter an existing database status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239019 | Invalid database permission. | Invalid database permission. | Check whether the database permission is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239020 | Invalid database name. | Invalid database name. | Check whether the database name is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239021 | Roles in the non-admin databases cannot be inherited from other databases. | Roles in the non-admin databases cannot be inherited from other databases. | Check whether the data role is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239022 | Cannot use database built-in roles. | Cannot use database built-in roles. | Check whether the role is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239029 | Failed to delete database role. | Failed to delete the database role. | Check whether the database role exists and whether the instance status is normal. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239031 | Invalid balancer action. | The balancer switching is invalid | Check whether the action parameter is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239032 | Invalid balancer window. | Invalid balancer window | Check whether the **startTime** and **stopTime** parameters are correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.239033 | Balancer window not supported. | Versions earlier than DDS 4.0 do not support the setting of the balancer window | Frozen instances and instances of versions earlier than DDS 4.0 do not support the setting of the balancer window. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280001 | Parameter error. | Parameter error. | Check whether the transferred parameters or URLs are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 500 | DBS.280005 | Server error. Try again later. | Server error. Try again later. | Contact technical support engineers. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280015 | Permission denied. | Permission denied. | Check whether the token expires and whether the instance matches the tenant. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280016 | Resource not found. | Resource not found. | Check whether the transferred parameters are correct and whether the instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.280019 | Account suspended. | Account suspended. | Check the account balance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.280032 | You do not have permission to perform this operation. Contact the administrator to obtain permission. | Permission denied. | Check whether the user group to which the current user belongs has the corresponding operation permission. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.280042 | Invalid request. | Invalid request. | Check whether the request is allowed by the current instance status and the operations being performed on the instance and whether the request is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 401 | DBS.280056 | Invalid token. | Invalid token. | Check whether the instance belongs to the tenant and whether the token has been obtained again. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.280063 | You do not have following permission to perform this operation: {0}. Contact the administrator to obtain permission. | Permission denied. Contact the account administrator for authorization | Check whether the user group to which the current user belongs has the corresponding operation permission. | + | | | | | | + | | | | .. note:: | | + | | | | | | + | | | | **xxx** indicates the fine-grained configuration item corresponding to an operation performed on the DDS DB instance. | | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 401 | DBS.280064 | Check PDP permissions failed. | Fine-grained authentication failed. | Contact the customer service. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280066 | Invalid log type. | Invalid log type. | Check whether the log type meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280067 | Invalid start time. | Invalid start time. | Check whether the start time meets the requirement. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280068 | Invalid end time. | Invalid end time. | Check whether the end time meets the requirement. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280110 | The DB instance does not exist. | The DB instance does not exist. | Check whether the tenant has the DB instance, whether the DB instance name or ID is correct, and whether the DB instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280122 | Invalid DB engine. | Invalid DB engine. | Check whether the storage engine matches the instance engine. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280123 | Invalid node number. | Invalid node number. | Check whether the number of nodes to be added to the instance meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280124 | Invalid backup. | Invalid backup. | Check whether the backup ID is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280127 | Invalid backup description. | Invalid backup description. | Check whether the backup description is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280200 | The password contains invalid characters. | The password contains invalid characters. | Check whether the password is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280214 | Invalid retention period. | Invalid retention period. | Check whether the backup retention period is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280215 | Invalid backup cycle. | Invalid backup period. | Check whether the backup start time, end time, and backup cycle are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280216 | Invalid backup start time. | Invalid backup start time. | Check whether the backup start time meets the requirements and whether the relationship between the backup start time and end time is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280234 | Invalid DB instance name. | Invalid DB instance name. | Check whether the instance name is correct and whether the instance exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280235 | Invalid database type. | Invalid DB engine. | Check whether the DB engine information is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280236 | Invalid database version. | Invalid database version. | Check whether the database version is supported. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280239 | Invalid specifications. | Invalid specifications. | Check whether the specification code is correct, whether the specification exists in the current AZ, and whether the specification is supported. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280241 | Invalid storage type | Invalid storage type. | Check whether the storage type is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280242 | The storage space is out of range. | The storage space is out of range. | Check whether the disk size is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280244 | Invalid AZ. | Invalid AZ. | Check whether the parameters of the AZ are correct, whether the AZ exists, and whether the AZ matches the specifications. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280247 | Invalid VPC. | Invalid VPC. | Check whether the VPC ID is correct and whether the VPC exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280248 | Invalid subnet. | Invalid subnet. | Check whether the subnet ID is correct and whether the subnet exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280249 | Invalid security group. | Invalid security group. | Check whether the security group ID is correct and whether the security group exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280266 | Invalid storage space. | Invalid storage space. | Check whether the storage space is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280267 | Specifications not match. | Specifications do not match. | Check whether the specification information is correct and whether the specification matches the instance. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280271 | Parameter value out of range. | The parameter value is too long. | Check whether the length of the parameter value is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280277 | Invalid backup name. | Invalid backup name. | Check whether the backup name is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280280 | Invalid DB instance number. | Invalid DB instance number. | Check whether the number of DB instances is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280284 | Invalid IP address. | Invalid IP address. | Check whether the IP address is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280292 | Invalid database username. | Invalid username. | Check whether the username is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280311 | Invalid storage space. | Invalid storage space. | Check whether the storage space is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280314 | Invalid storage space. | Invalid storage type. | Check whether the storage type is correct and whether the instance supports the disk type. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280327 | Invalid node type. | Invalid node type. | Check whether the node type is correct, whether the node type matches the instance, and whether the node type matches the group ID and node ID. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280342 | Invalid DB instance mode. | Invalid DB instance mode. | Check whether the instance mode is correct and whether the instance mode matches the instance ID. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280343 | Unsupported operation. | The operation is not supported. | Check whether the instance and node meet the API requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280347 | Unsupported database type. | Unsupported database type. | Check whether the DB instance type is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280361 | Invalid file name. | Invalid file name. | Check whether the input file name is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280365 | Invalid payment mode. | Invalid payment mode. | Check whether the payment mode is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280404 | Invalid DB instance ID. | Invalid DB instance ID. | Check whether the instance ID is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.280406 | The DB instance cannot be deleted. | The DB instance cannot be deleted. | Check whether the instance deletion operation is supported by the DB engine. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280407 | Invalid node ID. | Invalid node ID. | Check whether the node ID is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280408 | Invalid project id. | Unauthorized tenant ID | Check whether the tenant ID is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280409 | Invalid date. | Invalid time format. | Check whether the time format and content are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280414 | Invalid group type. | Invalid group type. | Check whether the group type is correct, whether the group type matches the instance, and whether the node type matches the group ID. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280416 | Invalid backup end time. | Invalid end time | Check whether the end time is missing and whether the end time period and format meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280421 | Invalid EIP . | Invalid EIP. | Check whether the EIP exists and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 403 | DBS.280433 | Invalid enterprise project ID. | Invalid enterprise project ID. | Check whether the enterprise project ID is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280434 | The specifications are unavailable. | Invalid resource specifications code. | Check whether the resource specifications code exists and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280437 | Not support enterprise project. | Not support enterprise multi-project. | The current user has not enabled the enterprise multi-project service. Enable the enterprise multi-project service or do not transfer related parameters. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280438 | Invalid encryption key. | Invalid encryption key ID. | Check whether the disk encryption key ID in the request is created and available, and whether the current DB engine supports disk encryption. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280439 | Invalid limit. | Invalid query limit. | Check whether the value of the **limit** parameter is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280440 | Invalid offset. | Invalid offset. | Check whether the value of the **offset** parameter is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280441 | Invalid key. | Invalid key. | Check whether the tag key is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 429 | DBS.280443 | The maximum number of connections has been reached. | The maximum number of connections has been reached. | APIs are frequently called by the same tenant. Reduce the frequency of API calls. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280445 | The DB instance class is not available. | The DB instance class is not available. | The current DB instance class is unavailable. Select another one. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280446 | The database information does not exist. | The database information does not exist. | Check whether the **datastore** field exists. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280469 | Invalid ECS group policy. | Invalid ECS group policy. | Check whether the policy associated with the ECS group is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280482 | Invalid user tag key. | Invalid user tag key. | Check whether the tag key is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280483 | Invalid tag value. | Invalid tag value. | Check whether the tag key is valid. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.280484 | Tag number reach limit. | There are too many tags. | Check whether the number of tags is correct. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.290000 | Parameter error. | Parameter error. | Check whether the transferred parameters or URLs are correct and meet the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301071 | Invalid session id. | Invalid session ID. | Check whether the session ID is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301072 | Invalid plan summary. | Invalid execution plan. | Check whether the execution plan is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301073 | Invalid operation type. | Invalid operation type. | Check whether the operation type is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301074 | Invalid namespace. | Invalid namespace. | Check whether the namespace is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301075 | Invalid cost time. | Invalid execution time. | Check whether the execution time is correct and meets the requirements. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301076 | Query session failed. | Failed to query the session. | Contact customer service to check the instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 400 | DBS.301077 | Kill session failed. | Failed to kill the session. | Contact customer service to check the instance status. | + +-------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/appendix/index.rst b/api-ref/source/appendix/index.rst index e8cddff..b400844 100644 --- a/api-ref/source/appendix/index.rst +++ b/api-ref/source/appendix/index.rst @@ -5,6 +5,7 @@ Appendix ======== +- :ref:`Abnormal Request Results ` - :ref:`Status Code ` - :ref:`Error Code ` - :ref:`Obtaining a Project ID ` @@ -14,6 +15,7 @@ Appendix :maxdepth: 1 :hidden: + abnormal_request_results status_code error_code obtaining_a_project_id diff --git a/api-ref/source/appendix/obtaining_a_project_id.rst b/api-ref/source/appendix/obtaining_a_project_id.rst index e1d44b0..fa7fb9e 100644 --- a/api-ref/source/appendix/obtaining_a_project_id.rst +++ b/api-ref/source/appendix/obtaining_a_project_id.rst @@ -8,7 +8,7 @@ Obtaining a Project ID Scenarios --------- -A project ID is required for some URLs when an API is called. Therefore, you need to obtain a project ID in advance. Two methods are available: +A project ID is required for some URLs when an API is called. To obtain the project ID: - :ref:`Obtaining the Project ID by Calling an API ` - :ref:`Obtain a Project ID from the Console ` @@ -18,7 +18,7 @@ A project ID is required for some URLs when an API is called. Therefore, you nee Obtaining the Project ID by Calling an API ------------------------------------------ -The API used to obtain a project ID is **GET https://{Endpoint}/v3/projects**. **{Endpoint}** is the IAM endpoint and can be obtained from `Regions and Endpoints `__ For details about API authentication, see :ref:`Token Authentication `. +The API used to obtain a project ID is **GET https://{Endpoint}/v3/projects**. **{Endpoint}** is the IAM endpoint and can be obtained from `Regions and Endpoints `__. For details about API authentication, see :ref:`Authentication `. The following is an example response. The value of **id** is the project ID. @@ -60,7 +60,7 @@ Obtain a Project ID from the Console On the **My Credential** page, view the project ID in the project list. - .. figure:: /_static/images/en-us_image_0208249570.jpg + .. figure:: /_static/images/en-us_image_0000001387625321.jpg :alt: **Figure 1** Viewing project IDs **Figure 1** Viewing project IDs diff --git a/api-ref/source/before_you_start.rst b/api-ref/source/before_you_start.rst index 86699ec..ec9311c 100644 --- a/api-ref/source/before_you_start.rst +++ b/api-ref/source/before_you_start.rst @@ -11,16 +11,16 @@ This document describes application programming interfaces (APIs), syntax, param .. table:: **Table 1** Documentation guide - +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Section | Description | - +================================================+========================================================================================================================================================+ - | :ref:`API Overview ` | DDS API components and API list | - +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Environment Preparations ` | Preparations before using the APIs, including obtaining the request authentication and project ID | - +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`API Calling ` | Representational State Transfer (REST) message bodies, calling methods, and examples | - +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`API Description ` | DDS APIs, including APIs used for querying information about API version, database version, and DB instance specifications, and managing DB instances. | - +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Appendix ` | Understand the status codes and error codes about DDS APIs. | - +------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Section | Description | + +======================================================+========================================================================================================================================================+ + | :ref:`API Overview ` | DDS API components and API list | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Environment Preparations ` | Preparations before using the APIs, including obtaining the request authentication and project ID | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`API Calling ` | Representational State Transfer (REST) message bodies, calling methods, and examples | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`APIs V3.0 (Recommended) ` | DDS APIs, including APIs used for querying information about API version, database version, and DB instance specifications, and managing DB instances. | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Appendix ` | Understand the status codes and error codes about DDS APIs. | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst index c12a459..fdacd62 100644 --- a/api-ref/source/change_history.rst +++ b/api-ref/source/change_history.rst @@ -5,22 +5,99 @@ Change History ============== -+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Date | Description | -+===================================+=========================================================================================================================================================================================================================================================================================+ -| 2020-10-15 | Modified the following content: | -| | | -| | - Modified the description of the **ram** parameter in :ref:`Querying All DB Instance Specifications `. | -| | - Modified the description of the **disk_encryption_id** parameter in :ref:`Querying DB Instances `. | -+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 2019-11-07 | Modified the following content: | -| | | -| | - Modified the value of **versions** in the response example in :ref:`Querying Database Version Information `. | -| | - Modified the description of the **num** parameter in :ref:`Creating a DB Instance `. | -+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 2019-09-25 | Modified the following content: | -| | | -| | - Change the value of **spec_code** in the request and response examples in :ref:`Example `, :ref:`Querying All DB Instance Specifications `, :ref:`Creating a DB Instance `, and :ref:`Querying DB Instances `. | -+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| 2019-08-19 | This issue is the first official release. | -+-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Date | Description | ++===================================+===========================================================================================================================================================================================================================================================================================+ +| 2022-10-30 | Modified the following content: | +| | | +| | - :ref:`Creating a DB Instance ` | +| | - :ref:`Modifying DB Instance Specifications ` | +| | - :ref:`Obtaining Links for Downloading Slow Query Logs ` | +| | - :ref:`Obtaining Links for Downloading Error Logs ` | +| | - :ref:`Restoring Data to a New DB Instance ` | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2022-04-29 | Added the following API: | +| | | +| | :ref:`Task Management ` | +| | | +| | Deleted the following API: | +| | | +| | Managing Databases and Users | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-05-30 | Modified the following content: | +| | | +| | Supported valid port range 2100-9500, 27017, 27018, and 27019. | +| | | +| | Added the following API: | +| | | +| | - :ref:`Querying Sessions of an Instance Node ` | +| | - :ref:`Killing Sessions of an Instance Node ` | +| | - :ref:`Querying the Number of Connections to an Instance Node ` | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-02-28 | Added the following content: | +| | | +| | - :ref:`Querying the Restoration Time Ranges ` | +| | - :ref:`Obtaining the List of Databases That Can Be Restored ` | +| | - :ref:`Obtaining the List of Database Collections That Can Be Restored ` | +| | - :ref:`Restoring Databases and Tables to a Point in Time ` | +| | - :ref:`Querying Database Slow Logs ` | +| | - :ref:`Obtaining Links for Downloading Slow Query Logs ` | +| | - :ref:`Querying Database Error Logs ` | +| | - :ref:`Obtaining Links for Downloading Error Logs ` | +| | - :ref:`Setting SQL Audit ` | +| | - :ref:`Querying SQL Audit Policy ` | +| | - :ref:`Obtaining the Audit Log List ` | +| | - :ref:`Obtaining Links for Downloading Audit Logs ` | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-08-30 | Modified the following content: | +| | | +| | - Modified the description in :ref:`Authentication `. | +| | - Modified the URI format in :ref:`Querying API Version Information `. | +| | - Modified the description of **target_type** in :ref:`Restarting a DB Instance `. | +| | - Modified the description **group_id** in :ref:`Scaling Up Storage Space `. | +| | - Modified the description of **size** in :ref:`Adding Nodes for a Cluster Instance `. | +| | | +| | Added the following content: | +| | | +| | :ref:`Restoring Data to a New DB Instance ` | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-04-16 | Modified the following content: | +| | | +| | - Modified the description of the **size** and **spec_code** parameters in :ref:`Creating a DB Instance `. | +| | | +| | Added the following content: | +| | | +| | - :ref:`Restarting a DB Instance ` | +| | - :ref:`Scaling Up Storage Space ` | +| | - :ref:`Adding Nodes for a Cluster Instance ` | +| | - :ref:`Modifying DB Instance Specifications ` | +| | - :ref:`Creating a Manual Backup ` | +| | - :ref:`Deleting a Manual Backup ` | +| | - :ref:`Querying the Backup List ` | +| | - :ref:`Querying an Automated Backup Policy ` | +| | - :ref:`Setting an Automated Backup Policy ` | +| | - :ref:`Querying Resources by Tag ` | +| | - :ref:`Adding or Deleting Resource Tags in Batches ` | +| | - :ref:`Querying Resource Tags ` | +| | - :ref:`Querying Tags in a Specified Project ` | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-01-15 | Modified the following content: | +| | | +| | - Modified the description of the **ram** parameter in :ref:`Querying Database Specifications `. | +| | - Modified the description of the **disk_encryption_id** parameter in :ref:`Querying Instances and Details `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2019-11-28 | Modified the following content: | +| | | +| | - Modified the value of **versions** in the response example in :ref:`Querying Database Version Information `. | +| | - Modified the description of the **type** parameter and added the response example for the single node instance in :ref:`Querying Database Specifications `. | +| | - Modified the description of the **num** parameter in :ref:`Creating a DB Instance `. | +| | - Added the **ssl_option** parameter, modified the description of the **version**, **mode**, and **flavor** parameters, and added the request and response examples for the single node instance in :ref:`Creating a DB Instance `. | +| | | +| | - Modified the description of the **mode**, **groups**, and **nodes** parameters, and added the response example for the single node instance in :ref:`Querying Instances and Details `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2019-09-25 | Modified the following content: | +| | | +| | - Change the value of **spec_code** in the request and response examples in :ref:`Example `, :ref:`Querying Database Specifications `, :ref:`Creating a DB Instance `, and :ref:`Querying Instances and Details `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2019-08-19 | This issue is the first official release. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/environment_preparations/authentication.rst b/api-ref/source/environment_preparations/authentication.rst new file mode 100644 index 0000000..7cf6a93 --- /dev/null +++ b/api-ref/source/environment_preparations/authentication.rst @@ -0,0 +1,55 @@ +:original_name: dds_api_0010.html + +.. _dds_api_0010: + +Authentication +============== + +DDS supports token authentication. + +Token Authentication +-------------------- + +.. note:: + + The validity period of a token is 24 hours. If a token needs to be used, the system caches the token to avoid frequent calling. + +A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API. + +If you use a token for authentication, you must obtain the user's token and add **X-Auth-Token** to the request message header of the service API when making an API call. + +When `calling an API to obtain a user token `__, you must set **auth.scope** in the request body to **project**. + +.. code-block:: text + + { + "auth": { + "identity": { + "methods": [ + "password" + ], + "password": { + "user": { + "name": "username", + "password": "password", + "domain": { + "name": "domainname" + } + } + } + }, + "scope": { + "project": { + "name": "xxxxxxxx" + } + } + } + } + +After a token is obtained, add the **X-Auth-Token** header field must be added to requests to specify the token when calling other APIs. For example, if the token is **ABCDEFJ....**, add **X-Auth-Token: ABCDEFJ....** in a request as follows: + +.. code-block:: text + + POST https://dds.eu-de.otc.t-systems.com/v3/auth/projects + Content-Type: application/json + X-Auth-Token: ABCDEFJ.... diff --git a/api-ref/source/environment_preparations/index.rst b/api-ref/source/environment_preparations/index.rst index 6f92506..5d6c126 100644 --- a/api-ref/source/environment_preparations/index.rst +++ b/api-ref/source/environment_preparations/index.rst @@ -5,10 +5,10 @@ Environment Preparations ======================== -- :ref:`Token Authentication ` +- :ref:`Authentication ` .. toctree:: :maxdepth: 1 :hidden: - token_authentication + authentication diff --git a/api-ref/source/environment_preparations/token_authentication.rst b/api-ref/source/environment_preparations/token_authentication.rst deleted file mode 100644 index 52c85e7..0000000 --- a/api-ref/source/environment_preparations/token_authentication.rst +++ /dev/null @@ -1,83 +0,0 @@ -:original_name: dds_api_0010.html - -.. _dds_api_0010: - -Token Authentication -==================== - -Application Scenarios ---------------------- - -If you use a token for authentication, you must obtain the user's token and add **X-Auth-Token** to the request message header of the service API when making an API call. - -This section describes how to make an API call for token authentication. - -Invoking an API ---------------- - -#. .. _dds_api_0010__en-us_topic_0110967262_li14280177102918: - - Obtain the following information: - - a. To obtain the IAM endpoint and region name in the message body, see `Regions and Endpoints `__. - b. To obtain the project ID, see :ref:`Obtaining a Project ID `. - -#. .. _dds_api_0010__en-us_topic_0110967262_li109381224173013: - - Send a POST https://*IAM\_Endpoint*/v3/auth/tokens request to obtain the user token. - - .. table:: **Table 1** Header description - - +--------------+----------------------------------------------+-----------+------------------+ - | Name | Description | Mandatory | Example | - +==============+==============================================+===========+==================+ - | Content-Type | Specifies the MIME type of the request body. | Yes | application/json | - +--------------+----------------------------------------------+-----------+------------------+ - - An example request message is as follows: - - .. code-block:: text - - { - "auth": { - "identity": { - "methods": [ - "password" - ], - "password": { - "user": { - "name": "username", - "password": "password", - "domain": { - "name": "domainname" - } - } - } - }, - "scope": { - "project": { - "id": "project_id" - } - } - } - } - - In the preceding command, replace parameter in italic with the actual values. For details, see the "Obtaining a User Token" section in the *Identity and Access Management API Reference*. - - a. **IAM\_Endpoint**: Replace it with the IAM endpoint obtained in :ref:`1 `. - b. **username** and **password**: Replace them respectively with the username and password of the IAM server. - c. **project_id**: Replace it with the project ID obtained in :ref:`1 `. - - After the request is processed, the value of **X-Subject-Token** in the header is the token value. - - .. code-block:: - - X-Subject-Token:MIIDkgYJKoZIhvcNAQcCoIIDgzCCA38CAQExDTALBglghkgBZQMEAgEwgXXXXX... - -#. Run the following command to set the token as an environment variable for subsequent operations: - - **export Token=\ {**\ *X-Subject-Token*\ **}** - - **X-Subject-Token**: Replace it with the token obtained in :ref:`2 `. An example command is as follows: - - **export Token=MIIDkgYJKoZIhvcNAQcCoIIDgzCCA38CAQExDTALBglghkgBZQMEAgEwgXXXXX...** diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 0afa208..928e062 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -9,6 +9,7 @@ Document Database Service - API Reference api_overview environment_preparations/index api_calling/index - api_description/index + apis_v3.0_recommended/index + permissions_policies_and_supported_actions/index appendix/index change_history diff --git a/api-ref/source/permissions_policies_and_supported_actions/dds_actions.rst b/api-ref/source/permissions_policies_and_supported_actions/dds_actions.rst new file mode 100644 index 0000000..d7be202 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/dds_actions.rst @@ -0,0 +1,186 @@ +:original_name: dds_api_0037.html + +.. _dds_api_0037: + +DDS Actions +=========== + +.. table:: **Table 1** DB instance management actions + + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Permissions | APIs | Action | IAM Project | Enterprise Project | + +======================================================================+====================================================================================================================================================================+==================================+=============+====================+ + | Creating a DB instance | POST /v3/{project_id}/instances | dds:instance:create | Y | x | + | | | | | | + | | | vpc:vpcs:list | | | + | | | | | | + | | | vpc:vpcs:get | | | + | | | | | | + | | | vpc:subnets:get | | | + | | | | | | + | | | vpc:securityGroups:get | | | + | | | | | | + | | | vpc:ports:get | | | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Querying DB instances | GET /v3/{project_id}/instances?id={id}&name={name}&mode={mode}&datastore_type={datastore_type}&vpc_id={vpc_id}&subnet_id={subnet_id}&offset={offset}&limit={limit} | dds:instance:list | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Deleting a DB instance | DELETE /v3/{project_id}/instances/{instance_id} | dds:instance:deleteInstance | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Restarting a DB instance | POST /v3/{project_id}/instances/{instance_id}/restart | dds:instance:reboot | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Scaling up storage space | POST /v3/{project_id}/instances/{instance_id}/enlarge-volume | dds:instance:extendVolume | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Adding nodes for a cluster instance | POST /v3/{project_id}/instances/{instance_id}/enlarge | dds:instance:extendNode | Y | x | + | | | | | | + | | | vpc:vpcs:list | | | + | | | | | | + | | | vpc:vpcs:get | | | + | | | | | | + | | | vpc:subnets:get | | | + | | | | | | + | | | vpc:securityGroups:get | | | + | | | | | | + | | | vpc:ports:get | | | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Modifying DB instance specifications | POST /v3/{project_id}/instances/{instance_id}/resize | dds:instance:modifySpec | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Performing a primary/secondary switchover in a replica set instance. | POST /v3/{project_id}/instances/{instance_id}/switchover | dds:instance:switchover | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Enabling or disabling SSL | POST/v3/{project_id}/instances/{instance_id}/switch-ssl | dds:instance:modifySSL | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Changing a DB instance name | PUT /v3/{project_id}/instances/{instance_id}/modify-name | dds:instance:modify | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Changing a database port | POST /v3/{project_id}/instances/{instance_id}/modify-port | dds:instance:modifyPort | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Changing a security group | POST /v3/{project_id}/instances/{instance_id}/modify-security-group | dds:instance:modifySecurityGroup | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Binding an EIP | POST /v3/{project_id}/nodes/{node_id}/bind-eip | dds:instance:bindPublicIp | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Unbinding an EIP | POST /v3/{project_id}/nodes/{node_id}/unbind-eip | dds:instance:unbindPublicIp | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Changing the private IP address of a DB instance. | POST /v3/{project_id}/instances/{instance_id}/modify-internal-ip | dds:instance:modifyVIP | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + | Enabling shard or config IP addresses | POST /v3/{project_id}/instances/{instance_id}/create-ip | dds:instance:createIp | Y | x | + +----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+-------------+--------------------+ + +.. table:: **Table 2** Connection Management + + +--------------------------------------------------------+---------------------------------------------------------+----------------------+-------------+--------------------+ + | Permissions | API | Action | IAM Project | Enterprise Project | + +========================================================+=========================================================+======================+=============+====================+ + | Querying sessions of an instance node | GET /v3/{project_id}/nodes/{node_id}/sessions | dds:instance:session | Y | x | + +--------------------------------------------------------+---------------------------------------------------------+----------------------+-------------+--------------------+ + | Killing a session of an instance node | POST /v3/{project_id}/nodes/{node_id}/session | dds:instance:session | Y | x | + +--------------------------------------------------------+---------------------------------------------------------+----------------------+-------------+--------------------+ + | Querying the number of connections to an instance node | GET | dds:instance:list | Y | x | + | | | | | | + | | /v3/{projectId}/instances/{instance_id}/conn-statistics | | | | + +--------------------------------------------------------+---------------------------------------------------------+----------------------+-------------+--------------------+ + +.. table:: **Table 3** Backup and restoration + + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Permissions | APIs | Action | IAM Project | Enterprise Project | + +==================================================================+==============================================================================================================================================================================================+======================================+=============+====================+ + | Creating a manual backup | POST /v3/{project_id}/backups | dds:instance:createManualBackup | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Deleting a manual backup | DELETE /v3/{project_id}/backups/{backups_id} | dds:backup:delete | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Querying the backup list | GET /v3/{project_id}/backups?instance_id={instance_id}&backup_id={backup_id}&backup_type={backup_type}&offset={offset}&limit={limit}&begin_time={begin_time}&end_time={end_time}&mode={mode} | dds:backup:list | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Querying an automated backup policy | GET /v3/{project_id}/instances/{instance_id}/backups/policy | dds:instance:list | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Setting an automated backup policy | PUT /v3/{project_id}/instances/{instance_id}/backups/policy | dds:instance:modifyBackupPolicy | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Restoring data to a new DB instance | POST /v3/{project_id}/instances | dds:instance:create | Y | x | + | | | | | | + | | | vpc:vpcs:list | | | + | | | | | | + | | | vpc:vpcs:get | | | + | | | | | | + | | | vpc:subnets:get | | | + | | | | | | + | | | vpc:securityGroups:get | | | + | | | | | | + | | | vpc:ports:get | | | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Obtaining the link for downloading a backup file | GET /v3/{projectId}/backups/download-file | dds:backup:download | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Querying restoration time ranges | GET /v3/{project_id}/instances/{instance_id}/restore-time | dds:instance:list | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Obtaining the list of databases that can be restored | GET | dds:instance:list | Y | x | + | | | | | | + | | /v3/{project_id}/instances/{instance_id}/restore-database | | | | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Obtaining the list of databases collections that can be restored | GET | dds:instance:list | Y | x | + | | | | | | + | | /v3/{project_id}/instances/{instance_id}/restore-collection | | | | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Restoring data to the original DB instance | POST /v3/{project_id}/instances/recovery | dds:backup:refreshInstanceFromBackup | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + | Restoring databases and tables to a point in time | POST /v3/{project_id}/instances/{instance_id}/restore/collections | dds:backup:refreshInstanceFromBackup | Y | x | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------+-------------+--------------------+ + +.. table:: **Table 4** Obtaining log information + + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Permissions | APIs | Action | IAM Project | Enterprise Project | + +====================================================+=================================================================+===================================+=============+====================+ + | Querying database slow logs | GET /v3/{project_id}/instances/{instance_id}/slowlog | dds:instance:list | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Obtaining the link for downloading slow query logs | POST /v3/{project_id}/instances/{instance_id}/slowlog-download | dds:instance:list | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Querying database error logs | GET /v3/{project_id}/instances/{instance_id}/errorlog | dds:instance:list | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Obtaining the link for downloading error logs. | POST /v3/{project_id}/instances/{instance_id}/errorlog-download | dds:instance:list | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Setting a policy for audit logs | POST /v3/{project_id}/instances/{instance_id}/auditlog-policy | dds:instance:modifyAuditLogSwitch | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Querying the audit log policy | GET /v3/{project_id}/instances/{instance_id}/auditlog-policy | dds:instance:list | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Querying the audit log list | GET /v3/{project_id}/instances/{instance_id}/auditlog | dds:instance:list | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + | Obtaining the link for downloading audit logs. | POST /v3/{project_id}/instances/{instance_id}/auditlog-links | dds:instance:downloadAuditLog | Y | x | + +----------------------------------------------------+-----------------------------------------------------------------+-----------------------------------+-------------+--------------------+ + +.. table:: **Table 5** Tag management + + +---------------------------------------------+-----------------------------------------------------------+---------------------+-------------+--------------------+ + | Permissions | APIs | Action | IAM Project | Enterprise Project | + +=============================================+===========================================================+=====================+=============+====================+ + | Adding or deleting resource tags in batches | POST /v3/{project_id}/instances/{instance_id}/tags/action | dds:instance:modify | Y | x | + +---------------------------------------------+-----------------------------------------------------------+---------------------+-------------+--------------------+ + | Querying resource tags | GET /v3/{project_id}/instances/{instance_id}/tags | dds:instance:list | Y | x | + +---------------------------------------------+-----------------------------------------------------------+---------------------+-------------+--------------------+ + +.. table:: **Table 6** Database and account management + + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Permissions | APIs | Action | IAM Project | Enterprise Project | + +===========================================+======================================================================================================================================+=================================+=============+====================+ + | Creating a database user | POST /v3/{project_id}/instances/{instance_id}/db-user | dds:instance:createDatabaseUser | Y | x | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Creating a database role | POST /v3/{project_id}/instances/{instance_id}/db-role | dds:instance:createDatabaseRole | Y | x | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Deleting a database user | DELETE /v3/{project_id}/instances/{instance_id}/db-user | dds:instance:deleteDatabaseUser | Y | x | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Deleting a database role | DELETE /v3/{project_id}/instances/{instance_id}/db-role | dds:instance:deleteDatabaseRole | Y | x | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Changing the password of a database user | PUT | dds:instance:resetPasswd | Y | x | + | | | | | | + | | /v3/{project_id}/instances/{instance_id}/reset-password | | | | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Querying details about database users | GET /v3/{project_id}/instances/{instance_id}/db-user/detail? offset ={offset}&limit={limit}&user_name={user_name }&db_name={db_name} | dds:instance:get | Y | x | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Querying the database role list | GET /v3/{project_id}/instances/{instance_id}/db-roles?role_name={role_name}&db_name={db_name}&offset={offset}&limit={limit} | dds:instance:get | Y | x | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + | Querying and setting the cluster balancer | GET /v3/{project_id}/instances/{instance_id}/balancer | dds:instance:balancer | Y | x | + | | | | | | + | | PUT /v3/{project_id}/instances/{instance_id}/balancer/{action} | | | | + | | | | | | + | | PUT /v3/{project_id}/instances/{instance_id}/balancer/active-window | | | | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+---------------------------------+-------------+--------------------+ + +.. note:: + + The check mark (Y) indicates that an action takes effect. The cross mark (x) indicates that an action does not take effect. diff --git a/api-ref/source/permissions_policies_and_supported_actions/index.rst b/api-ref/source/permissions_policies_and_supported_actions/index.rst new file mode 100644 index 0000000..ca6d74f --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/index.rst @@ -0,0 +1,16 @@ +:original_name: dds_api_permission.html + +.. _dds_api_permission: + +Permissions Policies and Supported Actions +========================================== + +- :ref:`Introduction ` +- :ref:`DDS Actions ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + introduction + dds_actions diff --git a/api-ref/source/permissions_policies_and_supported_actions/introduction.rst b/api-ref/source/permissions_policies_and_supported_actions/introduction.rst new file mode 100644 index 0000000..fd43ae1 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/introduction.rst @@ -0,0 +1,30 @@ +:original_name: dds_api_0036.html + +.. _dds_api_0036: + +Introduction +============ + +This chapter describes fine-grained permissions management for your DDS. If your account does not need individual IAM users, then you may skip over this chapter. + +By default, new IAM users do not have permissions assigned. You need to add a user to one or more groups, and attach permissions policies or roles to these groups. Users inherit permissions from the groups to which they are added and can perform specified operations on cloud services based on the permissions. + +You can grant users permissions by using roles and policies. Roles are a type of coarse-grained authorization mechanism that defines permissions related to user responsibilities. Policies define API-based permissions for operations on specific resources under certain conditions, allowing for more fine-grained, secure access control of cloud resources. + +.. note:: + + Policy-based authorization is useful if you want to allow or deny the access to an API. + +An account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. The permissions required for calling an API are determined by the actions supported by the API. Only users that have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user queries DDS DB instances using an API, the user must have been granted permissions that allow the **dds:instance:list** action. + +Supported Actions +----------------- + +DDS provides system-defined policies that can be directly used in IAM. You can also create custom policies and use them to supplement system-defined policies, implementing more refined access control. Operations supported by policies are specific to APIs. The following are common concepts related to policies: + +- Permission: A statement in a policy that allows or denies certain operations. +- APIs: REST APIs that can be called in a custom policy. +- Actions: Added to a custom policy to control permissions for specific operations. +- IAM projects or enterprise projects: Type of projects in which policies can be used to grant permissions. A policy can be applied to IAM projects, enterprise projects, or both. Policies that contain actions supporting both IAM and enterprise projects can be assigned to user groups and take effect in both IAM and Enterprise Management. Policies that only contain actions supporting IAM projects can be assigned to user groups and only take effect for IAM. Such policies will not take effect if they are assigned to user groups in Enterprise Management. + +For details about the custom actions supported by DDS, see :ref:`DDS Actions `.