forked from docs/gaussdb-mysql
Compare commits
4 Commits
main
...
propose-ga
Author | SHA1 | Date | |
---|---|---|---|
ea851d0e22 | |||
d01f123ec6 | |||
427027d148 | |||
6764e4fc7c |
BIN
api-ref/source/_static/images/en-us_image_0000001372529646.png
Normal file
BIN
api-ref/source/_static/images/en-us_image_0000001372529646.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
BIN
api-ref/source/_static/images/en-us_image_0000001422968749.gif
Normal file
BIN
api-ref/source/_static/images/en-us_image_0000001422968749.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
BIN
api-ref/source/_static/images/en-us_image_0000001423128721.jpg
Normal file
BIN
api-ref/source/_static/images/en-us_image_0000001423128721.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
24
api-ref/source/api/index.rst
Normal file
24
api-ref/source/api/index.rst
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
:original_name: gaussdb_04_0000.html
|
||||||
|
|
||||||
|
.. _gaussdb_04_0000:
|
||||||
|
|
||||||
|
API
|
||||||
|
===
|
||||||
|
|
||||||
|
- :ref:`Querying Version Information About a DB Engine <gaussdb_04_0001>`
|
||||||
|
- :ref:`Querying Database Specifications <gaussdb_04_0002>`
|
||||||
|
- :ref:`Managing DB Instances <gaussdb_04_0003>`
|
||||||
|
- :ref:`Managing Parameter Templates <gaussdb_04_0008>`
|
||||||
|
- :ref:`Managing Quotas <gaussdb_04_0010>`
|
||||||
|
- :ref:`Obtaining Task Information <gaussdb_04_0014>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
querying_version_information_about_a_db_engine
|
||||||
|
querying_database_specifications
|
||||||
|
managing_db_instances/index
|
||||||
|
managing_parameter_templates/index
|
||||||
|
managing_quotas/index
|
||||||
|
obtaining_task_information
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,75 @@
|
|||||||
|
:original_name: gaussdb_04_0007.html
|
||||||
|
|
||||||
|
.. _gaussdb_04_0007:
|
||||||
|
|
||||||
|
Deleting a DB Instance
|
||||||
|
======================
|
||||||
|
|
||||||
|
Function
|
||||||
|
--------
|
||||||
|
|
||||||
|
This API is used to delete a DB instance.
|
||||||
|
|
||||||
|
- Learn how to :ref:`authorize and authenticate <gaussdb_03_0001>` this API before using it.
|
||||||
|
- Before calling this API, obtain the required :ref:`region and endpoint <gaussdb_00_0003>`.
|
||||||
|
|
||||||
|
URI
|
||||||
|
---
|
||||||
|
|
||||||
|
- URI format
|
||||||
|
|
||||||
|
DELETE https://{*Endpoint*}/mysql/v3/{project_id}/instances/{instance_id}
|
||||||
|
|
||||||
|
- Example
|
||||||
|
|
||||||
|
DELETE https://{*Endpoint*}/mysql/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01
|
||||||
|
|
||||||
|
- Parameter description
|
||||||
|
|
||||||
|
.. table:: **Table 1** Parameter description
|
||||||
|
|
||||||
|
+-----------------------+-----------------------+----------------------------------------------------------------------------+
|
||||||
|
| Name | Mandatory | Description |
|
||||||
|
+=======================+=======================+============================================================================+
|
||||||
|
| project_id | Yes | Project ID of a tenant in a region. |
|
||||||
|
| | | |
|
||||||
|
| | | To obtain this value, see :ref:`Obtaining a Project ID <gaussdb_10_0004>`. |
|
||||||
|
+-----------------------+-----------------------+----------------------------------------------------------------------------+
|
||||||
|
| instance_id | Yes | DB instance ID, which is compliant with the UUID format. |
|
||||||
|
+-----------------------+-----------------------+----------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Normal response
|
||||||
|
|
||||||
|
.. table:: **Table 2** Parameter description
|
||||||
|
|
||||||
|
====== ====== ====================================
|
||||||
|
Name Type Description
|
||||||
|
====== ====== ====================================
|
||||||
|
job_id String ID of the DB instance deletion task.
|
||||||
|
====== ====== ====================================
|
||||||
|
|
||||||
|
- Example normal response
|
||||||
|
|
||||||
|
.. code-block:: text
|
||||||
|
|
||||||
|
{
|
||||||
|
"job_id": "dff1d289-4d03-4942-8b9f-463ea07c000d"
|
||||||
|
}
|
||||||
|
|
||||||
|
Status Code
|
||||||
|
-----------
|
||||||
|
|
||||||
|
For details, see :ref:`Status Codes <gaussdb_10_0002>`.
|
||||||
|
|
||||||
|
Error Code
|
||||||
|
----------
|
||||||
|
|
||||||
|
For details, see :ref:`Error Codes <gaussdb_10_0003>`.
|
20
api-ref/source/api/managing_db_instances/index.rst
Normal file
20
api-ref/source/api/managing_db_instances/index.rst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
:original_name: gaussdb_04_0003.html
|
||||||
|
|
||||||
|
.. _gaussdb_04_0003:
|
||||||
|
|
||||||
|
Managing DB Instances
|
||||||
|
=====================
|
||||||
|
|
||||||
|
- :ref:`Creating a DB instance <gaussdb_04_0004>`
|
||||||
|
- :ref:`Querying a DB Instance List <gaussdb_04_0005>`
|
||||||
|
- :ref:`Querying Details of a DB Instance <gaussdb_04_0006>`
|
||||||
|
- :ref:`Deleting a DB Instance <gaussdb_04_0007>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
creating_a_db_instance
|
||||||
|
querying_a_db_instance_list
|
||||||
|
querying_details_of_a_db_instance
|
||||||
|
deleting_a_db_instance
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
14
api-ref/source/api/managing_parameter_templates/index.rst
Normal file
14
api-ref/source/api/managing_parameter_templates/index.rst
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
:original_name: gaussdb_04_0008.html
|
||||||
|
|
||||||
|
.. _gaussdb_04_0008:
|
||||||
|
|
||||||
|
Managing Parameter Templates
|
||||||
|
============================
|
||||||
|
|
||||||
|
- :ref:`Querying a Parameter Template <gaussdb_04_0009>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
querying_a_parameter_template
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
18
api-ref/source/api/managing_quotas/index.rst
Normal file
18
api-ref/source/api/managing_quotas/index.rst
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
:original_name: gaussdb_04_0010.html
|
||||||
|
|
||||||
|
.. _gaussdb_04_0010:
|
||||||
|
|
||||||
|
Managing Quotas
|
||||||
|
===============
|
||||||
|
|
||||||
|
- :ref:`Querying Resource Quotas <gaussdb_04_0011>`
|
||||||
|
- :ref:`Configuring Resource Quotas <gaussdb_04_0012>`
|
||||||
|
- :ref:`Modifying Resource Quotas <gaussdb_04_0013>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
querying_resource_quotas
|
||||||
|
configuring_resource_quotas
|
||||||
|
modifying_resource_quotas
|
132
api-ref/source/api/managing_quotas/modifying_resource_quotas.rst
Normal file
132
api-ref/source/api/managing_quotas/modifying_resource_quotas.rst
Normal file
File diff suppressed because it is too large
Load Diff
116
api-ref/source/api/managing_quotas/querying_resource_quotas.rst
Normal file
116
api-ref/source/api/managing_quotas/querying_resource_quotas.rst
Normal file
File diff suppressed because it is too large
Load Diff
186
api-ref/source/api/obtaining_task_information.rst
Normal file
186
api-ref/source/api/obtaining_task_information.rst
Normal file
File diff suppressed because it is too large
Load Diff
142
api-ref/source/api/querying_database_specifications.rst
Normal file
142
api-ref/source/api/querying_database_specifications.rst
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,92 @@
|
|||||||
|
:original_name: gaussdb_04_0001.html
|
||||||
|
|
||||||
|
.. _gaussdb_04_0001:
|
||||||
|
|
||||||
|
Querying Version Information About a DB Engine
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
Function
|
||||||
|
--------
|
||||||
|
|
||||||
|
This API is used to query the DB version information of a specified DB engine.
|
||||||
|
|
||||||
|
- Learn how to :ref:`authorize and authenticate <gaussdb_03_0001>` this API before using it.
|
||||||
|
- Before calling this API, obtain the required :ref:`region and endpoint <gaussdb_00_0003>`.
|
||||||
|
|
||||||
|
URI
|
||||||
|
---
|
||||||
|
|
||||||
|
- URI format
|
||||||
|
|
||||||
|
GET https://{*Endpoint*}/mysql/v3/{project_id}/datastores/{database_name}
|
||||||
|
|
||||||
|
- Example
|
||||||
|
|
||||||
|
GET https://{*Endpoint*}/mysql/v3/619d3e78f61b4be68bc5aa0b59edcf7b/datastores/gaussdb-mysql
|
||||||
|
|
||||||
|
- Parameter description
|
||||||
|
|
||||||
|
.. table:: **Table 1** Parameter description
|
||||||
|
|
||||||
|
+-----------------------+-----------------------+-----------------------------------------------------------------------------------+
|
||||||
|
| Name | Mandatory | Description |
|
||||||
|
+=======================+=======================+===================================================================================+
|
||||||
|
| project_id | Yes | Project ID of a tenant in a region. |
|
||||||
|
| | | |
|
||||||
|
| | | To obtain this value, see :ref:`Obtaining a Project ID <gaussdb_10_0004>`. |
|
||||||
|
+-----------------------+-----------------------+-----------------------------------------------------------------------------------+
|
||||||
|
| database_name | Yes | DB engine. The following DB engine is supported (case-insensitive): gaussdb-mysql |
|
||||||
|
+-----------------------+-----------------------+-----------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
- Normal response
|
||||||
|
|
||||||
|
.. table:: **Table 2** Parameter description
|
||||||
|
|
||||||
|
+-----------------------+-----------------------+-------------------------------------------------------------------+
|
||||||
|
| Name | Type | Description |
|
||||||
|
+=======================+=======================+===================================================================+
|
||||||
|
| datastores | Array of objects | DB version list. |
|
||||||
|
| | | |
|
||||||
|
| | | For details, see :ref:`Table 3 <gaussdb_04_0001__table66531170>`. |
|
||||||
|
+-----------------------+-----------------------+-------------------------------------------------------------------+
|
||||||
|
|
||||||
|
.. _gaussdb_04_0001__table66531170:
|
||||||
|
|
||||||
|
.. table:: **Table 3** datastores field data structure description
|
||||||
|
|
||||||
|
+------+--------+-------------------------------------------------------------------------------+
|
||||||
|
| Name | Type | Description |
|
||||||
|
+======+========+===============================================================================+
|
||||||
|
| id | String | DB version ID. Its value is unique. |
|
||||||
|
+------+--------+-------------------------------------------------------------------------------+
|
||||||
|
| name | String | DB version number. Only the major version number with two digits is returned. |
|
||||||
|
+------+--------+-------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
- Example normal response
|
||||||
|
|
||||||
|
.. code-block:: text
|
||||||
|
|
||||||
|
{
|
||||||
|
"datastores": [{
|
||||||
|
"id": "87620726-6802-46c0-9028-a8785e1f1921",
|
||||||
|
"name": "8.0"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
Status Code
|
||||||
|
-----------
|
||||||
|
|
||||||
|
For details, see :ref:`Status Codes <gaussdb_10_0002>`.
|
||||||
|
|
||||||
|
Error Code
|
||||||
|
----------
|
||||||
|
|
||||||
|
For details, see :ref:`Error Codes <gaussdb_10_0003>`.
|
24
api-ref/source/api_overview.rst
Normal file
24
api-ref/source/api_overview.rst
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
:original_name: gaussdb_02_0000.html
|
||||||
|
|
||||||
|
.. _gaussdb_02_0000:
|
||||||
|
|
||||||
|
API Overview
|
||||||
|
============
|
||||||
|
|
||||||
|
With GaussDB(for MySQL) APIs, you can query, set, and modify resource quotas.
|
||||||
|
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Type | Description |
|
||||||
|
+===============================+===============================================================================================================================================+
|
||||||
|
| DB engine version query | Query the DB version information of a specified DB engine. |
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| DB specifications query | Query the DB specifications of a specified DB engine version. |
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| DB instance management | Create DB instances, query DB instance lists, query DB instance details, delete DB instances, create read replicas, and delete read replicas. |
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Parameter template management | Query parameter templates. |
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Quota management | Query, set, and modify resource quotas. |
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Task information query | Obtain task information about the task center. |
|
||||||
|
+-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
|
27
api-ref/source/appendix/abnormal_request_results.rst
Normal file
27
api-ref/source/appendix/abnormal_request_results.rst
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
:original_name: gaussdb_10_0001.html
|
||||||
|
|
||||||
|
.. _gaussdb_10_0001:
|
||||||
|
|
||||||
|
Abnormal Request Results
|
||||||
|
========================
|
||||||
|
|
||||||
|
- Abnormal response description
|
||||||
|
|
||||||
|
.. table:: **Table 1** Abnormal response description
|
||||||
|
|
||||||
|
+------------+--------+---------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| Name | Type | Description |
|
||||||
|
+============+========+=====================================================================================================================+
|
||||||
|
| error_code | String | Returned error code when a task submission exception occurs. For details, see :ref:`Error Codes <gaussdb_10_0003>`. |
|
||||||
|
+------------+--------+---------------------------------------------------------------------------------------------------------------------+
|
||||||
|
| error_msg | String | Returned error description when a task submission exception occurs. |
|
||||||
|
+------------+--------+---------------------------------------------------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
- Example response
|
||||||
|
|
||||||
|
.. code-block:: text
|
||||||
|
|
||||||
|
{
|
||||||
|
"error_code": "DBS.280234",
|
||||||
|
"error_msg": "Invalid DB instance name."
|
||||||
|
}
|
90
api-ref/source/appendix/error_codes.rst
Normal file
90
api-ref/source/appendix/error_codes.rst
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
:original_name: gaussdb_10_0003.html
|
||||||
|
|
||||||
|
.. _gaussdb_10_0003:
|
||||||
|
|
||||||
|
Error Codes
|
||||||
|
===========
|
||||||
|
|
||||||
|
The following table describes error codes.
|
||||||
|
|
||||||
|
.. table:: **Table 1** Error codes
|
||||||
|
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| Error Code | Response Code | Description |
|
||||||
|
+============+===============+=================================================================================================+
|
||||||
|
| DBS.200040 | 400 | The DB engine type must be specified. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.200041 | 400 | Invalid DB engine type. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.200051 | 500 | Invalid deployment mode. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.200910 | 400 | The maximum number of read replicas has been reached. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280203 | 400 | This is a weak password. Please enter a strong password. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280216 | 400 | Invalid backup start time. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280227 | 400 | The new storage space must be greater than the current storage and must be a multiple of 10 GB. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280234 | 400 | Invalid DB instance name. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280235 | 400 | Invalid database type. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280236 | 400 | Invalid database version. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280237 | 400 | DB engine information must be specified. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280238 | 400 | The DB engine or version is not supported. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280242 | 400 | Storage space is out of range. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280243 | 400 | Invalid region. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280247 | 400 | Invalid VPC ID. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280248 | 400 | Invalid subnet ID. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280260 | 400 | Invalid AZ. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280266 | 400 | Storage space must be a multiple of 10. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280288 | 400 | Invalid specification code. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280305 | 400 | Invalid security group. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280311 | 400 | Storage space must be specified. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280342 | 400 | Invalid cluster mode. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280365 | 400 | Invalid billing mode. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280431 | 400 | Invalid billing period. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280433 | 400 | Invalid enterprise project ID. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280434 | 400 | Invalid specification code |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280447 | 400 | Invalid time zone. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280448 | 400 | The storage type is sold out. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280450 | 400 | The DB instance specifications are sold out. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280462 | 400 | Invalid auto renewal parameter. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280463 | 400 | Invalid auto payment parameter. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280464 | 400 | Primary AZ cannot be defined in a single AZ. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280465 | 400 | Invalid password. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280466 | 400 | Invalid read replica quantity. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280467 | 400 | Invalid read replica failover priority. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280468 | 400 | Invalid DB instance type. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280470 | 400 | The primary node and read replicas must be located in different AZs. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
||||||
|
| DBS.280471 | 500 | CBC error. |
|
||||||
|
+------------+---------------+-------------------------------------------------------------------------------------------------+
|
187
api-ref/source/appendix/gaussdbfor_mysql_monitoring_metrics.rst
Normal file
187
api-ref/source/appendix/gaussdbfor_mysql_monitoring_metrics.rst
Normal file
File diff suppressed because it is too large
Load Diff
22
api-ref/source/appendix/index.rst
Normal file
22
api-ref/source/appendix/index.rst
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
:original_name: gaussdb_10_0000.html
|
||||||
|
|
||||||
|
.. _gaussdb_10_0000:
|
||||||
|
|
||||||
|
Appendix
|
||||||
|
========
|
||||||
|
|
||||||
|
- :ref:`Abnormal Request Results <gaussdb_10_0001>`
|
||||||
|
- :ref:`Status Codes <gaussdb_10_0002>`
|
||||||
|
- :ref:`Error Codes <gaussdb_10_0003>`
|
||||||
|
- :ref:`Obtaining a Project ID <gaussdb_10_0004>`
|
||||||
|
- :ref:`GaussDB(for MySQL) Monitoring Metrics <gaussdb_10_0006>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
abnormal_request_results
|
||||||
|
status_codes
|
||||||
|
error_codes
|
||||||
|
obtaining_a_project_id
|
||||||
|
gaussdbfor_mysql_monitoring_metrics
|
66
api-ref/source/appendix/obtaining_a_project_id.rst
Normal file
66
api-ref/source/appendix/obtaining_a_project_id.rst
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
:original_name: gaussdb_10_0004.html
|
||||||
|
|
||||||
|
.. _gaussdb_10_0004:
|
||||||
|
|
||||||
|
Obtaining a Project ID
|
||||||
|
======================
|
||||||
|
|
||||||
|
Scenarios
|
||||||
|
---------
|
||||||
|
|
||||||
|
When calling APIs, you need to specify the project ID in some URLs. To do so, you need to obtain the project ID first. Two methods are available:
|
||||||
|
|
||||||
|
- :ref:`Obtaining the Project ID by Calling an API <gaussdb_10_0004__section85791974381>`
|
||||||
|
- :ref:`Obtain a Project ID from the Console <gaussdb_10_0004__section196091152113715>`
|
||||||
|
|
||||||
|
.. _gaussdb_10_0004__section85791974381:
|
||||||
|
|
||||||
|
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 <https://docs.otc.t-systems.com/en-us/endpoint/index.html>`__. For details about API authentication, see :ref:`Authentication <gaussdb_03_0001>`.
|
||||||
|
|
||||||
|
The following is an example response. The value of **id** is the project ID.
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
{
|
||||||
|
"projects": [
|
||||||
|
{
|
||||||
|
"domain_id": "65382450e8f64ac0870cd180d14e684b",
|
||||||
|
"is_domain": false,
|
||||||
|
"parent_id": "65382450e8f64ac0870cd180d14e684b",
|
||||||
|
"name": "project_name",
|
||||||
|
"description": "",
|
||||||
|
"links": {
|
||||||
|
"next": null,
|
||||||
|
"previous": null,
|
||||||
|
"self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99"
|
||||||
|
},
|
||||||
|
"id": "a4a5d4098fb4474fa22cd05f897d6b99",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": {
|
||||||
|
"next": null,
|
||||||
|
"previous": null,
|
||||||
|
"self": "https://www.example.com/v3/projects"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.. _gaussdb_10_0004__section196091152113715:
|
||||||
|
|
||||||
|
Obtain a Project ID from the Console
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
#. Register yourself on the management console and log in to it.
|
||||||
|
|
||||||
|
#. Move your pointer over the username and select My Credentials in the displayed drop-down list.
|
||||||
|
|
||||||
|
On the **My Credentials** page, view project IDs in the project list.
|
||||||
|
|
||||||
|
|
||||||
|
.. figure:: /_static/images/en-us_image_0000001423128721.jpg
|
||||||
|
:alt: **Figure 1** Viewing project IDs
|
||||||
|
|
||||||
|
**Figure 1** Viewing project IDs
|
120
api-ref/source/appendix/status_codes.rst
Normal file
120
api-ref/source/appendix/status_codes.rst
Normal file
File diff suppressed because it is too large
Load Diff
8
api-ref/source/before_you_start/api_calling.rst
Normal file
8
api-ref/source/before_you_start/api_calling.rst
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
:original_name: gaussdb_00_0002.html
|
||||||
|
|
||||||
|
.. _gaussdb_00_0002:
|
||||||
|
|
||||||
|
API Calling
|
||||||
|
===========
|
||||||
|
|
||||||
|
GaussDB(for MySQL) supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see :ref:`Calling APIs <gaussdb_03_0000>`.
|
34
api-ref/source/before_you_start/concepts.rst
Normal file
34
api-ref/source/before_you_start/concepts.rst
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
:original_name: gaussdb_00_0005.html
|
||||||
|
|
||||||
|
.. _gaussdb_00_0005:
|
||||||
|
|
||||||
|
Concepts
|
||||||
|
========
|
||||||
|
|
||||||
|
- Domain
|
||||||
|
|
||||||
|
A domain is created upon successful registration. The domain has full access permissions for all of its cloud services and resources. It can be used to reset user passwords and grant user permissions. The domain is a payment entity and should not be used directly to perform routine management. For security purposes, create users and grant them permissions for routine management.
|
||||||
|
|
||||||
|
- IAM User
|
||||||
|
|
||||||
|
An IAM user is created using an account to use cloud services. Each IAM user has its own identity credentials (password and access keys).
|
||||||
|
|
||||||
|
API authentication requires information such as the account name, username, and password.
|
||||||
|
|
||||||
|
- Region
|
||||||
|
|
||||||
|
A region is a geographic area in which cloud resources are deployed. Availability zones (AZs) in the same region can communicate with each other over an intranet, while AZs in different regions are isolated from each other. Deploying cloud resources in different regions can better suit certain user requirements or comply with local laws or regulations.
|
||||||
|
|
||||||
|
- AZ
|
||||||
|
|
||||||
|
An AZ contains one or more physical data centers. Each AZ has independent cooling, fire extinguishing, moisture-proof, and electricity facilities. Within an AZ, computing, network, storage, and other resources are logically divided into multiple clusters. AZs within a region are interconnected using high-speed optical fibers to support cross-AZ high-availability systems.
|
||||||
|
|
||||||
|
- Project
|
||||||
|
|
||||||
|
Projects group and isolate resources (including compute, storage, and network resources) across physical regions. A default project is provided for each region, and subprojects can be created under each default project. Users can be granted permissions to access all resources in a specific project. For more refined access control, create subprojects under a project and purchase resources in the subprojects. Users can then be assigned permissions to access only specific resources in the subprojects.
|
||||||
|
|
||||||
|
|
||||||
|
.. figure:: /_static/images/en-us_image_0000001422968749.gif
|
||||||
|
:alt: **Figure 1** Project isolating model
|
||||||
|
|
||||||
|
**Figure 1** Project isolating model
|
9
api-ref/source/before_you_start/constraints.rst
Normal file
9
api-ref/source/before_you_start/constraints.rst
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
:original_name: gaussdb_00_0004.html
|
||||||
|
|
||||||
|
.. _gaussdb_00_0004:
|
||||||
|
|
||||||
|
Constraints
|
||||||
|
===========
|
||||||
|
|
||||||
|
- The number of DB instances that you can create is determined by your quota. To view or increase the quota, see "Managing Quotas" in the *GaussDB(for MySQL) User Guide*.
|
||||||
|
- For more constraints, see API description.
|
8
api-ref/source/before_you_start/endpoints.rst
Normal file
8
api-ref/source/before_you_start/endpoints.rst
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
:original_name: gaussdb_00_0003.html
|
||||||
|
|
||||||
|
.. _gaussdb_00_0003:
|
||||||
|
|
||||||
|
Endpoints
|
||||||
|
=========
|
||||||
|
|
||||||
|
An endpoint is the **request address** for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see `Regions and Endpoints <https://docs.otc.t-systems.com/en-us/endpoint/index.html>`__.
|
22
api-ref/source/before_you_start/index.rst
Normal file
22
api-ref/source/before_you_start/index.rst
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
:original_name: gaussdb_00_0011.html
|
||||||
|
|
||||||
|
.. _gaussdb_00_0011:
|
||||||
|
|
||||||
|
Before You Start
|
||||||
|
================
|
||||||
|
|
||||||
|
- :ref:`Overview <gaussdb_00_0001>`
|
||||||
|
- :ref:`API Calling <gaussdb_00_0002>`
|
||||||
|
- :ref:`Endpoints <gaussdb_00_0003>`
|
||||||
|
- :ref:`Constraints <gaussdb_00_0004>`
|
||||||
|
- :ref:`Concepts <gaussdb_00_0005>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
overview
|
||||||
|
api_calling
|
||||||
|
endpoints
|
||||||
|
constraints
|
||||||
|
concepts
|
10
api-ref/source/before_you_start/overview.rst
Normal file
10
api-ref/source/before_you_start/overview.rst
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
:original_name: gaussdb_00_0001.html
|
||||||
|
|
||||||
|
.. _gaussdb_00_0001:
|
||||||
|
|
||||||
|
Overview
|
||||||
|
========
|
||||||
|
|
||||||
|
This document describes how to use application programming interfaces (APIs) to perform operations on DB instances. For details about all supported operations, see :ref:`API Overview <gaussdb_02_0000>`.
|
||||||
|
|
||||||
|
If you plan to access GaussDB(for MySQL) through an API, ensure that you are familiar with GaussDB(for MySQL) concepts. For details, see "What Is GaussDB(for MySQL)?" in the *GaussDB(for MySQL) User Guide*.
|
28
api-ref/source/calling_apis/authentication.rst
Normal file
28
api-ref/source/calling_apis/authentication.rst
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
:original_name: gaussdb_03_0001.html
|
||||||
|
|
||||||
|
.. _gaussdb_03_0001:
|
||||||
|
|
||||||
|
Authentication
|
||||||
|
==============
|
||||||
|
|
||||||
|
Token authentication must be performed to call APIs.
|
||||||
|
|
||||||
|
Authentication using tokens: General requests are authenticated using tokens.
|
||||||
|
|
||||||
|
Token-based Authentication
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
In :ref:`Making an API Request <gaussdb_03_0005>`, the process of calling the API used to `obtain a user token <https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html>`__ is described.
|
||||||
|
|
||||||
|
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....**, **X-Auth-Token: ABCDEFJ....** can be added to a request as follows:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
Content-Type: application/json
|
||||||
|
X-Auth-Token: ABCDEFJ....
|
18
api-ref/source/calling_apis/index.rst
Normal file
18
api-ref/source/calling_apis/index.rst
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
:original_name: gaussdb_03_0000.html
|
||||||
|
|
||||||
|
.. _gaussdb_03_0000:
|
||||||
|
|
||||||
|
Calling APIs
|
||||||
|
============
|
||||||
|
|
||||||
|
- :ref:`Making an API Request <gaussdb_03_0005>`
|
||||||
|
- :ref:`Authentication <gaussdb_03_0001>`
|
||||||
|
- :ref:`Response <gaussdb_03_0006>`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
making_an_api_request
|
||||||
|
authentication
|
||||||
|
response
|
132
api-ref/source/calling_apis/making_an_api_request.rst
Normal file
132
api-ref/source/calling_apis/making_an_api_request.rst
Normal file
File diff suppressed because it is too large
Load Diff
62
api-ref/source/calling_apis/response.rst
Normal file
62
api-ref/source/calling_apis/response.rst
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
:original_name: gaussdb_03_0006.html
|
||||||
|
|
||||||
|
.. _gaussdb_03_0006:
|
||||||
|
|
||||||
|
Response
|
||||||
|
========
|
||||||
|
|
||||||
|
Status Code
|
||||||
|
-----------
|
||||||
|
|
||||||
|
After sending a request, you will receive a response, including the status code, response header, and response body.
|
||||||
|
|
||||||
|
A status code is a group of digits ranging from 1xx to 5xx. It indicates the status of a response. For more information, see :ref:`Status Codes <gaussdb_10_0002>`.
|
||||||
|
|
||||||
|
For example, if status code **201** is returned for calling the API used to `obtain a user token <https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html>`__, the request is successful.
|
||||||
|
|
||||||
|
Response Header
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Similar to a request, a response also has a header, for example, **Content-Type**.
|
||||||
|
|
||||||
|
:ref:`Figure 1 <gaussdb_03_0006__fig4865141011511>` shows the response header for the API used to `obtain a user token <https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html>`__. The **x-subject-token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs.
|
||||||
|
|
||||||
|
.. _gaussdb_03_0006__fig4865141011511:
|
||||||
|
|
||||||
|
.. figure:: /_static/images/en-us_image_0000001372529646.png
|
||||||
|
:alt: **Figure 1** Header fields of the response to the request for obtaining a user token
|
||||||
|
|
||||||
|
**Figure 1** Header fields of the response to the request for obtaining a user token
|
||||||
|
|
||||||
|
(Optional) Response Body
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
This part is optional. The body of a response is often returned in structured format as specified in the **Content-Type** header field. The response body transfers content except the response header.
|
||||||
|
|
||||||
|
The following is part of the response body for the API used to `obtain a user token <https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html>`__.
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
{
|
||||||
|
"token": {
|
||||||
|
"expires_at": "2019-02-13T06:52:13.855000Z",
|
||||||
|
"methods": [
|
||||||
|
"password"
|
||||||
|
],
|
||||||
|
"catalog": [
|
||||||
|
{
|
||||||
|
"endpoints": [
|
||||||
|
{
|
||||||
|
"region_id": "az-01",
|
||||||
|
......
|
||||||
|
|
||||||
|
If an error occurs during API calling, an error code and a message will be displayed. The following shows an error response body.
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
{
|
||||||
|
"error_code": "AS.0001",
|
||||||
|
"error_msg": "The format of message is error"
|
||||||
|
}
|
||||||
|
|
||||||
|
In the response body, **error_code** is an error code, and **error_msg** provides information about the error.
|
17
api-ref/source/change_history.rst
Normal file
17
api-ref/source/change_history.rst
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
:original_name: changeHistory.html
|
||||||
|
|
||||||
|
.. _changeHistory:
|
||||||
|
|
||||||
|
Change History
|
||||||
|
==============
|
||||||
|
|
||||||
|
+-----------------------------------+-------------------------------------------------------------------------------------+
|
||||||
|
| Released On | Description |
|
||||||
|
+===================================+=====================================================================================+
|
||||||
|
| 2022-10-30 | This issue is the second official release. |
|
||||||
|
| | |
|
||||||
|
| | - Optimized the content in :ref:`Querying a Parameter Template <gaussdb_04_0009>`. |
|
||||||
|
| | - Optimized the content in :ref:`Querying a DB Instance List <gaussdb_04_0005>`. |
|
||||||
|
+-----------------------------------+-------------------------------------------------------------------------------------+
|
||||||
|
| 2020-05-30 | This issue is the first official release. |
|
||||||
|
+-----------------------------------+-------------------------------------------------------------------------------------+
|
@ -24,8 +24,11 @@ extensions = [
|
|||||||
otcdocs_auto_name = False
|
otcdocs_auto_name = False
|
||||||
otcdocs_auto_version = False
|
otcdocs_auto_version = False
|
||||||
|
|
||||||
project = 'GaussDB Enterprise-class Distributed Database compatible with MySQL'
|
project = 'GaussDB (for MySQL)'
|
||||||
otcdocs_repo_name = 'docs/gaussdb-mysql'
|
otcdocs_repo_name = 'docs/gaussdb-mysql'
|
||||||
|
# Those variables are required for edit/bug links
|
||||||
|
otcdocs_git_fqdn = 'gitea.eco.tsi-dev.otc-service.com'
|
||||||
|
otcdocs_git_type = 'gitea'
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
@ -35,6 +38,9 @@ sys.path.insert(0, os.path.abspath('../'))
|
|||||||
sys.path.insert(0, os.path.abspath('./'))
|
sys.path.insert(0, os.path.abspath('./'))
|
||||||
|
|
||||||
# -- General configuration ----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
|
# https://docutils.sourceforge.io/docs/user/smartquotes.html - it does not
|
||||||
|
# what it is expected
|
||||||
|
smartquotes = False
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
@ -69,17 +75,18 @@ show_authors = False
|
|||||||
html_theme = 'otcdocs'
|
html_theme = 'otcdocs'
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'disable_search': True,
|
"disable_search": True,
|
||||||
'site_name': 'Internal Documentation Portal'
|
"site_name": "Internal Documentation Portal",
|
||||||
|
"logo_url": "https://docs-int.otc-service.com",
|
||||||
}
|
}
|
||||||
|
|
||||||
# The name for this set of Sphinx documents. If None, it defaults to
|
# The name for this set of Sphinx documents. If None, it defaults to
|
||||||
# "<project> v<release> documentation".
|
# "<project> v<release> documentation".
|
||||||
|
|
||||||
html_title = "GaussDB Enterprise-class Distributed Database compatible with MySQL - API Reference"
|
html_title = "GaussDB (for MySQL) - API Reference"
|
||||||
|
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
@ -89,8 +96,8 @@ html_static_path = ['_static']
|
|||||||
|
|
||||||
# -- Options for PDF output --------------------------------------------------
|
# -- Options for PDF output --------------------------------------------------
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index',
|
('index',
|
||||||
'gaussdb_mysql-api-ref.tex',
|
'gaussdb_mysql-api-ref.tex',
|
||||||
u'GaussDB Enterprise-class Distributed Database compatible with MySQL - API Reference',
|
u'GaussDB (for MySQL) - API Reference',
|
||||||
u'OpenTelekomCloud', 'manual'),
|
u'OpenTelekomCloud', 'manual'),
|
||||||
]
|
]
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
===================================================================================
|
===================================
|
||||||
GaussDB Enterprise-class Distributed Database compatible with MySQL - API Reference
|
GaussDB (for MySQL) - API Reference
|
||||||
===================================================================================
|
===================================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
before_you_start/index
|
||||||
|
api_overview
|
||||||
|
calling_apis/index
|
||||||
|
api/index
|
||||||
|
appendix/index
|
||||||
|
change_history
|
||||||
|
Loading…
x
Reference in New Issue
Block a user