Compare commits
4 Commits
main
...
propose-cc
Author | SHA1 | Date | |
---|---|---|---|
9781666424 | |||
e28fd99df8 | |||
1405c2c1cb | |||
1d8e3dd128 |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 205 KiB |
Before Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 7.9 KiB |
@ -1,41 +0,0 @@
|
||||
:original_name: cce_02_0344.html
|
||||
|
||||
.. _cce_02_0344:
|
||||
|
||||
API Usage Guidelines
|
||||
====================
|
||||
|
||||
Cloud APIs comply with the RESTful API design principles. REST-based web services are organized into resources. Each resource is identified by one or more Uniform Resource Identifiers (URIs). An application accesses a resource based on the resource's Unified Resource Locator (URL). A URL is usually in the following format: *https://Endpoint/uri*. In the URL, *uri* indicates the resource path, that is, the API access path.
|
||||
|
||||
Cloud APIs use HTTPS as the transmission protocol. Requests/Responses are transmitted by using JSON messages, with media type represented by **Application/json**.
|
||||
|
||||
- The URL of APIs described in :ref:`Cluster Management <cce_02_0092>` is in the format of *https://Endpoint/uri*. In the URL, uri indicates the resource path, that is, the API access path. Use X-Auth-Token as a header.
|
||||
|
||||
- The URL of Kubernetes-native APIs described in :ref:`Add-on Management <cce_02_0320>` and :ref:`Kubernetes APIs <cce_02_0340>` is in the format of **https://{clusterid}.Endpoint/uri**. In the URL, {clusterid} indicates a cluster ID, and uri indicates the resource path, that is, the API access path. Use X-Auth-Token as a header.
|
||||
|
||||
- The URL of Kubernetes-native APIs is in the format of **https://{publicip}:5443/uri**. In the URL, **{publicip}** indicates EIP of the cluster, and **uri** indicates the resource path, that is, the API access path. Use X-Remote-User or Authorization as a header.
|
||||
|
||||
Before using X-Remote-User as a header, obtain the required certificate in advance. Two types of certificates are supported:
|
||||
|
||||
- Self-owned certificate uploaded during cluster creation. For details, see `Creating a Cluster <https://docs.otc.t-systems.com/en-us/usermanual2/cce/cce_10_0028.html>`__.
|
||||
|
||||
|image1|
|
||||
|
||||
- Cluster certificate generated and downloaded after cluster creation. For details, see `Obtaining a Cluster Certificate <https://docs.otc.t-systems.com/en-us/usermanual2/cce/cce_10_0175.html>`__.
|
||||
|
||||
|image2|
|
||||
|
||||
For details about how to use APIs, see `API Usage Guidelines <https://docs.otc.t-systems.com/en-us/api/apiug/apig-en-api-180328001.html?tag=API%20Documents>`__.
|
||||
|
||||
CCE provides two methods to authenticate requests for calling an API: token and AK/SK. Select an authentication method based on actual requirements. If token-based authentication is used, you can call service APIs by using either of the following methods after obtaining a token:
|
||||
|
||||
- Method 1: Add **X-Auth-Token** to the request header and set **X-Auth-Token: ${token}** with the obtained IAM token.
|
||||
- Method 2: Add **Authorization** to the request header and set **Authorization: Bearer ${token}** with the obtained IAM token or token from Kubernetes service account.
|
||||
- Method 3: Add **X-Remote-User** to the request header and set **X-Remote-User**: **user** with a valid certificate.
|
||||
|
||||
.. note::
|
||||
|
||||
Method 3 requires that the CA root certificate must has been uploaded before you create a cluster on the CCE console.
|
||||
|
||||
.. |image1| image:: /_static/images/en-us_image_0000001121602072.png
|
||||
.. |image2| image:: /_static/images/en-us_image_0227096557.png
|
@ -1,85 +0,0 @@
|
||||
:original_name: cce_02_0324.html
|
||||
|
||||
.. _cce_02_0324:
|
||||
|
||||
Deleting an Add-on Instance
|
||||
===========================
|
||||
|
||||
Function
|
||||
--------
|
||||
|
||||
This API is used to delete an add-on instance.
|
||||
|
||||
.. note::
|
||||
|
||||
The URL for add-on management is in the format of **https://{clusterid}.Endpoint/uri.** In the URL, *{clusterid}* indicates the cluster ID, and *uri* indicates the resource path, that is, the path for API access.
|
||||
|
||||
URI
|
||||
---
|
||||
|
||||
DELETE /api/v3/addons/{id}?cluster_id={cluster_id}
|
||||
|
||||
:ref:`Table 1 <cce_02_0324__table493910491373>` describes the parameters of this API.
|
||||
|
||||
.. _cce_02_0324__table493910491373:
|
||||
|
||||
.. table:: **Table 1** Parameter description
|
||||
|
||||
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Parameter | Mandatory | Type | Description |
|
||||
+============+===========+========+===============================================================================================================================+
|
||||
| cluster_id | Yes | String | Cluster ID. For details about how to obtain the cluster ID, see :ref:`How to Obtain Parameters in the API URI <cce_02_0271>`. |
|
||||
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| id | Yes | String | Add-on instance ID. For details about how to obtain the ID, see :ref:`Table 4 <cce_02_0323__table12181142512286>`. |
|
||||
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
**Request parameters:**
|
||||
|
||||
:ref:`Table 2 <cce_02_0324__table061744914219>` list the request parameters.
|
||||
|
||||
.. _cce_02_0324__table061744914219:
|
||||
|
||||
.. table:: **Table 2** Parameters in the request header
|
||||
|
||||
+-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Parameter | Mandatory | Description |
|
||||
+=======================+=======================+===============================================================================================================================================================================================================================================================================+
|
||||
| Content-Type | Yes | Message body type (format). |
|
||||
| | | |
|
||||
| | | Default: **application/json** |
|
||||
+-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| X-Auth-Token | Yes | Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details on how to obtain a user token, see :ref:`API Usage Guidelines <cce_02_0344>`. |
|
||||
+-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
**Example request:**
|
||||
|
||||
N/A
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
**Response parameters:**
|
||||
|
||||
N/A
|
||||
|
||||
**Example response:**
|
||||
|
||||
.. code-block::
|
||||
|
||||
success
|
||||
|
||||
Status Codes
|
||||
------------
|
||||
|
||||
.. table:: **Table 3** Status codes
|
||||
|
||||
=========== ===========
|
||||
Status Code Description
|
||||
=========== ===========
|
||||
200 OK
|
||||
=========== ===========
|
||||
|
||||
For the description about error status codes, see :ref:`Status Code <cce_02_0084>`.
|
@ -1,24 +0,0 @@
|
||||
:original_name: cce_02_0320.html
|
||||
|
||||
.. _cce_02_0320:
|
||||
|
||||
Add-on Management
|
||||
=================
|
||||
|
||||
- :ref:`Installing an Add-on Instance <cce_02_0322>`
|
||||
- :ref:`Reading Add-on Templates <cce_02_0321>`
|
||||
- :ref:`Updating an Add-on Instance <cce_02_0323>`
|
||||
- :ref:`Deleting an Add-on Instance <cce_02_0324>`
|
||||
- :ref:`Reading an Add-on Instance <cce_02_0325>`
|
||||
- :ref:`Listing Add-on Instances <cce_02_0326>`
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
installing_an_add-on_instance
|
||||
reading_add-on_templates
|
||||
updating_an_add-on_instance
|
||||
deleting_an_add-on_instance
|
||||
reading_an_add-on_instance
|
||||
listing_add-on_instances
|
@ -1,16 +0,0 @@
|
||||
:original_name: cce_02_0348.html
|
||||
|
||||
.. _cce_02_0348:
|
||||
|
||||
API Version Query
|
||||
=================
|
||||
|
||||
- :ref:`Querying All API Versions <cce_02_0349>`
|
||||
- :ref:`Querying Information About API v3 <cce_02_0350>`
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
querying_all_api_versions
|
||||
querying_information_about_api_v3
|
@ -1,77 +0,0 @@
|
||||
:original_name: cce_02_0350.html
|
||||
|
||||
.. _cce_02_0350:
|
||||
|
||||
Querying Information About API v3
|
||||
=================================
|
||||
|
||||
Function
|
||||
--------
|
||||
|
||||
This API is used to query information about API v3.
|
||||
|
||||
URI
|
||||
---
|
||||
|
||||
GET /v3
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
N/A
|
||||
|
||||
Response
|
||||
--------
|
||||
|
||||
**Response parameters:**
|
||||
|
||||
:ref:`Table 1 <cce_02_0350__table986610460219>` describes the response parameters.
|
||||
|
||||
.. _cce_02_0350__table986610460219:
|
||||
|
||||
.. table:: **Table 1** Response parameters
|
||||
|
||||
========= ===== =================
|
||||
Parameter Type Description
|
||||
========= ===== =================
|
||||
versions Array API version list.
|
||||
========= ===== =================
|
||||
|
||||
**Example response:**
|
||||
|
||||
.. code-block::
|
||||
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"id": "v3",
|
||||
"links": [
|
||||
{
|
||||
"href": "https://container.eu-de.***.t-systems.com/v3",
|
||||
"rel": "self"
|
||||
}
|
||||
],
|
||||
"min_version": "",
|
||||
"status": "CURRENT",
|
||||
"updated": "2018-09-15T00:00:00Z",
|
||||
"version": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Status Code
|
||||
-----------
|
||||
|
||||
:ref:`Table 2 <cce_02_0350__t8935d48c19714740abd2e888a39be462>` describes the status code of the API.
|
||||
|
||||
.. _cce_02_0350__t8935d48c19714740abd2e888a39be462:
|
||||
|
||||
.. table:: **Table 2** Status code
|
||||
|
||||
=========== ==================================
|
||||
Status Code Description
|
||||
=========== ==================================
|
||||
200 The query operation is successful.
|
||||
=========== ==================================
|
||||
|
||||
For details about error status codes, see :ref:`Status Code <cce_02_0084>`.
|
@ -1,77 +0,0 @@
|
||||
:original_name: cce_02_0374.html
|
||||
|
||||
.. _cce_02_0374:
|
||||
|
||||
Hibernating a Cluster
|
||||
=====================
|
||||
|
||||
Function
|
||||
--------
|
||||
|
||||
This API is used to hibernate a running cluster.
|
||||
|
||||
Constraints
|
||||
-----------
|
||||
|
||||
#. After a cluster is hibernated, resources such as workloads cannot be created or managed in the cluster.
|
||||
|
||||
URI
|
||||
---
|
||||
|
||||
POST /api/v3/projects/{project_id}/clusters/{cluster_id}/operation/hibernate
|
||||
|
||||
.. table:: **Table 1** Path parameters
|
||||
|
||||
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Parameter | Mandatory | Type | Description |
|
||||
+============+===========+========+===============================================================================================================================+
|
||||
| project_id | Yes | String | Project ID. For details about how to obtain the project ID, see :ref:`How to Obtain Parameters in the API URI <cce_02_0271>`. |
|
||||
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
| cluster_id | Yes | String | Cluster ID. For details about how to obtain the cluster ID, see :ref:`How to Obtain Parameters in the API URI <cce_02_0271>`. |
|
||||
+------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Request Parameters
|
||||
------------------
|
||||
|
||||
.. table:: **Table 2** Request header parameters
|
||||
|
||||
+-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Parameter | Mandatory | Type | Description |
|
||||
+=================+=================+=================+=========================================================================================================================================================================================================================================================================+
|
||||
| Content-Type | Yes | String | Message body type (format). |
|
||||
| | | | |
|
||||
| | | | Default: **application/json** |
|
||||
+-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| X-Auth-Token | Yes | String | Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this field is mandatory and must be set to a user token. For details about how to obtain a token, see :ref:`API Usage Guidelines <cce_02_0344>`. |
|
||||
| | | | |
|
||||
| | | | Maximum: **16384** |
|
||||
+-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
None
|
||||
|
||||
Example Requests
|
||||
----------------
|
||||
|
||||
None
|
||||
|
||||
Example Responses
|
||||
-----------------
|
||||
|
||||
None
|
||||
|
||||
Status Codes
|
||||
------------
|
||||
|
||||
+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| Status Code | Description |
|
||||
+=============+=========================================================================================================================================================================+
|
||||
| 200 | The cluster hibernation job is successfully delivered. Keep querying the cluster status. When the cluster status changes to **Hibernation**, the cluster is hibernated. |
|
||||
+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
Error Codes
|
||||
-----------
|
||||
|
||||
See :ref:`Error Codes <cce_02_0250>`.
|
@ -1,64 +0,0 @@
|
||||
:original_name: cce_02_0092.html
|
||||
|
||||
.. _cce_02_0092:
|
||||
|
||||
Cluster Management
|
||||
==================
|
||||
|
||||
- :ref:`Creating a Cluster <cce_02_0236>`
|
||||
- :ref:`Reading a Specified Cluster <cce_02_0238>`
|
||||
- :ref:`Listing Clusters in a Specified Project <cce_02_0239>`
|
||||
- :ref:`Updating a Specified Cluster <cce_02_0240>`
|
||||
- :ref:`Deleting a Specified Cluster <cce_02_0241>`
|
||||
- :ref:`Hibernating a Cluster <cce_02_0374>`
|
||||
- :ref:`Waking Up a Cluster <cce_02_0375>`
|
||||
- :ref:`Obtaining Cluster Certificates <cce_02_0248>`
|
||||
- :ref:`Obtaining Cluster Certificates (Deprecated) <cce_02_0359>`
|
||||
- :ref:`Creating a Node <cce_02_0242>`
|
||||
- :ref:`Reading a Specified Node <cce_02_0243>`
|
||||
- :ref:`Listing All Nodes in a Cluster <cce_02_0244>`
|
||||
- :ref:`Updating a Specified Node <cce_02_0245>`
|
||||
- :ref:`Deleting a Node <cce_02_0246>`
|
||||
- :ref:`Reading Job Progress <cce_02_0247>`
|
||||
- :ref:`Querying the Access Information of a Specified Cluster <cce_02_0347>`
|
||||
- :ref:`Modifying the Access Information of a Specified Cluster <cce_02_0346>`
|
||||
- :ref:`Accepting a Node <addnode>`
|
||||
- :ref:`Resetting a Node <resetnode>`
|
||||
- :ref:`Removing a Node <removenode>`
|
||||
- :ref:`Migrating a Node <migratenode>`
|
||||
- :ref:`Creating a Node Pool <cce_02_0354>`
|
||||
- :ref:`Querying a Specified Node Pool <cce_02_0355>`
|
||||
- :ref:`Updating a Specified Node Pool <cce_02_0356>`
|
||||
- :ref:`Listing All Node Pools in a Specified Cluster <cce_02_0269>`
|
||||
- :ref:`Deleting a Node Pool <cce_02_0357>`
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
creating_a_cluster
|
||||
reading_a_specified_cluster
|
||||
listing_clusters_in_a_specified_project
|
||||
updating_a_specified_cluster
|
||||
deleting_a_specified_cluster
|
||||
hibernating_a_cluster
|
||||
waking_up_a_cluster
|
||||
obtaining_cluster_certificates
|
||||
obtaining_cluster_certificates_deprecated
|
||||
creating_a_node
|
||||
reading_a_specified_node
|
||||
listing_all_nodes_in_a_cluster
|
||||
updating_a_specified_node
|
||||
deleting_a_node
|
||||
reading_job_progress
|
||||
querying_the_access_information_of_a_specified_cluster
|
||||
modifying_the_access_information_of_a_specified_cluster
|
||||
accepting_a_node
|
||||
resetting_a_node
|
||||
removing_a_node
|
||||
migrating_a_node
|
||||
creating_a_node_pool
|
||||
querying_a_specified_node_pool
|
||||
updating_a_specified_node_pool
|
||||
listing_all_node_pools_in_a_specified_cluster
|
||||
deleting_a_node_pool
|