diff --git a/api-ref/source/api_usage_guidelines.rst b/api-ref/source/api_usage_guidelines.rst new file mode 100644 index 0000000..00f181f --- /dev/null +++ b/api-ref/source/api_usage_guidelines.rst @@ -0,0 +1,12 @@ +:original_name: en-us_topic_0050065465.html + +.. _en-us_topic_0050065465: + +API Usage Guidelines +==================== + +Public 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. + +Public cloud APIs use HTTPS as the transmission protocol. Requests/Responses are transmitted using JSON messages, with the media type represented by **Application/json**. + +For details about how to use APIs, see `API Usage Guidelines `__. diff --git a/api-ref/source/apis/bandwidth/index.rst b/api-ref/source/apis/bandwidth/index.rst new file mode 100644 index 0000000..44725d9 --- /dev/null +++ b/api-ref/source/apis/bandwidth/index.rst @@ -0,0 +1,18 @@ +:original_name: vpc_bandwidth_0000.html + +.. _vpc_bandwidth_0000: + +Bandwidth +========= + +- :ref:`Querying a Bandwidth ` +- :ref:`Querying Bandwidths ` +- :ref:`Updating a Bandwidth ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_a_bandwidth + querying_bandwidths + updating_a_bandwidth diff --git a/api-ref/source/apis/bandwidth/querying_a_bandwidth.rst b/api-ref/source/apis/bandwidth/querying_a_bandwidth.rst new file mode 100644 index 0000000..00bc31d --- /dev/null +++ b/api-ref/source/apis/bandwidth/querying_a_bandwidth.rst @@ -0,0 +1,177 @@ +:original_name: vpc_bandwidth_0001.html + +.. _vpc_bandwidth_0001: + +Querying a Bandwidth +==================== + +Function +-------- + +This API is used to query details about a bandwidth. + +URI +--- + +GET /v1/{project_id}/bandwidths/{bandwidth_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_bandwidth_0001__table40002310: + +.. table:: **Table 1** Parameter description + + +--------------+-----------+----------------------------------------------------------------------+ + | Name | Mandatory | Description | + +==============+===========+======================================================================+ + | project_id | Yes | Specifies the project ID. | + +--------------+-----------+----------------------------------------------------------------------+ + | bandwidth_id | Yes | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +--------------+-----------+----------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: + + Get https://{Endpoint}//v1/{project_id}/bandwidths/{bandwidth_id} + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+-------------------------------------------------------------+---------------------------------+ + | Name | Type | Description | + +===========+=============================================================+=================================+ + | bandwidth | :ref:`bandwidth ` object | Specifies the bandwidth object. | + +-----------+-------------------------------------------------------------+---------------------------------+ + + .. _vpc_bandwidth_0001__table60972066: + + .. table:: **Table 3** Description of the **bandwidth** field + + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===========================================================================+=====================================================================================================================================================================================================================+ + | name | String | - Specifies the bandwidth name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Integer | - Specifies the bandwidth size. | + | | | - The value ranges from 1 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | - Possible values are as follows: | + | | | | + | | | - **PER**: Dedicated bandwidth | + | | | - **WHOLE**: Shared bandwidth | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_info | Array of :ref:`publicip_info ` objects | - Specifies information about the EIP that uses the bandwidth. For details, see :ref:`Table 4 `. | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_type | String | - Specifies the bandwidth type. | + | | | - The value can be: | + | | | | + | | | - **share**: Shared bandwidth | + | | | - **gray**: Dedicated load balancer | + | | | - **bgp**: Dynamic BGP | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | String | If the value is **traffic**, the billing is based on traffic. | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | billing_info | String | Specifies the bill information. | + | | | | + | | | If **billing_info** is specified, the bandwidth is in yearly/monthly billing mode. | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). | + | | | - When creating a bandwidth, associate the enterprise project ID with the bandwidth. | + | | | - If this parameter is not specified, the default value is **0**, which indicates that the default enterprise project is used. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the bandwidth status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **NORMAL** (Normal) | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | - Specifies the time (UTC) when the bandwidth is created. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | - Specifies the time (UTC) when the bandwidth is updated. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_bandwidth_0001__table30936422: + + .. table:: **Table 4** **publicip_info** object + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=======================================================================================================================================+ + | publicip_id | String | Specifies the ID of the EIP that uses the bandwidth. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | - Specifies the IP address version. | + | | | - Possible values are as follows: | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "bandwidth": { + "id": "3cbd5ae9-368f-4bc8-8841-f2ecc322c64a", + "name": "EIPResourceSetup_1553594229", + "size": 5, + "share_type": "PER", + "publicip_info": [ + { + "publicip_id": "22b02f40-b95f-465a-ae9b-7c8b0f042a41", + "publicip_address": "10.xx.xx.62", + "ip_version": 4, + "publicip_type": "5_bgp", + } + ], + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "bandwidth_type": "bgp", + "charge_mode": "traffic", + "enterprise_project_id": "0", + "status": "NORMAL", + "created_at": "2020-04-21T07:58:02Z", + "updated_at": "2020-04-21T07:58:02Z" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/bandwidth/querying_bandwidths.rst b/api-ref/source/apis/bandwidth/querying_bandwidths.rst new file mode 100644 index 0000000..ec222b9 --- /dev/null +++ b/api-ref/source/apis/bandwidth/querying_bandwidths.rst @@ -0,0 +1,251 @@ +:original_name: vpc_bandwidth_0002.html + +.. _vpc_bandwidth_0002: + +Querying Bandwidths +=================== + +Function +-------- + +This API is used to query bandwidths using search criteria. + +URI +--- + +GET /v1/{project_id}/bandwidths + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_bandwidth_0002__table62833603: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+=============================================================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. This field can be used to filter out the VPCs associated with a specified enterprise project. | + | | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. To obtain the VPCs bound to all enterprise projects of the user, set **all_granted_eps**. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/bandwidths?limit={limit}&marker={marker} + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========================================================================+=======================================================================================================+ + | bandwidths | Array of :ref:`bandwidths ` objects | Specifies the bandwidth objects. For details, see :ref:`Table 3 `. | + +------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + + .. _vpc_bandwidth_0002__table17227723: + + .. table:: **Table 3** Description of the **bandwidths** field + + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===========================================================================+=======================================================================================================================================================================================================================================================================================================+ + | name | String | - Specifies the bandwidth name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Integer | - Specifies the bandwidth size in Mbit/s. | + | | | - The value ranges from 1 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | - Possible values are as follows: | + | | | | + | | | - **PER**: Dedicated bandwidth | + | | | - **WHOLE**: Shared bandwidth | + | | | | + | | | If this parameter is not set, the list of all bandwidths will be returned by default. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_info | Array of :ref:`publicip_info ` objects | - Specifies the information about the EIP that uses the bandwidth. For details, see :ref:`Table 4 `. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_type | String | - Specifies the bandwidth type. | + | | | - The value can be: | + | | | | + | | | - **share**: Shared bandwidth | + | | | - **gray**: Dedicated load balancer | + | | | - **bgp**: Dynamic BGP | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | String | If the value is **traffic**, the bandwidth is billed by traffic. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | billing_info | String | Specifies the bill information. | + | | | | + | | | If **billing_info** is specified, the bandwidth is in yearly/monthly billing mode. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. To obtain the bandwidth bound to all enterprise projects of the user, set **all_granted_eps**. | + | | | - When creating a bandwidth, associate the enterprise project ID with the bandwidth. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the bandwidth status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **NORMAL** (Normal) | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | - Specifies the time (UTC) when the bandwidth is created. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | - Specifies the time (UTC) when the bandwidth is updated. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_bandwidth_0002__table30936422: + + .. table:: **Table 4** **publicip_info** object + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=======================================================================================================================================+ + | publicip_id | String | Specifies the ID of the EIP that uses the bandwidth. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "bandwidths": [ + { + "id": "09b99c91-da7c-449f-94e2-f4934c5b2a71", + "name": "vpngw-f632a7b0-ef50-4ac5-97e9-ddc56b3d5977", + "size": 200, + "share_type": "PER", + "publicip_info": [ + { + "publicip_id": "2a65923c-7133-415d-ae3b-cf9635a942c5", + "publicip_address": "10.xx.xx.3", + "ip_version": 4, + "publicip_type": "5_bgp", + } + ], + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "bandwidth_type": "bgp", + "charge_mode": "traffic", + "billing_info": "", + "enterprise_project_id": "0", + "status": "NORMAL" + }, + { + "id": "0a583ff1-b43e-4000-ade3-e7af0097f832", + "name": "vpngw-7e880d5b-f458-40ad-a7e5-735c44cd8b7d", + "size": 300, + "share_type": "PER", + "publicip_info": [ + { + "publicip_id": "c754bc9a-16d5-4763-9674-d7561917aa80", + "publicip_address": "10.xx.xx.9", + "ip_version": 4, + "publicip_type": "5_bgp", + } + ], + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "bandwidth_type": "bgp", + "charge_mode": "traffic", + "billing_info": "", + "enterprise_project_id": "0", + "status": "NORMAL" + }, + { + "id": "0a673f00-3640-4a13-949e-7049b2916baf", + "name": "bandwidth123", + "size": 10, + "share_type": "PER", + "publicip_info": [ + { + "publicip_id": "cec7fb70-2f82-4561-bd83-2121fb642fdc", + "publicip_address": "10.xx.xx.184", + "ip_version": 4, + "publicip_type": "5_bgp", + } + ], + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "bandwidth_type": "bgp", + "charge_mode": "traffic", + "billing_info": "", + "enterprise_project_id": "0", + "status": "NORMAL" + }, + { + "id": "0dde1eae-1783-46dc-998c-930fbe261ff9", + "name": "bandwidth123", + "size": 100, + "share_type": "PER", + "publicip_info": [ + { + "publicip_id": "24232038-e178-40ad-80e4-5abb75db84be", + "publicip_address": "10.xx.xx.101", + "ip_version": 4, + "publicip_type": "5_bgp", + } + ], + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "bandwidth_type": "bgp", + "charge_mode": "traffic", + "billing_info": "", + "enterprise_project_id": "0", + "status": "NORMAL" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/bandwidth/updating_a_bandwidth.rst b/api-ref/source/apis/bandwidth/updating_a_bandwidth.rst new file mode 100644 index 0000000..38521b5 --- /dev/null +++ b/api-ref/source/apis/bandwidth/updating_a_bandwidth.rst @@ -0,0 +1,208 @@ +:original_name: vpc_bandwidth_0003.html + +.. _vpc_bandwidth_0003: + +Updating a Bandwidth +==================== + +Function +-------- + +This API is used to update information about a bandwidth. + +URI +--- + +PUT /v1/{project_id}/bandwidths/{bandwidth_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_bandwidth_0003__table25281875: + +.. table:: **Table 1** Parameter description + + +--------------+-----------+----------------------------------------------------------------------+ + | Name | Mandatory | Description | + +==============+===========+======================================================================+ + | project_id | Yes | Specifies the project ID. | + +--------------+-----------+----------------------------------------------------------------------+ + | bandwidth_id | Yes | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +--------------+-----------+----------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------+-----------+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===========+===========+=============================================================+=======================================================================================================+ + | bandwidth | Yes | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 3 `. | + +-----------+-----------+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + + .. _vpc_bandwidth_0003__table31854691: + + .. table:: **Table 3** Description of the **bandwidth** field + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=====================================================================================================================================================================================================================================================================================+ + | name | No | String | - Specifies the bandwidth name. | + | | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). If the value is left blank, the name of the bandwidth is not changed. | + | | | | - Either parameter **name** or **size** must be specified. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | No | Integer | - Specifies the bandwidth size in Mbit/s. | + | | | | - The value ranges from 1 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the available bandwidth range on the management console.) If the parameter is not included, the bandwidth size is not changed. | + | | | | - Either parameter **name** or **size** must be specified. | + | | | | - If a decimal fraction (for example **10.2**) or a character string (for example **"10"**) is specified, the specified value will be automatically converted to an integer. | + | | | | - The minimum increment for bandwidth adjustment varies depending on the bandwidth range. The details are as follows: | + | | | | | + | | | | - The minimum increment is 1 Mbit/s if the allowed bandwidth ranges from 0 Mbit/s to 300 Mbit/s (with 300 Mbit/s included). | + | | | | - The minimum increment is 50 Mbit/s if the allowed bandwidth ranges from 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). | + | | | | - The minimum increment is 500 Mbit/s if the allowed bandwidth is greater than 1000 Mbit/s. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v1/{project_id}/bandwidths/{bandwidth_id} + + { + "bandwidth": + {"name": "bandwidth123", + "size": 10 + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +-----------+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+=============================================================+=======================================================================================================+ + | bandwidth | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 5 `. | + +-----------+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + + .. _vpc_bandwidth_0003__table17227723: + + .. table:: **Table 5** Description of the **bandwidth** field + + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===========================================================================+=======================================================================================================================================================================================================================================================================================================+ + | name | String | - Specifies the bandwidth name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Integer | - Specifies the bandwidth size in Mbit/s. | + | | | - The value ranges from 1 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | - Possible values are as follows: | + | | | | + | | | - **PER**: Dedicated bandwidth | + | | | - **WHOLE**: Shared bandwidth | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_info | Array of :ref:`publicip_info ` objects | - Specifies the information about the EIP that uses the bandwidth. For details, see :ref:`Table 6 `. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_type | String | - Specifies the bandwidth type. | + | | | - The value can be **bgp** or **share**. | + | | | | + | | | - **share**: Shared bandwidth | + | | | - **bgp**: Dynamic BGP | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | String | If the value is **traffic**, the bandwidth is billed by traffic. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | billing_info | String | Specifies the bill information. | + | | | | + | | | If **billing_info** is specified, the bandwidth is in yearly/monthly billing mode. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. To obtain the bandwidth bound to all enterprise projects of the user, set **all_granted_eps**. | + | | | - When creating a bandwidth, associate the enterprise project ID with the bandwidth. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the bandwidth status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **NORMAL** (Normal) | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | - Specifies the time (UTC) when the bandwidth is created. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | - Specifies the time (UTC) when the bandwidth is updated. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_bandwidth_0003__table30936422: + + .. table:: **Table 6** **publicip_info** objects + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=======================================================================================================================================+ + | publicip_id | String | Specifies the ID of the EIP that uses the bandwidth. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | - Specifies the IP address version. | + | | | - Possible values are as follows: | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "bandwidth": { + "id": "3fa5b383-5a73-4dcb-a314-c6128546d855", + "name": "bandwidth123", + "size": 10, + "share_type": "PER", + "publicip_info": [ + { + "publicip_id": "6285e7be-fd9f-497c-bc2d-dd0bdea6efe0", + "publicip_address": "161.xx.xx.9", + "publicip_type": "5_bgp", + "ip_version": 4 + } + ], + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "bandwidth_type": "bgp", + "charge_mode": "traffic", + "billing_info": "", + "status": "NORMAL" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/bandwidth_v2.0/adding_an_eip_to_a_shared_bandwidth.rst b/api-ref/source/apis/bandwidth_v2.0/adding_an_eip_to_a_shared_bandwidth.rst new file mode 100644 index 0000000..db35284 --- /dev/null +++ b/api-ref/source/apis/bandwidth_v2.0/adding_an_eip_to_a_shared_bandwidth.rst @@ -0,0 +1,211 @@ +:original_name: vpc_sharebandwidth_0004.html + +.. _vpc_sharebandwidth_0004: + +Adding an EIP to a Shared Bandwidth +=================================== + +Function +-------- + +This API is used to add an EIP to a shared bandwidth. + +URI +--- + +POST /v2.0/{project_id}/bandwidths/{bandwidth_id}/insert + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sharebandwidth_0004__table25281875: + +.. table:: **Table 1** Parameter description + + +--------------+-----------+----------------------------------------------------------------------+ + | Name | Mandatory | Description | + +==============+===========+======================================================================+ + | project_id | Yes | Specifies the project ID. | + +--------------+-----------+----------------------------------------------------------------------+ + | bandwidth_id | Yes | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +--------------+-----------+----------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===========+===========+==================================================================+============================================================================================================+ + | bandwidth | Yes | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 3 `. | + +-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0004__table31854691: + + .. table:: **Table 3** Description of the **bandwidth** field + + +-----------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+================================================================================+================================================================================================================================================================================================+ + | publicip_info | Yes | Array of :ref:`publicip_info ` objects | - Specifies information about the EIP to be added to the shared bandwidth. For details, see :ref:`Table 4 `. | + | | | | - The bandwidth, whose type is **WHOLE**, can be used by multiple EIPs. The number of EIPs varies depending on the tenant quota. By default, a shared bandwidth can be used by up to 20 EIPs. | + +-----------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0004__table30936422: + + .. table:: **Table 4** **publicip_info** object + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================+ + | publicip_id | Yes | String | Specifies the ID of the EIP that uses the bandwidth. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_type | No | String | - Specifies the EIP type. | + | | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | | - Constraints: | + | | | | | + | | | | - The configured value must be supported by the system. | + | | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/bandwidths/{bandwidth_id}/insert + + { + "bandwidth": { + "publicip_info": [ + { + "publicip_id": "29b114d1-2d41-4741-a1f0-b6f80aabceff", + "publicip_type": "5_bgp", + } + ] + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 5** Response parameter + + +-----------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+======================================================================+================================================================================================================+ + | bandwidth | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 6 `. | + +-----------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0004__table138718569112: + + .. table:: **Table 6** Description of the **bandwidth** field + + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+================================================================================+================================================================================================================================================================================================================+ + | name | String | - Specifies the bandwidth name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Integer | - Specifies the bandwidth size. | + | | | - The value ranges from 5 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the available bandwidth range on the management console.) | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | - Specifies whether the bandwidth is shared or dedicated. | + | | | - The value can be **PER** or **WHOLE**. | + | | | | + | | | - **WHOLE**: Shared bandwidth | + | | | - **PER**: Dedicated bandwidth | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_info | Array of :ref:`publicip_info ` objects | - Specifies information about the EIP that uses the bandwidth. For details, see :ref:`Table 7 `. | + | | | - The bandwidth, whose type is **WHOLE**, can be used by multiple EIPs. The bandwidth, whose type is **PER**, can be used by only one EIP. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_type | String | - Specifies the bandwidth type. The default value for the shared bandwidth is **share**. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | String | - Specifies that the bandwidth is billed by bandwidth. | + | | | - The value can be **traffic**. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | billing_info | String | Specifies the bill information. | + | | | | + | | | If **billing_info** is specified, the bandwidth is in yearly/monthly billing mode. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | - When creating a shared bandwidth, associate the enterprise project ID with the shared bandwidth. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the bandwidth status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **NORMAL** (Normal) | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0004__table51281965: + + .. table:: **Table 7** **publicip_info** objects + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=======================================================================================================================================+ + | publicip_id | String | Specifies the ID of the EIP that uses the bandwidth. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | - Specifies the IP address version. | + | | | - Possible values are as follows: | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "bandwidth": { + "id": "3fa5b383-5a73-4dcb-a314-c6128546d855", + "name": "bandwidth123", + "size": 10, + "share_type": "WHOLE", + "publicip_info": [ + { + "publicip_id": "1d184b2c-4ec9-49b5-a3f9-27600a76ba3f", + "publicip_address": "99.xx.xx.82", + "publicip_type": "5_bgp", + "ip_version": 4 + } + ], + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "charge_mode": "traffic", + "billing_info": "", + "bandwidth_type": "share", + "status": "NORMAL" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/bandwidth_v2.0/assigning_a_shared_bandwidth.rst b/api-ref/source/apis/bandwidth_v2.0/assigning_a_shared_bandwidth.rst new file mode 100644 index 0000000..0a77506 --- /dev/null +++ b/api-ref/source/apis/bandwidth_v2.0/assigning_a_shared_bandwidth.rst @@ -0,0 +1,202 @@ +:original_name: vpc_sharebandwidth_0001.html + +.. _vpc_sharebandwidth_0001: + +Assigning a Shared Bandwidth +============================ + +Function +-------- + +This API is used to assign a shared bandwidth. + +URI +--- + +POST /v2.0/{project_id}/bandwidths + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sharebandwidth_0001__table40002310: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===========+===========+==================================================================+============================================================================================================+ + | bandwidth | Yes | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 3 `. | + +-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0001__table11041789: + + .. table:: **Table 3** Description of the **bandwidth** field + + +-----------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+================================================================================================================================================================================================================+ + | name | Yes | String | Specifies the bandwidth name. | + | | | | | + | | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Yes | Integer | - Specifies the bandwidth size. The shared bandwidth has a minimum limit, which may vary depending on sites. The default minimum value is 5 Mbit/s. | + | | | | - The value ranges from 5 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the available bandwidth range on the management console.) | + | | | | - If a decimal fraction (for example **10.2**) or a character string (for example **"10"**) is specified, the specified value will be automatically converted to an integer. | + | | | | - The minimum increment for bandwidth adjustment varies depending on the bandwidth range. The details are as follows: | + | | | | | + | | | | - The minimum increment is 1 Mbit/s if the allowed bandwidth ranges from 0 Mbit/s to 300 Mbit/s (with 300 Mbit/s included). | + | | | | - The minimum increment is 50 Mbit/s if the allowed bandwidth ranges from 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). | + | | | | - The minimum increment is 500 Mbit/s if the allowed bandwidth is greater than 1000 Mbit/s. | + +-----------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | - When creating a shared bandwidth, associate the enterprise project ID with the shared bandwidth. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/bandwidths + + { + "bandwidth": { + "name": "bandwidth123", + "size": 10, + "enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+==================================================================+============================================================================================================+ + | bandwidth | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 5 `. | + +-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0001__table60972066: + + .. table:: **Table 5** Description of the **bandwidth** field + + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+================================================================================+================================================================================================================================================================================================================+ + | name | String | - Specifies the bandwidth name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Integer | - Specifies the bandwidth size. | + | | | - The value ranges from 5 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the available bandwidth range on the management console.) | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | - Specifies whether the bandwidth is shared or dedicated. | + | | | - The value can be **PER** or **WHOLE**. | + | | | | + | | | - **WHOLE**: Shared bandwidth | + | | | - **PER**: Dedicated bandwidth | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_info | Array of :ref:`publicip_info ` objects | - Specifies information about the EIP that uses the bandwidth. For details, see :ref:`Table 6 `. | + | | | - The bandwidth, whose type is **WHOLE**, can be used by multiple EIPs. The bandwidth, whose type is **PER**, can be used by only one EIP. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_type | String | - Specifies the bandwidth type. The default value for the shared bandwidth is **share**. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | String | - Specifies that the bandwidth is billed by bandwidth. | + | | | - The value can be **traffic**. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | billing_info | String | Specifies the bill information. | + | | | | + | | | If **billing_info** is specified, the bandwidth is in yearly/monthly billing mode. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a UUID that can contain a maximum of 36 characters, including hyphens (-). Value **0** indicates the default enterprise project. | + | | | - When creating a shared bandwidth, associate the enterprise project ID with the shared bandwidth. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the bandwidth status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **NORMAL** (Normal) | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | - Specifies the time (UTC) when the bandwidth is created. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | - Specifies the time (UTC) when the bandwidth is updated. | + | | | - Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0001__table30936422: + + .. table:: **Table 6** **publicip_info** object + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=======================================================================================================================================+ + | publicip_id | String | Specifies the ID of the EIP that uses the bandwidth. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | publicip_type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "bandwidth": { + "id": "1bffc5f2-ff19-45a6-96d2-dfdca49cc387", + "name": "bandwidth123", + "size": 10, + "share_type": "WHOLE", + "publicip_info": [], + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "bandwidth_type": "share", + "charge_mode": "traffic", + "billing_info": "", + "enterprise_project_id": "0", + "status": "NORMAL", + "created_at": "2020-04-21T07:58:02Z", + "updated_at": "2020-04-21T07:58:02Z" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/bandwidth_v2.0/deleting_a_shared_bandwidth.rst b/api-ref/source/apis/bandwidth_v2.0/deleting_a_shared_bandwidth.rst new file mode 100644 index 0000000..e0d337d --- /dev/null +++ b/api-ref/source/apis/bandwidth_v2.0/deleting_a_shared_bandwidth.rst @@ -0,0 +1,73 @@ +:original_name: vpc_sharebandwidth_0003.html + +.. _vpc_sharebandwidth_0003: + +Deleting a Shared Bandwidth +=========================== + +Function +-------- + +This API is used to delete a shared bandwidth. + +URI +--- + +DELETE /v2.0/{project_id}/bandwidths/{bandwidth_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sharebandwidth_0003__table45251091: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+----------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+======================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+----------------------------------------------------------------------+ + | bandwidth_id | Yes | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + | | | | + | | | Currently, only the shared bandwidth can be deleted. | + +-----------------------+-----------------------+----------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v2.0/{project_id}/bandwidths/{bandwidth_id} + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + Or + + .. code-block:: + + { + "code":"xxx", + "message":"xxxxx" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/bandwidth_v2.0/index.rst b/api-ref/source/apis/bandwidth_v2.0/index.rst new file mode 100644 index 0000000..d8c51c4 --- /dev/null +++ b/api-ref/source/apis/bandwidth_v2.0/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_sharebandwidth_0000.html + +.. _vpc_sharebandwidth_0000: + +Bandwidth (V2.0) +================ + +- :ref:`Assigning a Shared Bandwidth ` +- :ref:`Deleting a Shared Bandwidth ` +- :ref:`Adding an EIP to a Shared Bandwidth ` +- :ref:`Removing an EIP from a Shared Bandwidth ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + assigning_a_shared_bandwidth + deleting_a_shared_bandwidth + adding_an_eip_to_a_shared_bandwidth + removing_an_eip_from_a_shared_bandwidth diff --git a/api-ref/source/apis/bandwidth_v2.0/removing_an_eip_from_a_shared_bandwidth.rst b/api-ref/source/apis/bandwidth_v2.0/removing_an_eip_from_a_shared_bandwidth.rst new file mode 100644 index 0000000..e611466 --- /dev/null +++ b/api-ref/source/apis/bandwidth_v2.0/removing_an_eip_from_a_shared_bandwidth.rst @@ -0,0 +1,128 @@ +:original_name: vpc_sharebandwidth_0005.html + +.. _vpc_sharebandwidth_0005: + +Removing an EIP from a Shared Bandwidth +======================================= + +Function +-------- + +This API is used to remove an EIP from a shared bandwidth. + +URI +--- + +POST /v2.0/{project_id}/bandwidths/{bandwidth_id}/remove + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sharebandwidth_0005__table25281875: + +.. table:: **Table 1** Parameter description + + +--------------+-----------+----------------------------------------------------------------------+ + | Name | Mandatory | Description | + +==============+===========+======================================================================+ + | project_id | Yes | Specifies the project ID. | + +--------------+-----------+----------------------------------------------------------------------+ + | bandwidth_id | Yes | Specifies the bandwidth ID, which uniquely identifies the bandwidth. | + +--------------+-----------+----------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===========+===========+==================================================================+============================================================================================================+ + | bandwidth | Yes | :ref:`bandwidth ` object | Specifies the bandwidth objects. For details, see :ref:`Table 3 `. | + +-----------+-----------+------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0005__table31854691: + + .. table:: **Table 3** Description of the **bandwidth** field + + +-----------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+================================================================================+==================================================================================================================================================================================================================+ + | publicip_info | Yes | Array of :ref:`publicip_info ` objects | - Specifies information about the EIP to be removed from the bandwidth. For details, see :ref:`Table 4 `. | + | | | | - The bandwidth, whose type is **WHOLE**, can be used by multiple EIPs. The number of EIPs varies depending on the tenant quota. By default, a shared bandwidth can be used by up to 20 EIPs. | + +-----------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | Yes | String | After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth. | + | | | | | + | | | | Specifies whether the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth is billed by traffic or by bandwidth. | + | | | | | + | | | | The value can be **bandwidth** or **traffic**. | + +-----------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Yes | Integer | After an EIP is removed from a shared bandwidth, a dedicated bandwidth will be allocated to the EIP, and you will be billed for the dedicated bandwidth. | + | | | | | + | | | | Specifies the size (Mbit/s) of the dedicated bandwidth used by the EIP that has been removed from a shared bandwidth. | + | | | | | + | | | | The value ranges from 1 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) | + +-----------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sharebandwidth_0005__table30936422: + + .. table:: **Table 4** **publicip_info** object + + +-------------+-----------+--------+------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=============+===========+========+======================================================+ + | publicip_id | Yes | String | Specifies the ID of the EIP that uses the bandwidth. | + +-------------+-----------+--------+------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/bandwidths/{bandwidth_id}/remove + + { + "bandwidth": { + "publicip_info": [ + { + "publicip_id": "d91b0028-6f6b-4478-808a-297b75b6812a" + + }, + { + "publicip_id": "1d184b2c-4ec9-49b5-a3f9-27600a76ba3f" + } + ], + "charge_mode": "traffic", + "size": 22 + } + } + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + + Or + + .. code-block:: + + { + "code":"xxx", + "message":"xxxxx" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/eip_tag_management/batch_creating_or_deleting_eip_tags.rst b/api-ref/source/apis/eip_tag_management/batch_creating_or_deleting_eip_tags.rst new file mode 100644 index 0000000..679f39e --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/batch_creating_or_deleting_eip_tags.rst @@ -0,0 +1,154 @@ +:original_name: eip_tag_0004.html + +.. _eip_tag_0004: + +Batch Creating or Deleting EIP Tags +=================================== + +Function +-------- + +This API is used to add multiple tags to or delete multiple tags from an EIP at a time. + +This API is idempotent. + +If there are duplicate keys in the request body when you add tags, an error is reported. + +During tag creation, duplicate keys are not allowed. If a key already exists in the database, its value will be overwritten by the new duplicate key. + +During tag deletion, if some tags do not exist, the operation is considered to be successful by default. The character set of the tags will not be checked. When you delete tags, the tag structure cannot be missing, and the key cannot be left blank or be an empty string. + +URI +--- + +POST /v2.0/{project_id}/publicips/{publicip_id}/tags/action + +:ref:`Table 1 ` describes the parameters. + +.. _eip_tag_0004__table27380479: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+=================================================================+=================+=========================================================================================================+ + | tags | Array of :ref:`tag ` objects | Yes | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+ + | action | String | Yes | Specifies the operation. Possible values are as follows: | + | | | | | + | | | | - **create** | + | | | | - **delete** | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0004__table13242848193719: + + .. table:: **Table 3** **tag** objects + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=================+=================+=================+=====================================================================+ + | key | String | Yes | - Specifies the tag key. | + | | | | - Cannot be left blank. | + | | | | - Can contain a maximum of 36 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | | + | | | | - The tag key of a VPC must be unique. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | value | String | Yes | - Specifies the tag value. | + | | | | - Can contain a maximum of 43 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + +- Request example 1: Creating tags in batches + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/publicips/{publicip_id}/tags/action + + { + "action": "create", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +- Request example 2: Deleting tags in batches + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/publicips/{publicip_id}/tags/action + + { + "action": "delete", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + + Or + + .. code-block:: + + { + "code":"xxx", + "message":"xxxxx" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/eip_tag_management/creating_a_tag_for_an_eip.rst b/api-ref/source/apis/eip_tag_management/creating_a_tag_for_an_eip.rst new file mode 100644 index 0000000..a2a103e --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/creating_a_tag_for_an_eip.rst @@ -0,0 +1,114 @@ +:original_name: eip_tag_0001.html + +.. _eip_tag_0001: + +Creating a Tag for an EIP +========================= + +Function +-------- + +This API is used to create a tag for an EIP. + +URI +--- + +POST /v2.0/{project_id}/publicips/{publicip_id}/tags + +:ref:`Table 1 ` describes the parameters. + +.. _eip_tag_0001__table27380479: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------+-------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+=======================================================+===========+=====================================================================================================+ + | tag | :ref:`tag ` object | Yes | Specifies the **tag** objects. For details, see :ref:`Table 3 `. | + +-----------+-------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0001__table13242848193719: + + .. table:: **Table 3** **tag** objects + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=================+=================+=================+=====================================================================+ + | key | String | Yes | - Specifies the tag key. | + | | | | - Cannot be left blank. | + | | | | - Can contain a maximum of 36 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | | + | | | | - The tag key of a VPC must be unique. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | value | String | Yes | - Specifies the tag value. | + | | | | - Can contain a maximum of 43 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/publicips/{publicip_id}/tags + + { + "tag": { + "key": "key1", + "value": "value1" + } + } + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + + Or + + .. code-block:: + + { + "code":"xxx", + "message":"xxxxx" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/eip_tag_management/deleting_an_eip_tag.rst b/api-ref/source/apis/eip_tag_management/deleting_an_eip_tag.rst new file mode 100644 index 0000000..36c2900 --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/deleting_an_eip_tag.rst @@ -0,0 +1,73 @@ +:original_name: eip_tag_0003.html + +.. _eip_tag_0003: + +Deleting an EIP Tag +=================== + +Function +-------- + +This API is used to delete an EIP tag. + +URI +--- + +DELETE /v2.0/{project_id}/publicips/{publicip_id}/tags/{key} + +:ref:`Table 1 ` describes the parameters. + +.. _eip_tag_0003__table27380479: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + key Yes Specifies the tag key. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v2.0/{project_id}/publicips/{publicip_id}/tags/{key} + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + + Or + + .. code-block:: + + { + "code":"xxx", + "message":"xxxxx" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/eip_tag_management/index.rst b/api-ref/source/apis/eip_tag_management/index.rst new file mode 100644 index 0000000..64686a9 --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/index.rst @@ -0,0 +1,24 @@ +:original_name: eip_tag_0000.html + +.. _eip_tag_0000: + +EIP Tag Management +================== + +- :ref:`Creating a Tag for an EIP ` +- :ref:`Querying EIP Tags ` +- :ref:`Deleting an EIP Tag ` +- :ref:`Batch Creating or Deleting EIP Tags ` +- :ref:`Querying EIPs by Tag ` +- :ref:`Querying EIP Tags in a Specified Project ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_tag_for_an_eip + querying_eip_tags + deleting_an_eip_tag + batch_creating_or_deleting_eip_tags + querying_eips_by_tag + querying_eip_tags_in_a_specified_project diff --git a/api-ref/source/apis/eip_tag_management/querying_eip_tags.rst b/api-ref/source/apis/eip_tag_management/querying_eip_tags.rst new file mode 100644 index 0000000..ea4d515 --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/querying_eip_tags.rst @@ -0,0 +1,111 @@ +:original_name: eip_tag_0002.html + +.. _eip_tag_0002: + +Querying EIP Tags +================= + +Function +-------- + +This API is used to query tags of a specified EIP. + +URI +--- + +GET /v2.0/{project_id}/publicips/{publicip_id}/tags + +:ref:`Table 1 ` describes the parameters. + +.. _eip_tag_0002__table27380479: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/{project_id}/publicips/{publicip_id}/tags + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=================================================================+=========================================================================================================+ + | tags | Array of :ref:`tag ` objects | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0002__table13242848193719: + + .. table:: **Table 3** **tag** objects + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=====================================================================+ + | key | String | - Specifies the tag key. | + | | | - Cannot be left blank. | + | | | - Can contain a maximum of 36 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | + | | | - The tag key of a VPC must be unique. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | value | String | - Specifies the tag value. | + | | | - Can contain a maximum of 43 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/eip_tag_management/querying_eip_tags_in_a_specified_project.rst b/api-ref/source/apis/eip_tag_management/querying_eip_tags_in_a_specified_project.rst new file mode 100644 index 0000000..dcea71e --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/querying_eip_tags_in_a_specified_project.rst @@ -0,0 +1,116 @@ +:original_name: eip_tag_0006.html + +.. _eip_tag_0006: + +Querying EIP Tags in a Specified Project +======================================== + +Function +-------- + +This API is used to query all EIP tags of a tenant in a specified region. + +URI +--- + +GET /v2.0/{project_id}/publicips/tags + +:ref:`Table 1 ` describes the parameters. + +.. _eip_tag_0006__table27380479: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET /v2.0/{project_id}/publicips/tags + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+===============================================================+=======================================================================================================+ + | tags | Array of :ref:`tag ` objects | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0006__table043062842515: + + .. table:: **Table 3** Description of the **tag** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | key | String | Specifies the tag key. | + | | | | + | | | - Cannot be left blank. | + | | | - Can contain a maximum of 36 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | values | Array of strings | Specifies the tag value list. | + | | | | + | | | - Can contain a maximum of 43 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/eip_tag_management/querying_eips_by_tag.rst b/api-ref/source/apis/eip_tag_management/querying_eips_by_tag.rst new file mode 100644 index 0000000..c49edfd --- /dev/null +++ b/api-ref/source/apis/eip_tag_management/querying_eips_by_tag.rst @@ -0,0 +1,218 @@ +:original_name: eip_tag_0005.html + +.. _eip_tag_0005: + +Querying EIPs by Tag +==================== + +Function +-------- + +This API is used to query EIPs by tag. + +URI +--- + +POST /v2.0/{project_id}/publicips/resource_instances/action + +:ref:`Table 1 ` describes the parameters. + +.. _eip_tag_0005__table27380479: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+===================================================================+=================+=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | tags | Array of :ref:`tags ` objects | No | Specifies the included tags. A maximum of 20 tag keys are allowed for each query operation. Each tag key can have up to 10 tag values. The structure body must be included. The tag key cannot be left blank or set to an empty string. Each tag key must be unique, and each tag value in a tag must be unique. | + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | Integer | No | Sets the page size. This parameter is not available when **action** is set to **count**. The default value is **1000** when **action** is set to **filter**. The maximum value is **1000**, and the minimum value is **1**. The value cannot be a negative number. | + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | Integer | No | Specifies the index position. The query starts from the next piece of data indexed by this parameter. This parameter is not required when you query data on the first page. The value in the response returned for querying data on the previous page will be included in this parameter for querying data on subsequent pages. This parameter is not available when **action** is set to **count**. If **action** is set to **filter**, the value must be a number, and the default value is **0**. The value cannot be a negative number. | + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Yes | Specifies the operation to perform. The value can only be **filter** (filtering) or **count** (querying the total number). | + | | | | | + | | | | The value **filter** indicates pagination query. The value **count** indicates that the total number of query results meeting the search criteria will be returned. | + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | Array of :ref:`match ` objects | No | Specifies the search criteria. The tag key is the field to match. Currently, only **resource_name** is supported. The tag value indicates the matched value. This field is a fixed dictionary value. | + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0005__table16632111318253: + + .. table:: **Table 3** Description of the **tags** field + + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+==================+====================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. The value can contain a maximum of 127 Unicode characters. The tag key cannot be left blank. (This parameter is not verified during the search process.) | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | Specifies the tag value list. Each value can contain a maximum of 255 Unicode characters. An empty list for **values** indicates any value. The values are in the OR relationship. | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0005__table18642101315254: + + .. table:: **Table 4** Description of the **match** field + + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======+===========+========+======================================================================================+ + | key | Yes | String | Specifies the tag key. Currently, the tag key can only be the resource name. | + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + | value | Yes | String | Specifies the tag value. Each value can contain a maximum of 255 Unicode characters. | + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + +- Example request 1: Setting **action** to **filter** + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/publicips/resource_instances/action + + { + "offset": "0", + "limit": "100", + "action": "filter", + "matches": [ + { + "key": "resource_name", + "value": "resource1" + } + ], + "tags": [ + { + "key": "key1", + "values": [ + "*value1", + "value2" + ] + } + ] + } + +- Example request 2: Setting **action** to **count** + + .. code-block:: + + { + "action": "count", + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ], + "matches": [ + { + "key": "resource_name", + "value": "resource1" + } + ] + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 5** Response parameter + + +-------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+======================================================================+==============================================================================================================+ + | resources | Array of :ref:`resource ` objects | Specifies the **resource** object list. For details, see :ref:`Table 6 `. | + +-------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | total_count | Integer | Specifies the total number of query records. | + +-------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0005__table15678313132518: + + .. table:: **Table 6** **resource** objects + + +-----------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=================+=================================================================+=============================================================================================================================================================+ + | resource_id | String | Specifies the resource ID. | + +-----------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_detail | Object | Specifies the resource details. Resource details are used for extension. This parameter is left blank by default. | + +-----------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`tags ` objects | Specifies the tag list. This parameter is an empty array by default if there is no tag. For details, see :ref:`Table 7 `. | + +-----------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_name | String | Specifies the resource name. This parameter is an empty string by default if there is no resource name. | + +-----------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _eip_tag_0005__table1548032316199: + + .. table:: **Table 7** Description of the **tags** field + + +-------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======+===========+========+====================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. The value can contain a maximum of 127 Unicode characters. The tag key cannot be left blank. (This parameter is not verified during the search process.) | + +-------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | Specifies the tag value list. Each value can contain a maximum of 255 Unicode characters. An empty list for **values** indicates any value. The values are in the OR relationship. | + +-------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response 1: Setting **action** to **filter** + + .. code-block:: + + { + "resources": [ + { + "resource_detail": null, + "resource_id": "cdfs_cefs_wesas_12_dsad", + "resource_name": "resouece1", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value1" + } + ] + } + ], + "total_count": 1000 + } + +- Example response 2: Setting **action** to **count** + + .. code-block:: + + { + "total_count": 1000 + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/elastic_ip/assigning_an_eip.rst b/api-ref/source/apis/elastic_ip/assigning_an_eip.rst new file mode 100644 index 0000000..2dabcf8 --- /dev/null +++ b/api-ref/source/apis/elastic_ip/assigning_an_eip.rst @@ -0,0 +1,217 @@ +:original_name: en-us_topic_0020090596.html + +.. _en-us_topic_0020090596: + +Assigning an EIP +================ + +Function +-------- + +This API is used to assign an EIP. + +The EIP service provides independent public IP addresses and bandwidth for Internet access. EIPs can be bound to or unbound from ECSs, BMSs, virtual IP addresses, load balancers, and NAT gateways. + +URI +--- + +POST /v1/{project_id}/publicips + +:ref:`Table 1 ` describes the parameters. + +.. _en-us_topic_0020090596__table57311924: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------------------+-----------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================================================================+==================================================================================================================================================+ + | publicip | Yes | :ref:`publicip ` object | Specifies the EIP object. For details, see :ref:`Table 3 `. | + +-----------------------+-----------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth | Yes | :ref:`bandwidth ` object | Specifies the bandwidth object. For details, see :ref:`Table 4 `. | + +-----------------------+-----------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). | + | | | | - When you assign an EIP, associate an enterprise project ID with the EIP. | + | | | | - If this parameter is not specified, the default value is **0**, which indicates that the default enterprise project is used. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _en-us_topic_0020090596__table4491214: + + .. table:: **Table 3** Description of the **publicip** field + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================+ + | type | Yes | String | - Specifies the EIP type. | + | | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | | - Constraints: | + | | | | | + | | | | - The configured value must be supported by the system. | + | | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | ip_address | No | String | - Specifies the EIP to be assigned. The system automatically assigns an EIP if you do not specify it. | + | | | | - The value must be a valid IPv4 address in the available IP address range. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------+ + + .. _en-us_topic_0020090596__table11041789: + + .. table:: **Table 4** Description of the **bandwidth** field + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=====================================================================================================================================================================================================================+ + | name | Yes | String | - Specifies the bandwidth name. | + | | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + | | | | - This parameter is mandatory when **share_type** is set to **PER**. This parameter will be ignored when **share_type** is set to **WHOLE** with an ID specified. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Yes | Integer | - Specifies the bandwidth size. | + | | | | - The value ranges from 1 Mbit/s to 1000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) | + | | | | - This parameter is mandatory when **share_type** is set to **PER**. This parameter will be ignored when **share_type** is set to **WHOLE** with an ID specified. | + | | | | - The minimum increment for bandwidth adjustment varies depending on the bandwidth range. The details are as follows: | + | | | | | + | | | | - The minimum increment is 1 Mbit/s if the allowed bandwidth ranges from 0 Mbit/s to 300 Mbit/s (with 300 Mbit/s included). | + | | | | - The minimum increment is 50 Mbit/s if the allowed bandwidth ranges from 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). | + | | | | - The minimum increment is 500 Mbit/s if the allowed bandwidth is greater than 1000 Mbit/s. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | No | String | - Specifies the bandwidth ID. You can specify an existing shared bandwidth when assigning an EIP. | + | | | | - The value can be the ID of the shared bandwidth whose type is set to **WHOLE**. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | Yes | String | - Specifies the bandwidth type. | + | | | | - Possible values are as follows: | + | | | | | + | | | | - **PER**: Dedicated bandwidth | + | | | | - **WHOLE**: Shared bandwidth | + | | | | | + | | | | - If this parameter is set to **WHOLE**, the bandwidth ID must be specified. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | charge_mode | No | String | - The value is **traffic**, indicating that the billing is based on traffic. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request (IPv4 EIP with dedicated bandwidth) + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/publicips + + { + "publicip": { + "type": "5_bgp", + "ip_version": 4 + }, + "bandwidth": { + "name": "bandwidth123", + "size": 10, + "share_type": "PER" + }, + "enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439" + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 5** Response parameter + + +----------+----------------------------------------------------------------+----------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+================================================================+====================================================================================================+ + | publicip | :ref:`publicip ` object | Specifies the EIP object. For details, see :ref:`Table 6 `. | + +----------+----------------------------------------------------------------+----------------------------------------------------------------------------------------------------+ + + .. _en-us_topic_0020090596__table44471219: + + .. table:: **Table 6** Description of the **publicip** field + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==================================================================================================================================================+ + | id | String | Specifies the unique identifier of an EIP. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the EIP status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **BIND_ERROR** (Binding failed) | + | | | - **BINDING** (Binding) | + | | | - **PENDING_DELETE** (Releasing) | + | | | - **PENDING_CREATE** (Assigning) | + | | | - **PENDING_UPDATE** (Updating) | + | | | - **DOWN** (Unbound) | + | | | - **ACTIVE** (Bound) | + | | | - **ELB** (Bound to a load balancer) | + | | | - **ERROR** (Exceptions) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | public_ip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. The value can be **4** or **6**. | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | create_time | String | Specifies the time (UTC) when the EIP is assigned. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_size | Integer | Specifies the bandwidth (Mbit/s). | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). | + | | | - When you assign an EIP, associate an enterprise project ID with the EIP. | + | | | - If this parameter is not specified, the default value is **0**, which indicates that the default enterprise project is used. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response (IPv4 EIP with dedicated bandwidth) + + .. code-block:: + + { + "publicip": { + "id": "f588ccfa-8750-4d7c-bf5d-2ede24414706", + "status": "PENDING_CREATE", + "type": "5_bgp", + "public_ip_address": "161.xx.xx.7", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "ip_version": 4, + "create_time": "2015-07-16 04:10:52", + "bandwidth_size": 0, + "enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/elastic_ip/index.rst b/api-ref/source/apis/elastic_ip/index.rst new file mode 100644 index 0000000..50fc1b8 --- /dev/null +++ b/api-ref/source/apis/elastic_ip/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_eip_0000.html + +.. _vpc_eip_0000: + +Elastic IP +========== + +- :ref:`Assigning an EIP ` +- :ref:`Querying an EIP ` +- :ref:`Querying EIPs ` +- :ref:`Updating an EIP ` +- :ref:`Releasing an EIP ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + assigning_an_eip + querying_an_eip + querying_eips + updating_an_eip + releasing_an_eip diff --git a/api-ref/source/apis/elastic_ip/querying_an_eip.rst b/api-ref/source/apis/elastic_ip/querying_an_eip.rst new file mode 100644 index 0000000..db7ea0b --- /dev/null +++ b/api-ref/source/apis/elastic_ip/querying_an_eip.rst @@ -0,0 +1,179 @@ +:original_name: vpc_eip_0002.html + +.. _vpc_eip_0002: + +Querying an EIP +=============== + +Function +-------- + +This API is used to query a specific EIP. + +URI +--- + +GET /v1/{project_id}/publicips/{publicip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_eip_0002__table57982344: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: + + Get https://{Endpoint}/v1/{project_id}/publicips/{publicip_id} + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +----------+-----------------------------------------------------+-----------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+=====================================================+=========================================================================================+ + | publicip | :ref:`publicip ` object | Specifies the EIP object. For details, see :ref:`Table 3 `. | + +----------+-----------------------------------------------------+-----------------------------------------------------------------------------------------+ + + .. _vpc_eip_0002__table3035698: + + .. table:: **Table 3** Description of the **publicip** field + + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===========================================================+=======================================================================================================================================================================================+ + | id | String | Specifies the unique identifier of an EIP. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the EIP status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **BIND_ERROR** (Binding failed) | + | | | - **BINDING** (Binding) | + | | | - **PENDING_DELETE** (Releasing) | + | | | - **PENDING_CREATE** (Assigning) | + | | | - **PENDING_UPDATE** (Updating) | + | | | - **DOWN** (Unbound) | + | | | - **ACTIVE** (Bound) | + | | | - **ELB** (Bound to a load balancer) | + | | | - **ERROR** (Exceptions) | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | profile | :ref:`profile ` object | Specifies the additional parameters, including the order ID and product ID. For details, see :ref:`Table 4 `. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | public_ip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. Specifies the IPv4 address corresponding to the IPv6 address if IPv6 EIPs are available. IPv6 is not supported currently. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. The value can be **4** or **6**. | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | private_ip_address | String | - Specifies the private IP address bound to the EIP. | + | | | - This parameter is returned only if the private IP address is bound to the EIP. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **private_ip_address** is **null** if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_id | String | - Specifies the port ID. | + | | | - This parameter is returned only when a port is associated with the EIP. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **port_id** is null if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | create_time | String | Specifies the time (UTC) when the EIP is assigned. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_id | String | Specifies the ID of the EIP bandwidth. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_size | Integer | Specifies the bandwidth (Mbit/s). | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_share_type | String | - Specifies the EIP bandwidth type. | + | | | - The value can be **PER** or **WHOLE**. | + | | | | + | | | - **PER**: Dedicated bandwidth | + | | | - **WHOLE**: Shared bandwidth | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_name | String | Specifies the bandwidth name. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). | + | | | - When assigning an EIP, you need to associate an enterprise project ID with the EIP. | + | | | - If this parameter is not specified, the default value is **0**, which indicates that the default enterprise project is used. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_eip_0002__table66651219193417: + + .. table:: **Table 4** Description of the **profile** field + + ========== ====== ========================= + Name Type Description + ========== ====== ========================= + order_id String Specifies the order ID. + product_id String Specifies the product ID. + region_id String Specifies the region ID. + user_id String Specifies the user ID. + ========== ====== ========================= + +- Example response + + .. code-block:: + + { + "publicip": { + "id": "2ec9b78d-9368-46f3-8f29-d1a95622a568", + "status": "DOWN", + "profile": {}, + "type": "5_bgp", + "public_ip_address": "161.xx.xx.12", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "private_ip_address": "192.168.10.5", + "create_time": "2015-07-16 04:32:50", + "bandwidth_id": "49c8825b-bed9-46ff-9416-704b96d876a2", + "bandwidth_share_type": "PER", + "bandwidth_size": 10, //The EIP bandwidth size is 10 Mbit/s. + "bandwidth_name": "bandwidth-test", + "enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439", + "ip_version": 4 + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/elastic_ip/querying_eips.rst b/api-ref/source/apis/elastic_ip/querying_eips.rst new file mode 100644 index 0000000..5bc28aa --- /dev/null +++ b/api-ref/source/apis/elastic_ip/querying_eips.rst @@ -0,0 +1,216 @@ +:original_name: vpc_eip_0003.html + +.. _vpc_eip_0003: + +Querying EIPs +============= + +Function +-------- + +This API is used to query EIPs. + +URI +--- + +GET /v1/{project_id}/publicips + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_eip_0003__table51200735: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+=============================================================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. This field can be used to filter the EIPs of an enterprise project. | + | | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. To obtain the EIPs bound to all enterprise projects of the user, set **all_granted_eps**. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/publicips?limit={limit}&marker={marker} + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+====================================================================+=============================================================================================+ + | publicips | Array of :ref:`publicips ` objects | Specifies the EIP object. For details, see :ref:`Table 3 `. | + +-----------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ + + .. _vpc_eip_0003__table83964341880: + + .. table:: **Table 3** Description of the **publicips** field + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==================================================================================================================================================+ + | id | String | Specifies the unique identifier of an EIP. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the EIP status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **BIND_ERROR** (Binding failed) | + | | | - **BINDING** (Binding) | + | | | - **PENDING_DELETE** (Releasing) | + | | | - **PENDING_CREATE** (Assigning) | + | | | - **PENDING_UPDATE** (Updating) | + | | | - **DOWN** (Unbound) | + | | | - **ACTIVE** (Bound) | + | | | - **ELB** (Bound to a load balancer) | + | | | - **ERROR** (Exceptions) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | profile | Object | Specifies the additional parameters, including the order ID and product ID. For details, see :ref:`Table 4 `. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | public_ip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. The value can be **4** or **6**. | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | private_ip_address | String | - Specifies the private IP address bound to the EIP. | + | | | - This parameter is returned only if the private IP address is bound to the EIP. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **private_ip_address** is **null** if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_id | String | - Specifies the port ID. | + | | | - This parameter is returned only when a port is associated with the EIP. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **port_id** is null if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | create_time | String | Specifies the time (UTC) when the EIP is assigned. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_id | String | Specifies the ID of the EIP bandwidth. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_size | Integer | Specifies the bandwidth (Mbit/s). | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_share_type | String | - Specifies the EIP bandwidth type. | + | | | - The value can be **PER** or **WHOLE**. | + | | | | + | | | - **PER**: Dedicated bandwidth | + | | | - **WHOLE**: Shared bandwidth | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_name | String | Specifies the bandwidth name. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). | + | | | - When assigning an EIP, you need to associate an enterprise project ID with the EIP. | + | | | - If this parameter is not specified, the default value is **0**, which indicates that the default enterprise project is used. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_eip_0003__table66651219193417: + + .. table:: **Table 4** Description of the **profile** field + + ========== ====== ========================= + Name Type Description + ========== ====== ========================= + order_id String Specifies the order ID. + product_id String Specifies the product ID. + region_id String Specifies the region ID. + user_id String Specifies the user ID. + ========== ====== ========================= + +- Example response + + .. code-block:: + + { + "publicips": [ + { + "id": "6285e7be-fd9f-497c-bc2d-dd0bdea6efe0", + "status": "DOWN", + "profile": {}, + "type": "5_bgp", + "public_ip_address": "161.xx.xx.9", + "private_ip_address": "192.168.10.5", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "create_time": "2015-07-16 04:22:32", + "bandwidth_id": "3fa5b383-5a73-4dcb-a314-c6128546d855", + "bandwidth_share_type": "PER", + "bandwidth_size": 5, + "bandwidth_name": "bandwidth-test", + "enterprise_project_id":"b261ac1f-2489-4bc7-b31b-c33c3346a439", + "ip_version": 4 + }, + { + "id": "80d5b82e-43b9-4f82-809a-37bec5793bd4", + "status": "DOWN", + "profile": {}, + "type": "5_bgp", + "public_ip_address": "161.xx.xx.10", + "private_ip_address": "192.168.10.6", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "create_time": "2015-07-16 04:23:03", + "bandwidth_id": "a79fd11a-047b-4f5b-8f12-99c178cc780a", + "bandwidth_share_type": "PER", + "bandwidth_size": 5, + "bandwidth_name": "bandwidth-test1", + "enterprise_project_id":"0", + "ip_version": 4 + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/elastic_ip/releasing_an_eip.rst b/api-ref/source/apis/elastic_ip/releasing_an_eip.rst new file mode 100644 index 0000000..9593e24 --- /dev/null +++ b/api-ref/source/apis/elastic_ip/releasing_an_eip.rst @@ -0,0 +1,72 @@ +:original_name: vpc_eip_0005.html + +.. _vpc_eip_0005: + +Releasing an EIP +================ + +Function +-------- + +This API is used to release an EIP. + +URI +--- + +DELETE /v1/{project_id}/publicips/{publicip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_eip_0005__table45251091: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/{project_id}/publicips + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + + Or + + .. code-block:: + + { + "code":"xxx", + "message":"xxxxx" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/elastic_ip/updating_an_eip.rst b/api-ref/source/apis/elastic_ip/updating_an_eip.rst new file mode 100644 index 0000000..8dc8747 --- /dev/null +++ b/api-ref/source/apis/elastic_ip/updating_an_eip.rst @@ -0,0 +1,204 @@ +:original_name: vpc_eip_0004.html + +.. _vpc_eip_0004: + +Updating an EIP +=============== + +Function +-------- + +This API is used to bind an EIP to a NIC, or unbind an EIP from a NIC. + +.. note:: + + This API cannot be used to bind an EIP to or unbind an EIP from a dedicated load balancer. + +URI +--- + +PUT /v1/{project_id}/publicips/{publicip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_eip_0004__table25231885: + +.. table:: **Table 1** Parameter description + + =========== ========= ========================================== + Name Mandatory Description + =========== ========= ========================================== + project_id Yes Specifies the project ID. + publicip_id Yes Specifies the unique identifier of an EIP. + =========== ========= ========================================== + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +----------+-----------+------------------------------------------------------+------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +==========+===========+======================================================+==========================================================================================+ + | publicip | Yes | :ref:`publicip ` object | Specifies the EIP object. For details, see :ref:`Table 3 `. | + +----------+-----------+------------------------------------------------------+------------------------------------------------------------------------------------------+ + + .. _vpc_eip_0004__table23403840: + + .. table:: **Table 3** Description of the **publicip** field + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================================================================================================================================================================+ + | port_id | No | String | - Specifies the port ID. | + | | | | | + | | | | - The value must be an existing port ID. If this parameter is not included or the parameter value is left blank, the EIP is unbound. If the specified port ID does not exist or has already been bound with an EIP, an error message will be displayed. | + | | | | | + | | | | Leaving this parameter blank does not unbind the EIP from the dedicated load balancer. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request 1 (Binding an EIP to a NIC) + + .. code-block:: text + + PUT https://{Endpoint}/v1/{project_id}/publicips/{publicip_id} + + { + "publicip": { + "port_id": "f588ccfa-8750-4d7c-bf5d-2ede24414706" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +----------+---------------------------------------------------------+---------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+=========================================================+=============================================================================================+ + | publicip | :ref:`publicip ` object | Specifies the EIP object. For details, see :ref:`Table 5 `. | + +----------+---------------------------------------------------------+---------------------------------------------------------------------------------------------+ + + .. _vpc_eip_0004__table83964341880: + + .. table:: **Table 5** Description of the **publicips** field + + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===========================================================+==================================================================================================================================================+ + | id | String | Specifies the unique identifier of an EIP. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the EIP status. | + | | | - Possible values are as follows: | + | | | | + | | | - **FREEZED** (Frozen) | + | | | - **BIND_ERROR** (Binding failed) | + | | | - **BINDING** (Binding) | + | | | - **PENDING_DELETE** (Releasing) | + | | | - **PENDING_CREATE** (Assigning) | + | | | - **PENDING_UPDATE** (Updating) | + | | | - **DOWN** (Unbound) | + | | | - **ACTIVE** (Bound) | + | | | - **ELB** (Bound to a load balancer) | + | | | - **ERROR** (Exceptions) | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | profile | :ref:`profile ` object | Specifies the additional parameters, including the order ID and product ID. For details, see :ref:`Table 6 `. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | String | - Specifies the EIP type. | + | | | - The value can be **5_bgp** (Dynamic BGP), **5_mailbgp** (Mail BGP), or **5_gray** (Dedicated load balancer, shared load balancer). | + | | | - Constraints: | + | | | | + | | | - The configured value must be supported by the system. | + | | | - **publicip_id** is an IPv4 port. If **publicip_type** is not specified, the default value is **5_bgp**. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | public_ip_address | String | Specifies the obtained EIP if only IPv4 EIPs are available. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. The value can be **4** or **6**. | + | | | | + | | | - **4**: IPv4 | + | | | - **6**: IPv6 (IPv6 is not supported currently.) | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | private_ip_address | String | - Specifies the private IP address bound to the EIP. | + | | | - This parameter is returned only when a port is associated with the EIP. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **private_ip_address** is **null** if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_id | String | - Specifies the port ID. | + | | | - This parameter is returned only when a port is associated with the EIP. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **port_id** is null if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | create_time | String | Specifies the time (UTC) when the EIP is assigned. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_id | String | Specifies the ID of the EIP bandwidth. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_size | Integer | Specifies the bandwidth (Mbit/s). | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | bandwidth_share_type | String | - Specifies the EIP bandwidth type. | + | | | - The value can be **PER** or **WHOLE**. | + | | | | + | | | - **PER**: Dedicated bandwidth | + | | | - **WHOLE**: Shared bandwidth | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). | + | | | - When you assign an EIP, associate an enterprise project ID with the EIP. | + | | | - If this parameter is not specified, the default value is **0**, which indicates that the default enterprise project is used. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_eip_0004__table66651219193417: + + .. table:: **Table 6** Description of the **profile** field + + ========== ====== ========================= + Name Type Description + ========== ====== ========================= + order_id String Specifies the order ID. + product_id String Specifies the product ID. + region_id String Specifies the region ID. + user_id String Specifies the user ID. + ========== ====== ========================= + +- Example response (Binding an EIP to a NIC) + + .. code-block:: + + { + "publicip": { + "id": "f6318bef-6508-4ea5-a48f-6152b6b1a8fb", + "status": "ACTIVE", + "profile": {}, + "type": "5_bgp", + "port_id": "a135e9b8-1630-40d2-a6c5-eb534a61efbe", + "public_ip_address": "10.xx.xx.162", + "private_ip_address": "192.168.1.131", + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "create_time": "2019-03-27 01:33:18", + "bandwidth_size": 7, + "ip_version": 4 + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/floating_ip_address_ipv6/assigning_a_floating_ip_address.rst b/api-ref/source/apis/floating_ip_address_ipv6/assigning_a_floating_ip_address.rst new file mode 100644 index 0000000..f791bd5 --- /dev/null +++ b/api-ref/source/apis/floating_ip_address_ipv6/assigning_a_floating_ip_address.rst @@ -0,0 +1,146 @@ +:original_name: vpc_ipv6_0003.html + +.. _vpc_ipv6_0003: + +Assigning a Floating IP Address +=============================== + +Function +-------- + +This API is used to assign a floating IP address and associates it with an internal port. + +Restrictions + +You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to obtain the UUID of the external network required for assigning a floating IP address. + +The **port_id** parameter value must be the ECS port ID, which can be obtained from the **NIC ID** parameter in the ECS NIC details. + +URI +--- + +POST /v2.0/eip/floatingips_v6 + +Request Message +--------------- + +- Request parameter + +.. table:: **Table 1** Request parameter + + +------------+--------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +============+==============================================================+===========+==============================================================================================================+ + | floatingip | :ref:`floatingip ` object | Yes | Specifies the floating IP address list. For details, see :ref:`Table 2 `. | + +------------+--------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------+ + +.. _vpc_ipv6_0003__table1831319135111: + +.. table:: **Table 2** **floatingip** objects + + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=====================+=================+=================+===================================================================================================================================================+ + | id | Yes | String | Specifies the floating IP address ID. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | floating_ip_address | No | String | Specifies the floating IPv6 address. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | floating_network_id | No | String | Specifies the external network ID. | + | | | | | + | | | | You can only use fixed external network. | + | | | | | + | | | | You can use **GET /v2.0/networks?router:external=True** or | + | | | | | + | | | | **GET /v2.0/networks?name={floating_network}** or run the **neutron net-external-list** command to obtain information about the external network. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | router_id | No | String | Specifies the ID of the belonged router. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_id | No | String | Specifies the port ID. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ip_address | No | String | Specifies the private IP address of the associated port. | + | | | | | + | | | | This value can only be dynamically assigned by the system. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies the project ID. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/eip/floatingips_v6 + + { + "floatingip": { + "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8", + "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 3** Response parameter + + +------------+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+============================================================+============================================================================================================+ + | floatingip | :ref:`floatingip ` object | Specifies the floating IP address list. For details, see :ref:`Table 4 `. | + +------------+------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + + .. _vpc_ipv6_0003__table71601678316: + + .. table:: **Table 4** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IPv6 address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "floatingip": { + "router_id": "76c052d6-6a92-444c-b67d-147ee166a480", + "status": "DOWN", + "tenant_id": "6fd9b5fdb997425f97bc5ba1f0846084", + "floating_network_id": "5ce655fa-c911-4d2c-99f7-445bc1162ef8", + "fixed_ip_address": "12.xx.xx.5", + "floating_ip_address": "cdcd:910a:2222:5498:8475:1111:c013:8096", + "port_id": "552389f5-8f4c-4bb7-9991-07233c315d60", + "id": "2567f393-5c76-42db-a397-477723ce41f7" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/floating_ip_address_ipv6/deleting_a_floating_ip_address.rst b/api-ref/source/apis/floating_ip_address_ipv6/deleting_a_floating_ip_address.rst new file mode 100644 index 0000000..86289d5 --- /dev/null +++ b/api-ref/source/apis/floating_ip_address_ipv6/deleting_a_floating_ip_address.rst @@ -0,0 +1,50 @@ +:original_name: vpc_ipv6_0005.html + +.. _vpc_ipv6_0005: + +Deleting a Floating IP Address +============================== + +Function +-------- + +This API is used to delete a floating IP address. + +URI +--- + +DELETE /v2.0/eip/floatingips_v6/{floatingip_id} + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v2.0/eip/floatingips_v6/a95ec431-8473-463b-aede-34fb048ee3a7 + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/floating_ip_address_ipv6/index.rst b/api-ref/source/apis/floating_ip_address_ipv6/index.rst new file mode 100644 index 0000000..6add9c6 --- /dev/null +++ b/api-ref/source/apis/floating_ip_address_ipv6/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_ipv6_0000.html + +.. _vpc_ipv6_0000: + +Floating IP Address (IPv6) +========================== + +- :ref:`Querying Floating IP Addresses ` +- :ref:`Querying a Floating IP Address ` +- :ref:`Assigning a Floating IP Address ` +- :ref:`Updating a Floating IP Address ` +- :ref:`Deleting a Floating IP Address ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_floating_ip_addresses + querying_a_floating_ip_address + assigning_a_floating_ip_address + updating_a_floating_ip_address + deleting_a_floating_ip_address diff --git a/api-ref/source/apis/floating_ip_address_ipv6/querying_a_floating_ip_address.rst b/api-ref/source/apis/floating_ip_address_ipv6/querying_a_floating_ip_address.rst new file mode 100644 index 0000000..f310f98 --- /dev/null +++ b/api-ref/source/apis/floating_ip_address_ipv6/querying_a_floating_ip_address.rst @@ -0,0 +1,100 @@ +:original_name: vpc_ipv6_0002.html + +.. _vpc_ipv6_0002: + +Querying a Floating IP Address +============================== + +Function +-------- + +This API is used to query details about a specific floating IP address accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/eip/floatingips_v6/{floatingip_id} + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}//v2.0/eip/floatingips_v6/2dedb5e7-cb70-4e78-b50f-d88c8321d161 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 1** Response parameter + + +------------+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+=============================================================+=============================================================================================================+ + | floatingip | :ref:`floatingip ` object | Specifies the floating IP address list. For details, see :ref:`Table 2 `. | + +------------+-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + + .. _vpc_ipv6_0002__table870410995611: + + .. table:: **Table 2** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IPv6 address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "floatingip": { + "id": "861a4c5b-b17b-4a1d-b653-f3e95dcb3345", + "status": "DOWN", + "router_id": null, + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "project_id": "26ae5181a416420998eb2093aaed84d9", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": null, + "floating_ip_address": "cdcd:910a:2222:5498:8475:1111:c613:16e3", + "port_id": null, + "created_at": "2019-03-26T09:52:41", + "updated_at": "2019-03-26T09:52:45" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/floating_ip_address_ipv6/querying_floating_ip_addresses.rst b/api-ref/source/apis/floating_ip_address_ipv6/querying_floating_ip_addresses.rst new file mode 100644 index 0000000..52c0320 --- /dev/null +++ b/api-ref/source/apis/floating_ip_address_ipv6/querying_floating_ip_addresses.rst @@ -0,0 +1,144 @@ +:original_name: vpc_ipv6_0001.html + +.. _vpc_ipv6_0001: + +Querying Floating IP Addresses +============================== + +Function +-------- + +This API is used to query all floating IP addresses accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/eip/floatingips_v6 + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/eip/floatingips_v6?id={id}&router_id={router_id}&floating_network_id={floating_network_id}&floating_ip_address={floating_ip_address}&port_id={port_id }&fixed_ip_address={fixed_ip_address}&tenant_id={tenant_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_ipv6_0001__table668331194113: + +.. table:: **Table 1** Parameter description + + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=====================+=================+=================+===================================================================================================================================================+ + | id | Yes | String | Specifies the floating IP address ID. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | floating_ip_address | No | String | Specifies the floating IPv6 address. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | floating_network_id | No | String | Specifies the external network ID. | + | | | | | + | | | | You can only use fixed external network. | + | | | | | + | | | | You can use **GET /v2.0/networks?router:external=True** or | + | | | | | + | | | | **GET /v2.0/networks?name={floating_network}** or run the **neutron net-external-list** command to obtain information about the external network. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | router_id | No | String | Specifies the ID of the belonged router. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_id | No | String | Specifies the port ID. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ip_address | No | String | Specifies the private IP address of the associated port. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies the project ID. | + +---------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + None + +Response Message +---------------- + +- Response parameter + +.. table:: **Table 2** Response parameter + + +-------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=============+==========================================================================+================================================================================================================+ + | floatingips | Array of :ref:`floatingip ` objects | Specifies the floating IP address list. For details, see :ref:`Table 3 `. | + +-------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_ipv6_0001__table129961748135412: + +.. table:: **Table 3** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IPv6 address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floatingips_links | Array of strings | Specifies the request URL. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "floatingips": [ + { + "id": "861a4c5b-b17b-4a1d-b653-f3e95dcb3345", + "status": "DOWN", + "router_id": null, + "tenant_id": "26ae5181a416420998eb2093aaed84d9", + "project_id": "26ae5181a416420998eb2093aaed84d9", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": null, + "floating_ip_address": "cdcd:910a:2222:5498:8475:1111:c613:16e3", + "port_id": null, + "created_at": "2019-03-26T09:52:41", + "updated_at": "2019-03-26T09:52:45" + } + ], + "floatingips_links": [ + { + "href": "https://network.region.cn-southwest-2.hwclouds.com/v2.0/floatingips_v6?marker=861a4c5b-b17b-4a1d-b653-f3e95dcb3345&page_reverse=true&page_reverse=True", + "rel": "previous" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/floating_ip_address_ipv6/updating_a_floating_ip_address.rst b/api-ref/source/apis/floating_ip_address_ipv6/updating_a_floating_ip_address.rst new file mode 100644 index 0000000..e53b24d --- /dev/null +++ b/api-ref/source/apis/floating_ip_address_ipv6/updating_a_floating_ip_address.rst @@ -0,0 +1,155 @@ +:original_name: vpc_ipv6_0004.html + +.. _vpc_ipv6_0004: + +Updating a Floating IP Address +============================== + +Function +-------- + +This API is used to update a specific floating IP address and the port associated with the IP address. If **port_id** is left blank, the floating IP address has been unbound from the port. + +Restrictions + +When you bind a floating IP address, if the floating IP address is in the **error** state, try unbinding the address first. + +You are not allowed to bind a floating IP address that has been bound to a port to another port. You must first unbind the IP address from its original port and bind it to the required port. + +URI +--- + +PUT /v2.0/eip/floatingips_v6/{floatingip_id} + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 1** Request parameter + + +------------+-------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +============+=============================================================+===========+=============================================================================================================+ + | floatingip | :ref:`floatingip ` object | Yes | Specifies the floating IP address list. For details, see :ref:`Table 2 `. | + +------------+-------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------------------+ + + .. _vpc_ipv6_0004__table547993685510: + + .. table:: **Table 2** **floatingip** objects + + ========= ========= ====== ====================== + Parameter Mandatory Type Description + ========= ========= ====== ====================== + port_id No String Specifies the port ID. + ========= ========= ====== ====================== + +- Example request 1 (Binding to a port) + + .. code-block:: text + + PUT https://{Endpoint}/v2.0/eip/floatingips_v6/b639c937-4737-4107-8978-fecc7327a5ae + + { + "floatingip": { + "port_id": "21b5c483-84e9-40a1-86b3-3041606106f5", + "fixed_ip_address": "10.0.2.2" + } + } + +- Example request 2 (Unbinding from a port) + + .. code-block:: text + + PUT https://{Endpoint}/v2.0/eip/floatingips_v6/3870858f-91dc-489f-92a1-c04dbdc6d781 + + { + "floatingip": { + "port_id": null + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 3** Response parameter + + +------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+==============================================================+==============================================================================================================+ + | floatingip | :ref:`floatingip ` object | Specifies the floating IP address list. For details, see :ref:`Table 4 `. | + +------------+--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + + .. _vpc_ipv6_0004__table1935317341267: + + .. table:: **Table 4** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IPv6 address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +- Example response 1 (Binding a specified floating IP address to a port) + + .. code-block:: + + { + "floatingip": { + "router_id": "76c052d6-6a92-444c-b67d-147ee166a480", + "status": "ACTIVE", + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": "10.0.2.2", + "floating_ip_address": "cdcd:910a:2222:5498:8475:1111:c013:8096", + "port_id": "21b5c483-84e9-40a1-86b3-3041606106f5", + "id": "b639c937-4737-4107-8978-fecc7327a5ae" + } + } + +- Example response 2 (Unbinding a specified floating IP address from a port) + + .. code-block:: + + { + "floatingip": { + "floating_network_id": "809fdbbc-2e3e-426e-897c-cb632b081a72", + "router_id": null, + "fixed_ip_address": null, + "floating_ip_address": "cdcd:910a:2222:5498:8475:1111:c013:8096", + "tenant_id": "3c8c36e1520147ccbc83d2ccfbb9ab24", + "status": "ACTIVE", + "port_id": null, + "id": "3870858f-91dc-489f-92a1-c04dbdc6d781" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/index.rst b/api-ref/source/apis/index.rst new file mode 100644 index 0000000..6371abb --- /dev/null +++ b/api-ref/source/apis/index.rst @@ -0,0 +1,44 @@ +:original_name: vpc_api_0000.html + +.. _vpc_api_0000: + +APIs +==== + +- :ref:`Virtual Private Cloud ` +- :ref:`Subnet ` +- :ref:`Elastic IP ` +- :ref:`Floating IP Address (IPv6) ` +- :ref:`Bandwidth ` +- :ref:`Bandwidth (V2.0) ` +- :ref:`Quota ` +- :ref:`Private IP Address ` +- :ref:`Security Group ` +- :ref:`VPC Peering Connection ` +- :ref:`VPC Route ` +- :ref:`VPC Tag Management ` +- :ref:`Subnet Tag Management ` +- :ref:`EIP Tag Management ` +- :ref:`Querying IP Address Usage ` +- :ref:`VPC Flow Log ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + virtual_private_cloud/index + subnet/index + elastic_ip/index + floating_ip_address_ipv6/index + bandwidth/index + bandwidth_v2.0/index + quota/index + private_ip_address/index + security_group/index + vpc_peering_connection/index + vpc_route/index + vpc_tag_management/index + subnet_tag_management/index + eip_tag_management/index + querying_ip_address_usage/index + vpc_flow_log/index diff --git a/api-ref/source/apis/private_ip_address/assigning_a_private_ip_address.rst b/api-ref/source/apis/private_ip_address/assigning_a_private_ip_address.rst new file mode 100644 index 0000000..6a2074c --- /dev/null +++ b/api-ref/source/apis/private_ip_address/assigning_a_private_ip_address.rst @@ -0,0 +1,151 @@ +:original_name: vpc_privateip_0001.html + +.. _vpc_privateip_0001: + +Assigning a Private IP Address +============================== + +Function +-------- + +This API is used to assign a private IP address. + +URI +--- + +POST /v1/{project_id}/privateips + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_privateip_0001__table57906226: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +------------+-----------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+=======================================================================+================================================================================================================+ + | privateips | Yes | Array of :ref:`privateip ` objects | Specifies the private IP address objects. For details, see :ref:`Table 3 `. | + +------------+-----------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_privateip_0001__table45335391: + + .. table:: **Table 3** Description of the **privateip** field + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================================================================================+ + | subnet_id | Yes | String | Specifies the ID of the subnet from which IP addresses are assigned. | + | | | | | + | | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------+ + | ip_address | No | String | - Specifies the target IP address. | + | | | | - The value can be an available IP address in the subnet. If it is not specified, the system automatically assigns an IP address. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/privateips + + { + "privateips": + [ + { + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd" + }, + { + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "ip_address": "192.168.1.17" + } + ] + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+=======================================================================+================================================================================================================+ + | privateips | Array of :ref:`privateip ` objects | Specifies the private IP address objects. For details, see :ref:`Table 5 `. | + +------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_privateip_0001__table34571880: + + .. table:: **Table 5** Description of the **privateip** field + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+========================================================================================================================================================================================================================================================================================================+ + | status | String | - Specifies the status of the private IP address. | + | | | - Possible values are as follows: | + | | | | + | | | - **ACTIVE** | + | | | - **DOWN** | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the ID of the private IP address, which uniquely identifies the private IP address. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Specifies the ID of the subnet from which IP addresses are assigned. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | - Specifies the resource using the private IP address. The parameter is left blank if it is not used. | + | | | - The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | - The value range specifies only the type of private IP addresses supported by the current service. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_address | String | Specifies the assigned private IP address. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "privateips": [ + { + "status": "DOWN", + "id": "c60c2ce1-1e73-44bd-bf48-fd688448ff7b", + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "device_owner": "", + "ip_address": "192.168.1.10" + }, + { + "status": "DOWN", + "id": "4b123c18-ae92-4dfa-92cd-d44002359aa1", + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "device_owner": "", + "ip_address": "192.168.1.17" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/private_ip_address/deleting_a_private_ip_address.rst b/api-ref/source/apis/private_ip_address/deleting_a_private_ip_address.rst new file mode 100644 index 0000000..fa7dcdc --- /dev/null +++ b/api-ref/source/apis/private_ip_address/deleting_a_private_ip_address.rst @@ -0,0 +1,66 @@ +:original_name: vpc_privateip_0004.html + +.. _vpc_privateip_0004: + +Deleting a Private IP Address +============================= + +Function +-------- + +This API is used to delete a private IP address. + +URI +--- + +DELETE /v1/{project_id}/privateips/{privateip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_privateip_0004__table24633528: + +.. table:: **Table 1** Parameter description + + +--------------+-----------+-----------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +==============+===========+===============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +--------------+-----------+-----------------------------------------------------------------------------------------------+ + | privateip_id | Yes | Specifies the ID of the private IP address, which uniquely identifies the private IP address. | + +--------------+-----------+-----------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/{project_id}/privateips/4779ab1c-7c1a-44b1-a02e-93dfc361b32d + +Response Message +---------------- + +- Request parameter + + None + +- Example response + + .. code-block:: text + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/private_ip_address/index.rst b/api-ref/source/apis/private_ip_address/index.rst new file mode 100644 index 0000000..26e75fb --- /dev/null +++ b/api-ref/source/apis/private_ip_address/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_privateip_0000.html + +.. _vpc_privateip_0000: + +Private IP Address +================== + +- :ref:`Assigning a Private IP Address ` +- :ref:`Querying Private IP Address Details ` +- :ref:`Querying Private IP Addresses ` +- :ref:`Deleting a Private IP Address ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + assigning_a_private_ip_address + querying_private_ip_address_details + querying_private_ip_addresses + deleting_a_private_ip_address diff --git a/api-ref/source/apis/private_ip_address/querying_private_ip_address_details.rst b/api-ref/source/apis/private_ip_address/querying_private_ip_address_details.rst new file mode 100644 index 0000000..ca3c05c --- /dev/null +++ b/api-ref/source/apis/private_ip_address/querying_private_ip_address_details.rst @@ -0,0 +1,110 @@ +:original_name: vpc_privateip_0002.html + +.. _vpc_privateip_0002: + +Querying Private IP Address Details +=================================== + +Function +-------- + +This API is used to query details about a private IP address using the specified ID. + +URI +--- + +GET /v1/{project_id}/privateips/{privateip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_privateip_0002__table4378562: + +.. table:: **Table 1** Parameter description + + +--------------+-----------+-----------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +==============+===========+===============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +--------------+-----------+-----------------------------------------------------------------------------------------------+ + | privateip_id | Yes | Specifies the ID of the private IP address, which uniquely identifies the private IP address. | + +--------------+-----------+-----------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/privateips/d600542a-b231-45ed-af05-e9930cb14f78 + +Response +-------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+=============================================================+================================================================================================================+ + | privateip | :ref:`privateip ` object | Specifies the private IP address objects. For details, see :ref:`Table 3 `. | + +-----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_privateip_0002__table23250319: + + .. table:: **Table 3** Description of the **privateip** field + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+========================================================================================================================================================================================================================================================================================================+ + | status | String | - Specifies the status of the private IP address. | + | | | - Possible values are as follows: | + | | | | + | | | - **ACTIVE** | + | | | - **DOWN** | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the ID of the private IP address, which uniquely identifies the private IP address. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Specifies the ID of the subnet from which IP addresses are assigned. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | - Specifies the resource using the private IP address. The parameter is left blank if it is not used. | + | | | - The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | - The value range specifies only the type of private IP addresses supported by the current service. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_address | String | Specifies the assigned private IP address. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "privateip": + { + "status": "DOWN", + "id": "d600542a-b231-45ed-af05-e9930cb14f78", + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "device_owner": "", + "ip_address": "192.168.1.11" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/private_ip_address/querying_private_ip_addresses.rst b/api-ref/source/apis/private_ip_address/querying_private_ip_addresses.rst new file mode 100644 index 0000000..d602235 --- /dev/null +++ b/api-ref/source/apis/private_ip_address/querying_private_ip_addresses.rst @@ -0,0 +1,140 @@ +:original_name: vpc_privateip_0003.html + +.. _vpc_privateip_0003: + +Querying Private IP Addresses +============================= + +Function +-------- + +This API is used to query private IP addresses using search criteria and to display the private IP addresses in a list. + +URI +--- + +GET /v1/{project_id}/subnets/{subnet_id}/privateips + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_privateip_0003__table12098568: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | Yes | String | Specifies the unique ID of the subnet to which the private IP address belongs. | + | | | | | + | | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips + +Response Message +---------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+=======================================================================+================================================================================================================+ + | privateips | Array of :ref:`privateip ` objects | Specifies the private IP address objects. For details, see :ref:`Table 3 `. | + +------------+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_privateip_0003__table21538022: + + .. table:: **Table 3** Description of the **privateip** field + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+========================================================================================================================================================================================================================================================================================================+ + | status | String | - Specifies the status of the private IP address. | + | | | - Possible values are as follows: | + | | | | + | | | - **ACTIVE** | + | | | - **DOWN** | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the ID of the private IP address, which uniquely identifies the private IP address. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Specifies the ID of the subnet from which IP addresses are assigned. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | - Specifies the resource using the private IP address. The parameter is left blank if it is not used. | + | | | - The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | - The value range specifies only the type of private IP addresses supported by the current service. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_address | String | Specifies the assigned private IP address. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "privateips": [ + { + "status": "DOWN", + "id": "d600542a-b231-45ed-af05-e9930cb14f78", + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "device_owner": "", + "ip_address": "192.168.1.11" + }, + { + "status": "DOWN", + "id": "d600542a-b231-45ed-af05-e9930cb14f79", + "subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "tenant_id": "8b7e35ad379141fc9df3e178bd64f55c", + "device_owner": "", + "ip_address": "192.168.1.12" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/querying_ip_address_usage/index.rst b/api-ref/source/apis/querying_ip_address_usage/index.rst new file mode 100644 index 0000000..054b1b9 --- /dev/null +++ b/api-ref/source/apis/querying_ip_address_usage/index.rst @@ -0,0 +1,14 @@ +:original_name: vpc_natworkip_0000.html + +.. _vpc_natworkip_0000: + +Querying IP Address Usage +========================= + +- :ref:`Querying IP Address Usage on a Specified Network ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_ip_address_usage_on_a_specified_network diff --git a/api-ref/source/apis/querying_ip_address_usage/querying_ip_address_usage_on_a_specified_network.rst b/api-ref/source/apis/querying_ip_address_usage/querying_ip_address_usage_on_a_specified_network.rst new file mode 100644 index 0000000..579a24b --- /dev/null +++ b/api-ref/source/apis/querying_ip_address_usage/querying_ip_address_usage_on_a_specified_network.rst @@ -0,0 +1,138 @@ +:original_name: vpc_natworkip_0001.html + +.. _vpc_natworkip_0001: + +Querying IP Address Usage on a Specified Network +================================================ + +Function +-------- + +This API is used to query the IP address usage on a specified network. + +The obtained information includes the total number of IP addresses on the network, the number of in-use IP addresses on the network, the total number of IP addresses on each subnet, and the number of in-use IP addresses on the subnet. + +.. important:: + + - The first and the last two IP addresses on each subnet are reserved by the system for the gateway and DHCP service. + - The total number of IP addresses and the number of in-use IP addresses described in this section and the subsequent sections do not include the IP addresses reserved by the system. + - When assigning an IP address, you can specify the reserved IP address for the system. The reserved IP addresses will not be included in the number of in-use IP addresses and the total number of IP addresses no matter how the IP address is assigned. + +URI +--- + +GET /v2.0/network-ip-availabilities/{network_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_natworkip_0001__table38148684: + +.. table:: **Table 1** Parameter description + + ========== ====== ========= ========================= + Parameter Type Mandatory Description + ========== ====== ========= ========================= + network_id String Yes Specifies the network ID. + ========== ====== ========= ========================= + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/network-ip-availabilities/6b50d967-779c-40c9-a157-de1df3c17043 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-------------------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+================================================================================+==============================================================================================================================+ + | network_ip_availability | :ref:`network_ip_availability ` object | Specifies the **network_ip_availability** objects. For details, see :ref:`Table 3 `. | + +-------------------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_natworkip_0001__table4952133061113: + + .. table:: **Table 3** **network_ip_availability** objects + + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +========================+========================================================================================+=========================================================================================================================+ + | network_id | String | Specifies the network ID. | + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | network_name | String | Specifies the network name. | + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | total_ips | Integer | Specifies the total number of IP addresses on a network. (System reserved IP addresses are not included.) | + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | used_ips | Integer | Specifies the number of in-use IP addresses on a network. (Reserved IP addresses are not included.) | + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | subnet_ip_availability | Array of :ref:`subnet_ip_availability ` objects | Specifies the subnet IP address usage objects. For details, see :ref:`Table 4 `. | + +------------------------+----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_natworkip_0001__table110015141519: + + .. table:: **Table 4** Description of the **subnet_ip_availability** field + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+===========================================================================================================+ + | used_ips | Integer | Specifies the number of in-use IP addresses on a subnet. (System reserved IP addresses are not included.) | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + | subnet_id | String | Specifies the subnet ID. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + | subnet_name | String | Specifies the subnet name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP version of the subnet. Only IPv4 is supported. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the subnet CIDR block. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + | total_ips | Integer | Specifies the total number of IP addresses on a subnet. (System reserved IP addresses are not included.) | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "network_ip_availability": { + "used_ips": 4, + "subnet_ip_availability": [ + { + "used_ips": 4, + "subnet_id": "98e343d1-3cb8-4f69-9cd1-00569819480f", + "subnet_name": "", + "ip_version": 4, + "cidr": "10.0.0.0/8", + "total_ips": 300 + } + ], + "network_id": "6b50d967-779c-40c9-a157-de1df3c17043", + "tenant_id": "7c4b23cb125d481c95cbe4f91b2c11cd", + "total_ips": 300, + "network_name": "pch_test_003" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/quota/index.rst b/api-ref/source/apis/quota/index.rst new file mode 100644 index 0000000..aa8d8cf --- /dev/null +++ b/api-ref/source/apis/quota/index.rst @@ -0,0 +1,14 @@ +:original_name: vpc_quota_0000.html + +.. _vpc_quota_0000: + +Quota +===== + +- :ref:`Querying Quotas ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_quotas diff --git a/api-ref/source/apis/quota/querying_quotas.rst b/api-ref/source/apis/quota/querying_quotas.rst new file mode 100644 index 0000000..c99c2b3 --- /dev/null +++ b/api-ref/source/apis/quota/querying_quotas.rst @@ -0,0 +1,248 @@ +:original_name: vpc_quota_0001.html + +.. _vpc_quota_0001: + +Querying Quotas +=============== + +Function +-------- + +This API is used to query network resource quotas of a tenant. The network resources include VPCs, subnets, security groups, security group rules, EIPs, and VPNs. + +URI +--- + +GET /v1/{project_id}/quotas + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/quotas?type={type} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_quota_0001__table38014313: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+---------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+=================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------+-----------------+-----------------+---------------------------------+ + | type | No | String | - Specifies the resource type. | + | | | | - Values: | + | | | | | + | | | | - vpc | + | | | | - subnet | + | | | | - securityGroup | + | | | | - securityGroupRule | + | | | | - publicIp | + | | | | - vpn | + | | | | - vpngw | + | | | | - vpcPeer | + | | | | - loadbalancer | + | | | | - listener | + | | | | - physicalConnect | + | | | | - virtualInterface | + | | | | - firewall | + | | | | - shareBandwidthIP | + | | | | - shareBandwidth | + | | | | - address_group | + | | | | - flow_log | + | | | | - vpcContainRoutetable | + | | | | - routetableContainRoutes | + +-----------------+-----------------+-----------------+---------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. code-block:: text + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/quotas + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +--------+------------------------------------------------------------+----------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +========+============================================================+====================================================================================================+ + | quotas | :ref:`quotas ` object | Specifies the quota object. For details, see :ref:`Table 3 `. | + +--------+------------------------------------------------------------+----------------------------------------------------------------------------------------------------+ + + .. _vpc_quota_0001__table11308015155544: + + .. table:: **Table 3** Description of the **quotas** field + + +-----------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+=================================================================+=================================================================================================+ + | resources | Array of :ref:`resource ` objects | Specifies the resource objects. For details, see :ref:`Table 4 `. | + +-----------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ + + .. _vpc_quota_0001__table8208684: + + .. table:: **Table 4** Description of the **resource** field + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=============================================================================================================+ + | type | String | - Specifies the resource type. | + | | | - Values: | + | | | | + | | | - vpc | + | | | - subnet | + | | | - securityGroup | + | | | - securityGroupRule | + | | | - publicIp | + | | | - vpn | + | | | - vpngw | + | | | - vpcPeer | + | | | - loadbalancer | + | | | - listener | + | | | - physicalConnect | + | | | - virtualInterface | + | | | - firewall | + | | | - shareBandwidthIP | + | | | - shareBandwidth | + | | | - address_group | + | | | - flow_log | + | | | - vpcContainRoutetable | + | | | - routetableContainRoutes | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------+ + | used | Integer | - Specifies the number of created network resources. | + | | | - The value ranges from **0** to the value of **quota**. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------+ + | quota | Integer | - Specifies the maximum quota values for the resources. | + | | | | + | | | - The value ranges from the default quota value to the maximum quota value. | + | | | | + | | | - The default quota values can be changed. Configure the quota values in the underlying system in advance. | + | | | | + | | | Default quota values: | + | | | | + | | | - VPC: 150 | + | | | - Subnet: 400 | + | | | - Security group: 100 | + | | | - Security group rule: 5000 | + | | | - EIPs: 10 | + | | | - VPNs: 5 | + | | | - VPC peering connections: 50 | + | | | - Load balancers: 10 | + | | | - Listeners: 10 | + | | | - Firewalls: 200 | + | | | - EIPs that can be added to a shared bandwidth: 20 | + | | | - Shared bandwidths: 5 | + | | | - IP address groups: 50 | + | | | - Route table per VPC: 1 | + | | | - Routes per route table: 200 | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------+ + | min | Integer | Specifies the minimum quota value allowed. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "quotas": { + "resources": [ + { + "type": "vpc", + "used": 4, + "quota": 150, + "min": 0 + }, + { + "type": "subnet", + "used": 5, + "quota": 400, + "min": 0 + }, + { + "type": "securityGroup", + "used": 1, + "quota": 100, + "min": 0 + }, + { + "type": "securityGroupRule", + "used": 6, + "quota": 5000, + "min": 0 + }, + { + "type": "publicIp", + "used": 2, + "quota": 10, + "min": 0 + }, + { + "type": "vpn", + "used": 0, + "quota": 5, + "min": 0 + }, + { + "type": "vpcPeer", + "used": 0, + "quota": 50, + "min": 0 + }, + { + "type": "firewall", + "used": 0, + "quota": 200, + "min": 0 + }, + { + "type": "shareBandwidth", + "used": 0, + "quota": 5, + "min": 0 + }, + { + "type": "shareBandwidthIP", + "used": 0, + "quota": 20, + "min": 0 + }, + { + "type": "loadbalancer", + "used": 0, + "quota": 10, + "min": 0 + }, + { + "type": "listener", + "used": 0, + "quota": 10, + "min": 0 + } + ] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/associating_multiple_nic_ports_to_or_disassociating_them_from_a_security_group_at_a_time.rst b/api-ref/source/apis/security_group/associating_multiple_nic_ports_to_or_disassociating_them_from_a_security_group_at_a_time.rst new file mode 100644 index 0000000..5736c8e --- /dev/null +++ b/api-ref/source/apis/security_group/associating_multiple_nic_ports_to_or_disassociating_them_from_a_security_group_at_a_time.rst @@ -0,0 +1,157 @@ +:original_name: vpc_sg01_0009.html + +.. _vpc_sg01_0009: + +Associating Multiple NIC Ports to or Disassociating Them from a Security Group at a Time +======================================================================================== + +Function +-------- + +This API is used to associate multiple NIC ports to or disassociate them from a specified security group at a time. + +Restrictions + +- A maximum of 20 ports can be associated to or disassociated from a security group at a time. Therefore, the **ports** can contain a maximum of 20 values. +- No error message is displayed if a port is repeatedly associated with a security group. + +URI +--- + +POST /v2.0/{project_id}/security-groups/{security_group_id}/instance/action + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0009__table7179415121614: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------+--------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +===================+===========+================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-------------------+-----------+--------------------------------------------------------------------------------+ + | security_group_id | Yes | Specifies the security group ID, which uniquely identifies the security group. | + +-------------------+-----------+--------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +--------+-----------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+=================================================================+===================================================================================================================================+ + | ports | Yes | Array of :ref:`Port ` objects | Specifies the port list. A maximum of 20 ports are supported. For details, see :ref:`Table 3 `. | + +--------+-----------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | action | Yes | String | Specifies the operation. The value can be **add** (associate) or **remove** (disassociate). The values are case-insensitive. | + +--------+-----------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0009__table425751511619: + + .. table:: **Table 3** Description of field **Port** + + +------+-----------+--------+------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+========+============================================================+ + | id | Yes | String | Specifies the port ID, which uniquely identifies the port. | + +------+-----------+--------+------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/security-groups/0c4a2336-b036-4fa2-bc3c-1a291ed4c431/instance/action + + { + "ports": [ + { + "id": "b9ac5247-c4ca-4c9b-b8fa-7d19132e560a" + }, + { + "id": "aa2f8625-0042-4627-a05c-61500b604cc3" + } + ], + "action": "add" + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +-----------------------+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================================================+==========================================================================================================================================+ + | fail | :ref:`fail ` object | Specifies the failed ports. For details, see :ref:`Table 5 `. | + | | | | + | | | If all ports are associated with or disassociated from the security group successfully, the **fail** list in the response body is blank. | + +-----------------------+-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0009__table728810252119: + + .. table:: **Table 5** **fail** objects + + +------------+--------+--------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========+==========================================================================+ + | id | String | Specifies the ID of the failed port, which uniquely identifies the port. | + +------------+--------+--------------------------------------------------------------------------+ + | error_code | String | Specifies the error code. | + +------------+--------+--------------------------------------------------------------------------+ + | error_msg | String | Specifies the error message. | + +------------+--------+--------------------------------------------------------------------------+ + +- Example normal response 1 + + Multiple NIC ports are successfully associated to or disassociated from a security group at a time. + + .. code-block:: + + { + "fail": [] + } + +- Example normal response 2 + + Some NIC ports fail to be associated to or disassociated from a security group at a time. + + .. code-block:: + + { + "fail": [ + { + "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", + "error_code": "VPC.0608", + "error_msg": "{\"NeutronError\":{\"message\":\"Port 99d9d709-8478-4b46-9f3f-2206b1023fd3 could not be found.\",\"type\":\"PortNotFound\",\"detail\":\"\"}}" + }, + { + "id": "aa2f8625-0042-4627-a05c-61500b604cc3", + "error_code": "VPC.0607", + "error_msg": "An instance must belong to at least one security group" + } + ] + } + +- Example abnormal response + + .. code-block:: + + { + "code": "VPC.0606", + "message": "Request is invalid" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/creating_a_security_group.rst b/api-ref/source/apis/security_group/creating_a_security_group.rst new file mode 100644 index 0000000..734d6bb --- /dev/null +++ b/api-ref/source/apis/security_group/creating_a_security_group.rst @@ -0,0 +1,211 @@ +:original_name: vpc_sg01_0001.html + +.. _vpc_sg01_0001: + +Creating a Security Group +========================= + +Function +-------- + +This API is used to create a security group. + +URI +--- + +POST /v1/{project_id}/security-groups + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0001__table483113939489: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +----------------+-----------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +================+===========+=================================================================+===========================================================================================================+ + | security_group | Yes | :ref:`security_group ` object | Specifies the security group objects. For details, see :ref:`Table 3 `. | + +----------------+-----------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0001__table495783939489: + + .. table:: **Table 3** Description of **security_group** fields + + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+===================================================================================================================================================================+ + | name | Yes | String | - Specifies the security group name. | + | | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | No | String | Specifies the resource ID of the VPC to which the security group belongs. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter has been discarded, it is not recommended to use it. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group. | + | | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/security-groups + + { + "security_group": { + "name": "qq", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85" + "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +----------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +================+=================================================================+===========================================================================================================+ + | security_group | :ref:`security_group ` object | Specifies the security group objects. For details, see :ref:`Table 5 `. | + +----------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0001__table661472489489: + + .. table:: **Table 5** Description of **security_group** fields + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+================================================================================+===================================================================================================================================================================+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the security group ID, which uniquely identifies the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the resource ID of the VPC to which the security group belongs. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter has been discarded, it is not recommended to use it. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`security_group_rule ` objects | Specifies the default security group rules, which ensure that resources in the security group can communicate with one another. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0001__table210704979489: + + .. table:: **Table 6** **security_group_rule** objects + + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+=======================+===========================================================================================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the security group rule. | + | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | - Specifies the direction of access control. | + | | | - Possible values are as follows: | + | | | | + | | | - **egress** | + | | | - **ingress** | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | - Specifies the IP protocol version. | + | | | - The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | - Specifies the protocol type. | + | | | - The value can be **icmp**, **tcp**, or **udp**. | + | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | - Specifies the start port number. | + | | | - The value ranges from 1 to 65535. | + | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | - Specifies the end port number. | + | | | - The value ranges from 1 to 65535. | + | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | - The value can be in the CIDR format or IP addresses. | + | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | - Specifies the ID of the peer security group. | + | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | - Specifies the ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "security_group": { + "id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "name": "qq", + "description": "", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", + "security_group_rules": [ + { + "direction": "egress", + "ethertype": "IPv4", + "id": "369e6499-b2cb-4126-972a-97e589692c62", + "description": "", + "security_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6" + }, + { + "direction": "ingress", + "ethertype": "IPv4", + "id": "0222556c-6556-40ad-8aac-9fd5d3c06171", + "description": "", + "remote_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "security_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "remote_address_group_id": null + } + ] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/creating_a_security_group_rule.rst b/api-ref/source/apis/security_group/creating_a_security_group_rule.rst new file mode 100644 index 0000000..fb9a977 --- /dev/null +++ b/api-ref/source/apis/security_group/creating_a_security_group_rule.rst @@ -0,0 +1,184 @@ +:original_name: vpc_sg01_0005.html + +.. _vpc_sg01_0005: + +Creating a Security Group Rule +============================== + +Function +-------- + +This API is used to create a security group rule. + +URI +--- + +POST /v1/{project_id}/security-group-rules + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 1** Request parameter + + +---------------------+-----------+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=====================+===========+========================================================================+==================================================================================================================+ + | security_group_rule | Yes | :ref:`security_group_rule ` object | Specifies the security group rule objects. For details, see :ref:`Table 2 `. | + +---------------------+-----------+------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0005__table40497645103533: + + .. table:: **Table 2** Description of the **security_group_rule** field + + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=========================+=================+=================+===========================================================================================================================================================================================================================================================+ + | security_group_id | Yes | String | Specifies the security group ID. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the security group rule. | + | | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | Yes | String | - The value can be: | + | | | | | + | | | | - **egress** | + | | | | - **ingress** | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | No | String | - Specifies the IP protocol version. | + | | | | - The value can be **IPv4** or **IPv6**. | + | | | | - If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | No | String | - Specifies the protocol type. | + | | | | - The value can be **tcp**, **udp**, **icmp** or an IP protocol number (0 to 255). | + | | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | No | Integer | - Specifies the start port number. | + | | | | - The value ranges from 1 to 65535. | + | | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | No | Integer | - Specifies the end port number. | + | | | | - The value ranges from 1 to 65535. | + | | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | No | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | | - The value can be in the CIDR format or IP addresses. | + | | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | No | String | - Specifies the ID of the peer security group. | + | | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | No | String | - Specifies the remote IP address group ID. You can log in to the management console and view the ID on the IP address group page. | + | | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/security-group-rules + + { + "security_group_rule": { + "direction": "ingress", + "port_range_min": "80", + "ethertype": "IPv4", + "port_range_max": "80", + "protocol": "tcp", + "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "security_group_id": "a7734e61-b545-452d-a3cd-0189cbd9747a", + "remote_address_group_id": null + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 3** Response parameter + + +---------------------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=====================+======================================================================+================================================================================================================+ + | security_group_rule | :ref:`security_group_rule ` object | Specifies the security group rule objects. For details, see :ref:`Table 4 `. | + +---------------------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0005__table488727239520: + + .. table:: **Table 4** **security_group_rule** objects + + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+=======================+===========================================================================================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the security group rule. | + | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | - Specifies the direction of access control. | + | | | - Possible values are as follows: | + | | | | + | | | - **egress** | + | | | - **ingress** | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | - Specifies the IP protocol version. | + | | | - The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | - Specifies the protocol type. | + | | | - The value can be **icmp**, **tcp**, or **udp**. | + | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | - Specifies the start port number. | + | | | - The value ranges from 1 to 65535. | + | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | - Specifies the end port number. | + | | | - The value ranges from 1 to 65535. | + | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | - The value can be in the CIDR format or IP addresses. | + | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | - Specifies the ID of the peer security group. | + | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | - Specifies the ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "security_group_rule": { + "direction": "ingress", + "ethertype": "IPv4", + "id": "2bc0accf-312e-429a-956e-e4407625eb62", + "description": "", + "port_range_max": 80, + "port_range_min": 80, + "protocol": "tcp", + "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "remote_ip_prefix": null, + "security_group_id": "a7734e61-b545-452d-a3cd-0189cbd9747a", + "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550", + "remote_address_group_id": null + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/deleting_a_security_group.rst b/api-ref/source/apis/security_group/deleting_a_security_group.rst new file mode 100644 index 0000000..e1be1fc --- /dev/null +++ b/api-ref/source/apis/security_group/deleting_a_security_group.rst @@ -0,0 +1,64 @@ +:original_name: vpc_sg01_0004.html + +.. _vpc_sg01_0004: + +Deleting a Security Group +========================= + +Function +-------- + +This API is used to delete a security group. + +URI +--- + +DELETE /v1/{project_id}/security-groups/{security_group_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0004__table1939240195259: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------+--------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +===================+===========+================================================================================+ + | security_group_id | Yes | Specifies the security group ID, which uniquely identifies the security group. | + +-------------------+-----------+--------------------------------------------------------------------------------+ + | project_id | No | Specifies the project ID. | + +-------------------+-----------+--------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/{project_id}/security-groups/0c4a2336-b036-4fa2-bc3c-1a291ed4c431 + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/deleting_a_security_group_rule.rst b/api-ref/source/apis/security_group/deleting_a_security_group_rule.rst new file mode 100644 index 0000000..6db5701 --- /dev/null +++ b/api-ref/source/apis/security_group/deleting_a_security_group_rule.rst @@ -0,0 +1,64 @@ +:original_name: vpc_sg01_0008.html + +.. _vpc_sg01_0008: + +Deleting a Security Group Rule +============================== + +Function +-------- + +This API is used to delete a security group rule. + +URI +--- + +DELETE /v1/{project_id}/security-group-rules/{security_group_rule_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0008__table1939240195259: + +.. table:: **Table 1** Parameter description + + +------------------------+-----------+------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +========================+===========+==========================================================================================+ + | security_group_rule_id | Yes | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +------------------------+-----------+------------------------------------------------------------------------------------------+ + | project_id | Yes | Specifies the project ID. | + +------------------------+-----------+------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/{project_id}/security-group-rules/2bc0accf-312e-429a-956e-e4407625eb62 + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/index.rst b/api-ref/source/apis/security_group/index.rst new file mode 100644 index 0000000..d997a06 --- /dev/null +++ b/api-ref/source/apis/security_group/index.rst @@ -0,0 +1,30 @@ +:original_name: vpc_sg01_0000.html + +.. _vpc_sg01_0000: + +Security Group +============== + +- :ref:`Creating a Security Group ` +- :ref:`Querying Security Group Details ` +- :ref:`Querying Security Groups ` +- :ref:`Deleting a Security Group ` +- :ref:`Creating a Security Group Rule ` +- :ref:`Querying Security Group Rule Details ` +- :ref:`Querying Security Group Rules ` +- :ref:`Deleting a Security Group Rule ` +- :ref:`Associating Multiple NIC Ports to or Disassociating Them from a Security Group at a Time ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_security_group + querying_security_group_details + querying_security_groups + deleting_a_security_group + creating_a_security_group_rule + querying_security_group_rule_details + querying_security_group_rules + deleting_a_security_group_rule + associating_multiple_nic_ports_to_or_disassociating_them_from_a_security_group_at_a_time diff --git a/api-ref/source/apis/security_group/querying_security_group_details.rst b/api-ref/source/apis/security_group/querying_security_group_details.rst new file mode 100644 index 0000000..78dedfd --- /dev/null +++ b/api-ref/source/apis/security_group/querying_security_group_details.rst @@ -0,0 +1,175 @@ +:original_name: vpc_sg01_0002.html + +.. _vpc_sg01_0002: + +Querying Security Group Details +=============================== + +Function +-------- + +This API is used to query details about a security group. + +URI +--- + +GET /v1/{project_id}/security-groups/{security_group_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0002__table211310359520: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------+--------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +===================+===========+================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-------------------+-----------+--------------------------------------------------------------------------------+ + | security_group_id | Yes | Specifies the security group ID, which uniquely identifies the security group. | + +-------------------+-----------+--------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/security-groups/16b6e77a-08fa-42c7-aa8b-106c048884e6 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +----------------+-----------------------------------------------------------------+--------------------------------------+ + | Name | Type | Description | + +================+=================================================================+======================================+ + | security_group | :ref:`security_group ` object | Specifies the security group object. | + +----------------+-----------------------------------------------------------------+--------------------------------------+ + + .. _vpc_sg01_0002__table333218689520: + + .. table:: **Table 3** Description of **security_group** fields + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+================================================================================+===================================================================================================================================================================+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the security group ID, which uniquely identifies the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the resource ID of the VPC to which the security group belongs. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter has been discarded. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`security_group_rule ` objects | Specifies the default security group rules, which ensure that resources in the security group can communicate with one another. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0002__table488727239520: + + .. table:: **Table 4** **security_group_rule** objects + + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+=======================+===========================================================================================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the security group rule. | + | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | - Specifies the direction of access control. | + | | | - Possible values are as follows: | + | | | | + | | | - **egress** | + | | | - **ingress** | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | - Specifies the IP protocol version. | + | | | - The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | - Specifies the protocol type. | + | | | - The value can be **icmp**, **tcp**, or **udp**. | + | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | - Specifies the start port number. | + | | | - The value ranges from 1 to 65535. | + | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | - Specifies the end port number. | + | | | - The value ranges from 1 to 65535. | + | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | - The value can be in the CIDR format or IP addresses. | + | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | - Specifies the ID of the peer security group. | + | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | - Specifies the ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "security_group": { + "id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "name": "qq", + "description": "qq", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "enterprise_project_id ": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", + "security_group_rules": [ + { + "direction": "egress", + "ethertype": "IPv4", + "id": "369e6499-b2cb-4126-972a-97e589692c62", + "description": "", + "security_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "remote_address_group_id": null + }, + { + "direction": "ingress", + "ethertype": "IPv4", + "id": "0222556c-6556-40ad-8aac-9fd5d3c06171", + "description": "", + "remote_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "security_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6" + } + ] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/querying_security_group_rule_details.rst b/api-ref/source/apis/security_group/querying_security_group_rule_details.rst new file mode 100644 index 0000000..a30405b --- /dev/null +++ b/api-ref/source/apis/security_group/querying_security_group_rule_details.rst @@ -0,0 +1,135 @@ +:original_name: vpc_sg01_0006.html + +.. _vpc_sg01_0006: + +Querying Security Group Rule Details +==================================== + +Function +-------- + +This API is used to query details about a security group rule. + +URI +--- + +GET /v1/{project_id}/security-group-rules/{security_group_rule_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0006__table211310359520: + +.. table:: **Table 1** Parameter description + + +------------------------+-----------+------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +========================+===========+==========================================================================================+ + | project_id | Yes | Specifies the project ID. | + +------------------------+-----------+------------------------------------------------------------------------------------------+ + | security_group_rule_id | Yes | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +------------------------+-----------+------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/security-group-rules/2bc0accf-312e-429a-956e-e4407625eb62 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +---------------------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=====================+======================================================================+================================================================================================================+ + | security_group_rule | :ref:`security_group_rule ` object | Specifies the security group rule objects. For details, see :ref:`Table 3 `. | + +---------------------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0006__table488727239520: + + .. table:: **Table 3** **security_group_rule** objects + + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+=======================+===========================================================================================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the security group rule. | + | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | - Specifies the direction of access control. | + | | | - Possible values are as follows: | + | | | | + | | | - **egress** | + | | | - **ingress** | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | - Specifies the IP protocol version. | + | | | - The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | - Specifies the protocol type. | + | | | - The value can be **icmp**, **tcp**, or **udp**. | + | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | - Specifies the start port number. | + | | | - The value ranges from 1 to 65535. | + | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | - Specifies the end port number. | + | | | - The value ranges from 1 to 65535. | + | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | - The value can be in the CIDR format or IP addresses. | + | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | - Specifies the ID of the peer security group. | + | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | - Specifies the ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "security_group_rule": { + "direction": "ingress", + "ethertype": "IPv4", + "id": "2bc0accf-312e-429a-956e-e4407625eb62", + "description":"", + "port_range_max": 80, + "port_range_min": 80, + "protocol": "tcp", + "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "remote_ip_prefix": null, + "security_group_id": "a7734e61-b545-452d-a3cd-0189cbd9747a", + "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550", + "remote_address_group_id": null + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/querying_security_group_rules.rst b/api-ref/source/apis/security_group/querying_security_group_rules.rst new file mode 100644 index 0000000..80427ba --- /dev/null +++ b/api-ref/source/apis/security_group/querying_security_group_rules.rst @@ -0,0 +1,196 @@ +:original_name: vpc_sg01_0007.html + +.. _vpc_sg01_0007: + +Querying Security Group Rules +============================= + +Function +-------- + +This API is used to query security group rules using search criteria and to display the security group rules in a list. + +URI +--- + +GET /v1/{project_id}/security-group-rules + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/security-group-rules?security_group_id=a7734e61-b545-452da3cd-0189cbd9747a&limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0007__table1939240195259: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+=================+=================+========================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | No | String | Specifies the security group ID. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/security-group-rules + +Response Message +---------------- + +- Response parameter + + +----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +======================+================================================================================+================================================================================================================+ + | security_group_rules | Array of :ref:`security_group_rule ` objects | Specifies the security group rule objects. For details, see :ref:`Table 2 `. | + +----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0007__table488727239520: + + .. table:: **Table 2** **security_group_rule** objects + + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+=======================+===========================================================================================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the security group rule. | + | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | - Specifies the direction of access control. | + | | | - Possible values are as follows: | + | | | | + | | | - **egress** | + | | | - **ingress** | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | - Specifies the IP protocol version. | + | | | - The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | - Specifies the protocol type. | + | | | - The value can be **icmp**, **tcp**, or **udp**. | + | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | - Specifies the start port number. | + | | | - The value ranges from 1 to 65535. | + | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | - Specifies the end port number. | + | | | - The value ranges from 1 to 65535. | + | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | - The value can be in the CIDR format or IP addresses. | + | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | - Specifies the ID of the peer security group. | + | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | - Specifies the ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "security_group_rules": [ + { + "direction": "egress", + "ethertype": "IPv6", + "id": "3c0e45ff-adaf-4124-b083-bf390e5482ff", + "description": "", + "port_range_max": null, + "port_range_min": null, + "protocol": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550", + "remote_address_group_id": null + }, + { + "direction": "egress", + "ethertype": "IPv4", + "id": "93aa42e5-80db-4581-9391-3a608bd0e448", + "description": "", + "port_range_max": null, + "port_range_min": null, + "protocol": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550", + "remote_address_group_id": null + }, + { + "direction": "ingress", + "ethertype": "IPv6", + "id": "c0b09f00-1d49-4e64-a0a7-8a186d928138", + "description": "", + "port_range_max": null, + "port_range_min": null, + "protocol": null, + "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "remote_ip_prefix": null, + "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550", + "remote_address_group_id": null + }, + { + "direction": "ingress", + "ethertype": "IPv4", + "id": "f7d45c89-008e-4bab-88ad-d6811724c51c", + "description": "", + "port_range_max": null, + "port_range_min": null, + "protocol": null, + "remote_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "remote_ip_prefix": null, + "security_group_id": "85cc3048-abc3-43cc-89b3-377341426ac5", + "tenant_id": "e4f50856753b4dc6afee5fa6b9b6c550", + "remote_address_group_id": null + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/security_group/querying_security_groups.rst b/api-ref/source/apis/security_group/querying_security_groups.rst new file mode 100644 index 0000000..c9db829 --- /dev/null +++ b/api-ref/source/apis/security_group/querying_security_groups.rst @@ -0,0 +1,230 @@ +:original_name: vpc_sg01_0003.html + +.. _vpc_sg01_0003: + +Querying Security Groups +======================== + +Function +-------- + +This API is used to query security groups using search criteria and to display the security groups in a list. + +URI +--- + +GET /v1/{project_id}/security-groups + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/security-groups?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85 + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg01_0003__table1939240195259: + +.. table:: **Table 1** Parameter description + + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=========================+=================+=================+=====================================================================================================================================================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | No | String | Specifies that the VPC ID is used as the filtering condition. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. This field can be used to filter the security groups of an enterprise project. | + | | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. To obtain the security groups bound to all enterprise projects of the user or to display the security group list for enterprise project member accounts, set **all_granted_eps**. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | No | String | - Specifies the remote IP address group ID. You can log in to the management console and view the ID on the IP address group page. | + | | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/security-groups + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------------+---------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=================+===========================================================================+===========================================================================================================+ + | security_groups | Array of :ref:`security_group ` objects | Specifies the security group objects. For details, see :ref:`Table 3 `. | + +-----------------+---------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0003__table333218689520: + + .. table:: **Table 3** Description of **security_group** fields + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+================================================================================+===================================================================================================================================================================+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the security group ID, which uniquely identifies the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the resource ID of the VPC to which the security group belongs. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter has been discarded. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`security_group_rule ` objects | Specifies the default security group rules, which ensure that resources in the security group can communicate with one another. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_sg01_0003__table488727239520: + + .. table:: **Table 4** **security_group_rule** objects + + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=========================+=======================+===========================================================================================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the security group rule. | + | | | - The value can contain no more than 255 characters, including letters and digits. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the security group rule ID, which uniquely identifies the security group rule. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | - Specifies the direction of access control. | + | | | - Possible values are as follows: | + | | | | + | | | - **egress** | + | | | - **ingress** | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | - Specifies the IP protocol version. | + | | | - The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | - Specifies the protocol type. | + | | | - The value can be **icmp**, **tcp**, or **udp**. | + | | | - If the parameter is left blank, all protocols are supported. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | - Specifies the start port number. | + | | | - The value ranges from 1 to 65535. | + | | | - The value cannot be greater than the **port_range_max** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | - Specifies the end port number. | + | | | - The value ranges from 1 to 65535. | + | | | - If the protocol is not **icmp**, the value cannot be smaller than the **port_range_min** value. An empty value indicates all ports. If the protocol is **icmp**, the value range is shown in :ref:`ICMP-Port Range Relationship Table `. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | - Specifies the remote IP address. If the access control direction is set to **egress**, the parameter specifies the source IP address. If the access control direction is set to **ingress**, the parameter specifies the destination IP address. | + | | | - The value can be in the CIDR format or IP addresses. | + | | | - The parameter is exclusive with parameter **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | - Specifies the ID of the peer security group. | + | | | - The value is exclusive with parameter **remote_ip_prefix**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | - Specifies the ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "security_groups": [ + { + "id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "name": "qq", + "description": "qq", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "enterprise_project_id ": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", + "security_group_rules": [ + { + "direction": "egress", + "ethertype": "IPv4", + "id": "369e6499-b2cb-4126-972a-97e589692c62", + "description": "", + "security_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "remote_address_group_id": null + }, + { + "direction": "ingress", + "ethertype": "IPv4", + "id": "0222556c-6556-40ad-8aac-9fd5d3c06171", + "description": "", + "remote_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6", + "security_group_id": "16b6e77a-08fa-42c7-aa8b-106c048884e6" + } + ] + }, + { + "id": "9c0f56be-a9ac-438c-8c57-fce62de19419", + "name": "default", + "description": "qq", + "vpc_id": "13551d6b-755d-4757-b956-536f674975c0", + "enterprise_project_id ": "0", + "security_group_rules": [ + { + "direction": "egress", + "ethertype": "IPv4", + "id": "95479e0a-e312-4844-b53d-a5e4541b783f", + "description": "", + "security_group_id": "9c0f56be-a9ac-438c-8c57-fce62de19419" + }, + { + "direction": "ingress", + "ethertype": "IPv4", + "id": "0c4a2336-b036-4fa2-bc3c-1a291ed4c431", + "description": "", + "remote_group_id": "9c0f56be-a9ac-438c-8c57-fce62de19419", + "security_group_id": "9c0f56be-a9ac-438c-8c57-fce62de19419" + } + ] + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet/creating_a_subnet.rst b/api-ref/source/apis/subnet/creating_a_subnet.rst new file mode 100644 index 0000000..a4f0f5f --- /dev/null +++ b/api-ref/source/apis/subnet/creating_a_subnet.rst @@ -0,0 +1,262 @@ +:original_name: vpc_subnet01_0001.html + +.. _vpc_subnet01_0001: + +Creating a Subnet +================= + +Function +-------- + +This API is used to create a subnet. + +URI +--- + +POST /v1/{project_id}/subnets + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_subnet01_0001__table21421675: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +--------+-----------+---------------------------------------------------------+-------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+=========================================================+=========================================================================+ + | subnet | Yes | :ref:`subnet ` object | Specifies the :ref:`subnet objects `. | + +--------+-----------+---------------------------------------------------------+-------------------------------------------------------------------------+ + + .. _vpc_subnet01_0001__table45596481: + + .. table:: **Table 3** **subnet** objects + + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+=================+================================================================================+======================================================================================================================================================================================================================================================================================================+ + | name | Yes | String | - Specifies the subnet name. | + | | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the subnet. | + | | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | Yes | String | - Specifies the subnet CIDR block. | + | | | | - The value must be within the VPC CIDR block. | + | | | | - The value must be in CIDR format. The subnet mask cannot be greater than 28. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | Yes | String | - Specifies the gateway of the subnet. | + | | | | - The value must be an IP address in the subnet. | + | | | | - The value must be a valid IP address. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dhcp_enable | No | Boolean | - Specifies whether DHCP is enabled for the subnet. | + | | | | - The value can be **true** (enabled) or **false** (disabled). | + | | | | - If this parameter is left blank, the system automatically sets it to **true** by default. If this parameter is set to **false**, newly created ECSs cannot obtain IP addresses, and usernames and passwords cannot be injected using Cloud-init. Exercise caution when performing this operation. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | primary_dns | No | String | - Specifies the IP address of DNS server 1 on the subnet. | + | | | | - The value must be an IP address. If the value is not specified, the default value will be left blank. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | secondary_dns | No | String | - Specifies the IP address of DNS server 2 on the subnet. | + | | | | - The value must be an IP address. If the value is not specified, the default value will be left blank. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dnsList | No | Array of strings | - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. | + | | | | - This parameter value is the superset of both DNS server address 1 and DNS server address 2. If the value is not specified, the default value will be left blank. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | No | String | - Specifies the AZ to which the subnet belongs, which can be obtained from endpoints. | + | | | | - The value must be an existing AZ in the system. If the value is not specified, the default value will be left blank. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | Yes | String | Specifies the ID of the VPC to which the subnet belongs. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | No | Array of :ref:`extra_dhcp_opt ` objects | Specifies the NTP server address configured for the subnet. For details, see :ref:`Table 4 `. | + +-------------------+-----------------+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_subnet01_0001__table1805181451016: + + .. table:: **Table 4** **extra_dhcp_opt** object + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+======================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | opt_value | No | String | - Specifies the NTP server address configured for the subnet. | + | | | | | + | | | | - Constraints: | + | | | | | + | | | | The option **ntp** for **opt_name** indicates the NTP server configured for the subnet. Currently, only IPv4 addresses are supported. A maximum of four IP addresses can be configured, and each address must be unique. Multiple IP addresses must be separated using commas (,). The option **null** for **opt_name** indicates that no NTP server is configured for the subnet. The parameter value cannot be an empty string. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | opt_name | Yes | String | - Specifies the NTP server address name configured for the subnet. | + | | | | - Currently, the value can only be set to **ntp**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/subnets + + { + "subnet": { + "name": "subnet", + "description": "", + "cidr": "192.168.20.0/24", + "gateway_ip": "192.168.20.1", + "dhcp_enable": true, + "primary_dns": "114.xx.xx.114", + "secondary_dns": "114.xx.xx.115", + "dnsList": [ + "114.xx.xx.114", + "114.xx.xx.115" + ], + "availability_zone": "aa-bb-cc",//For example, the AZ is aa-bb-cc. + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "extra_dhcp_opts": [ + { + "opt_value": "10.100.0.33,10.100.0.34", + "opt_name": "ntp" + } + ] + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 5** Response parameter + + +--------+---------------------------------------------------------+-------------------------------------------------------------------------+ + | Name | Type | Description | + +========+=========================================================+=========================================================================+ + | subnet | :ref:`subnet ` object | Specifies the :ref:`subnet objects `. | + +--------+---------------------------------------------------------+-------------------------------------------------------------------------+ + + .. _vpc_subnet01_0001__table54041329: + + .. table:: **Table 6** **subnet** objects + + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===============================================================================+==================================================================================================================================================================================================================================================+ + | id | String | Specifies the resource identifier in the form of UUID. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | - Specifies the subnet name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the subnet. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | - Specifies the subnet CIDR block. | + | | | - The value must be within the VPC CIDR block. | + | | | - The value must be in CIDR format. The subnet mask cannot be greater than 28. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | - Specifies the gateway of the subnet. | + | | | - The value must be an IP address in the subnet. | + | | | - The value must be a valid IP address. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dhcp_enable | Boolean | Specifies whether the DHCP function is enabled for the subnet. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | primary_dns | String | - Specifies the IP address of DNS server 1 on the subnet. | + | | | - The value must be an IP address. If the value is not specified, the default value will be left blank. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | secondary_dns | String | - Specifies the IP address of DNS server 2 on the subnet. | + | | | - The value must be an IP address. If the value is not specified, the default value will be left blank. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dnsList | Array of strings | - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. | + | | | - This parameter value is the superset of both DNS server address 1 and DNS server address 2. If the value is not specified, the default value will be left blank. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | - Specifies the AZ to which the subnet belongs, which can be obtained from endpoints. | + | | | - The value must be an existing AZ in the system. If the value is not specified, the default value will be left blank. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the ID of the VPC to which the subnet belongs. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the status of the subnet. | + | | | | + | | | - The value can be **ACTIVE**, **UNKNOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE**: indicates that the subnet has been associated with a VPC. | + | | | - **UNKNOWN**: indicates that the subnet has not been associated with a VPC. | + | | | - **ERROR**: indicates that the subnet is abnormal. | + | | | | + | | | - The system creates a subnet and then associates the subnet with a VPC in the threads. | + | | | | + | | | In the concurrent scenario, if the CIDR block of the created subnet is the same as that of an existing subnet, the created subnet fails to associate with a VPC after underlying system verification. As a result, the subnet creation fails. | + | | | | + | | | In this scenario, the returned value of **status** is **UNKNOWN**. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | neutron_network_id | String | Specifies the ID of the corresponding network (OpenStack Neutron API). | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | neutron_subnet_id | String | Specifies the ID of the corresponding subnet (OpenStack Neutron API). | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the NTP server address configured for the subnet. For details, see :ref:`Table 7 `. | + +-----------------------+-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_subnet01_0001__table019517383270: + + .. table:: **Table 7** **extra_dhcp_opt** object + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+======================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | opt_value | No | String | - Specifies the NTP server address configured for the subnet. | + | | | | | + | | | | - Constraints: | + | | | | | + | | | | The option **ntp** for **opt_name** indicates the NTP server configured for the subnet. Currently, only IPv4 addresses are supported. A maximum of four IP addresses can be configured, and each address must be unique. Multiple IP addresses must be separated using commas (,). The option **null** for **opt_name** indicates that no NTP server is configured for the subnet. The parameter value cannot be an empty string. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | opt_name | Yes | String | - Specifies the NTP server address name configured for the subnet. | + | | | | - Currently, the value can only be set to **ntp**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "subnet": { + "id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "name": "subnet", + "description": "", + "cidr": "192.168.20.0/24", + "dnsList": [ + "114.xx.xx.114", + "114.xx.xx.115" + ], + "status": "UNKNOWN", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "gateway_ip": "192.168.20.1", + "dhcp_enable": true, + "primary_dns": "114.xx.xx.114", + "secondary_dns": "114.xx.xx.115", + "availability_zone": "aa-bb-cc",//For example, the AZ is aa-bb-cc. + "neutron_network_id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "neutron_subnet_id": "213cb9d-3122-2ac1-1a29-91ffc1231a12" + "extra_dhcp_opts": [ + { + "opt_value": "10.100.0.33,10.100.0.34", + "opt_name": "ntp" + } + ] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet/deleting_a_subnet.rst b/api-ref/source/apis/subnet/deleting_a_subnet.rst new file mode 100644 index 0000000..e39ea29 --- /dev/null +++ b/api-ref/source/apis/subnet/deleting_a_subnet.rst @@ -0,0 +1,68 @@ +:original_name: vpc_subnet01_0005.html + +.. _vpc_subnet01_0005: + +Deleting a Subnet +================= + +Function +-------- + +This API is used to delete a subnet. + +URI +--- + +DELETE /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_subnet01_0005__table23279683: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | vpc_id | Yes | Specifies the ID of the subnet VPC. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/{project_id}/vpcs/{vpc_id}/subnets/4779ab1c-7c1a-44b1-a02e-93dfc361b32d + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet/index.rst b/api-ref/source/apis/subnet/index.rst new file mode 100644 index 0000000..c986254 --- /dev/null +++ b/api-ref/source/apis/subnet/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_subnet01_0000.html + +.. _vpc_subnet01_0000: + +Subnet +====== + +- :ref:`Creating a Subnet ` +- :ref:`Querying Subnet Details ` +- :ref:`Querying Subnets ` +- :ref:`Updating Subnet Information ` +- :ref:`Deleting a Subnet ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_subnet + querying_subnet_details + querying_subnets + updating_subnet_information + deleting_a_subnet diff --git a/api-ref/source/apis/subnet/querying_subnet_details.rst b/api-ref/source/apis/subnet/querying_subnet_details.rst new file mode 100644 index 0000000..b828e87 --- /dev/null +++ b/api-ref/source/apis/subnet/querying_subnet_details.rst @@ -0,0 +1,162 @@ +:original_name: vpc_subnet01_0002.html + +.. _vpc_subnet01_0002: + +Querying Subnet Details +======================= + +Function +-------- + +This API is used to query details about a subnet. + +URI +--- + +GET /v1/{project_id}/subnets/{subnet_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_subnet01_0002__table61566768: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/subnets/4779ab1c-7c1a-44b1-a02e-93dfc361b32d + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +--------+--------------------------------------------------------------+------------------------------------------------------------------------------+ + | Name | Type | Description | + +========+==============================================================+==============================================================================+ + | subnet | :ref:`subnet ` object | Specifies the :ref:`subnet objects `. | + +--------+--------------------------------------------------------------+------------------------------------------------------------------------------+ + + .. _vpc_subnet01_0002__table6614597017585: + + .. table:: **Table 3** **subnet** objects + + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===============================================================================+=====================================================================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | - Specifies the subnet name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the subnet. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the subnet CIDR block. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | Specifies the subnet gateway address. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | dhcp_enable | Boolean | Specifies whether DHCP is enabled for the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | primary_dns | String | Specifies the IP address of DNS server 1 on the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | secondary_dns | String | Specifies the IP address of DNS server 2 on the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | dnsList | Array of strings | Specifies the IP address list of DNS servers on the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | Identifies the AZ to which the subnet belongs. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the ID of the VPC to which the subnet belongs. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the status of the subnet. | + | | | - The value can be **ACTIVE**, **UNKNOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE**: indicates that the subnet has been associated with a VPC. | + | | | - **UNKNOWN**: indicates that the subnet has not been associated with a VPC. | + | | | - **ERROR**: indicates that the subnet is abnormal. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | neutron_network_id | String | Specifies the ID of the corresponding network (OpenStack Neutron API). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | neutron_subnet_id | String | Specifies the ID of the corresponding subnet (OpenStack Neutron API). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the NTP server address configured for the subnet. For details, see :ref:`Table 4 `. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_subnet01_0002__table019517383270: + + .. table:: **Table 4** **extra_dhcp_opt** object + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+======================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | opt_value | No | String | - Specifies the NTP server address configured for the subnet. | + | | | | | + | | | | - Constraints: | + | | | | | + | | | | The option **ntp** for **opt_name** indicates the NTP server configured for the subnet. Currently, only IPv4 addresses are supported. A maximum of four IP addresses can be configured, and each address must be unique. Multiple IP addresses must be separated using commas (,). The option **null** for **opt_name** indicates that no NTP server is configured for the subnet. The parameter value cannot be an empty string. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | opt_name | Yes | String | - Specifies the NTP server address name configured for the subnet. | + | | | | - Currently, the value can only be set to **ntp**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "subnet": { + "id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "name": "subnet", + "description": "", + "cidr": "192.168.20.0/24", + "dnsList": [ + "114.xx.xx.114", + "114.xx.xx.115" + ], + "status": "ACTIVE", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "gateway_ip": "192.168.20.1", + "dhcp_enable": true, + "primary_dns": "114.xx.xx.114", + "secondary_dns": "114.xx.xx.115", + "availability_zone": "aa-bb-cc",//For example, the AZ is aa-bb-cc. + "neutron_network_id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "neutron_subnet_id": "213cb9d-3122-2ac1-1a29-91ffc1231a12", + "extra_dhcp_opts": [ + { + "opt_value": "10.100.0.33,10.100.0.34", + "opt_name": "ntp" + } + ] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet/querying_subnets.rst b/api-ref/source/apis/subnet/querying_subnets.rst new file mode 100644 index 0000000..6a87e9a --- /dev/null +++ b/api-ref/source/apis/subnet/querying_subnets.rst @@ -0,0 +1,203 @@ +:original_name: vpc_subnet01_0003.html + +.. _vpc_subnet01_0003: + +Querying Subnets +================ + +Function +-------- + +This API is used to query subnets using search criteria and to display the subnets in a list. + +URI +--- + +GET /v1/{project_id}/subnets + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/subnets?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85 + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | No | String | Specifies that the VPC ID is used as the filtering condition. | + | | | | | + | | | | This field is mandatory in the fine-grained authorization scenario based on enterprise projects. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/subnets + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +---------+-----------------------------------------------------------------------+------------------------+ + | Name | Type | Description | + +=========+=======================================================================+========================+ + | subnets | Array of :ref:`subnet ` objects | Specifies the subnets. | + +---------+-----------------------------------------------------------------------+------------------------+ + + .. _vpc_subnet01_0003__table946390317596: + + .. table:: **Table 3** **subnet** objects + + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+===============================================================================+=====================================================================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | - Specifies the subnet name. | + | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the subnet. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the subnet CIDR block. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | Specifies the subnet gateway address. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | dhcp_enable | Boolean | Specifies whether the DHCP function is enabled for the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | primary_dns | String | Specifies the IP address of DNS server 1 on the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | secondary_dns | String | Specifies the IP address of DNS server 2 on the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | dnsList | Array of strings | Specifies the IP address list of DNS servers on the subnet. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | Identifies the AZ to which the subnet belongs. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the ID of the VPC to which the subnet belongs. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the status of the subnet. | + | | | - The value can be **ACTIVE**, **UNKNOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE**: indicates that the subnet has been associated with a VPC. | + | | | - **UNKNOWN**: indicates that the subnet has not been associated with a VPC. | + | | | - **ERROR**: indicates that the subnet is abnormal. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | neutron_network_id | String | Specifies the ID of the corresponding network (OpenStack Neutron API). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | neutron_subnet_id | String | Specifies the ID of the corresponding subnet (OpenStack Neutron API). | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the NTP server address configured for the subnet. For details, see :ref:`Table 4 `. | + +-----------------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_subnet01_0003__table019517383270: + + .. table:: **Table 4** **extra_dhcp_opt** object + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+======================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | opt_value | No | String | - Specifies the NTP server address configured for the subnet. | + | | | | | + | | | | - Constraints: | + | | | | | + | | | | The option **ntp** for **opt_name** indicates the NTP server configured for the subnet. Currently, only IPv4 addresses are supported. A maximum of four IP addresses can be configured, and each address must be unique. Multiple IP addresses must be separated using commas (,). The option **null** for **opt_name** indicates that no NTP server is configured for the subnet. The parameter value cannot be an empty string. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | opt_name | Yes | String | - Specifies the NTP server address name configured for the subnet. | + | | | | - Currently, the value can only be set to **ntp**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "subnets": [ + { + "id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "name": "subnet", + "cidr": "192.168.20.0/24", + "dnsList": [ + "114.xx.xx.114", + "114.xx.xx.115" + ], + "status": "ACTIVE", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "gateway_ip": "192.168.20.1", + "dhcp_enable": true, + "primary_dns": "114.xx.xx.114", + "secondary_dns": "114.xx.xx.115", + "availability_zone": "aa-bb-cc",//For example, the AZ is aa-bb-cc. + "neutron_network_id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "neutron_subnet_id": "213cb9d-3122-2ac1-1a29-91ffc1231a12" + "extra_dhcp_opts": [ + { + "opt_value": "10.100.0.33,10.100.0.34", + "opt_name": "ntp" + } + ] + }, + { + "id": "531dec0f-3116-411b-a21b-e612e42349fd", + "name": "Subnet1", + "description": "", + "cidr": "192.168.1.0/24", + "dnsList": [ + "114.xx.xx.114", + "114.xx.xx.115" + ], + "status": "ACTIVE", + "vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "gateway_ip": "192.168.1.1", + "dhcp_enable": true, + "primary_dns": "114.xx.xx.114", + "secondary_dns": "114.xx.xx.115", + "availability_zone": "aa-bb-cc",//For example, the AZ is aa-bb-cc. + "neutron_network_id": "531dec0f-3116-411b-a21b-e612e42349fd", + "neutron_subnet_id": "1aac193-a2ad-f153-d122-12d64c2c1d78", + "extra_dhcp_opts": [ + { + "opt_value": "10.100.0.33,10.100.0.34", + "opt_name": "ntp" + } + ] + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet/updating_subnet_information.rst b/api-ref/source/apis/subnet/updating_subnet_information.rst new file mode 100644 index 0000000..f53cca1 --- /dev/null +++ b/api-ref/source/apis/subnet/updating_subnet_information.rst @@ -0,0 +1,166 @@ +:original_name: vpc_subnet01_0004.html + +.. _vpc_subnet01_0004: + +Updating Subnet Information +=========================== + +Function +-------- + +This API is used to update information about a subnet. + +URI +--- + +PUT /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_subnet01_0004__table27806533: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID of the subnet. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +--------+-----------+---------------------------------------------------------+-------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+=========================================================+=========================================================================+ + | subnet | Yes | :ref:`subnet ` object | Specifies the :ref:`subnet objects `. | + +--------+-----------+---------------------------------------------------------+-------------------------------------------------------------------------+ + + .. _vpc_subnet01_0004__table45027976: + + .. table:: **Table 3** **subnet** objects + + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+===============================================================================+======================================================================================================================================================================================================================================================================================================+ + | name | Yes | String | - Specifies the subnet name. | + | | | | - The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the subnet. | + | | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dhcp_enable | No | Boolean | - Specifies whether DHCP is enabled for the subnet. | + | | | | - The value can be **true** (enabled) or **false** (disabled). | + | | | | - If this parameter is left blank, the system automatically sets it to **true** by default. If this parameter is set to **false**, newly created ECSs cannot obtain IP addresses, and usernames and passwords cannot be injected using Cloud-init. Exercise caution when performing this operation. | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | primary_dns | No | String | - Specifies the IP address of DNS server 1 on the subnet. | + | | | | - The value must be a valid IP address. | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | secondary_dns | No | String | - Specifies the IP address of DNS server 2 on the subnet. | + | | | | - The value must be a valid IP address. | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dnsList | No | Array of strings | - Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers. | + | | | | - This parameter value is the superset of both DNS server address 1 and DNS server address 2. | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | No | Array of :ref:`extra_dhcp_opt ` objects | Specifies the NTP server address configured for the subnet. For details, see :ref:`Table 4 `. | + +-----------------+-----------------+-------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_subnet01_0004__table019517383270: + + .. table:: **Table 4** **extra_dhcp_opt** object + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+======================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | opt_value | No | String | - Specifies the NTP server address configured for the subnet. | + | | | | | + | | | | - Constraints: | + | | | | | + | | | | The option **ntp** for **opt_name** indicates the NTP server configured for the subnet. Currently, only IPv4 addresses are supported. A maximum of four IP addresses can be configured, and each address must be unique. Multiple IP addresses must be separated using commas (,). The option **null** for **opt_name** indicates that no NTP server is configured for the subnet. The parameter value cannot be an empty string. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | opt_name | Yes | String | - Specifies the NTP server address name configured for the subnet. | + | | | | - Currently, the value can only be set to **ntp**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v1/{project_id}/vpcs/{vpc_id}/subnets/4779ab1c-7c1a-44b1-a02e-93dfc361b32d + + { + "subnet": { + "name": "subnetqq", + "ipv6_enable": true, + "dhcp_enable": false, + "primary_dns": "114.xx.xx.115", + "secondary_dns": "114.xx.xx.116", + "extra_dhcp_opts": [ + { + "opt_value": "10.100.0.33,10.100.0.34", + "opt_name": "ntp" + } + ] + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 5** Response parameter + + +--------+--------------------------------------------------------+-----------------------------------+ + | Name | Type | Description | + +========+========================================================+===================================+ + | subnet | :ref:`subnet ` object | Specifies the **subnet** objects. | + +--------+--------------------------------------------------------+-----------------------------------+ + + .. _vpc_subnet01_0004__table1210700: + + .. table:: **Table 6** **subnet** objects + + +-----------------------+-----------------------+----------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------+ + | status | String | - Specifies the status of the subnet. | + | | | - The value can be **ACTIVE**, **UNKNOWN**, or **ERROR**. | + | | | | + | | | - **ACTIVE**: indicates that the subnet has been associated with a VPC. | + | | | - **UNKNOWN**: indicates that the subnet has not been associated with a VPC. | + | | | - **ERROR**: indicates that the subnet is abnormal. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "subnet": { + "id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d", + "status": "ACTIVE" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet_tag_management/batch_creating_or_deleting_subnet_tags.rst b/api-ref/source/apis/subnet_tag_management/batch_creating_or_deleting_subnet_tags.rst new file mode 100644 index 0000000..5b53106 --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/batch_creating_or_deleting_subnet_tags.rst @@ -0,0 +1,148 @@ +:original_name: subnet_tag_0004.html + +.. _subnet_tag_0004: + +Batch Creating or Deleting Subnet Tags +====================================== + +Function +-------- + +This API is used to add multiple tags to or delete multiple tags from a subnet at a time. + +This API is idempotent. + +If there are duplicate keys in the request body when you add tags, an error is reported. + +During tag creation, duplicate keys are not allowed. If a key already exists in the database, its value will be overwritten by the new duplicate key. + +During tag deletion, if some tags do not exist, the deletion is considered to be successful by default. The character set of the tags will not be checked. When you delete tags, the tag structure cannot be missing, and the key cannot be left blank or be an empty string. + +URI +--- + +POST /v2.0/{project_id}/subnets/{subnet_id}/tags/action + +:ref:`Table 1 ` describes the parameters. + +.. _subnet_tag_0004__table27380479: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +Request parameter + +.. table:: **Table 2** Request parameter + + +-----------------+------------------------------------------------------------------+-----------------+----------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+==================================================================+=================+==========================================================================================================+ + | tags | Array of :ref:`tag ` objects | Yes | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------------+------------------------------------------------------------------+-----------------+----------------------------------------------------------------------------------------------------------+ + | action | String | Yes | Specifies the operation. Possible values are as follows: | + | | | | | + | | | | - **create** | + | | | | - **delete** | + +-----------------+------------------------------------------------------------------+-----------------+----------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0004__table244913515593: + +.. table:: **Table 3** **tag** objects + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=================+=================+=================+=====================================================================+ + | key | String | Yes | - Specifies the tag key. | + | | | | - Cannot be left blank. | + | | | | - Can contain a maximum of 36 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | | + | | | | - The tag key of a VPC must be unique. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | value | String | Yes | - Specifies the tag value. | + | | | | - Can contain a maximum of 43 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + +Request example 1: Creating tags in batches + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/subnets/{subnet_id}/tags/action + + { + "action": "create", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Request example 2: Deleting tags in batches + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/subnets/{subnet_id}/tags/action + + { + "action": "delete", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Response Message +---------------- + +Response parameter + +None + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet_tag_management/creating_a_tag_for_a_subnet.rst b/api-ref/source/apis/subnet_tag_management/creating_a_tag_for_a_subnet.rst new file mode 100644 index 0000000..7aac7e7 --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/creating_a_tag_for_a_subnet.rst @@ -0,0 +1,108 @@ +:original_name: subnet_tag_0001.html + +.. _subnet_tag_0001: + +Creating a Tag for a Subnet +=========================== + +Function +-------- + +This API is used to create a tag for a subnet. + +URI +--- + +POST /v2.0/{project_id}/subnets/{subnet_id}/tags + +:ref:`Table 1 ` describes the parameters. + +.. _subnet_tag_0001__table27380479: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + +.. table:: **Table 2** Request parameter + + +-----------+----------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+==========================================================+===========+========================================================================================================+ + | tag | :ref:`tag ` object | Yes | Specifies the **tag** objects. For details, see :ref:`Table 3 `. | + +-----------+----------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0001__table13242848193719: + +.. table:: **Table 3** **tag** objects + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=================+=================+=================+=====================================================================+ + | key | String | Yes | - Specifies the tag key. | + | | | | - Cannot be left blank. | + | | | | - Can contain a maximum of 36 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | | + | | | | - The tag key of a VPC must be unique. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | value | String | Yes | - Specifies the tag value. | + | | | | - Can contain a maximum of 43 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + +- Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/subnets/{subnet_id}/tags + + { + "tag": { + "key": "key1", + "value": "value1" + } + } + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet_tag_management/deleting_a_subnet_tag.rst b/api-ref/source/apis/subnet_tag_management/deleting_a_subnet_tag.rst new file mode 100644 index 0000000..025b98b --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/deleting_a_subnet_tag.rst @@ -0,0 +1,68 @@ +:original_name: subnet_tag_0003.html + +.. _subnet_tag_0003: + +Deleting a Subnet Tag +===================== + +Function +-------- + +This API is used to delete a subnet tag. + +URI +--- + +DELETE /v2.0/{project_id}/subnets/{subnet_id}/tags/{key} + +:ref:`Table 1 ` describes the parameters. + +.. _subnet_tag_0003__table27380479: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | key | Yes | Specifies the tag key. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +Request parameter + +None + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/{project_id}/subnets/{subnet_id}/tags/{key} + +Response Message +---------------- + +Response parameter + +None + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet_tag_management/index.rst b/api-ref/source/apis/subnet_tag_management/index.rst new file mode 100644 index 0000000..a6d0552 --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/index.rst @@ -0,0 +1,24 @@ +:original_name: subnet_tag_0000.html + +.. _subnet_tag_0000: + +Subnet Tag Management +===================== + +- :ref:`Creating a Tag for a Subnet ` +- :ref:`Querying Subnet Tags ` +- :ref:`Deleting a Subnet Tag ` +- :ref:`Batch Creating or Deleting Subnet Tags ` +- :ref:`Querying Subnets by Tag ` +- :ref:`Querying Subnet Tags in a Specified Project ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_tag_for_a_subnet + querying_subnet_tags + deleting_a_subnet_tag + batch_creating_or_deleting_subnet_tags + querying_subnets_by_tag + querying_subnet_tags_in_a_specified_project diff --git a/api-ref/source/apis/subnet_tag_management/querying_subnet_tags.rst b/api-ref/source/apis/subnet_tag_management/querying_subnet_tags.rst new file mode 100644 index 0000000..d443d25 --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/querying_subnet_tags.rst @@ -0,0 +1,114 @@ +:original_name: subnet_tag_0002.html + +.. _subnet_tag_0002: + +Querying Subnet Tags +==================== + +Function +-------- + +This API is used to query tags of a specified subnet. + +URI +--- + +GET /v2.0/{project_id}/subnets/{subnet_id}/tags + +:ref:`Table 1 ` describes the parameters. + +.. _subnet_tag_0002__table27380479: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | Name | Mandatory | Description | + +=======================+=======================+=============================================================================================+ + | project_id | Yes | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + | subnet_id | Yes | Specifies the subnet ID, which uniquely identifies the subnet. | + | | | | + | | | If you use the management console, the value of this parameter is the **Network ID** value. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +Request parameter + +None + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/{project_id}/subnets/{subnet_id}/tags + +Response Message +---------------- + +Response parameter + +.. table:: **Table 2** Response parameter + + +-----------+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+====================================================================+============================================================================================================+ + | tags | Array of :ref:`tag ` objects | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0002__table13242848193719: + +.. table:: **Table 3** **tag** objects + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=====================================================================+ + | key | String | - Specifies the tag key. | + | | | - Cannot be left blank. | + | | | - Can contain a maximum of 36 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | + | | | - The tag key of a VPC must be unique. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | value | String | - Specifies the tag value. | + | | | - Can contain a maximum of 43 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +Example response + +.. code-block:: + + { + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet_tag_management/querying_subnet_tags_in_a_specified_project.rst b/api-ref/source/apis/subnet_tag_management/querying_subnet_tags_in_a_specified_project.rst new file mode 100644 index 0000000..5e18e72 --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/querying_subnet_tags_in_a_specified_project.rst @@ -0,0 +1,116 @@ +:original_name: subnet_tag_0006.html + +.. _subnet_tag_0006: + +Querying Subnet Tags in a Specified Project +=========================================== + +Function +-------- + +This API is used to query all subnet tags of a tenant in a specified region. + +URI +--- + +GET /v2.0/{project_id}/subnets/tags + +:ref:`Table 1 ` describes the parameters. + +.. _subnet_tag_0006__table27380479: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +Request parameter + +None + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/{project_id}/subnets/tags + +Response Message +---------------- + +Response parameter + +.. table:: **Table 2** Response parameter + + +-----------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=================================================================+=========================================================================================================+ + | tags | Array of :ref:`tag ` objects | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0006__table98981570229: + +.. table:: **Table 3** Description of the **tag** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | key | String | Specifies the tag key. | + | | | | + | | | - Cannot be left blank. | + | | | - Can contain a maximum of 36 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | values | Array of strings | Specifies the tag value list. | + | | | | + | | | - Can contain a maximum of 43 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +Example response + +.. code-block:: + + { + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/subnet_tag_management/querying_subnets_by_tag.rst b/api-ref/source/apis/subnet_tag_management/querying_subnets_by_tag.rst new file mode 100644 index 0000000..7ecbfe6 --- /dev/null +++ b/api-ref/source/apis/subnet_tag_management/querying_subnets_by_tag.rst @@ -0,0 +1,219 @@ +:original_name: subnet_tag_0005.html + +.. _subnet_tag_0005: + +Querying Subnets by Tag +======================= + +Function +-------- + +This API is used to query subnets by tag. + +URI +--- + +POST /v2.0/{project_id}/subnets/resource_instances/action + +:ref:`Table 1 ` describes the parameters. + +.. _subnet_tag_0005__table27380479: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +Request parameter + +.. table:: **Table 2** Request parameter + + +-----------------+----------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+======================================================================+=================+=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | tags | Array of :ref:`tag ` objects | No | Specifies the included tags. A maximum of 20 tag keys are allowed for each query operation. Each tag key can have up to 10 tag values. The structure body must be included. The tag key cannot be left blank or set to an empty string. Each tag key must be unique, and each tag value in a tag must be unique. | + +-----------------+----------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | Integer | No | Sets the page size. This parameter is not available when **action** is set to **count**. The default value is **1000** when **action** is set to **filter**. The maximum value is **1000**, and the minimum value is **1**. The value cannot be a negative number. | + +-----------------+----------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | Integer | No | Specifies the index position. The query starts from the next piece of data indexed by this parameter. This parameter is not required when you query data on the first page. The value in the response returned for querying data on the previous page will be included in this parameter for querying data on subsequent pages. This parameter is not available when **action** is set to **count**. If **action** is set to **filter**, the value must be a number, and the default value is **0**. The value cannot be a negative number. | + +-----------------+----------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Yes | Specifies the operation to perform. The value can only be **filter** (filtering) or **count** (querying the total number). | + | | | | | + | | | | The value **filter** indicates pagination query. The value **count** indicates that the total number of query results meeting the search criteria will be returned. | + +-----------------+----------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | Array of :ref:`match ` objects | No | Specifies the search criteria. The tag key is the field to match. Currently, only **resource_name** is supported. The tag value indicates the matched value. This field is a fixed dictionary value. | + +-----------------+----------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0005__table1361524272219: + +.. table:: **Table 3** Description of the **tag** field + + +------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+========+=================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. The value can contain a maximum of 127 Unicode characters. The tag key cannot be left blank. (This parameter is not verified during the search process.) | + +------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0005__table46291842142217: + +.. table:: **Table 4** Description of the **match** field + + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======+===========+========+======================================================================================+ + | key | Yes | String | Specifies the tag key. Currently, the tag key can only be the resource name. | + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + | value | Yes | String | Specifies the tag value. Each value can contain a maximum of 255 Unicode characters. | + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + +Example request 1: Setting **action** to **filter** + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/subnets/resource_instances/action + + { + "offset": "0", + "limit": "100", + "action": "filter", + "matches": [ + { + "key": "resource_name", + "value": "resource1" + } + ], + "tags": [ + { + "key": "key1", + "values": [ + "*value1", + "value2" + ] + } + ] + } + +Example request 2: Setting **action** to **count** + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/subnets/resource_instances/action + + { + "action": "count", + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ], + "matches": [ + { + "key": "resource_name", + "value": "resource1" + } + ] + } + +Response Message +---------------- + +Response parameter + +.. table:: **Table 5** Response parameter + + +-------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+==========================================================================+==================================================================================================================+ + | resources | Array of :ref:`resource ` objects | Specifies the **resource** object list. For details, see :ref:`Table 6 `. | + +-------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ + | total_count | Integer | Specifies the total number of query records. | + +-------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0005__table186631042162216: + +.. table:: **Table 6** **resource** objects + + +-----------------+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=================+===================================================================+================================================================================================================================================================+ + | resource_id | String | Specifies the resource ID. | + +-----------------+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_detail | Object | Specifies the resource details. Resource details are used for extension. This parameter is left blank by default. | + +-----------------+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`tag ` objects | Specifies the tag list. This parameter is an empty array by default if there is no tag. For details, see :ref:`Table 7 `. | + +-----------------+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_name | String | Specifies the resource name. This parameter is an empty string by default if there is no resource name. | + +-----------------+-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _subnet_tag_0005__table1548032316199: + +.. table:: **Table 7** Description of the **tag** field + + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+==================+====================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. The value can contain a maximum of 127 Unicode characters. The tag key cannot be left blank. (This parameter is not verified during the search process.) | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | Specifies the tag value list. Each value can contain a maximum of 255 Unicode characters. An empty list for **values** indicates any value. The values are in the OR relationship. | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example response 1: Setting **action** to **filter** + +.. code-block:: + + { + "resources": [ + { + "resource_detail": null, + "resource_id": "cdfs_cefs_wesas_12_dsad", + "resource_name": "resouece1", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value1" + } + ] + } + ], + "total_count": 1000 + } + + +Example response 2: Setting **action** to **count** + +.. code-block:: + + { + "total_count": 1000 + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/virtual_private_cloud/creating_a_vpc.rst b/api-ref/source/apis/virtual_private_cloud/creating_a_vpc.rst new file mode 100644 index 0000000..9c501ed --- /dev/null +++ b/api-ref/source/apis/virtual_private_cloud/creating_a_vpc.rst @@ -0,0 +1,187 @@ +:original_name: vpc_api01_0001.html + +.. _vpc_api01_0001: + +Creating a VPC +============== + +Function +-------- + +This API is used to create a VPC. + +URI +--- + +POST /v1/{project_id}/vpcs + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_api01_0001__table3672032: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +------+-----------+------------------------------------+-------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+====================================+===================================================================+ + | vpc | Yes | :ref:`vpc ` object | :ref:`Specifies the VPC objects. ` | + +------+-----------+------------------------------------+-------------------------------------------------------------------+ + + .. _vpc_api01_0001__table33750194: + + .. table:: **Table 3** VPC objects + + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+===================================================================================================================================================================+ + | name | No | String | - Specifies the VPC name. | + | | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + | | | | - Each VPC name of a tenant must be unique if the VPC name is not left blank. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the VPC. | + | | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | No | String | - Specifies the available IP address ranges for subnets in the VPC. | + | | | | - Possible values are as follows: | + | | | | | + | | | | - 10.0.0.0/8-24 | + | | | | - 172.16.0.0/12-24 | + | | | | - 192.168.0.0/16-24 | + | | | | | + | | | | - If **cidr** is not specified, the default value is left blank. | + | | | | - The value must be in CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. When creating a VPC, you can associate an enterprise project ID with the VPC. | + | | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/{project_id}/vpcs + + { + "vpc": { + "name": "vpc", + "description": "test", + "cidr": "192.168.0.0/16", + "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +------+------------------------------------+-------------------------------------------------------------------+ + | Name | Type | Description | + +======+====================================+===================================================================+ + | vpc | :ref:`vpc ` object | :ref:`Specifies the VPC objects. ` | + +------+------------------------------------+-------------------------------------------------------------------+ + + .. _vpc_api01_0001__table39714111: + + .. table:: **Table 5** VPC objects + + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+====================================================================+=======================================================================================================================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | - Specifies the VPC name. | + | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + | | | - Each VPC name of a tenant must be unique if the VPC name is not left blank. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the VPC. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | - Specifies the available IP address ranges for subnets in the VPC. | + | | | - Possible values are as follows: | + | | | | + | | | - 10.0.0.0/8-24 | + | | | - 172.16.0.0/12-24 | + | | | - 192.168.0.0/16-24 | + | | | | + | | | - If **cidr** is not specified, the default value is left blank. | + | | | - The value must be in CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the VPC status. | + | | | - Possible values are as follows: | + | | | | + | | | - **CREATING**: The VPC is being created. | + | | | - **OK**: The VPC is created successfully. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | - Specifies the route information. | + | | | - For details, see the description of the :ref:`route objects `. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_shared_snat | Boolean | Specifies whether the shared SNAT function is enabled. The value **true** indicates that the function is enabled, and the value **false** indicates that the function is not enabled. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_api01_0001__table3576833291556: + + .. table:: **Table 6** **route** objects + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==========================================================================================================================+ + | destination | String | - Specifies the destination network segment of a route. | + | | | - The value must be in the CIDR format. Currently, only the value **0.0.0.0/0** is supported. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | nexthop | String | - Specifies the next hop of a route. | + | | | - The value must be an IP address and must belong to the subnet in the VPC. Otherwise, this value does not take effect. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "vpc": + { + "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", + "name": "vpc", + "description": "test", + "cidr": "192.168.0.0/16", + "status": "CREATING", + "enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", + "routes": [] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/virtual_private_cloud/deleting_a_vpc.rst b/api-ref/source/apis/virtual_private_cloud/deleting_a_vpc.rst new file mode 100644 index 0000000..81f02d9 --- /dev/null +++ b/api-ref/source/apis/virtual_private_cloud/deleting_a_vpc.rst @@ -0,0 +1,64 @@ +:original_name: vpc_api01_0005.html + +.. _vpc_api01_0005: + +Deleting a VPC +============== + +Function +-------- + +This API is used to delete a VPC. + +URI +--- + +DELETE /v1/{project_id}/vpcs/{vpc_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_api01_0005__table47834478: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/{project_id}/vpcs/13551d6b-755d-4757-b956-536f674975c0 + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/virtual_private_cloud/index.rst b/api-ref/source/apis/virtual_private_cloud/index.rst new file mode 100644 index 0000000..52019c3 --- /dev/null +++ b/api-ref/source/apis/virtual_private_cloud/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_api01_0000.html + +.. _vpc_api01_0000: + +Virtual Private Cloud +===================== + +- :ref:`Creating a VPC ` +- :ref:`Querying VPC Details ` +- :ref:`Querying VPCs ` +- :ref:`Updating VPC Information ` +- :ref:`Deleting a VPC ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_vpc + querying_vpc_details + querying_vpcs + updating_vpc_information + deleting_a_vpc diff --git a/api-ref/source/apis/virtual_private_cloud/querying_vpc_details.rst b/api-ref/source/apis/virtual_private_cloud/querying_vpc_details.rst new file mode 100644 index 0000000..e346994 --- /dev/null +++ b/api-ref/source/apis/virtual_private_cloud/querying_vpc_details.rst @@ -0,0 +1,142 @@ +:original_name: vpc_api01_0002.html + +.. _vpc_api01_0002: + +Querying VPC Details +==================== + +Function +-------- + +This API is used to query details about a VPC. + +URI +--- + +GET /v1/{project_id}/vpcs/{vpc_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_api01_0002__table26431778: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +------+--------------------------------------------------------+------------------------------------------------------------------------+ + | Name | Type | Description | + +======+========================================================+========================================================================+ + | vpc | :ref:`vpc ` object | :ref:`Specifies the VPC objects. ` | + +------+--------------------------------------------------------+------------------------------------------------------------------------+ + + .. _vpc_api01_0002__table1945411214515: + + .. table:: **Table 3** VPC objects + + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+====================================================================+=======================================================================================================================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | - Specifies the VPC name. | + | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + | | | - Each VPC name of a tenant must be unique if the VPC name is not left blank. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the VPC. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | - Specifies the available IP address ranges for subnets in the VPC. | + | | | - Possible values are as follows: | + | | | | + | | | - 10.0.0.0/8-24 | + | | | - 172.16.0.0/12-24 | + | | | - 192.168.0.0/16-24 | + | | | | + | | | - If **cidr** is not specified, the default value is left blank. | + | | | - The value must be in CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the VPC status. | + | | | - Possible values are as follows: | + | | | | + | | | - **CREATING**: The VPC is being created. | + | | | - **OK**: The VPC is created successfully. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | - Specifies the route information. | + | | | - For details, see the description of the :ref:`route objects `. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_shared_snat | Boolean | Specifies whether the shared SNAT function is enabled. The value **true** indicates that the function is enabled, and the value **false** indicates that the function is not enabled. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_api01_0002__table3576833291556: + + .. table:: **Table 4** **route** objects + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==========================================================================================================================+ + | destination | String | - Specifies the destination network segment of a route. | + | | | - The value must be in the CIDR format. Currently, only the value **0.0.0.0/0** is supported. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | nexthop | String | - Specifies the next hop of a route. | + | | | - The value must be an IP address and must belong to the subnet in the VPC. Otherwise, this value does not take effect. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "vpc": { + "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", + "name": "vpc", + "description": "test", + "cidr": "192.168.0.0/16", + "status": "OK", + "enterprise_project_id": "0" + "routes": [], + "enable_shared_snat": false + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/virtual_private_cloud/querying_vpcs.rst b/api-ref/source/apis/virtual_private_cloud/querying_vpcs.rst new file mode 100644 index 0000000..71bbe4b --- /dev/null +++ b/api-ref/source/apis/virtual_private_cloud/querying_vpcs.rst @@ -0,0 +1,188 @@ +:original_name: vpc_api01_0003.html + +.. _vpc_api01_0003: + +Querying VPCs +============= + +Function +-------- + +This API is used to query VPCs using search criteria and to display the VPCs in a list. + +URI +--- + +GET /v1/{project_id}/vpcs + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/vpcs?limit=10&marker=13551d6b-755d-4757-b956-536f674975c0 + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_api01_0003__table39337169: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+=============================================================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | - Specifies the enterprise project ID. This field can be used to filter out the VPCs associated with a specified enterprise project. | + | | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. To obtain the VPCs bound to all enterprise projects of the user, set **all_granted_eps**. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | This parameter is unsupported. Do not use it. | + +-----------------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/{project_id}/vpcs + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +------+--------------------------------------------------------------+---------------------+ + | Name | Type | Description | + +======+==============================================================+=====================+ + | vpcs | Array of :ref:`vpcs ` objects | Specifies the VPCs. | + +------+--------------------------------------------------------------+---------------------+ + + .. _vpc_api01_0003__table65129753: + + .. table:: **Table 3** Description of the **vpcs** field + + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+====================================================================+=======================================================================================================================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | - Specifies the VPC name. | + | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + | | | - Each VPC name of a tenant must be unique if the VPC name is not left blank. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the VPC. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | - Specifies the available IP address ranges for subnets in the VPC. | + | | | - Possible values are as follows: | + | | | | + | | | - 10.0.0.0/8-24 | + | | | - 172.16.0.0/12-24 | + | | | - 192.168.0.0/16-24 | + | | | | + | | | - If **cidr** is not specified, the default value is left blank. | + | | | - The value must be in CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the VPC status. | + | | | - Possible values are as follows: | + | | | | + | | | - **CREATING**: The VPC is being created. | + | | | - **OK**: The VPC is created successfully. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | - Specifies the route information. | + | | | - For details, see :ref:`Table 4 `. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_shared_snat | Boolean | Specifies whether the shared SNAT function is enabled. The value **true** indicates that the function is enabled, and the value **false** indicates that the function is not enabled. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_api01_0003__table3576833291556: + + .. table:: **Table 4** **route** objects + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==========================================================================================================================+ + | destination | String | - Specifies the destination network segment of a route. | + | | | - The value must be in the CIDR format. Currently, only the value **0.0.0.0/0** is supported. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | nexthop | String | - Specifies the next hop of a route. | + | | | - The value must be an IP address and must belong to the subnet in the VPC. Otherwise, this value does not take effect. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "vpcs": [ + { + "id": "13551d6b-755d-4757-b956-536f674975c0", + "name": "default", + "description": "test", + "cidr": "172.16.0.0/16", + "status": "OK", + "enterprise_project_id": "0", + "routes": [], + "enable_shared_snat": false + }, + { + "id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85", + "name": "222", + "description": "test", + "cidr": "192.168.0.0/16", + "status": "OK", + "enterprise_project_id": "0635d733-c12d-4308-ba5a-4dc27ec21038", + "routes": [], + "enable_shared_snat": false + }, + { + "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", + "name": "vpc", + "description": "test", + "cidr": "192.168.0.0/16", + "status": "OK", + "enterprise_project_id": "0", + "routes": [], + "enable_shared_snat": false + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/virtual_private_cloud/updating_vpc_information.rst b/api-ref/source/apis/virtual_private_cloud/updating_vpc_information.rst new file mode 100644 index 0000000..1aaaf60 --- /dev/null +++ b/api-ref/source/apis/virtual_private_cloud/updating_vpc_information.rst @@ -0,0 +1,198 @@ +:original_name: vpc_api01_0004.html + +.. _vpc_api01_0004: + +Updating VPC Information +======================== + +Function +-------- + +This API is used to update information about a VPC. + +URI +--- + +PUT /v1/{project_id}/vpcs/{vpc_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_api01_0004__table27380479: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +------+-----------+---------------------------------------------------+-------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +======+===========+===================================================+===================================================================+ + | vpc | Yes | :ref:`vpc ` object | :ref:`Specifies the VPC objects. ` | + +------+-----------+---------------------------------------------------+-------------------------------------------------------------------+ + + .. _vpc_api01_0004__table34290771: + + .. table:: **Table 3** VPC objects + + +--------------------+-----------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +====================+=================+====================================================================+=======================================================================================================================================================================================+ + | name | No | String | - Specifies the VPC name. | + | | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + | | | | - Each VPC name of a tenant must be unique if the VPC name is not left blank. | + +--------------------+-----------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the VPC. | + | | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +--------------------+-----------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | No | String | - Specifies the available IP address ranges for subnets in the VPC. | + | | | | - Possible values are as follows: | + | | | | | + | | | | - 10.0.0.0/8-24 | + | | | | - 172.16.0.0/12-24 | + | | | | - 192.168.0.0/16-24 | + | | | | | + | | | | - If **cidr** is not specified, the default value is left blank. | + | | | | - The value must be in CIDR format, for example, **192.168.0.0/16**. | + +--------------------+-----------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routes | No | Array of :ref:`route ` objects | - Specifies the route list. For details, see :ref:`Table 4 `. | + +--------------------+-----------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_shared_snat | No | Boolean | Specifies whether the shared SNAT function is enabled. The value **true** indicates that the function is enabled, and the value **false** indicates that the function is not enabled. | + +--------------------+-----------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_api01_0004__table1696324019336: + + .. table:: **Table 4** **route** objects + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================================+ + | destination | No | String | - Specifies the destination network segment of a route. | + | | | | - The value must be in the CIDR format. Currently, only the value **0.0.0.0/0** is supported. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + | nexthop | No | String | - Specifies the next hop of a route. | + | | | | - The value must be an IP address and must belong to the subnet in the VPC. Otherwise, this value does not take effect. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v1/{project_id}/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3 + + { + "vpc": { + "name": "vpc1", + "description": "test1", + "cidr": "192.168.0.0/16", + "enable_shared_snat": true + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 5** Response parameter + + +------+---------------------------------------------------+-------------------------------------------------------------------+ + | Name | Type | Description | + +======+===================================================+===================================================================+ + | vpc | :ref:`vpc ` object | :ref:`Specifies the VPC objects. ` | + +------+---------------------------------------------------+-------------------------------------------------------------------+ + + .. _vpc_api01_0004__table22527411: + + .. table:: **Table 6** VPC objects + + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+====================================================================+=======================================================================================================================================================================================+ + | id | String | Specifies a resource ID in UUID format. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC name. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | - Provides supplementary information about the VPC. | + | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | - Specifies the available IP address ranges for subnets in the VPC. | + | | | - Possible values are as follows: | + | | | | + | | | - 10.0.0.0/8-24 | + | | | - 172.16.0.0/12-24 | + | | | - 192.168.0.0/16-24 | + | | | | + | | | - If **cidr** is not specified, the default value is left blank. | + | | | - The value must be in CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | - Specifies the VPC status. | + | | | - Possible values are as follows: | + | | | | + | | | - **CREATING**: The VPC is being created. | + | | | - **OK**: The VPC is created successfully. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | - Specifies the enterprise project ID. | + | | | - The value is **0** or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value **0** indicates the default enterprise project. | + | | | | + | | | .. note:: | + | | | | + | | | This parameter is unsupported. Do not use it. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | - Specifies the route information. | + | | | - For details, see the description of the :ref:`route objects `. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_shared_snat | Boolean | Specifies whether the shared SNAT function is enabled. The value **true** indicates that the function is enabled, and the value **false** indicates that the function is not enabled. | + +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_api01_0004__table3576833291556: + + .. table:: **Table 7** **route** objects + + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+==========================================================================================================================+ + | destination | String | - Specifies the destination network segment of a route. | + | | | - The value must be in the CIDR format. Currently, only the value **0.0.0.0/0** is supported. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | nexthop | String | - Specifies the next hop of a route. | + | | | - The value must be an IP address and must belong to the subnet in the VPC. Otherwise, this value does not take effect. | + +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "vpc": { + "id": "99d9d709-8478-4b46-9f3f-2206b1023fd3", + "name": "vpc1", + "description": "test1", + "cidr": "192.168.0.0/16", + "status": "OK", + "enterprise_project_id": "0", + "routes": [], + "enable_shared_snat": true + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_flow_log/creating_a_vpc_flow_log.rst b/api-ref/source/apis/vpc_flow_log/creating_a_vpc_flow_log.rst new file mode 100644 index 0000000..8708212 --- /dev/null +++ b/api-ref/source/apis/vpc_flow_log/creating_a_vpc_flow_log.rst @@ -0,0 +1,180 @@ +:original_name: vpc_flow_0001.html + +.. _vpc_flow_0001: + +Creating a VPC Flow Log +======================= + +Function +-------- + +This API is used to create a flow log. + +A VPC flow log captures information about the traffic going to and from your VPC. You can use flow logs to monitor network traffic, analyze network attacks, and to determine whether security group and firewall rules need to be modified. + +VPC flow logs must be used together with the Log Tank Service (LTS). You need to create a log group and a log topic in LTS, and then create a VPC flow log. + +URI +--- + +POST /v1/{project_id}/fl/flow_logs + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_flow_0001__table1851575853914: + +.. table:: **Table 1** Parameter description + + ========== ========= ====== ========================= + Name Mandatory Type Description + ========== ========= ====== ========================= + project_id Yes String Specifies the project ID. + ========== ========= ====== ========================= + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +----------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+===========================================================+========================================================================================================+ + | flow_log | :ref:`flow_log ` object | Specifies the **FlowLog** objects. For details, see :ref:`Table 3 `. | + +----------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + + .. _vpc_flow_0001__table656165873916: + + .. table:: **Table 3** Description of the **FlowLog** field + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+================================================================================================================================+ + | name | No | String | - Specifies the VPC flow log name. | + | | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the VPC flow log. | + | | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | resource_type | Yes | String | Specifies the type of resource on which to create the VPC flow log. The value can be **Port**, **VPC**, and **Network**. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | resource_id | Yes | String | Specifies the unique resource ID. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | traffic_type | Yes | String | Specifies the type of traffic to log. The value can be: | + | | | | | + | | | | - **all**: specifies that both accepted and rejected traffic of the specified resource will be logged. | + | | | | - **accept**: specifies that only accepted inbound and outbound traffic of the specified resource will be logged. | + | | | | - **reject**: specifies that only rejected inbound and outbound traffic of the specified resource will be logged. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | log_group_id | Yes | String | Specifies the log group ID. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | log_topic_id | Yes | String | Specifies the log topic ID. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | index_enabled | No | Boolean | Specifies whether to enable the log index. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs + + { + "flow_log": { + "name": "flowlog", + "description": "just a test", + "resource_type": "port", + "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", + "traffic_type": "reject", + "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd", + "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", + "index_enabled": true + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +----------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+===========================================================+========================================================================================================+ + | flow_log | :ref:`flow_log ` object | Specifies the **FlowLog** objects. For details, see :ref:`Table 5 `. | + +----------+-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + + .. _vpc_flow_0001__table763920584395: + + .. table:: **Table 5** Description of the **FlowLog** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | id | String | Specifies the VPC flow log UUID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | name | String | Specifies the VPC flow log name. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_type | String | Specifies the type of resource on which to create the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_id | String | Specifies the unique resource ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | traffic_type | String | Specifies the type of traffic to log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_group_id | String | Specifies the log group ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_topic_id | String | Specifies the log topic ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | index_enabled | Boolean | Specifies whether to enable the log index. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | admin_state | Boolean | Specifies whether to enable the VPC flow log function. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | status | String | Specifies the VPC flow log status. | + | | | | + | | | - **ACTIVE**: Enabled | + | | | - **DOWN**: Disabled | + | | | - **ERROR**: Abnormal fault | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | created_at | String | Specifies the time when the VPC flow log was created. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | updated_at | String | Specifies the time when the VPC flow log was updated. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "flow_log": { + "id": "f49f00f1-0f15-470a-a8c5-4e879e461c8d", + "name": "flowlog", + "description": "just a test", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "resource_type": "port", + "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", + "traffic_type": "reject", + "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd", + "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", + "created_at": "2019-01-14T11:03:02", + "updated_at": "2019-01-14T11:03:02", + "index_enabled": false, + "admin_state": true, + "status": "ACTIVE" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_flow_log/deleting_a_vpc_flow_log.rst b/api-ref/source/apis/vpc_flow_log/deleting_a_vpc_flow_log.rst new file mode 100644 index 0000000..19671ca --- /dev/null +++ b/api-ref/source/apis/vpc_flow_log/deleting_a_vpc_flow_log.rst @@ -0,0 +1,63 @@ +:original_name: vpc_flow_0005.html + +.. _vpc_flow_0005: + +Deleting a VPC Flow Log +======================= + +Function +-------- + +This API is used to delete a flow log. + +URI +--- + +DELETE /v1/{project_id}/fl/flow_logs/{flowlog_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_flow_0005__table19961835154017: + +.. table:: **Table 1** Parameter description + + ========== ========= ====== ============================== + Name Mandatory Type Description + ========== ========= ====== ============================== + project_id Yes String Specifies the project ID. + flowlog_id Yes String Specifies the VPC flow log ID. + ========== ========= ====== ============================== + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs/60c809cb-6731-45d0-ace8-3bf5626421a9 + +Response Message +---------------- + +- Request parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_flow_log/index.rst b/api-ref/source/apis/vpc_flow_log/index.rst new file mode 100644 index 0000000..0c021cc --- /dev/null +++ b/api-ref/source/apis/vpc_flow_log/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_flow_0000.html + +.. _vpc_flow_0000: + +VPC Flow Log +============ + +- :ref:`Creating a VPC Flow Log ` +- :ref:`Querying VPC Flow Logs ` +- :ref:`Querying a VPC Flow Log ` +- :ref:`Updating a VPC Flow Log ` +- :ref:`Deleting a VPC Flow Log ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_vpc_flow_log + querying_vpc_flow_logs + querying_a_vpc_flow_log + updating_a_vpc_flow_log + deleting_a_vpc_flow_log diff --git a/api-ref/source/apis/vpc_flow_log/querying_a_vpc_flow_log.rst b/api-ref/source/apis/vpc_flow_log/querying_a_vpc_flow_log.rst new file mode 100644 index 0000000..a96f6bd --- /dev/null +++ b/api-ref/source/apis/vpc_flow_log/querying_a_vpc_flow_log.rst @@ -0,0 +1,126 @@ +:original_name: vpc_flow_0003.html + +.. _vpc_flow_0003: + +Querying a VPC Flow Log +======================= + +Function +-------- + +This API is used to query a VPC flow log. + +URI +--- + +GET /v1/{project_id}/fl/flow_logs/{flowlog_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_flow_0003__table152848346516: + +.. table:: **Table 1** Parameter description + + +------------+-----------+--------+----------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+========+============================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +------------+-----------+--------+----------------------------------------------------------------------------+ + | flowlog_id | Yes | String | Specifies the VPC flow log ID, which uniquely identifies the VPC flow log. | + +------------+-----------+--------+----------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs/1e10cd9d-742a-4d36-a9fd-aee9784336ff + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+=============================================================+==========================================================================================================+ + | flow_log | :ref:`flow_log ` object | Specifies the **FlowLog** objects. For details, see :ref:`Table 3 `. | + +----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + + .. _vpc_flow_0003__table17299234185110: + + .. table:: **Table 3** Description of the **FlowLog** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | id | String | Specifies the VPC flow log UUID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | name | String | Specifies the VPC flow log name. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_type | String | Specifies the type of resource on which to create the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_id | String | Specifies the unique resource ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | traffic_type | String | Specifies the type of traffic to log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_group_id | String | Specifies the log group ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_topic_id | String | Specifies the log topic ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | admin_state | Boolean | Specifies whether to enable the VPC flow log function. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | status | String | Specifies the VPC flow log status. | + | | | | + | | | - **ACTIVE**: Enabled | + | | | - **DOWN**: Disabled | + | | | - **ERROR**: Abnormal fault | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | created_at | String | Specifies the time when the VPC flow log was created. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | updated_at | String | Specifies the time when the VPC flow log was updated. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "flow_log": { + "id": "35868d55-443e-4d5c-90a4-ac618dc45c1a", + "name": "flow", + "description": "just a test", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "resource_type": "port", + "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", + "traffic_type": "reject", + "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fff", + "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", + "created_at": "2019-01-14T11:03:02", + "updated_at": "2019-01-14T11:03:02" + "status": "ACTIVE", + "admin_state": true + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_flow_log/querying_vpc_flow_logs.rst b/api-ref/source/apis/vpc_flow_log/querying_vpc_flow_logs.rst new file mode 100644 index 0000000..87c5b89 --- /dev/null +++ b/api-ref/source/apis/vpc_flow_log/querying_vpc_flow_logs.rst @@ -0,0 +1,164 @@ +:original_name: vpc_flow_0002.html + +.. _vpc_flow_0002: + +Querying VPC Flow Logs +====================== + +Function +-------- + +This API is used to query all VPC flow logs of the tenant submitting the request. The VPC flow logs are filtered based on the filtering condition. + +URI +--- + +GET /v1/{project_id}/fl/flow_logs + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs?name=flowlog + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_flow_0002__table238711153416: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | project_id | Yes | String | Specifies the project ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | No | String | Specifies the VPC flow log UUID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | - Specifies the VPC flow log name. | + | | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_type | No | String | Specifies the type of resource on which to create the VPC flow log. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_id | No | String | Specifies the unique resource ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | traffic_type | No | String | Specifies the type of traffic to log. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | log_group_id | No | String | Specifies the log group ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | log_topic_id | No | String | Specifies the log topic ID. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | No | String | Specifies the VPC flow log status. | + | | | | | + | | | | - **ACTIVE**: Enabled | + | | | | - **DOWN**: Disabled | + | | | | - **ERROR**: Abnormal fault | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + None + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===========+======================================================================+==============================================================================================================+ + | flow_logs | Array of :ref:`FlowLog ` objects | Specifies the **FlowLog** object list. For details, see :ref:`Table 3 `. | + +-----------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + + .. _vpc_flow_0002__table34811015184118: + + .. table:: **Table 3** Description of the **FlowLog** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | id | String | Specifies the VPC flow log UUID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | name | String | Specifies the VPC flow log name. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_type | String | Specifies the type of resource on which to create the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_id | String | Specifies the unique resource ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | traffic_type | String | Specifies the type of traffic to log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_group_id | String | Specifies the log group ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_topic_id | String | Specifies the log topic ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | admin_state | Boolean | Specifies whether to enable the VPC flow log function. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | status | String | Specifies the VPC flow log status. | + | | | | + | | | - **ACTIVE**: Enabled | + | | | - **DOWN**: Disabled | + | | | - **ERROR**: Abnormal fault | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | created_at | String | Specifies the time when the VPC flow log was created. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | updated_at | String | Specifies the time when the VPC flow log was updated. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "flow_logs": [ + { + "id": "35868d55-443e-4d5c-90a4-ac618dc45c1a", + "name": "flow", + "description": "just a test", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "resource_type": "port", + "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", + "traffic_type": "reject", + "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fff", + "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", + "created_at": "2019-01-14T11:03:02", + "updated_at": "2019-01-14T11:03:02" + "status": "ACTIVE", + "admin_state": true + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_flow_log/updating_a_vpc_flow_log.rst b/api-ref/source/apis/vpc_flow_log/updating_a_vpc_flow_log.rst new file mode 100644 index 0000000..8dcfa6a --- /dev/null +++ b/api-ref/source/apis/vpc_flow_log/updating_a_vpc_flow_log.rst @@ -0,0 +1,155 @@ +:original_name: vpc_flow_0004.html + +.. _vpc_flow_0004: + +Updating a VPC Flow Log +======================= + +Function +-------- + +This API is used to update a VPC flow log. + +URI +--- + +PUT /v1/{project_id}/fl/flow_logs/{flowlog_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_flow_0004__table12780121844016: + +.. table:: **Table 1** Parameter description + + ========== ========= ====== ============================== + Name Mandatory Type Description + ========== ========= ====== ============================== + project_id Yes String Specifies the project ID. + flowlog_id Yes String Specifies the VPC flow log ID. + ========== ========= ====== ============================== + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+=============================================================+==========================================================================================================+ + | flow_log | :ref:`flow_log ` object | Specifies the **FlowLog** objects. For details, see :ref:`Table 3 `. | + +----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + + .. _vpc_flow_0004__table13828101864013: + + .. table:: **Table 3** Description of the **FlowLog** field + + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+================================================================================================================================+ + | name | No | String | - Specifies the VPC flow log name. | + | | | | - The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | - Provides supplementary information about the VPC flow log. | + | | | | - The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + | admin_state | No | Boolean | Specifies whether to enable the VPC flow log function. | + +-----------------+-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v1/b2782e6708b8475c993e6064bc456bf8/fl/flow_logs/f49f00f1-0f15-470a-a8c5-4e879e461c8d + + { + "flow_log": { + "name": "flow-log-update", + "description": "update", + "admin_state": false + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +==========+=============================================================+==========================================================================================================+ + | flow_log | :ref:`flow_log ` object | Specifies the **FlowLog** objects. For details, see :ref:`Table 5 `. | + +----------+-------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + + .. _vpc_flow_0004__table17299234185110: + + .. table:: **Table 5** Description of the **FlowLog** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | id | String | Specifies the VPC flow log UUID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | name | String | Specifies the VPC flow log name. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_type | String | Specifies the type of resource on which to create the VPC flow log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | resource_id | String | Specifies the unique resource ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | traffic_type | String | Specifies the type of traffic to log. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_group_id | String | Specifies the log group ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | log_topic_id | String | Specifies the log topic ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | admin_state | Boolean | Specifies whether to enable the VPC flow log function. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | status | String | Specifies the VPC flow log status. | + | | | | + | | | - **ACTIVE**: Enabled | + | | | - **DOWN**: Disabled | + | | | - **ERROR**: Abnormal fault | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | created_at | String | Specifies the time when the VPC flow log was created. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | updated_at | String | Specifies the time when the VPC flow log was updated. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "flow_log": { + "id": "f49f00f1-0f15-470a-a8c5-4e879e461c8d", + "name": " flow-log-update", + "description": "update", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "resource_type": "port", + "resource_id": "05c4052d-8d14-488f-aa00-19fea5a25fde", + "traffic_type": "reject", + "log_group_id": "05c4052d-8d14-488f-aa00-19fea5a25fdd", + "log_topic_id": "a9d7dee7-37d2-4cba-a208-a016252aaa63", + "created_at": "2019-01-14T11:03:02", + "updated_at": "2019-01-14T12:03:02" + "status": "DOWN", + "admin_state": false + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/accepting_a_vpc_peering_connection.rst b/api-ref/source/apis/vpc_peering_connection/accepting_a_vpc_peering_connection.rst new file mode 100644 index 0000000..826cc5c --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/accepting_a_vpc_peering_connection.rst @@ -0,0 +1,118 @@ +:original_name: vpc_peering_0004.html + +.. _vpc_peering_0004: + +Accepting a VPC Peering Connection +================================== + +Function +-------- + +After tenant A requests to create a VPC peering connection with a VPC of tenant B, the VPC peering connection takes effect only after tenant B accepts the request. This API is used by a tenant to accept a VPC peering connection request initiated by another tenant. + +URI +--- + +PUT /v2.0/vpc/peerings/{peering_id}/accept + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_peering_0004__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+========+================================================================================================+ + | peering_id | Yes | String | Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection. | + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v2.0/vpc/peerings/22b76469-08e3-4937-8c1d-7aad34892be1/accept + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===========================================+====================================================================================================================+ + | id | String | Specifies the VPC peering connection ID. | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC peering connection name. | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the VPC peering connection status. Possible values are as follows: | + | | | | + | | | - **PENDING_ACCEPTANCE** | + | | | - **REJECTED** | + | | | - **EXPIRED** | + | | | - **DELETED** | + | | | - **ACTIVE** | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 3 `. | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 3 `. | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC peering connection. | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the VPC peering connection is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the VPC peering connection is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0004__table1125991417114: + + .. table:: **Table 3** **vpc_info** objects + + +-----------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +===========+========+================================================================================================+ + | vpc_id | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "name": "test", + "id": "22b76469-08e3-4937-8c1d-7aad34892be1", + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5", + "tenant_id": "059a737356594b41b447b557bf0aae56" + }, + "status": "ACTIVE" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/creating_a_vpc_peering_connection.rst b/api-ref/source/apis/vpc_peering_connection/creating_a_vpc_peering_connection.rst new file mode 100644 index 0000000..10e2f83 --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/creating_a_vpc_peering_connection.rst @@ -0,0 +1,168 @@ +:original_name: vpc_peering_0003.html + +.. _vpc_peering_0003: + +Creating a VPC Peering Connection +================================= + +Function +-------- + +This API is used to create a VPC peering connection. + +If you create a VPC peering connection with another VPC of your own, the connection is created without the need for you to accept the connection. + +If you create a VPC peering connection with a VPC of another tenant, the peer tenant must accept the connection so that the connection can be created. If the peer tenant refuses the connection, it cannot be created. + +URI +--- + +POST /v2.0/vpc/peerings + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 1** Request parameter + + +-----------+-----------+--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+==============================================================+===============================================================================================================+ + | peering | Yes | :ref:`peering ` object | Specifies the VPC peering connection. For details, see :ref:`Table 2 `. | + +-----------+-----------+--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0003__table1026243410414: + + .. table:: **Table 2** Description of the **peering** field + + +------------------+-----------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +==================+===========+===============================================================+====================================================================================================================+ + | name | Yes | String | Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters. | + +------------------+-----------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | Yes | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 3 `. | + +------------------+-----------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | Yes | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 3 `. | + +------------------+-----------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0003__table1132310347417: + + .. table:: **Table 3** Description of the **vpc_info** field + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================+ + | vpc_id | Yes | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + | | | | | + | | | | This parameter is mandatory if the VPC peering connection is created between VPCs in different accounts. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/vpc/peerings + + { + "peering": { + "name": "test", + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5" + } + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +-----------+---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+===============================================================+================================================================================================================+ + | peering | :ref:`peering ` object | Specifies the VPC peering connection. For details, see :ref:`Table 5 `. | + +-----------+---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0003__table14258131481112: + + .. table:: **Table 5** **peering** objects + + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===============================================================+====================================================================================================================+ + | id | String | Specifies the VPC peering connection ID. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC peering connection name. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the VPC peering connection status. Possible values are as follows: | + | | | | + | | | - **PENDING_ACCEPTANCE** | + | | | - **REJECTED** | + | | | - **EXPIRED** | + | | | - **DELETED** | + | | | - **ACTIVE** | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 6 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 6 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC peering connection. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the VPC peering connection is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the VPC peering connection is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0003__table1125991417114: + + .. table:: **Table 6** **vpc_info** objects + + +-----------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +===========+========+================================================================================================+ + | vpc_id | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "peering": { + "name": "test", + "id": "22b76469-08e3-4937-8c1d-7aad34892be1", + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "status": "ACTIVE" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/deleting_a_vpc_peering_connection.rst b/api-ref/source/apis/vpc_peering_connection/deleting_a_vpc_peering_connection.rst new file mode 100644 index 0000000..ebcaa2b --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/deleting_a_vpc_peering_connection.rst @@ -0,0 +1,64 @@ +:original_name: vpc_peering_0007.html + +.. _vpc_peering_0007: + +Deleting a VPC Peering Connection +================================= + +Function +-------- + +This API is used to delete a VPC peering connection. + +A VPC peering connection can be deleted either by the local or peer tenant. + +URI +--- + +DELETE /v2.0/vpc/peerings/{peering_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_peering_0007__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+========+================================================================================================+ + | peering_id | Yes | String | Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection. | + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v2.0/vpc/peerings/2b098395-046a-4071-b009-312bcee665cb + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/index.rst b/api-ref/source/apis/vpc_peering_connection/index.rst new file mode 100644 index 0000000..1692583 --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/index.rst @@ -0,0 +1,26 @@ +:original_name: vpc_peering_0000.html + +.. _vpc_peering_0000: + +VPC Peering Connection +====================== + +- :ref:`Querying VPC Peering Connections ` +- :ref:`Querying a VPC Peering Connection ` +- :ref:`Creating a VPC Peering Connection ` +- :ref:`Accepting a VPC Peering Connection ` +- :ref:`Refusing a VPC Peering Connection ` +- :ref:`Updating a VPC Peering Connection ` +- :ref:`Deleting a VPC Peering Connection ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_vpc_peering_connections + querying_a_vpc_peering_connection + creating_a_vpc_peering_connection + accepting_a_vpc_peering_connection + refusing_a_vpc_peering_connection + updating_a_vpc_peering_connection + deleting_a_vpc_peering_connection diff --git a/api-ref/source/apis/vpc_peering_connection/querying_a_vpc_peering_connection.rst b/api-ref/source/apis/vpc_peering_connection/querying_a_vpc_peering_connection.rst new file mode 100644 index 0000000..fc825f1 --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/querying_a_vpc_peering_connection.rst @@ -0,0 +1,130 @@ +:original_name: vpc_peering_0002.html + +.. _vpc_peering_0002: + +Querying a VPC Peering Connection +================================= + +Function +-------- + +This API is used to query details about a VPC peering connection. + +URI +--- + +GET /v2.0/vpc/peerings/{peering_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_peering_0002__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+========+================================================================================================================================================+ + | peering_id | Yes | String | Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection. The **peering_id** value is used as the filter. | + +------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/vpc/peerings/22b76469-08e3-4937-8c1d-7aad34892be1 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+==============================================================+===========================================================================================================================+ + | peering | :ref:`peering ` object | Specifies the VPC peering connection object list. For details, see :ref:`Table 3 `. | + +-----------+--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0002__table1026243410414: + + .. table:: **Table 3** **peering** objects + + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===============================================================+====================================================================================================================+ + | id | String | Specifies the VPC peering connection ID. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC peering connection name. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the VPC peering connection status. Possible values are as follows: | + | | | | + | | | - **PENDING_ACCEPTANCE** | + | | | - **REJECTED** | + | | | - **EXPIRED** | + | | | - **DELETED** | + | | | - **ACTIVE** | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 4 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 4 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC peering connection. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the VPC peering connection is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the VPC peering connection is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0002__table1132310347417: + + .. table:: **Table 4** **vpc_info** objects + + +-----------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +===========+========+================================================================================================+ + | vpc_id | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "peering": { + "name": "test", + "id": "22b76469-08e3-4937-8c1d-7aad34892be1", + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "status": "ACTIVE" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/querying_vpc_peering_connections.rst b/api-ref/source/apis/vpc_peering_connection/querying_vpc_peering_connections.rst new file mode 100644 index 0000000..8067341 --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/querying_vpc_peering_connections.rst @@ -0,0 +1,178 @@ +:original_name: vpc_peering_0001.html + +.. _vpc_peering_0001: + +Querying VPC Peering Connections +================================ + +Function +-------- + +This API is used to query all VPC peering connections accessible to the tenant submitting the request. The connections are filtered based on the filtering condition. For details about pagination query, see section :ref:`Pagination `. + +URI +--- + +GET /v2.0/vpc/peerings + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/vpc/peerings?id={id}&name={name}&status={status}&tenant_id={tenant_id}&vpc_id={vpc_id}&limit={limit}&marker={marker} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_peering_0001__table18880184689: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the VPC peering connection ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | - Specifies that the peering connection name is used as the filter. | + | | | | - The value can contain no more than 64 characters. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | No | String | Specifies that the VPC peering connection status is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the tenant ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | No | String | Specifies that the VPC ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + | | | | | + | | | | The default value is **2000**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/vpc/peerings + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+============================================================================+======================================================================================================================================================================================================================+ + | peerings | Array of :ref:`peering ` objects | Specifies the VPC peering connection object list. For details, see :ref:`Table 3 `. | + +-----------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | peerings_links | Array of :ref:`peerings_link ` objects | Specifies the VPC peering connection object list. For details, see :ref:`Table 5 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0001__table1026243410414: + + .. table:: **Table 3** **peering** objects + + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===============================================================+====================================================================================================================+ + | id | String | Specifies the VPC peering connection ID. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC peering connection name. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the VPC peering connection status. Possible values are as follows: | + | | | | + | | | - **PENDING_ACCEPTANCE** | + | | | - **REJECTED** | + | | | - **EXPIRED** | + | | | - **DELETED** | + | | | - **ACTIVE** | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 4 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 4 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC peering connection. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the VPC peering connection is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the VPC peering connection is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0001__table1132310347417: + + .. table:: **Table 4** **vpc_info** objects + + +-----------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +===========+========+================================================================================================+ + | vpc_id | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0001__table25150247450: + + .. table:: **Table 5** **peerings_link** object + + +------+--------+----------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+======================================================================+ + | href | String | Specifies the API link. | + +------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +------+--------+----------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "peerings": [ + { + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "name": "test", + "id": "b147a74b-39bb-4c7a-aed5-19cac4c2df13", + "status": "ACTIVE" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/refusing_a_vpc_peering_connection.rst b/api-ref/source/apis/vpc_peering_connection/refusing_a_vpc_peering_connection.rst new file mode 100644 index 0000000..92265ff --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/refusing_a_vpc_peering_connection.rst @@ -0,0 +1,118 @@ +:original_name: vpc_peering_0005.html + +.. _vpc_peering_0005: + +Refusing a VPC Peering Connection +================================= + +Function +-------- + +After tenant A requests to create a VPC peering connection with a VPC of tenant B, the VPC peering connection takes effect only after tenant B accepts the request. However, tenant can refuse the VPC peering connection request. This API is used by a tenant to refuse a VPC peering connection request initiated by another tenant. + +URI +--- + +PUT /v2.0/vpc/peerings/{peering_id}/reject + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_peering_0005__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+========+================================================================================================+ + | peering_id | Yes | String | Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection. | + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v2.0/vpc/peerings/22b76469-08e3-4937-8c1d-7aad34892be1/reject + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===============================================================+====================================================================================================================+ + | id | String | Specifies the VPC peering connection ID. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC peering connection name. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the VPC peering connection status. Possible values are as follows: | + | | | | + | | | - **PENDING_ACCEPTANCE** | + | | | - **REJECTED** | + | | | - **EXPIRED** | + | | | - **DELETED** | + | | | - **ACTIVE** | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 3 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 3 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC peering connection. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the VPC peering connection is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the VPC peering connection is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0005__table1125991417114: + + .. table:: **Table 3** **vpc_info** objects + + +-----------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +===========+========+================================================================================================+ + | vpc_id | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "name": "test", + "id": "22b76469-08e3-4937-8c1d-7aad34892be1", + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "status": "REJECTED" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_peering_connection/updating_a_vpc_peering_connection.rst b/api-ref/source/apis/vpc_peering_connection/updating_a_vpc_peering_connection.rst new file mode 100644 index 0000000..f9e6a56 --- /dev/null +++ b/api-ref/source/apis/vpc_peering_connection/updating_a_vpc_peering_connection.rst @@ -0,0 +1,155 @@ +:original_name: vpc_peering_0006.html + +.. _vpc_peering_0006: + +Updating a VPC Peering Connection +================================= + +Function +-------- + +Updates a VPC peering connection. + +URI +--- + +PUT /v2.0/vpc/peerings/{peering_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_peering_0006__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +============+===========+========+================================================================================================+ + | peering_id | Yes | String | Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection. | + +------------+-----------+--------+------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==============================================================+==================================================================================================================================================================+ + | peering | Yes | :ref:`peering ` object | Updates a VPC peering connection. For details, see :ref:`Table 3 `. | + | | | | | + | | | | When updating a VPC peering connection, you must specify at least one attribute. Currently, only the VPC peering connection name and description can be updated. | + +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0006__table9931835105819: + + .. table:: **Table 3** Description of the **peering** field + + +-------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+=======================================================================================================================================================+ + | name | No | String | Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters. | + +-------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the VPC peering connection. The value can contain no more than 255 characters, including letters and digits. | + +-------------+-----------+--------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + PUT https://{Endpoint}/v2.0/vpc/peerings/7a9a954a-eb41-4954-a300-11ab17a361a2 + { + "peering": { + "name": "test2" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 4** Response parameter + + +-----------+---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+===============================================================+================================================================================================================+ + | peering | :ref:`peering ` object | Specifies the VPC peering connection. For details, see :ref:`Table 5 `. | + +-----------+---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0006__table14258131481112: + + .. table:: **Table 5** **peering** objects + + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===============================================================+====================================================================================================================+ + | id | String | Specifies the VPC peering connection ID. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the VPC peering connection name. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the VPC peering connection status. Possible values are as follows: | + | | | | + | | | - **PENDING_ACCEPTANCE** | + | | | - **REJECTED** | + | | | - **EXPIRED** | + | | | - **DELETED** | + | | | - **ACTIVE** | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | request_vpc_info | :ref:`vpc_info ` object | Specifies information about the local VPC. For details, see :ref:`Table 6 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | accept_vpc_info | :ref:`vpc_info ` object | Specifies information about the peer VPC. For details, see :ref:`Table 6 `. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the VPC peering connection. | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the VPC peering connection is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the VPC peering connection is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_peering_0006__table1125991417114: + + .. table:: **Table 6** **vpc_info** objects + + +-----------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +===========+========+================================================================================================+ + | vpc_id | String | Specifies the ID of a VPC involved in a VPC peering connection. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the ID of the project to which a VPC involved in the VPC peering connection belongs. | + +-----------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "peering": { + "name": "test2", + "id": "22b76469-08e3-4937-8c1d-7aad34892be1", + "request_vpc_info": { + "vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299", + "tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e" + }, + "accept_vpc_info": { + "vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5", + "tenant_id": "059a737356594b41b447b557bf0aae56" + }, + "status": "ACTIVE" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_route/creating_a_vpc_route.rst b/api-ref/source/apis/vpc_route/creating_a_vpc_route.rst new file mode 100644 index 0000000..4ca471d --- /dev/null +++ b/api-ref/source/apis/vpc_route/creating_a_vpc_route.rst @@ -0,0 +1,118 @@ +:original_name: vpc_route_0003.html + +.. _vpc_route_0003: + +Creating a VPC Route +==================== + +Function +-------- + +This API is used to create a route. + +URI +--- + +POST /v2.0/vpc/routes + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 1** Request parameter + + +-----------+--------------------------------------+-----------+------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+======================================+===========+==========================================================================================+ + | route | :ref:`route ` object | Yes | Specifies the route. For details, see :ref:`Table 2 `. | + +-----------+--------------------------------------+-----------+------------------------------------------------------------------------------------------+ + + .. _vpc_route_0003__table05001250111: + + .. table:: **Table 2** **route** objects + + +-------------+--------+-----------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=============+========+===========+================================================================================================+ + | destination | String | Yes | Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. | + +-------------+--------+-----------+------------------------------------------------------------------------------------------------+ + | nexthop | String | Yes | Specifies the next hop. If the route type is **peering**, enter the VPC peering connection ID. | + +-------------+--------+-----------+------------------------------------------------------------------------------------------------+ + | type | String | Yes | Specifies the route type. Currently, the value can only be **peering**. | + +-------------+--------+-----------+------------------------------------------------------------------------------------------------+ + | vpc_id | String | Yes | Specifies the ID of the VPC ID requesting for creating a route. | + +-------------+--------+-----------+------------------------------------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/vpc/routes + + { + "route": { + "type": "peering", + "nexthop": "60c809cb-6731-45d0-ace8-3bf5626421a9", + "destination": "192.168.200.0/24", + "vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff" + } + } + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 3** Response parameter + + +-----------+--------------------------------------+--------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+======================================+============================================================================================+ + | route | :ref:`route ` object | Specifies the route. For details, see :ref:`Table 4 `. | + +-----------+--------------------------------------+--------------------------------------------------------------------------------------------+ + + .. _vpc_route_0003__table1163544010410: + + .. table:: **Table 4** **route** objects + + +-------------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+================================================================================================+ + | id | String | Specifies the route ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | destination | String | Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop. If the route type is **peering**, enter the VPC peering connection ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | type | String | Specifies the route type. Currently, the value can only be **peering**. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the VPC of the route. Set this parameter to the existing VPC ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "route": { + "type": "peering", + "nexthop": "60c809cb-6731-45d0-ace8-3bf5626421a9", + "destination": "192.168.200.0/24", + "vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff", + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "id": "3d42a0d4-a980-4613-ae76-a2cddecff054" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_route/deleting_a_vpc_route.rst b/api-ref/source/apis/vpc_route/deleting_a_vpc_route.rst new file mode 100644 index 0000000..4a16842 --- /dev/null +++ b/api-ref/source/apis/vpc_route/deleting_a_vpc_route.rst @@ -0,0 +1,62 @@ +:original_name: vpc_route_0004.html + +.. _vpc_route_0004: + +Deleting a VPC Route +==================== + +Function +-------- + +This API is used to delete a route. + +URI +--- + +DELETE /v2.0/vpc/routes/{route_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_route_0004__table18880184689: + +.. table:: **Table 1** Parameter description + + +----------+-----------+--------+--------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +==========+===========+========+==============================================================+ + | route_id | Yes | String | Specifies the route ID, which uniquely identifies the route. | + +----------+-----------+--------+--------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v2.0/vpc/routes/60c809cb-6731-45d0-ace8-3bf5626421a9 + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_route/index.rst b/api-ref/source/apis/vpc_route/index.rst new file mode 100644 index 0000000..38dc90f --- /dev/null +++ b/api-ref/source/apis/vpc_route/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_route_0000.html + +.. _vpc_route_0000: + +VPC Route +========= + +- :ref:`Querying VPC Routes ` +- :ref:`Querying a VPC Route ` +- :ref:`Creating a VPC Route ` +- :ref:`Deleting a VPC Route ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_vpc_routes + querying_a_vpc_route + creating_a_vpc_route + deleting_a_vpc_route diff --git a/api-ref/source/apis/vpc_route/querying_a_vpc_route.rst b/api-ref/source/apis/vpc_route/querying_a_vpc_route.rst new file mode 100644 index 0000000..a906775 --- /dev/null +++ b/api-ref/source/apis/vpc_route/querying_a_vpc_route.rst @@ -0,0 +1,99 @@ +:original_name: vpc_route_0002.html + +.. _vpc_route_0002: + +Querying a VPC Route +==================== + +Function +-------- + +This API is used to query details about a route. + +URI +--- + +GET /v2.0/vpc/routes/{route_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_route_0002__table18880184689: + +.. table:: **Table 1** Parameter description + + +----------+-----------+--------+--------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +==========+===========+========+==============================================================+ + | route_id | Yes | String | Specifies the route ID, which uniquely identifies the route. | + +----------+-----------+--------+--------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/vpc/routes/60c809cb-6731-45d0-ace8-3bf5626421a9 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+--------------------------------------+------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+======================================+==========================================================================================+ + | route | :ref:`route ` object | Specifies the route. For details, see :ref:`Table 3 `. | + +-----------+--------------------------------------+------------------------------------------------------------------------------------------+ + + .. _vpc_route_0002__table05001250111: + + .. table:: **Table 3** **route** objects + + +-------------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+================================================================================================+ + | id | String | Specifies the route ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | destination | String | Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop. If the route type is **peering**, enter the VPC peering connection ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | type | String | Specifies the route type. Currently, the value can only be **peering**. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the VPC of the route. Set this parameter to the existing VPC ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "route": { + "type": "peering", + "nexthop": "60c809cb-6731-45d0-ace8-3bf5626421a9", + "destination": "192.168.200.0/24", + "vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff", + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "id": "3d42a0d4-a980-4613-ae76-a2cddecff054" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_route/querying_vpc_routes.rst b/api-ref/source/apis/vpc_route/querying_vpc_routes.rst new file mode 100644 index 0000000..8fe2712 --- /dev/null +++ b/api-ref/source/apis/vpc_route/querying_vpc_routes.rst @@ -0,0 +1,147 @@ +:original_name: vpc_route_0001.html + +.. _vpc_route_0001: + +Querying VPC Routes +=================== + +Function +-------- + +This API is used to query all routes of the tenant submitting the request. The routes are filtered based on the filtering condition. For details about the response format of pagination query, see section :ref:`Pagination `. + +URI +--- + +GET /v2.0/vpc/routes + +Example: + +.. code-block:: + + Example: + GET https://{Endpoint}/v2.0/vpc/routes?id={id}&vpc_id={vpc_id}&tenant_id={tenant_id}&destination={destination}&type={type}&limit={limit}&marker={marker} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_route_0001__table1256815152114: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the route ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the tenant ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | No | String | Specifies that the VPC ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | destination | No | String | Specifies that the route destination address (CIDR) is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | type | No | String | Specifies that the type is used as the filtering condition. Currently, the value can only be **peering**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + | | | | | + | | | | The default value is **2000**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/vpc/routes?vpc_id=ab78be2d-782f-42a5-aa72-35879f6890ff + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+========================================================================+======================================================================================================================================================================================================================+ + | routes | Array of :ref:`route ` objects | Specifies the route object list. For details, see :ref:`Table 3 `. | + +-----------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routes_links | Array of :ref:`routes_link ` objects | Specifies the route object list. For details, see :ref:`Table 4 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. _vpc_route_0001__table05001250111: + + .. table:: **Table 3** **route** objects + + +-------------+--------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+================================================================================================+ + | id | String | Specifies the route ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | destination | String | Specifies the destination address in the CIDR notation format, for example, 192.168.200.0/24. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop. If the route type is **peering**, enter the VPC peering connection ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | type | String | Specifies the route type. Currently, the value can only be **peering**. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | vpc_id | String | Specifies the VPC of the route. Set this parameter to the existing VPC ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------+--------+------------------------------------------------------------------------------------------------+ + + .. _vpc_route_0001__table25150247450: + + .. table:: **Table 4** **routes_link** object + + +------+--------+----------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+======================================================================+ + | href | String | Specifies the API link. | + +------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +------+--------+----------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "routes": [ + { + "type": "peering", + "nexthop": "60c809cb-6731-45d0-ace8-3bf5626421a9", + "destination": "192.168.200.0/24", + "vpc_id": "ab78be2d-782f-42a5-aa72-35879f6890ff", + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "id": "3d42a0d4-a980-4613-ae76-a2cddecff054" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_tag_management/batch_creating_or_deleting_vpc_tags.rst b/api-ref/source/apis/vpc_tag_management/batch_creating_or_deleting_vpc_tags.rst new file mode 100644 index 0000000..42f365c --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/batch_creating_or_deleting_vpc_tags.rst @@ -0,0 +1,146 @@ +:original_name: vpc_tag_0004.html + +.. _vpc_tag_0004: + +Batch Creating or Deleting VPC Tags +=================================== + +Function +-------- + +This API is used to add multiple tags to or delete multiple tags from a VPC at a time. + +This API is idempotent. + +If there are duplicate keys in the request body when you add tags, an error is reported. + +During tag creation, duplicate keys are not allowed. If a key already exists in the database, its value will be overwritten by the new duplicate key. + +During tag deletion, if some tags do not exist, the operation is considered to be successful by default. The character set of the tags will not be checked. When you delete tags, the tag structure cannot be missing, and the key cannot be left blank or be an empty string. + +URI +--- + +POST /v2.0/{project_id}/vpcs/{vpc_id}/tags/action + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_tag_0004__table27380479: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +Request parameter + +.. table:: **Table 2** Request parameter + + +-----------------+---------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+===============================================================+=================+===================================================================================================+ + | tags | Array of :ref:`tag ` objects | Yes | Specifies the **tag** objects. For details, see :ref:`Table 3 `. | + +-----------------+---------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------+ + | action | String | Yes | Specifies the operation. Possible values are as follows: | + | | | | | + | | | | - **create** | + | | | | - **delete** | + +-----------------+---------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------+ + +.. _vpc_tag_0004__table244913515593: + +.. table:: **Table 3** **tag** objects + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=================+=================+=================+=====================================================================+ + | key | String | Yes | - Specifies the tag key. | + | | | | - Cannot be left blank. | + | | | | - Can contain a maximum of 36 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | | + | | | | - The tag key of a VPC must be unique. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | value | String | Yes | - Specifies the tag value. | + | | | | - Can contain a maximum of 43 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + +Request example 1: Creating tags in batches + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/vpcs/{vpc_id}/tags/action + + { + "action": "create", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Request example 2: Deleting tags in batches + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/vpcs/{vpc_id}/tags/action + + { + "action": "delete", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Response Message +---------------- + +Response parameter + +None + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_tag_management/creating_a_tag_for_a_vpc.rst b/api-ref/source/apis/vpc_tag_management/creating_a_tag_for_a_vpc.rst new file mode 100644 index 0000000..26aab6b --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/creating_a_tag_for_a_vpc.rst @@ -0,0 +1,106 @@ +:original_name: vpc_tag_0001.html + +.. _vpc_tag_0001: + +Creating a Tag for a VPC +======================== + +Function +-------- + +This API is used to create a tag for a VPC. + +URI +--- + +POST /v2.0/{project_id}/vpcs/{vpc_id}/tags + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_tag_0001__table27380479: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + .. table:: **Table 2** Request parameter + + +-----------+-------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+=======================================================+===========+=====================================================================================================+ + | tag | :ref:`tag ` object | Yes | Specifies the **tag** objects. For details, see :ref:`Table 3 `. | + +-----------+-------------------------------------------------------+-----------+-----------------------------------------------------------------------------------------------------+ + + .. _vpc_tag_0001__table13242848193719: + + .. table:: **Table 3** **tag** objects + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | Attribute | Type | Mandatory | Description | + +=================+=================+=================+=====================================================================+ + | key | String | Yes | - Specifies the tag key. | + | | | | - Cannot be left blank. | + | | | | - Can contain a maximum of 36 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | | + | | | | - The tag key of a VPC must be unique. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + | value | String | Yes | - Specifies the tag value. | + | | | | - Can contain a maximum of 43 characters. | + | | | | - Can contain only the following character types: | + | | | | | + | | | | - Uppercase letters | + | | | | - Lowercase letters | + | | | | - Digits | + | | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------+ + +- Example request + + .. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/vpcs/{vpc_id}/tags + + { + "tag": { + "key": "key1", + "value": "value1" + } + } + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_tag_management/deleting_a_vpc_tag.rst b/api-ref/source/apis/vpc_tag_management/deleting_a_vpc_tag.rst new file mode 100644 index 0000000..1337115 --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/deleting_a_vpc_tag.rst @@ -0,0 +1,66 @@ +:original_name: vpc_tag_0003.html + +.. _vpc_tag_0003: + +Deleting a VPC Tag +================== + +Function +-------- + +This API is used to delete a VPC tag. + +URI +--- + +DELETE /v2.0/{project_id}/vpcs/{vpc_id}/tags/{key} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_tag_0003__table27380479: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + | key | Yes | Specifies the tag key. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + DELETE https://{Endpoint}/v2.0/{project_id}/vpcs/{vpc_id}/tags/{key} + +Response Message +---------------- + +- Response parameter + + None + +- Example response + + None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_tag_management/index.rst b/api-ref/source/apis/vpc_tag_management/index.rst new file mode 100644 index 0000000..96958fe --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/index.rst @@ -0,0 +1,24 @@ +:original_name: vpc_tag_0000.html + +.. _vpc_tag_0000: + +VPC Tag Management +================== + +- :ref:`Creating a Tag for a VPC ` +- :ref:`Querying VPC Tags ` +- :ref:`Deleting a VPC Tag ` +- :ref:`Batch Creating or Deleting VPC Tags ` +- :ref:`Querying VPCs by Tag ` +- :ref:`Querying VPC Tags in a Specified Project ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_tag_for_a_vpc + querying_vpc_tags + deleting_a_vpc_tag + batch_creating_or_deleting_vpc_tags + querying_vpcs_by_tag + querying_vpc_tags_in_a_specified_project diff --git a/api-ref/source/apis/vpc_tag_management/querying_vpc_tags.rst b/api-ref/source/apis/vpc_tag_management/querying_vpc_tags.rst new file mode 100644 index 0000000..04cf142 --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/querying_vpc_tags.rst @@ -0,0 +1,112 @@ +:original_name: vpc_tag_0002.html + +.. _vpc_tag_0002: + +Querying VPC Tags +================= + +Function +-------- + +This API is used to query tags of a specified VPC. + +URI +--- + +GET /v2.0/{project_id}/vpcs/{vpc_id}/tags + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_tag_0002__table27380479: + +.. table:: **Table 1** Parameter description + + +------------+-----------+----------------------------------------------------------+ + | Name | Mandatory | Description | + +============+===========+==========================================================+ + | project_id | Yes | Specifies the project ID. | + +------------+-----------+----------------------------------------------------------+ + | vpc_id | Yes | Specifies the VPC ID, which uniquely identifies the VPC. | + +------------+-----------+----------------------------------------------------------+ + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/{project_id}/vpcs/{vpc_id}/tags + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=================================================================+=========================================================================================================+ + | tags | Array of :ref:`tag ` objects | Specifies the **tag** object list. For details, see :ref:`Table 3 `. | + +-----------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + + .. _vpc_tag_0002__table13242848193719: + + .. table:: **Table 3** **tag** objects + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=====================================================================+ + | key | String | - Specifies the tag key. | + | | | - Cannot be left blank. | + | | | - Can contain a maximum of 36 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + | | | | + | | | - The tag key of a VPC must be unique. | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | value | String | - Specifies the tag value. | + | | | - Can contain a maximum of 43 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value3" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_tag_management/querying_vpc_tags_in_a_specified_project.rst b/api-ref/source/apis/vpc_tag_management/querying_vpc_tags_in_a_specified_project.rst new file mode 100644 index 0000000..f9d4f66 --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/querying_vpc_tags_in_a_specified_project.rst @@ -0,0 +1,116 @@ +:original_name: vpc_tag_0006.html + +.. _vpc_tag_0006: + +Querying VPC Tags in a Specified Project +======================================== + +Function +-------- + +This API is used to query all VPC tags of a tenant in a specified region. + +URI +--- + +GET /v2.0/{project_id}/vpcs/tags + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_tag_0006__table27380479: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +Request parameter + +None + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/{project_id}/vpcs/tags + +Response Message +---------------- + +Response parameter + +.. table:: **Table 2** Response parameter + + +-----------+----------------------------------------------------------------+-------------------------+ + | Parameter | Type | Description | + +===========+================================================================+=========================+ + | tags | Array of :ref:`tag ` objects | Specifies the tag list. | + +-----------+----------------------------------------------------------------+-------------------------+ + +.. _vpc_tag_0006__table1696410062019: + +.. table:: **Table 3** Description of the **tag** field + + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | Name | Type | Description | + +=======================+=======================+=====================================================================+ + | key | String | Specifies the tag key. | + | | | | + | | | - Cannot be left blank. | + | | | - Can contain a maximum of 36 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + | values | Array of strings | Specifies the tag value list. | + | | | | + | | | - Can contain a maximum of 43 characters. | + | | | - Can contain only the following character types: | + | | | | + | | | - Uppercase letters | + | | | - Lowercase letters | + | | | - Digits | + | | | - Special characters, including hyphens (-) and underscores (_) | + +-----------------------+-----------------------+---------------------------------------------------------------------+ + +Example response + +.. code-block:: + + { + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/apis/vpc_tag_management/querying_vpcs_by_tag.rst b/api-ref/source/apis/vpc_tag_management/querying_vpcs_by_tag.rst new file mode 100644 index 0000000..e9f09ac --- /dev/null +++ b/api-ref/source/apis/vpc_tag_management/querying_vpcs_by_tag.rst @@ -0,0 +1,221 @@ +:original_name: vpc_tag_0005.html + +.. _vpc_tag_0005: + +Querying VPCs by Tag +==================== + +Function +-------- + +This API is used to query VPCs by tag. + +URI +--- + +POST /v2.0/{project_id}/vpcs/resource_instances/action + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_tag_0005__table27380479: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + project_id Yes Specifies the project ID. + ========== ========= ========================= + +Request Message +--------------- + +Request parameter + +.. table:: **Table 2** Request parameter + + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+=================================================================+=================+=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | tags | Array of :ref:`tag ` objects | No | Specifies the included tags. A maximum of 20 tag keys are allowed for each query operation. Each tag key can have up to 10 tag values. The structure body must be included. The tag key cannot be left blank or set to an empty string. Each tag key must be unique, and each tag value in a tag must be unique. | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | Integer | No | Sets the page size. This parameter is not available when **action** is set to **count**. The default value is **1000** when **action** is set to **filter**. The maximum value is **1000**, and the minimum value is **1**. The value cannot be a negative number. | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | Integer | No | Specifies the index position. The query starts from the next piece of data indexed by this parameter. This parameter is not required when you query data on the first page. The value in the response returned for querying data on the previous page will be included in this parameter for querying data on subsequent pages. This parameter is not available when **action** is set to **count**. If **action** is set to **filter**, the value must be a number, and the default value is **0**. The value cannot be a negative number. | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Yes | Specifies the operation to perform. The value can only be **filter** (filtering) or **count** (querying the total number). | + | | | | | + | | | | The value **filter** indicates pagination query. The value **count** indicates that the total number of query results meeting the search criteria will be returned. | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | Array of :ref:`match ` objects | No | Specifies the search criteria. The tag key is the field to match. Currently, only **resource_name** is supported. The tag value indicates the matched value. This field is a fixed dictionary value. | + +-----------------+-----------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_tag_0005__table1548032316199: + +.. table:: **Table 3** Description of the **tag** field + + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+==================+====================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. The value can contain a maximum of 127 Unicode characters. The tag key cannot be left blank. (This parameter is not verified during the search process.) | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | Specifies the tag value list. Each value can contain a maximum of 255 Unicode characters. An empty list for **values** indicates any value. The values are in the OR relationship. | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_tag_0005__table104959232192: + +.. table:: **Table 4** Description of the **match** field + + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======+===========+========+======================================================================================+ + | key | Yes | String | Specifies the tag key. Currently, the tag key can only be the resource name. | + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + | value | Yes | String | Specifies the tag value. Each value can contain a maximum of 255 Unicode characters. | + +-------+-----------+--------+--------------------------------------------------------------------------------------+ + +Example request 1: Setting **action** to **filter** + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/vpcs/resource_instances/action + + { + "offset": "0", + "limit": "100", + "action": "filter", + "matches": [ + { + "key": "resource_name", + "value": "resource1" + } + ], + "tags": [ + { + "key": "key1", + "values": [ + "*value1", + "value2" + ] + } + ] + } + +Example request 2: Setting **action** to **count** + +.. code-block:: text + + POST https://{Endpoint}/v2.0/{project_id}/vpcs/resource_instances/action + + { + "action": "count", + "tags": [ + { + "key": "key1", + "values": [ + "value1", + "value2" + ] + }, + { + "key": "key2", + "values": [ + "value1", + "value2" + ] + } + ], + "matches": [ + { + "key": "resource_name", + "value": "resource1" + } + ] + } + +Response Message +---------------- + +Response parameter + +.. table:: **Table 5** Response parameter + + +-------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=============+=====================================================================+=============================================================================================================+ + | resources | Array of :ref:`resource ` objects | Specifies the **resource** object list. For details, see :ref:`Table 6 `. | + +-------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | total_count | Integer | Specifies the total number of query records. | + +-------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_tag_0005__table1454542331912: + +.. table:: **Table 6** **resource** objects + + +-----------------+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +=================+================================================================+=============================================================================================================================================================+ + | resource_id | String | Specifies the resource ID. | + +-----------------+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_detail | Object | Specifies the resource details. Resource details are used for extension. This parameter is left blank by default. | + +-----------------+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`tag ` objects | Specifies the tag list. This parameter is an empty array by default if there is no tag. For details, see :ref:`Table 7 `. | + +-----------------+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | resource_name | String | Specifies the resource name. This parameter is an empty string by default if there is no resource name. | + +-----------------+----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_tag_0005__table1353515016272: + +.. table:: **Table 7** Description of the **tag** field + + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +========+===========+==================+====================================================================================================================================================================================+ + | key | Yes | String | Specifies the tag key. The value can contain a maximum of 127 Unicode characters. The tag key cannot be left blank. (This parameter is not verified during the search process.) | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | Specifies the tag value list. Each value can contain a maximum of 255 Unicode characters. An empty list for **values** indicates any value. The values are in the OR relationship. | + +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example response 1: Setting **action** to **filter** + +.. code-block:: + + { + "resources": [ + { + "resource_detail": null, + "resource_id": "cdfs_cefs_wesas_12_dsad", + "resource_name": "resouece1", + "tags": [ + { + "key": "key1", + "value": "value1" + }, + { + "key": "key2", + "value": "value1" + } + ] + } + ], + "total_count": 1000 + } + + +Example response 2: Setting **action** to **count** + +.. code-block:: + + { + "total_count": 1000 + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/appendix/error_codes.rst b/api-ref/source/appendix/error_codes.rst new file mode 100644 index 0000000..8435110 --- /dev/null +++ b/api-ref/source/appendix/error_codes.rst @@ -0,0 +1,344 @@ +:original_name: vpc_api_0003.html + +.. _vpc_api_0003: + +Error Codes +=========== + +Description +----------- + +If an error occurs when an API is called, error information is returned. This section describes the error information for VPC APIs (excluding native OpenStack APIs). + +Example of Returned Error Information +------------------------------------- + +.. code-block:: + + { + "code": "VPC.0002", + "message": "Available zone Name is null." + } + +Error Code Description +---------------------- + ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Module | Status Code | Error Code | Message | Description | Handling Measure | ++==========================================================================================+=============+============+=========================================================================================+==============================================================================================================+==============================================================================================================================+ +| Public | 400 | VPC.0002 | Available zone Name is null. | The AZ is left blank. | Check whether the **availability_zone** field in the request body for creating a subnet is left blank. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0003 | VPC does not exist. | The VPC does not exist. | Check whether the VPC ID is correct or whether the VPC exists under the tenant. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0004 | VPC is not active, please try later. | The VPC status is abnormal. | Try again later or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 401 | VPC.0005 | Lack of user authority. | User restricted. | Check whether the account is in arrears or has not applied for the OBT permission. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 401 | VPC.0009 | real-name authentication fail. | Real-name authentication fails. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Public | 400 | VPC.0007 | urlTenantId is not equal tokenTenantId | Inconsistent tenant IDs. | The tenant ID in the URL is different from that parsed in the token. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 401 | VPC.0008 | Invalid token in the header. | Invalid token. | Check whether the token in the request header is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 403 | VPC.2701 | Token not allowed to do this action. | You do not have permission to perform this operation, or your account balance is insufficient. | Check whether the account balance is insufficient or whether your account has been frozen. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Public | 403 | VPC.0010 | Rules on xx by \*\* disallowed by policy | Insufficient permissions to make calls to the underlying system. | Obtain the required permissions. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 403 | VPC.2201 | Policy doesn't allow to be performed | Insufficient fine-grained permissions. | Obtain the required permissions. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Creating a VPC | 400 | VPC.0101 | Param is invalid. | VPC parameters are incorrect. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0114 | Quota exceeded for resources: ['router']. | The number of VPCs has reached the maximum allowed limit specified by the quota. | Clear VPC resources that no longer will be used or apply for expanding the VPC resource quota. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0115 | The router name has exist. | The VPC name already exists. | Change the VPC name. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying a VPC | 400 | VPC.0101 | getVpc error vpcId is invalid. | VPC parameters are incorrect. | Ensure that the specified VPC ID is correct. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0105 | Neutron Error. | Calling the backend service fails. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0106 | get router is null. | An error is returned for the failure to call the backend service. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying VPCs | 400 | VPC.0101 | Query vpc list error. | Failed to query the VPCs. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0105 | Neutron Error. | Calling the backend service fails. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0106 | query routers or getList are null. | The response result of calls to the IaaS OpenStack system is null or empty. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Deleting a VPC | 400/404 | VPC.0101 | Delete router error xx is invalid. | Invalid parameters. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0102 | Delete router fail. | The interface fails to obtain the routing resources. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0103 | Resource status is busy, try it again later. | The VPC cannot be deleted because it is being created. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0104 | Router contains subnets, please delete subnet first. | The VPC cannot be deleted because it contains subnets. | Delete the subnet in the VPC. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0105 | Neutron Error. | Calling the backend service fails. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0107 | Delete the firewall first before deleting the router. | Failed to delete the VPC because it has firewalls associated. | Delete the firewalls of the tenant first. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0108 | Router is used not allow deleted. | Failed to delete the VPC because it has EIPs associated. | Delete the EIPs of the tenant first. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0109 | Router is used not allow deleted. | Failed to delete the VPC because one or more VPNs have been created for it. | Delete VPNs of the tenant. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0110 | deleteDefaultNetworkFromRouter router status is invalid. | The VPC cannot be deleted because its status is unstable. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0111 | Database Error. | An internal VPC exception occurs. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0112 | Delete the securitygroup first before deleting the router. | The VPC cannot be deleted because it contains security groups. | Delete security groups of the tenant. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0118 | ELB exists under this router, delete ELB firstly. | The VPC cannot be deleted because it contains load balancers. | Delete load balancers in the VPC. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0119 | ELB Error. | An error occurred when the VPC service makes calls to the ELB service. | Check whether the ELB service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0120 | exroutes exists under this router, delete exroutes firstly. | The VPC cannot be deleted because it contains extension routes. | Delete extension routes in the VPC. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Updating a VPC | 400 | VPC.0101 | Update router xx is invalid. | Invalid parameters. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0105 | Neutron Error. | Calling the backend service fails. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0113 | Router status is not active. | The VPC cannot be updated because the status of the VPC is abnormal. | Try again later or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0115 | The router name has exist. | The VPC name already exists. | Change the VPC name. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0117 | Cidr can not contain subnetList cidr. | The subnet parameters are invalid. The VPC CIDR block does not contain all its subnet CIDR blocks. | Change the CIDR block of the VPC. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Creating a subnet | 400 | VPC.0201 | Subnet name is invalid. | Incorrect subnet parameters. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0202 | Create subnet failed. | An internal error occurs in the subnet. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0203 | Subnet is not in the range of VPC. | The CIDR block of the subnet is not in the range of the VPC. | Change the CIDR block of the subnet. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0204 | The subnet has already existed in the VPC, or has been in conflict with the VPC subnet. | The CIDR block of the subnet already exists in the VPC. | Change the CIDR block of the subnet. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0212 | The subnet cidr is not valid. | Invalid subnet CIDR block. | Check whether the subnet CIDR block is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying a subnet | 400 | VPC.0201 | Subnet ID is invalid. | Invalid subnet ID. | Check whether the subnet ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0202 | Query subnet fail. | Failed to query the subnet. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying subnets | 400 | VPC.0201 | Query subnets list error. | Failed to query the subnets. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0202 | List subnets error. | Failed to query the subnets. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Deleting a subnet | 400 | VPC.0201 | Subnet ID is invalid. | Invalid subnet ID. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0202 | Neutron Error. | An internal error occurs in the subnet. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0206 | Subnet has been used by VPN, please remove the subnet from the VPN and try again. | The subnet cannot be deleted because it is being used by the VPN. | Delete the subnet that is used by the VPN. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0207 | Subnet does not belong to the VPC. | This operation is not allowed because the subnet does not belong to the VPC. | Check whether the subnet is in the VPC. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0208 | Subnet is used by private IP, can not be deleted. | The subnet cannot be deleted because it is being used by the private IP address. | Delete the private IP address of the subnet. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0209 | subnet is still used ,such as computer,LB. | The subnet cannot be deleted because it is being used by an ECS or load balancer. | Delete the ECS or load balancer in the subnet. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0210 | Subnet has been used by routes, please remove the routes first and try again. | The subnet cannot be deleted because it is being used by the custom route. | Delete the custom route. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0211 | subnet is still used by LBaas. | The subnet cannot be deleted because it is being used by load balancers. | Delete load balancers in the subnet. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Updating a subnet | 400 | VPC.0201 | xx is invalid. | Incorrect subnet parameters. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0202 | Neutron Error. | An internal error occurs in the subnet. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0205 | Subnet states is invalid, please try again later. | The subnet cannot be updated because it is being processed. | Try again later or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0207 | Subnet does not belong to the VPC. | This operation is not allowed because the subnet does not belong to the VPC. | Check whether the subnet is in the VPC. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Assigning an EIP | 400 | VPC.0301 | Bandwidth name or share_type is invalid. | The specified bandwidth parameter for assigning an EIP is invalid. | Check whether the specified bandwidth parameter is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0501 | Bandwidth share_type is invalid. | Invalid EIP parameters. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 403 | VPC.0502 | Tenant status is op_restricted. | You are not allowed to assign the EIP. | Check whether the account balance is insufficient or whether your account has been frozen. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0503 | Creating publicIp failed. | Failed to assign the EIP. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0504 | FloatIp is null. | Failed to assign the EIP because no IP address is found. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0508 | Port is invalid. | Port-related resources could not be found. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0510 | Floatingip has already associated with port. | The EIP has already been bound to another ECS. | Unbind the EIP from the ECS. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0511 | Port has already associated with floatingip. | The port has already been associated with an EIP. | Disassociate the port from the EIP. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0521 | Quota exceeded for resources: ['floatingip']. | Insufficient EIP quota. | Release the unbound EIPs or request to increase the EIP quota. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0522 | The IP address is in use. | The IP address is invalid or in use. | Check whether the IP address format is valid or replace it with another IP address. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0532 | No more IP addresses available on network. | Failed to assign the IP address because no IP addresses are available. | Release unbound EIPs or try again later. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying an EIP | 400 | VPC.0501 | Invalid floatingip_id. | Invalid EIP parameters. | Check whether the EIP ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0504 | Floating IP could not be found. | The EIP could not be found. | Check whether the specified EIP ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0514 | Neutron Error. | An exception occurs in the IaaS OpenStack system. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying EIPs | 400 | VPC.0501 | Invalid limit. | Invalid EIP parameters. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Releasing an EIP | 400 | VPC.0501 | Invalid param. | Invalid EIP parameters. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0504 | Floating IP could not be found. | The EIP could not be found. | Check whether the specified EIP ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0512 | Resource status is busy, try it again later. | The EIP status is abnormal. | Try again later or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0513 | getElementByKey error. | Network resources cannot be found. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0516 | Publicip is in used by ELB. | Failed to release the EIP because it is being used by a load balancer. | Unbind the EIP from the load balancer. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0517 | Floatingip has associated with port, please disassociate it firstly. | Failed to release the EIP because it is bound to an ECS. | Unbind the EIP from the ECS. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0518 | Public IP has firewall rules. | Failed to release the EIP because it is being used by a firewall. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Updating an EIP | 400 | VPC.0501 | Port id is invalid. | Invalid EIP parameters. | Check whether the port ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0504 | Floating IP could not be found. | The EIP could not be found. | Check whether the specified EIP ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0509 | Floating ip double status is invalid. | The port has already been associated with an EIP. | Disassociate the port from the EIP. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0510 | Floatingip has already associated with port. | The EIP has already been bound to another ECS. | Unbind the EIP from the ECS. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0511 | Port has already associated with floatingip. | Failed to bind the EIP to the ECS because another EIP has already been bound to the ECS. | Unbind the EIP from the ECS. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0512 | Resource status is busy, try it again later. | The EIP status is abnormal. | Try again later or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0514 | Neutron Error. | An exception occurs in the IaaS OpenStack system. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying a bandwidth | 400 | VPC.0301 | getBandwidth error bandwidthId is invalid. | The bandwidth parameters are incorrect. | Check whether the bandwidth ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0306 | No Eip bandwidth exist with id. | The bandwidth object does not exist. | The bandwidth object to be queried does not exist. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0302 | Neutron Error. | An exception occurs in the IaaS OpenStack system. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying bandwidths | 400 | VPC.0301 | Get bandwidths error limit is invalid. | The bandwidth parameters are incorrect. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0306 | No Eip bandwidth exist with id. | The bandwidth object does not exist. | The bandwidth object to be queried does not exist. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0302 | Neutron Error. | An exception occurs in the IaaS OpenStack system. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Updating a bandwidth | 400 | VPC.0301 | updateBandwidth input param is invalid. | The bandwidth parameters are incorrect. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0302 | Neutron Error. | Failed to obtain underlying resources. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0305 | updateBandwidth error. | An internal error occurs during the bandwidth update. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying quotas | 400 | VPC.1207 | resource type is invalid. | The specified resource type does not exist. | Use an existing resource type. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Assigning a private IP address | 500 | VPC.0701 | The IP has been used. | The private IP address already exists. | Change another private IP address and try again. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0705 | IP address is not a valid IP for the specified subnet. | Invalid private IP address | Check whether the specified IP address in the request body is within the subnet CIDR block. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.2204 | Query resource by id fail. | The resource does not exist or the permission is insufficient. | Check whether the specified subnet in the request body exists or the current account has the permission to query the subnet. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0703 | No more IP addresses available on network xxx. | Insufficient IP addresses. | Check whether the subnet has sufficient IP addresses. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying a Private IP Address | 404 | VPC.0704 | Query resource by id fail. | The private IP address does not exist. | Check whether the private IP address exists. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying Private IP Addresses | 400 | VPC.0702 | query privateIps error. | Invalid parameters. | Check whether the parameter values are valid based on the returned error message. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Releasing a Private IP Address | 404 | VPC.0704 | Query resource by id fail. | The private IP address does not exist. | Check whether the private IP address exists. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0706 | Delete port fail. | An error occurs when the private IP address is being released. | Try again later or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0707 | privateIp is in use. | The private IP address is in use. | Check whether the private IP address is being used by other resource. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Creating a security group | 400 | VPC.0601 | Creating securitygroup name is invalid. | The parameters of the security group are incorrect. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0602 | Add security group fail. | An internal error occurs in the security group. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 409 | VPC.0604 | Quota exceeded for resources: ['security_group']. | Insufficient security group quota. | Delete the security group that is no longer required or apply for increasing the quota. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying a security group | 400 | VPC.0601 | Securitygroup id is invalid. | The parameters of the security group are incorrect. | Check whether the security group ID is valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0602 | Query security group fail. | An internal error occurs in the security group. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.0603 | Securitygroup is not exist. | The security group does not exist. | Check whether the security group ID is correct or whether the security group exists under the tenant. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404/500 | VPC.0612 | Neutron Error. | An internal error occurs in the security group. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying security groups | 400 | VPC.0601 | Query security groups error limit is invalid. | The parameters of the security group are incorrect. | Check whether the parameter values are valid based on the returned error message and API reference document. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.0602 | Query security groups fail. | An internal error occurs in the security group. | Check whether the Neutron service is normal or contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Associating multiple NIC ports to or disassociating them from a security group at a time | 400 | VPC.0606 | Security group id is invalid | Invalid security group ID. | Use a valid security group ID. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0606 | Request is invalid | The request structure is missing. | Use a valid request body. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0606 | Request is null | The request is empty. | Use a valid request body. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0606 | Action is invalid | Invalid action value. | Use a valid action value (**add** or **remove**). | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0606 | Ports list is empty | The **ports** are an empty list. | Use a valid **ports** list. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0606 | Port id is invalid | The **ports** list contains invalid port IDs. | Use a valid **ports** list. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0609 | Ports list exceeds limit | The **ports** list contains more than 20 IDs. | Use a valid **ports** list. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.0606 | Endpoint is invalid | Invalid endpoint. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 200 | VPC.0607 | Security group of this instance doesn't exist | The security group does not exist. | Use a valid security group ID. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 200 | VPC.0607 | An instance must belong to at least one security group | Do not disassociate the instance from the security group when it is associated with only one security group. | Perform other operations. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 200 | VPC.0608 | Neutron Error | An internal error occurs when you perform batch operations. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Flow log | 400 | VPC.3001 | resource could not be found, flowlog id is invalid | Invalid parameters. | Check whether the parameters are valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.3002 | create its topic failed | An error occurred during log topic creation in LTS. | Check whether the parameters are valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.3002 | NeutronError | Failed to query the flow log. | Check whether the parameters are valid. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.3002 | NeutronError | Failed to create the flow log. | Contact technical support. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Resource tags | 400 | VPC.1801 | resource id is invalid. | Incorrect resource ID. | Use a correct resource ID. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | action is invalid. | Invalid action value. | Ensure that the value of **action** is **create** or **delete**. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag length is invalid. The key length must be in range [1,36] and value in range [0,43] | Invalid key length. The key can contain 1 to 36 characters. | Use a valid key value. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag length is invalid. The key length must be in range [1,36] and value in range [0,43] | Invalid value length. | Use a value of valid length. | +| | | | | | | +| | | | | The value can contain 0 to 43 characters. | | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Resource_type xxx is invalid. | Incorrect resource type. | Ensure that the value of **resource_type** is **vpcs**. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag can not be null. | The tag list contains value null. | Use valid tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | The list of matches contains null. | The matches list contains value null. | Use valid matches. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag value can not be null. | The tags exist, but their values are null. | Use valid tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | The value of Matches in resourceInstancesReq is null. | The matches exist, and the value is null. | Use valid matches. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | number of tags exceeds max num of 10. | The tag list contains more than 10 keys. | Use valid tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag key is repeated. | The tag list contains duplicate keys. | Use valid tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Value of tags in resourceInstancesReq is duplicate. | There are duplicate tag values in the tag list. | Use valid tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | number of tags exceeds max num of 10. | The tag in the tag list has more than 10 tag values. | Use valid tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | The key of matches is invalid. | The key in **matches** is not the resource name. | Use valid matches. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Limit in resourceInstancesReq is invalid. | Invalid **limit** or **offset** value. | Use valid **limit** and **offset** values. | +| | | | | | | +| | | | Offset in resourceInstancesReq is invalid. | | | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | ResourceInstancesReq is null or invalid. | The tags dictionary structure is missing. | Use a valid tags dictionary structure. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag length is invalid. The key length must be in range [1,36] and value in range [0,43] | The key in tags exceeds the maximum length or is left blank. | Use valid keys in tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | Tag length is invalid. The key length must be in range [1,36] and value in range [0,43] | A value in tags exceeds the maximum length. | Use valid values in tags. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | ResourceInstancesReq is null or invalid. | The matches dictionary structure is missing. | Use a valid matches dictionary structure. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | The number of Matches in resourceInstancesReq is 0. | The matches are an empty list. | Use a valid matches list. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.1801 | The value's length of Matches in resourceInstancesReq is more than 255. | The matches list contains tag values that contain more than 255 Unicode characters. | Use a valid matches list. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 500 | VPC.1801 | InvalidInput | Incorrect request body format. | Use the correct request body format. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 404 | VPC.2204 | Query subnet by id fail. | The resource does not exist or the permission is insufficient. | Use an existing resource or obtain required permission. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| Querying the network IP address usage | 400 | VPC.2301 | parameter network_id is invalid. | The request parameter is incorrect. | Enter a valid network ID. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ +| | 400 | VPC.2302 | Network xxx could not be found. | The network is not found. | Ensure that the network ID exists. | ++------------------------------------------------------------------------------------------+-------------+------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/appendix/icmp-port_range_relationship_table.rst b/api-ref/source/appendix/icmp-port_range_relationship_table.rst new file mode 100644 index 0000000..716046d --- /dev/null +++ b/api-ref/source/appendix/icmp-port_range_relationship_table.rst @@ -0,0 +1,32 @@ +:original_name: vpc_api_0009.html + +.. _vpc_api_0009: + +ICMP-Port Range Relationship Table +================================== + +==================== ============== ============== +ICMP Type port_range_min port_range_max +==================== ============== ============== +Any NULL NULL +Echo 8 0 +Echo reply 0 0 +Fragment need DF set 3 4 +Host redirect 5 1 +Host TOS redirect 5 3 +Host unreachable 3 1 +Information reply 16 0 +Information request 15 0 +Net redirect 5 0 +Net TOS redirect 5 2 +Net unreachable 3 0 +Parameter problem 12 0 +Port unreachable 3 3 +Protocol unreachable 3 2 +Reassembly timeout 11 1 +Source quench 4 0 +Source route failed 3 5 +Timestamp reply 14 0 +Timestamp request 13 0 +TTL exceeded 11 0 +==================== ============== ============== diff --git a/api-ref/source/appendix/index.rst b/api-ref/source/appendix/index.rst new file mode 100644 index 0000000..dc99c7c --- /dev/null +++ b/api-ref/source/appendix/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_api_0007.html + +.. _vpc_api_0007: + +Appendix +======== + +- :ref:`ICMP-Port Range Relationship Table ` +- :ref:`VPC Monitoring Metrics ` +- :ref:`Status Codes ` +- :ref:`Error Codes ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + icmp-port_range_relationship_table + vpc_monitoring_metrics + status_codes + error_codes diff --git a/api-ref/source/appendix/status_codes.rst b/api-ref/source/appendix/status_codes.rst new file mode 100644 index 0000000..b67c9d1 --- /dev/null +++ b/api-ref/source/appendix/status_codes.rst @@ -0,0 +1,52 @@ +:original_name: vpc_api_0002.html + +.. _vpc_api_0002: + +Status Codes +============ + +.. table:: **Table 1** Normal values + + +----------------------+------------+-----------------------------------------------------------------------------------------+ + | Normal Response Code | Type | Description | + +======================+============+=========================================================================================+ + | 200 | OK | Specifies the normal response code for the GET, PUT, and POST operations. | + +----------------------+------------+-----------------------------------------------------------------------------------------+ + | 201 | Created | Specifies the normal response code for the POST operation of the OpenStack Neutron API. | + +----------------------+------------+-----------------------------------------------------------------------------------------+ + | 204 | No Content | Specifies the normal response code for the DELETE operation. | + +----------------------+------------+-----------------------------------------------------------------------------------------+ + +.. table:: **Table 2** Abnormal values + + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | Returned Value | Description | + +===================================+============================================================================================+ + | 400 Bad Request | The server failed to process the request. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 401 Unauthorized | You must enter a username and password to access the requested page. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 403 Forbidden | You are forbidden to access the requested page. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 404 Not Found | The server could not find the requested page. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 405 Method Not Allowed | You are not allowed to use the method specified in the request. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 406 Not Acceptable | The response generated by the server could not be accepted by the client. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 407 Proxy Authentication Required | You must use the proxy server for authentication so that the request can be processed. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 408 Request Timeout | The request timed out. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 409 Conflict | The request could not be processed due to a conflict. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 500 Internal Server Error | Failed to complete the request because of an internal service error. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 501 Not Implemented | Failed to complete the request because the server does not support the requested function. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 502 Bad Gateway | Failed to complete the request because the server has received an invalid response. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 503 Service Unavailable | Failed to complete the request because the service is unavailable. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ + | 504 Gateway Timeout | A gateway timeout error occurred. | + +-----------------------------------+--------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/appendix/vpc_monitoring_metrics.rst b/api-ref/source/appendix/vpc_monitoring_metrics.rst new file mode 100644 index 0000000..0b714de --- /dev/null +++ b/api-ref/source/appendix/vpc_monitoring_metrics.rst @@ -0,0 +1,51 @@ +:original_name: vpc_api_0010.html + +.. _vpc_api_0010: + +VPC Monitoring Metrics +====================== + +Description +----------- + +This section describes monitoring metrics reported by VPC to Cloud Eye as well as their namespaces and dimensions. You can use APIs provided by Cloud Eye to query the monitoring metrics of the monitored object and alarms generated for VPC. + +Namespace +--------- + +SYS.VPC + +Metrics +------- + +.. table:: **Table 1** EIP and bandwidth metrics + + +----------------------+--------------------+-------------------------------------------------+-------------+------------------+--------------------------------+ + | ID | Name | Description | Value Range | Monitored Object | Monitoring Interval (Raw Data) | + +======================+====================+=================================================+=============+==================+================================+ + | upstream_bandwidth | Outbound Bandwidth | Network rate of outbound traffic | ≥ 0 bit/s | Bandwidth or EIP | 1 minute | + | | | | | | | + | | | Unit: bit/s | | | | + +----------------------+--------------------+-------------------------------------------------+-------------+------------------+--------------------------------+ + | downstream_bandwidth | Inbound Bandwidth | Network rate of inbound traffic | ≥ 0 bit/s | Bandwidth or EIP | 1 minute | + | | | | | | | + | | | Unit: bit/s | | | | + +----------------------+--------------------+-------------------------------------------------+-------------+------------------+--------------------------------+ + | up_stream | Outbound Traffic | Network traffic going out of the cloud platform | ≥ 0 bytes | Bandwidth or EIP | 1 minute | + | | | | | | | + | | | Unit: byte | | | | + +----------------------+--------------------+-------------------------------------------------+-------------+------------------+--------------------------------+ + | down_stream | Inbound Traffic | Network traffic going into the cloud platform | ≥ 0 bytes | Bandwidth or EIP | 1 minute | + | | | | | | | + | | | Unit: byte | | | | + +----------------------+--------------------+-------------------------------------------------+-------------+------------------+--------------------------------+ + +Dimension +--------- + +============ ============ +Key Value +============ ============ +publicip_id EIP ID +bandwidth_id Bandwidth ID +============ ============ diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst new file mode 100644 index 0000000..a5de736 --- /dev/null +++ b/api-ref/source/change_history.rst @@ -0,0 +1,263 @@ +:original_name: vpc_api_0012.html + +.. _vpc_api_0012: + +Change History +============== + ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Released On | Description | ++===================================+=============================================================================================================================================================================================================================================================================================================================================================================================================+ +| 2022-06-25 | This release incorporates the following changes: | +| | | +| | - Modified the load balancer types applicable to the **5_gray** type in :ref:`Assigning an EIP `, :ref:`Querying an EIP `, :ref:`Querying EIPs `, and :ref:`Updating an EIP `. | +| | - Modified the load balancer types applicable to the **5_gray** type in :ref:`Querying a Bandwidth `, :ref:`Querying Bandwidths `, and :ref:`Updating a Bandwidth `. | +| | - Modified the load balancer types applicable to the **5_gray** type in :ref:`Assigning a Shared Bandwidth ` and :ref:`Adding an EIP to a Shared Bandwidth `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2022-03-03 | This release incorporates the following changes: | +| | | +| | Added descriptions of parameters **private_ip_address** and **port_id** in :ref:`Querying an EIP `, :ref:`Querying EIPs `, and :ref:`Updating an EIP `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2022-02-15 | This release incorporates the following changes: | +| | | +| | - Added **5_gray** to the value range of parameter **type** in sections :ref:`Assigning an EIP `, :ref:`Querying an EIP `, :ref:`Querying EIPs `, and :ref:`Updating an EIP `. | +| | - Added **5_gray** to the value range of parameter **publicip_type** and **gray** for parameter **bandwidth_type** in sections :ref:`Querying a Bandwidth ` and :ref:`Querying Bandwidths `. | +| | - Added **5_gray** to the value range of parameter **publicip_type** in sections :ref:`Updating a Bandwidth `, :ref:`Assigning a Shared Bandwidth `, and :ref:`Adding an EIP to a Shared Bandwidth `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-08-25 | This release incorporates the following changes: | +| | | +| | - Modified the description about parameter **updated_at** and added parameters **billing_info** and **enterprise_project_id** in :ref:`Bandwidth ` and :ref:`Bandwidth (V2.0) `. | +| | - Changed the value range of **type** in :ref:`Querying Quotas `. | +| | - Added parameter **remote_address_group_id** to sections :ref:`Security Group ` and :ref:`Security Group `. | +| | - Deleted parameters **ipv6_address_mode** and **ipv6_ra_mode** from :ref:`Subnet `. | +| | - Added parameter **enterprise_project_id** to section :ref:`Elastic IP `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-06-22 | This release incorporates the following changes: | +| | | +| | - Added parameter **profile** to sections :ref:`Querying an EIP `, :ref:`Querying EIPs `, and :ref:`Updating an EIP `. | +| | - Changed the value range of the **size** parameter to 1 Mbit/s to 1000 Mbit/s in :ref:`Querying Bandwidths `, :ref:`Updating a Bandwidth `, and :ref:`Removing an EIP from a Shared Bandwidth `. | +| | - Changed the value range of the **size** parameter to 5 Mbit/s to 1000 Mbit/s in :ref:`Assigning a Shared Bandwidth ` and :ref:`Adding an EIP to a Shared Bandwidth `. | +| | - Updated response examples in sections :ref:`Querying a Bandwidth `, :ref:`Querying Bandwidths `, :ref:`Updating a Bandwidth `, :ref:`Assigning a Shared Bandwidth `, and :ref:`Adding an EIP to a Shared Bandwidth `. | +| | - Changed the parameter of **binding:vif_details** to **primary_interface** in sections :ref:`Querying Ports `, :ref:`Querying a Port `, :ref:`Creating a Port `, and :ref:`Updating a Port `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-05-25 | This release incorporates the following changes: | +| | | +| | - Added parameter **id** to the **bandwidth** field in section :ref:`Assigning an EIP `. | +| | - Added parameter **ip_version** to sections :ref:`Elastic IP `, :ref:`Bandwidth `, and :ref:`Bandwidth (V2.0) `. | +| | - Added parameter **bandwidth_name** to section :ref:`Elastic IP `. | +| | - Deleted description about IP address version conversion from section :ref:`Updating an EIP `. | +| | - Added parameters **created_at**, **updated_at**, **enable_bandwidth_rules**, **rule_quota**, and **bandwidth_rules** in sections :ref:`Bandwidth ` and :ref:`Assigning a Shared Bandwidth `. | +| | - Added value **share** to the value range of parameter **bandwidth_type** in section :ref:`Bandwidth `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-05-10 | This release incorporates the following changes: | +| | | +| | - Added description that the IP addresses reserved by the system cannot be obtained using APIs in :ref:`Querying Private IP Address Details `. | +| | - Moved :ref:`Error Codes ` and :ref:`Status Codes ` to :ref:`Appendix `. | +| | - Added a value for the **type** parameter of the **publicip** field in section :ref:`Elastic IP ` and :ref:`Bandwidth `. | +| | - Added **WHOLE** to the value range of parameter **share_type** in section :ref:`Bandwidth `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2021-03-16 | This release incorporates the following changes: | +| | | +| | Added description that leaving parameter **port_id** blank cannot be used to unbind an EIP from a dedicated load balancer in sections :ref:`Updating an EIP ` and :ref:`Updating a Floating IP Address `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-12-16 | This release incorporates the following changes: | +| | | +| | - Modified the value range of **cidr** in section :ref:`Virtual Private Cloud `. | +| | - Changed the maximum number of tags in sections :ref:`Querying VPCs by Tag ` and :ref:`Querying Subnets by Tag `. | +| | - Added fields **port_security_enabled**, **dns_name**, and **dns_assignment** to section :ref:`Port `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-06-30 | This release incorporates the following changes: | +| | | +| | - Added the **routes** field in section :ref:`Updating VPC Information `. | +| | - Added field **index_enabled** in section :ref:`VPC Flow Log `. | +| | - Modified URI parameters in sections :ref:`Querying Security Group Rule Details ` and :ref:`Deleting a Security Group Rule `. | +| | - Modified description of the **tenant_id** field in section :ref:`Creating a VPC Peering Connection `. | +| | - Modified the **network_ip_availability** parameter type in section :ref:`Querying IP Address Usage on a Specified Network `. | +| | - Modified the **networks** parameter type in section :ref:`Querying Networks `. | +| | - Added response parameter **project_id** in sections :ref:`Adding an Interface to a Router ` and :ref:`Removing an Interface from a Router `. | +| | - Added the **device_owner** field in section :ref:`Creating a Port `. | +| | - Added information about whether the **allow_address_pair** and **extra_dhcp_opt** fields are mandatory in section :ref:`Updating a Port `. | +| | - Added or modified the **ports_links**, **binding:profile**, and **binding:vif_details** fields in section :ref:`Port `. | +| | - Added the **networks_links** field in section :ref:`Network `. | +| | - Added the **subnets_links** field in section :ref:`Subnet `. | +| | - Added the **routers_links** field in section :ref:`Router `. | +| | - Added or modified the **firewall_rules_links** and **firewall_policies** fields in section :ref:`Firewall `. | +| | - Modified the URI in sections :ref:`Querying a Security Group Rule ` and :ref:`Deleting a Security Group Rule `. | +| | - Added the **tenant_id** field in sections :ref:`Creating a Security Group ` and :ref:`Querying Security Group Rule Details `. | +| | - Added the **peerings_link** object in section :ref:`Querying VPC Peering Connections `. | +| | - Added the **routes_link** object in section :ref:`Querying VPC Routes `. | +| | - Added the **fixed_ip** field in section :ref:`Creating a Port `. | +| | - Added the **firewall_policies_link** object in section :ref:`Querying Firewall Policies `. | +| | - Added the **project_id** field in sections :ref:`Inserting a Firewall Rule ` and :ref:`Removing a Firewall Rule `. | +| | - Added the **created_at** and **updated_at** fields in sections :ref:`Querying Firewall Groups `, :ref:`Querying a Firewall Group `, :ref:`Creating a Firewall Group `, and :ref:`Updating a Firewall Group `. | +| | - Added the **firewall_groups_link** object in section :ref:`Querying Firewall Groups `. | +| | - Changed the position of the section :ref:`Permissions Policies and Supported Actions ` and adjusted the table. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-04-13 | This release incorporates the following changes: | +| | | +| | - Modified description of parameters in the **security_group_rule** field in section :ref:`Creating a Security Group Rule `. | +| | - Added URI parameter description in :ref:`Port `, :ref:`Network `, :ref:`Querying Subnets `, :ref:`Querying Routers `, :ref:`Firewall `, and :ref:`Security Group `. | +| | - Added description of discarding **vpc_id** in section :ref:`Creating a Security Group `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-03-20 | This release incorporates the following changes: | +| | | +| | Added the value of **5_mailbgp** for parameters **type** and **publicip_type** | +| | | +| | in sections :ref:`Assigning an EIP `, :ref:`Bandwidth `, and :ref:`Bandwidth (V2.0) `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2020-02-25 | This release incorporates the following changes: | +| | | +| | - Added section :ref:`Bandwidth (V2.0) `. | +| | - Added :ref:`Bandwidth (V2.0) ` in section :ref:`Permissions Policies and Supported Actions `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2019-09-10 | This release incorporates the following changes: | +| | | +| | - Added APIs described in section :ref:`VPC Flow Log ` and VPC flow log error codes to section :ref:`Error Codes `. | +| | - Modified the description of the **charge_mode** field and its value in the response example in :ref:`Bandwidth `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-11-30 | This release incorporates the following changes: | +| | | +| | - Added the **extra_dhcp_opts** field in sections :ref:`Creating a Subnet `, :ref:`Querying Subnet Details `, :ref:`Querying Subnets `, and :ref:`Updating Subnet Information `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-10-22 | This release incorporates the following changes: | +| | | +| | - Added sections :ref:`APIs ` and :ref:`Native OpenStack Neutron APIs (V2.0) ` and categorized VPC APIs and native OpenStack APIs. | +| | - Deleted description about the **Reject** rule from section :ref:`Updating a Firewall Rule `. | +| | - Added the **project_id**, **created_at**, and **updated_at** fields to and modified the example request and response in sections :ref:`Port `, :ref:`Network `, :ref:`Subnet `, :ref:`Router `, :ref:`Floating IP Address `, :ref:`Firewall `, and :ref:`Security Group `. | +| | - Modified the API format to ensure consistency. | +| | - Modified description about the **tenant_id** and **project_id** fields to ensure consistency. | +| | - Added section :ref:`VPC Peering Connection ` under **API Permissions**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-10-12 | This release incorporates the following changes: | +| | | +| | - Added section :ref:`Querying a Specified API Version `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-09-04 | This release incorporates the following changes: | +| | | +| | - Modified the response example in section :ref:`Associating Multiple NIC Ports to or Disassociating Them from a Security Group at a Time `. | +| | - Added error messages for associating multiple NIC ports to or disassociating them from a security group at a time in section :ref:`Error Codes `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-08-30 | This release incorporates the following changes: | +| | | +| | - Added section :ref:`Associating Multiple NIC Ports to or Disassociating Them from a Security Group at a Time `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-07-30 | This release incorporates the following changes: | +| | | +| | - Added section :ref:`Permissions Policies and Supported Actions `. | +| | - Deleted sections related to VPNs. An independent VPN API reference will be provided. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-06-11 | This release incorporates the following changes: | +| | | +| | - Modified VPC tagging description in section :ref:`Querying VPC Tags in a Specified Project `. | +| | - Modified subnet tagging description in section :ref:`Querying Subnet Tags in a Specified Project `. | +| | - Modified EIP tagging description in section :ref:`Querying EIP Tags in a Specified Project `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-04-28 | This release incorporates the following changes: | +| | | +| | - Opened APIs described in section :ref:`Floating IP Address (IPv6) `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-03-30 | This release incorporates the following changes: | +| | | +| | - Added section :ref:`Querying API Versions `. | +| | - Modified the content in section :ref:`VPC Tag Management `. | +| | - Added section :ref:`Subnet Tag Management `. | +| | - Added section :ref:`EIP Tag Management `. | +| | - Added metrics **Upstream Traffic** and **Downstream Traffic** in section :ref:`VPC Monitoring Metrics `. | +| | - Modified the content in section :ref:`API Usage Guidelines `. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-02-28 | This release incorporates the following changes: | +| | | +| | - Modified the URI and description in the API format in section :ref:`Querying VPC Peering Connections `. | +| | - Modified the URI and description in the API format in section :ref:`Querying VPC Routes `. | +| | - Modified the response parameters and parameter examples in section :ref:`Accepting a VPC Peering Connection `. | +| | - Modified the response parameters and parameter examples in section :ref:`Refusing a VPC Peering Connection `. | +| | - Provided the address for downloading the sample code in section **Sample Code**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-02-14 | This release incorporates the following changes: | +| | | +| | - Modified the title of section **VPN (Native OpenStack API)**. | +| | - Linked the error codes in subsections of **VPN (Native OpenStack API)** to **Error Codes**. | +| | - Linked the error codes in subsection :ref:`Subnet Pool ` to :ref:`Status Codes `. | +| | - Linked the error codes in the tag management sections. | +| | - Adjusted the sequence of subsections under :ref:`Subnet Pool `. | +| | - Modified the description of parameters **share_type** and **charge_mode** in the **bandwidth** field in section :ref:`Assigning an EIP `. | +| | - Added the example request in section **Creating a VPN Service**. | +| | - Added the example request and example response in section **Querying VPN Endpoint Groups**. | +| | - Added the example request in section **Querying Details About a VPN Service**. | +| | - Modified the example response in section **Deleting an IKE Policy**. | +| | - Added the example request in section **Deleting a VPN Service**. | +| | - Added the example request in section **Querying Details About an IKE Policy**. | +| | - Added the example response in section **Querying Details About a VPN Endpoint Group**. | +| | - Added the example response in section **Querying Details About a VPN Service**. | +| | - Added the example response in section **Updating an IPsec Policy**. | +| | - Added the example response in section **Updating a VPN Service**. | +| | - Modified the example request and example response in section **Updating an IPsec VPN Connection**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2018-01-30 | This release incorporates the following changes: | +| | | +| | - Deleted the section **Port**. | +| | - Added section **VPN (Native OpenStack API)**. | +| | - Added section **Subnet Pool (Native OpenStack API)**. | +| | - Added parameters **dns_name** and **dns_domain** in the floating IP address object table in section **Floating IP Address (Native OpenStack API)**. | +| | - Added parameters **dns_name** and **dns_assignment** in the **port object** table in section **Port (Native OpenStack API)** > **Overview**. | +| | - Added the parameter **dns_domain** in the **network object** table in section **Network (Native OpenStack API)** > **Overview**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-11-30 | This release incorporates the following changes: | +| | | +| | - Added parameter **port_security_enable** in section **Creating a Subnet**. | +| | - Modified the **port_id** parameter description in the **publicip** fields in section **Binding or Unbinding an EIP** under **Elastic IP Address**. | +| | - Updated the **device_owner** parameter description in the **port object** table in section **Port (Native OpenStack API)** > **Overview**. | +| | - Added the **min** parameter to the **resources** field in the response in section **Querying Quotas**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-09-30 | This release incorporates the following changes: | +| | | +| | - Deleted the **ip_version** field from the **floatingip** object, request parameter, and response parameter in section **Floating IP Address (Native OpenStack API)**. | +| | - Added section **VPC Peering Connection**. | +| | - Added section **VPC Route**. | +| | - Added a filter field to the URI of the APIs in sections **Querying Ports** and **Querying VPC Routes**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-08-30 | This release incorporates the following changes: | +| | | +| | Updated description in section **Updating a Network** under **Network (Native OpenStack API)**. | +| | | +| | - Added section **Elastic IP Address V2.0 (Extended OpenStack API)**. | +| | - Deleted the **ip_version** field from the **floatingip** object, request parameter, and response parameter in section **Floating IP Address (Native OpenStack API)**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-07-30 | This release incorporates the following changes: | +| | | +| | - Changed the allowed maximum subnet mask value to 28 for CIDR blocks in the **subnet** object in section **Overview** under **Subnet (Native OpenStack API)**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-06-30 | This release incorporates the following changes: | +| | | +| | - Changed the **CRUD** value of parameter **router_id** to **R** for the **Floating IP address** object in section **Overview** under **Floating IP Address (Native OpenStack API)**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-05-30 | Added the following sections: | +| | | +| | - Network (Native OpenStack API) | +| | - Router (Native OpenStack API) | +| | - Floating IP Address (Native OpenStack API) | +| | - firewall (Native OpenStack API) | +| | - Security Group (Native OpenStack API) | +| | - Modified the request URI in section **Security Group**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2017-04-28 | This release incorporates the following changes: | +| | | +| | - Added monitoring metrics **up_stream** and **down_stream**. | +| | - Added field **dnsList** for APIs used to create a subnet, query a subnet, query subnets, and update a subnet. | +| | - Changed the bandwidth size value to 1 Mbit/s to 500 Mbit/s in sections **Elastic IP Address** and **Bandwidth**. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2016-10-29 | This release incorporates the following changes: | +| | | +| | - Added the **ip_address** field to enable users to obtain a specified EIP. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2016-06-02 | This release incorporates the following changes: | +| | | +| | Changed the **ethertype** field for creating a security group rule to an optional field. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2016-04-14 | This release incorporates the following changes: | +| | | +| | - Modified the URL parameter description in section **Service Usage**. | +| | - Modified the procedure for making API calls for token authentication. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2016-03-09 | This issue is the first official release. | ++-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index f0f56eb..231e537 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -2,3 +2,12 @@ Virtual Private Cloud - API Reference ===================================== +.. toctree:: + :maxdepth: 1 + + api_usage_guidelines + apis/index + native_openstack_neutron_apis_v2.0/index + permissions_policies_and_supported_actions/index + appendix/index + change_history diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/index.rst new file mode 100644 index 0000000..e6a436a --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/index.rst @@ -0,0 +1,18 @@ +:original_name: vpc_version_0000.html + +.. _vpc_version_0000: + +API Version Information +======================= + +- :ref:`Querying API Versions ` +- :ref:`Querying a Specified API Version ` +- :ref:`Pagination ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_api_versions + querying_a_specified_api_version + pagination diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/pagination.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/pagination.rst new file mode 100644 index 0000000..05ba1d1 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/pagination.rst @@ -0,0 +1,149 @@ +:original_name: vpc_version_0003.html + +.. _vpc_version_0003: + +Pagination +========== + +Function +-------- + +Neutron APIs v2.0 provides the pagination function. You can set parameters **limit** and **marker** in the URL to enable the desired number of items to be returned. All returned items are displayed in the ascending order of ID. + +- To access the next page of the request, perform the following configurations: + + - Replace the value of **marker** in the original access request URL. Replace the value of **marker** to the value of **marker** in the value of **herf** if the value of **rel** in the response is **next**. + - Set the value of **page_reverse** to **False**. + +- To access the previous page of the request, perform the following configurations: + + - Replace the value of **marker** in the original access request URL. Replace the value of **marker** to the value of **marker** in the value of **herf** if the value of **rel** in the response is **previous**. + - Set the value of **page_reverse** to **True**. + +Request Message +--------------- + +Request parameter + +.. table:: **Table 1** Request parameter + + +--------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +==============+=========+===========+==========================================================================================================================+ + | limit | Integer | No | Specifies the number of items displayed per page. | + +--------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------+ + | marker | String | No | Specifies the ID of the last item in the previous list. If the marker value is invalid, error code 400 will be returned. | + +--------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------+ + | page_reverse | Boolean | No | Specifies the page direction. The value can be **True** or **False**. | + +--------------+---------+-----------+--------------------------------------------------------------------------------------------------------------------------+ + +Example request 1 + +.. code-block:: text + + GET https://{Endpoint}/v2.0/networks?limit=2&marker=3d42a0d4-a980-4613-ae76-a2cddecff054&page_reverse=False + +Example request 2 + +.. code-block:: text + + GET https://{Endpoint}/v2.0/vpc/peerings?limit=2&marker=e5a0c88e-228e-4e62-a8b0-90825b1b7958&page_reverse=True + +Response Message +---------------- + +Response parameter + +None + +Example response 1 + +.. code-block:: + + { + "networks": [ + { + "status": "ACTIVE", + "subnets": [], + "name": "liudongtest ", + "admin_state_up": false, + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "id": "60c809cb-6731-45d0-ace8-3bf5626421a9" + }, + { + "status": "ACTIVE", + "subnets": [ + "132dc12d-c02a-4c90-9cd5-c31669aace04" + ], + "name": "publicnet", + "admin_state_up": true, + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "id": "9daeac7c-a98f-430f-8e38-67f9c044e299" + } + ], + "networks_links": [ + { + "href": "http://192.168.82.231:9696/v2.0/networks?limit=2&marker=9daeac7c-a98f-430f-8e38-67f9c044e299", + "rel": "next" + }, + { + "href": "http://192.168.82.231:9696/v2.0/networks?limit=2&marker=60c809cb-6731-45d0-ace8-3bf5626421a9&page_reverse=True", + "rel": "previous" + } + ] + } + +Example response 2 + +.. code-block:: + + { + "peerings_links": [ + { + "marker": "dd442819-5638-401c-bd48-a82703cf0464", + "rel": "next" + }, + { + "marker": "1e13cbaf-3ce4-413d-941f-66d855dbfa7f", + "rel": "previous" + } + ], + "peerings": [ + { + "status": "ACTIVE", + "accept_vpc_info": { + "vpc_id": "83a48834-b9bc-4f70-aa46-074568594650", + "tenant_id": "e41a43bf06e249678413c6d61536eff9" + }, + "request_vpc_info": { + "vpc_id": "db8e7687-e43b-4fc1-94cf-16f69f484d6d", + "tenant_id": "e41a43bf06e249678413c6d61536eff9" + }, + "name": "peering1", + "id": "1e13cbaf-3ce4-413d-941f-66d855dbfa7f" + }, + { + "status": "ACTIVE", + "accept_vpc_info": { + "vpc_id": "83a48834-b9bc-4f70-aa46-074568594650", + "tenant_id": "e41a43bf06e249678413c6d61536eff9" + }, + "request_vpc_info": { + "vpc_id": "bd63cc9e-e7b8-4d4e-a0e9-055031470ffc", + "tenant_id": "e41a43bf06e249678413c6d61536eff9" + }, + "name": "peering2", + "id": "dd442819-5638-401c-bd48-a82703cf0464" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/querying_a_specified_api_version.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/querying_a_specified_api_version.rst new file mode 100644 index 0000000..85a403b --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/querying_a_specified_api_version.rst @@ -0,0 +1,129 @@ +:original_name: vpc_version_0002.html + +.. _vpc_version_0002: + +Querying a Specified API Version +================================ + +Function +-------- + +This API is used to query the version of a specified API. + +URI +--- + +GET /{api_version} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_version_0002__table8488410142319: + +.. table:: **Table 1** Parameter description + + =========== ====== =================================================== + Parameter Type Description + =========== ====== =================================================== + api_version String Specifies the version number, for example **v2.0**. + =========== ====== =================================================== + +Request Message +--------------- + +- Request parameter + + None + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0 + +Response Message +---------------- + +- Response parameter + + .. table:: **Table 2** Response parameter + + +-----------+-------------------------------------------------------------------------+-----------------------------------------+ + | Parameter | Type | Description | + +===========+=========================================================================+=========================================+ + | resources | Array of :ref:`resource ` objects | Specifies the **resource** object list. | + +-----------+-------------------------------------------------------------------------+-----------------------------------------+ + + .. _vpc_version_0002__table1195920258372: + + .. table:: **Table 3** **resource** object + + +------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+=====================================================================+==================================================================================================+ + | name | String | Specifies the resource name. | + +------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | collection | String | Specifies the resource collection name. | + +------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | links | Array of :ref:`link ` objects | Specifies the link list. For details, see :ref:`Table 4 `. | + +------------+---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + + .. _vpc_version_0002__table4442151110172: + + .. table:: **Table 4** **link** objects + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +- Example response + + .. code-block:: + + { + "resources": [ + { + "links": [ + { + "href": "https://vpc.systems.com/v2.0/subnets", + "rel": "self" + } + ], + "name": "subnet", + "collection": "subnets" + }, + { + "links": [ + { + "href": "https://vpc.systems.com/v2.0/networks", + "rel": "self" + } + ], + "name": "network", + "collection": "networks" + }, + { + "links": [ + { + "href": "https://vpc.systems.com/v2.0/ports", + "rel": "self" + } + ], + "name": "port", + "collection": "ports" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/querying_api_versions.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/querying_api_versions.rst new file mode 100644 index 0000000..9ce7c19 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/api_version_information/querying_api_versions.rst @@ -0,0 +1,101 @@ +:original_name: vpc_version_0001.html + +.. _vpc_version_0001: + +Querying API Versions +===================== + +Function +-------- + +This API is used to query all available versions of a native OpenStack API. + +URI +--- + +GET / + +Request Message +--------------- + +Request parameter + +None + +Example request + +.. code-block:: text + + GET https://{Endpoint}/ + +Response Message +---------------- + +Response parameter + +.. table:: **Table 1** Response parameter + + +-----------+------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========================================================================+=========================================================================================================+ + | versions | Array of :ref:`version ` objects | Specifies the API version list. For details, see :ref:`Table 2 `. | + +-----------+------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_version_0001__table7472653181512: + +.. table:: **Table 2** **version** objects + + +-----------------------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+===================================================================+================================================================================================+ + | status | String | Specifies the API version status. Possible values are as follows: | + | | | | + | | | - **CURRENT** | + | | | - **STABLE** | + | | | - **DEPRECATED** | + +-----------------------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the API version. | + +-----------------------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + | links | Array of :ref:`link ` objects | Specifies the link list. For details, see :ref:`Table 3 `. | + +-----------------------+-------------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + +.. _vpc_version_0001__table62331111162: + +.. table:: **Table 3** **link** objects + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +Example response + +.. code-block:: + + { + "versions": [ + { + "status": "CURRENT", + "id": "v2.0", + "links": [ + { + "href": "https://None/v2.0", + "rel": "self" + } + ] + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_group.rst new file mode 100644 index 0000000..468d956 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_group.rst @@ -0,0 +1,156 @@ +:original_name: vpc_firewall_0015.html + +.. _vpc_firewall_0015: + +Creating a Firewall Group +========================= + +Function +-------- + +This API is used to create a firewall group. + +URI +--- + +POST /v2.0/fwaas/firewall_groups + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +----------------+-------------------------------------------------------------------------+-----------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +================+=========================================================================+===========+=========================================================================================================+ + | firewall_group | :ref:`firewall_group `\ object | Yes | Specifies the firewall group. For details, see :ref:`Table 2 `. | + +----------------+-------------------------------------------------------------------------+-----------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0015__table31629250121127: + +.. table:: **Table 2** **Firewall Group** objects + + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +============================+=================+==================+==============================================================+ + | name | No | String | Specifies the name of the firewall group. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the firewall group. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | ingress_firewall_policy_id | No | String | Specifies the firewall policy for inbound traffic. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | egress_firewall_policy_id | No | String | Specifies the firewall policy for outbound traffic. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | ports | No | Array of strings | Specifies the list of ports bound with the firewall group. | + | | | | | + | | | | The value must be the port ID of the distributed router. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status of the firewall. | + | | | | | + | | | | The value can be **true** or **false**. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+========================================================================+========================================================================================================+ + | firewall_group | :ref:`firewall_group `\ object | Specifies the firewall group. For details, see :ref:`Table 4 `. | + +----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0015__table7886851182616: + +.. table:: **Table 4** **Firewall Group** objects + + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +============================+=======================+===========================================================================+ + | id | String | Specifies the UUID of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ingress_firewall_policy_id | String | Specifies the firewall policy for inbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | egress_firewall_policy_id | String | Specifies the firewall policy for outbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ports | Array of strings | Specifies the list of ports bound with the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | status | String | Specifies the status of the firewall policy. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status of the firewall. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the resource is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the resource is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/fwaas/firewall_groups + + { + "firewall_group": { + "ingress_firewall_policy_id": "afc52ce9-5305-4ec9-9feb-44feb8330341", + "ports": [ + "c133f2bf-6937-4416-bb17-012e1be5cd2d" + ] + } + } + +Example response + +.. code-block:: + + { + "firewall_group": { + "status": "PENDING_CREATE", + "public": false, + "egress_firewall_policy_id": null, + "name": "", + "admin_state_up": true, + "ports": [ + "c133f2bf-6937-4416-bb17-012e1be5cd2d" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "id": "0415f554-26ed-44e7-a881-bdf4e6216e38", + "ingress_firewall_policy_id": "afc52ce9-5305-4ec9-9feb-44feb8330341", + "description": "", + "project_id": "23c8a121505047b6869edf39f3062712", + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_policy.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_policy.rst new file mode 100644 index 0000000..c4d837c --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_policy.rst @@ -0,0 +1,131 @@ +:original_name: vpc_firewall_0008.html + +.. _vpc_firewall_0008: + +Creating a Firewall Policy +========================== + +Function +-------- + +This API is used to create a firewall policy. + +URI +--- + +POST /v2.0/fwaas/firewall_policies + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+--------------------------------------------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+==========================================================================+===========+==========================================================================================================+ + | firewall_policy | :ref:`firewall_policy `\ object | Yes | Specifies the firewall policy. For details, see :ref:`Table 2 `. | + +-----------------+--------------------------------------------------------------------------+-----------+----------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0008__table17002720121127: + +.. table:: **Table 2** **Firewall Policy** objects + + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+==================+=================================================================+ + | name | No | String | Specifies the name of the firewall policy. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the firewall policy. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | firewall_rules | No | Array of strings | Specifies the firewall rules referenced by the firewall policy. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | audited | No | Boolean | Specifies the audit flag. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +-----------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+=========================================================================+=========================================================================================================+ + | firewall_policy | :ref:`firewall_policy `\ object | Specifies the firewall policy. For details, see :ref:`Table 4 `. | + +-----------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0008__table6763048152111: + +.. table:: **Table 4** **Firewall Policy** objects + + +----------------+------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +================+==================+===========================================================================+ + | id | String | Specifies the UUID of the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------+------------------+---------------------------------------------------------------------------+ + | firewall_rules | Array of strings | Specifies the firewall rules referenced by the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | audited | Boolean | Specifies the audit flag. | + +----------------+------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------+------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------+------------------+---------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/fwaas/firewall_policies + + { + "firewall_policy": { + "name": "test-policy", + "firewall_rules": [ + "b8243448-cb3c-496e-851c-dadade4c161b" + ] + } + } + +Example response + +.. code-block:: + + { + "firewall_policy": { + "description": "", + "firewall_rules": [ + "b8243448-cb3c-496e-851c-dadade4c161b" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "2fb0e81f-9f63-44b2-9894-c13a3284594a", + "audited": false, + "name": "test-policy", + "project_id": "23c8a121505047b6869edf39f3062712" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_rule.rst new file mode 100644 index 0000000..ac958f2 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/creating_a_firewall_rule.rst @@ -0,0 +1,170 @@ +:original_name: vpc_firewall_0003.html + +.. _vpc_firewall_0003: + +Creating a Firewall Rule +======================== + +Function +-------- + +This API is used to create a firewall rule. + +URI +--- + +POST /v2.0/fwaas/firewall_rules + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +---------------+-----------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===============+===========+======================================================================+================================================================================================================+ + | firewall_rule | Yes | :ref:`firewall_rule ` object | Specifies the firewall rule objects. For details, see :ref:`Table 2 `. | + +---------------+-----------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0003__table38646929121127: + +.. table:: **Table 2** **Firewall Rule** objects + + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Constraint | Description | + +========================+=============+=============+==============================================================================================+==============================================================================================+ + | name | No | String | The value can contain a maximum of 255 characters. | Specifies the firewall rule name. | + | | | | | | + | | | | | The value can contain a maximum of 255 characters. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | description | No | String | The value can contain a maximum of 255 characters. | Provides supplementary information about the firewall rule. | + | | | | | | + | | | | | The value can contain a maximum of 255 characters. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | protocol | No | String | The value can be **TCP**, **UDP**, or **ICMP**. | Specifies the IP protocol. | + | | | | | | + | | | | | The value can be **TCP**, **UDP**, or **ICMP**. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | source_port | No | String | The value can be an integer from 1 to 65535 or a port number range in the format of **a:b**. | Specifies the source port number or port number range. | + | | | | | | + | | | | | The value can be an integer from 1 to 65535 or a port number range in the format of **a:b**. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | destination_port | No | String | The value can be an integer from 1 to 65535 or a port number range in the format of **a:b**. | Specifies the destination port number or port number range. | + | | | | | | + | | | | | The value can be an integer from 1 to 65535 or a port number range in the format of **a:b**. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | ip_version | No | Integer | 4/6 | Specifies the IP protocol version. | + | | | | | | + | | | | | The value can be **4** and **6**, indicating IPv4 address and IPv6 address, respectively. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | source_ip_address | No | String | N/A | Specifies the source IP address or CIDR block. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | destination_ip_address | No | String | N/A | Specifies the destination IP address or CIDR block. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | action | No | String | deny/allow | Specifies action performed on traffic passing through the firewall. | + | | | | | | + | | | | | The value can be **deny** or **allow**. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | enabled | No | Boolean | The value can be **true** or **false**. | Specifies whether the firewall rule is enabled. | + | | | | | | + | | | | | The value can be **true** or **false**. | + +------------------------+-------------+-------------+----------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +---------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===============+=====================================================================+=============================================================================================================+ + | firewall_rule | :ref:`firewall_rule `\ object | Specifies the firewall rule objects. For details, see :ref:`Table 4 `. | + +---------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0003__table96821221510: + +.. table:: **Table 4** **Firewall Rule** objects + + +------------------------+---------+-------------------------------------------------------------------------+ + | Attribute | Type | Description | + +========================+=========+=========================================================================+ + | id | String | Specifies the UUID of the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | name | String | Specifies the firewall rule name. | + +------------------------+---------+-------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +------------------------+---------+-------------------------------------------------------------------------+ + | protocol | String | Specifies the IP protocol. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_port | String | Specifies the source port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_port | String | Specifies the destination port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP protocol version. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_ip_address | String | Specifies the source IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_ip_address | String | Specifies the destination IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | action | String | Specifies action performed on traffic passing through the firewall. | + +------------------------+---------+-------------------------------------------------------------------------+ + | enabled | Boolean | Specifies whether the firewall rule is enabled. | + +------------------------+---------+-------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/fwaas/firewall_rules + + { + "firewall_rule": { + "action": "allow", + "enabled": true, + "destination_port": "80", + "protocol": "tcp", + "name": "ALLOW_HTTP" + } + } + +Example response + +.. code-block:: + + { + "firewall_rule": { + "protocol": "tcp", + "description": "", + "source_ip_address": null, + "destination_ip_address": null, + "source_port": null, + "destination_port": "80", + "id": "b94acf06-efc2-485d-ba67-a61acf2a7e28", + "name": "ALLOW_HTTP", + "tenant_id": "23c8a121505047b6869edf39f3062712", + "enabled": true, + "action": "allow", + "ip_version": 4, + "public": false, + "project_id": "23c8a121505047b6869edf39f3062712" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_group.rst new file mode 100644 index 0000000..6d29bb6 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_group.rst @@ -0,0 +1,61 @@ +:original_name: vpc_firewall_0017.html + +.. _vpc_firewall_0017: + +Deleting a Firewall Group +========================= + +Function +-------- + +This API is used to delete a firewall group. + +URI +--- + +DELETE /v2.0/fwaas/firewall_groups/{firewall_group_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0017__table18880184689: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------+--------+--------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+===========+========+================================================================================+ + | firewall_group_id | Yes | String | Specifies the firewall group ID, which uniquely identifies the firewall group. | + +-------------------+-----------+--------+--------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/fwaas/firewall_groups/0415f554-26ed-44e7-a881-bdf4e6216e38 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_policy.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_policy.rst new file mode 100644 index 0000000..8b170e9 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_policy.rst @@ -0,0 +1,61 @@ +:original_name: vpc_firewall_0010.html + +.. _vpc_firewall_0010: + +Deleting a Firewall Policy +========================== + +Function +-------- + +This API is used to delete a firewall policy. + +URI +--- + +DELETE /v2.0/fwaas/firewall_policies/{firewall_policy_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0010__table18880184689: + +.. table:: **Table 1** Parameter description + + +--------------------+-----------+--------+----------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +====================+===========+========+==================================================================================+ + | firewall_policy_id | Yes | String | Specifies the firewall policy ID, which uniquely identifies the firewall policy. | + +--------------------+-----------+--------+----------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/fwaas/firewall_policies/2fb0e81f-9f63-44b2-9894-c13a3284594a + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_rule.rst new file mode 100644 index 0000000..7425e19 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/deleting_a_firewall_rule.rst @@ -0,0 +1,65 @@ +:original_name: vpc_firewall_0005.html + +.. _vpc_firewall_0005: + +Deleting a Firewall Rule +======================== + +Function +-------- + +This API is used to delete a firewall rule. + +.. note:: + + Before deleting a rule, you need to remove the rule from the corresponding policy first. For details, see :ref:`Removing a Firewall Rule `. + +URI +--- + +DELETE /v2.0/fwaas/firewall_rules/{firewall_rule_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0005__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------------+-----------+--------+------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +==================+===========+========+==============================================================================+ + | firewall_rule_id | Yes | String | Specifies the firewall rule ID, which uniquely identifies the firewall rule. | + +------------------+-----------+--------+------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/fwaas/firewall_rules/b94acf06-efc2-485d-ba67-a61acf2a7e28 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/index.rst new file mode 100644 index 0000000..d7fa618 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/index.rst @@ -0,0 +1,46 @@ +:original_name: vpc_firewall_0000.html + +.. _vpc_firewall_0000: + +Firewall +======== + +- :ref:`Querying Firewall Rules ` +- :ref:`Querying a Firewall Rule ` +- :ref:`Creating a Firewall Rule ` +- :ref:`Updating a Firewall Rule ` +- :ref:`Deleting a Firewall Rule ` +- :ref:`Querying Firewall Policies ` +- :ref:`Querying a Firewall Policy ` +- :ref:`Creating a Firewall Policy ` +- :ref:`Updating a Firewall Policy ` +- :ref:`Deleting a Firewall Policy ` +- :ref:`Inserting a Firewall Rule ` +- :ref:`Removing a Firewall Rule ` +- :ref:`Querying Firewall Groups ` +- :ref:`Querying a Firewall Group ` +- :ref:`Creating a Firewall Group ` +- :ref:`Updating a Firewall Group ` +- :ref:`Deleting a Firewall Group ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_firewall_rules + querying_a_firewall_rule + creating_a_firewall_rule + updating_a_firewall_rule + deleting_a_firewall_rule + querying_firewall_policies + querying_a_firewall_policy + creating_a_firewall_policy + updating_a_firewall_policy + deleting_a_firewall_policy + inserting_a_firewall_rule + removing_a_firewall_rule + querying_firewall_groups + querying_a_firewall_group + creating_a_firewall_group + updating_a_firewall_group + deleting_a_firewall_group diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/inserting_a_firewall_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/inserting_a_firewall_rule.rst new file mode 100644 index 0000000..7d5afc6 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/inserting_a_firewall_rule.rst @@ -0,0 +1,115 @@ +:original_name: vpc_firewall_0011.html + +.. _vpc_firewall_0011: + +Inserting a Firewall Rule +========================= + +Function +-------- + +This API is used to insert a firewall rule to a firewall policy. + +URI +--- + +PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id}/insert_rule + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0011__table18880184689: + +.. table:: **Table 1** Parameter description + + +--------------------+-----------+--------+----------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +====================+===========+========+==================================================================================+ + | firewall_policy_id | Yes | String | Specifies the firewall policy ID, which uniquely identifies the firewall policy. | + +--------------------+-----------+--------+----------------------------------------------------------------------------------+ + +Request Message +--------------- + +.. table:: **Table 2** Request parameter + + +------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +==================+=================+=================+===========================================================================================================================================================================================================================+ + | firewall_rule_id | String | Yes | Specifies the firewall rule ID, which uniquely identifies the firewall rule. | + +------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | insert_after | String | No | The **insert_after** parameter indicates the firewall rule that has already been associated with the firewall policy. A new firewall rule will be inserted after the firewall rule associated with the firewall policy. | + | | | | | + | | | | If both the **insert_after** and **insert_before** parameters are specified, the **insert_after** parameter will be ignored. | + +------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | insert_before | String | No | The **insert_before** parameter indicates the firewall rule that has already been associated with the firewall policy. A new firewall rule will be inserted before the firewall rule associated with the firewall policy. | + | | | | | + | | | | If both the **insert_after** and **insert_before** parameters are specified, the **insert_after** parameter will be ignored. | + +------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+==================+=======================================================================================================================================================================+ + | description | String | Provides supplementary information about the firewall policy. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | audited | Boolean | Each time the firewall policy or the associated firewall rules are changed, this attribute will be set to **False**. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | firewall_rules | Array of strings | Specifies the ID list of the firewall rules associated with the current firewall policy. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the firewall policy ID. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the firewall policy name. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | public | Boolean | If this attribute is set to **true**, the firewall policy is visible to tenants other than its owner. The firewall policy is not visible to other tenants by default. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/fwaas/firewall_policies/afc52ce9-5305-4ec9-9feb-44feb8330341/insert_rule + + { + "insert_after": "b8243448-cb3c-496e-851c-dadade4c161b", + "firewall_rule_id": "0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1", + "insert_before": "" + } + +Example response + +.. code-block:: + + { + "description": "", + "firewall_rules": [ + "b8243448-cb3c-496e-851c-dadade4c161b", + "0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "afc52ce9-5305-4ec9-9feb-44feb8330341", + "audited": false, + "name": "test-policy", + "project_id": "23c8a121505047b6869edf39f3062712" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_group.rst new file mode 100644 index 0000000..7b2d779 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_group.rst @@ -0,0 +1,125 @@ +:original_name: vpc_firewall_0014.html + +.. _vpc_firewall_0014: + +Querying a Firewall Group +========================= + +Function +-------- + +This API is used to query details about a specific firewall group. + +URI +--- + +GET /v2.0/fwaas/firewall_groups/{firewall_group_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0014__table18880184689: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+===========+========+===================================================================================================================================+ + | firewall_group_id | Yes | String | Specifies the firewall group ID, which uniquely identifies the firewall group. The **fire_group_id** value is used as the filter. | + +-------------------+-----------+--------+-----------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +----------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+=========================================================================+=========================================================================================================+ + | firewall_group | :ref:`firewall_group `\ object | Specifies the firewall group. For details, see :ref:`Table 3 `. | + +----------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0014__table31629250121127: + +.. table:: **Table 3** **Firewall Group** objects + + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +============================+=======================+===========================================================================+ + | id | String | Specifies the UUID of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ingress_firewall_policy_id | String | Specifies the firewall policy for inbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | egress_firewall_policy_id | String | Specifies the firewall policy for outbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ports | Array of strings | Specifies the list of ports bound with the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | status | String | Specifies the status of the firewall policy. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status of the firewall. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the resource is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the resource is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_groups/a504a4cf-9300-40e0-b2d4-649bd157c55a + +Example response + +.. code-block:: + + { + "firewall_group": { + "status": "ACTIVE", + "public": false, + "egress_firewall_policy_id": null, + "name": "bobby_fwg1", + "admin_state_up": true, + "ports": [ + "16e6d779-15e9-48fb-abc5-b86457792a15" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "id": "a504a4cf-9300-40e0-b2d4-649bd157c55a", + "ingress_firewall_policy_id": "fed2d88f-d0e7-4cc5-bd7e-c495f67037b6", + "description": "test", + "project_id": "23c8a121505047b6869edf39f3062712", + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_policy.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_policy.rst new file mode 100644 index 0000000..90307f2 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_policy.rst @@ -0,0 +1,106 @@ +:original_name: vpc_firewall_0007.html + +.. _vpc_firewall_0007: + +Querying a Firewall Policy +========================== + +Function +-------- + +This API is used to query details about a specific firewall policy. + +URI +--- + +GET /v2.0/fwaas/firewall_policies/{firewall_policy_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0007__table18880184689: + +.. table:: **Table 1** Parameter description + + +--------------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +====================+===========+========+==========================================================================================================================================+ + | firewall_policy_id | Yes | String | Specifies the firewall policy ID, which uniquely identifies the firewall policy. The **firewall_policy_id** value is used as the filter. | + +--------------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+========================================================================+==========================================================================================================+ + | firewall_policy | :ref:`firewall_policy ` object | Specifies the firewall policy. For details, see :ref:`Table 3 `. | + +-----------------+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0007__table17002720121127: + +.. table:: **Table 3** **Firewall Policy** objects + + +----------------+------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +================+==================+===========================================================================+ + | id | String | Specifies the UUID of the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------+------------------+---------------------------------------------------------------------------+ + | firewall_rules | Array of strings | Specifies the firewall rules referenced by the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | audited | Boolean | Specifies the audit flag. | + +----------------+------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------+------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------+------------------+---------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_policies/fed2d88f-d0e7-4cc5-bd7e-c495f67037b6 + +Example response + +.. code-block:: + + { + "firewall_policy": { + "description": "", + "firewall_rules": [ + "3c0e6267-73df-4d9a-87a6-e226f2db2036" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "fed2d88f-d0e7-4cc5-bd7e-c495f67037b6", + "audited": false, + "name": "bobby_fwp1", + "project_id": "23c8a121505047b6869edf39f3062712" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_rule.rst new file mode 100644 index 0000000..b30bcdb --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_a_firewall_rule.rst @@ -0,0 +1,126 @@ +:original_name: vpc_firewall_0002.html + +.. _vpc_firewall_0002: + +Querying a Firewall Rule +======================== + +Function +-------- + +This API is used to query details about a specific firewall rule. + +URI +--- + +GET /v2.0/fwaas/firewall_rules/{firewall_rule_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0002__table18880184689: + +.. table:: **Table 1** Parameter description + + +------------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +==================+===========+========+====================================================================================================================================+ + | firewall_rule_id | Yes | String | Specifies the firewall rule ID, which uniquely identifies the firewall rule. The **firewall_rule_id** value is used as the filter. | + +------------------+-----------+--------+------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +---------------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===============+======================================================================+================================================================================================================+ + | firewall_rule | :ref:`firewall_rule ` object | Specifies the firewall rule objects. For details, see :ref:`Table 3 `. | + +---------------+----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0002__table38646929121127: + +.. table:: **Table 3** **Firewall Rule** objects + + +------------------------+---------+-------------------------------------------------------------------------+ + | Attribute | Type | Description | + +========================+=========+=========================================================================+ + | id | String | Specifies the UUID of the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | name | String | Specifies the firewall rule name. | + +------------------------+---------+-------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +------------------------+---------+-------------------------------------------------------------------------+ + | protocol | String | Specifies the IP protocol. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_port | String | Specifies the source port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_port | String | Specifies the destination port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP protocol version. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_ip_address | String | Specifies the source IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_ip_address | String | Specifies the destination IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | action | String | Specifies action performed on traffic passing through the firewall. | + +------------------------+---------+-------------------------------------------------------------------------+ + | enabled | Boolean | Specifies whether the firewall rule is enabled. | + +------------------------+---------+-------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_rules/514e6776-162a-4b5d-ab8b-aa36b86655ef + +Example response + +.. code-block:: + + { + "firewall_rule": { + "protocol": "tcp", + "name": "bobby_rule", + "mode": "normal", + "tenant_id": "4490a89232ce46d4ae4bfb227ef1a40a", + "rule_profile": "", + "enabled": true, + "source_port": null, + "source_ip_address": null, + "destination_ip_address": null, + "firewall_policy_id": null, + "action": "allow", + "position": null, + "ip_version": 4, + "shared": false, + "destination_port": null, + "id": "514e6776-162a-4b5d-ab8b-aa36b86655ef", + "description": "", + "project_id": "4490a89232ce46d4ae4bfb227ef1a40a" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_groups.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_groups.rst new file mode 100644 index 0000000..c1ec80e --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_groups.rst @@ -0,0 +1,191 @@ +:original_name: vpc_firewall_0013.html + +.. _vpc_firewall_0013: + +Querying Firewall Groups +======================== + +Function +-------- + +This API is used to query all firewall groups accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/fwaas/firewall_groups + +Example of querying groups by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_groups?limit=2&marker=cd600d47-0045-483f-87a1-5041ae2f513b&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0013__table2285151162120: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the ID of the firewall group is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the name of the firewall group is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Specifies that the description of the firewall group is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies that the admin state of the firewall group is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID of the firewall group is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+====================================================================================+======================================================================================================================================================================================================================+ + | firewall_groups | Array of :ref:`Firewall Group ` objects | Specifies the firewall group list. For details, see :ref:`Table 3 `. | + +-----------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | firewall_groups_links | Array of :ref:`firewall_groups_link ` objects | Specifies the **firewall_groups_link** object list. For details, see :ref:`Table 4 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0013__table31629250121127: + +.. table:: **Table 3** **Firewall Group** objects + + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +============================+=======================+===========================================================================+ + | id | String | Specifies the UUID of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ingress_firewall_policy_id | String | Specifies the firewall policy for inbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | egress_firewall_policy_id | String | Specifies the firewall policy for outbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ports | Array of strings | Specifies the list of ports bound with the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | status | String | Specifies the status of the firewall policy. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status of the firewall. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the resource is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the resource is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + +.. _vpc_firewall_0013__table25150247450: + +.. table:: **Table 4** **firewall_groups_link** object + + +------+--------+----------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+======================================================================+ + | href | String | Specifies the API link. | + +------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +------+--------+----------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_groups + +Example response + +.. code-block:: + + { + "firewall_groups": [ + { + "status": "INACTIVE", + "public": false, + "egress_firewall_policy_id": null, + "name": "", + "admin_state_up": true, + "ports": [ ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "id": "cd600d47-0045-483f-87a1-5041ae2f513b", + "ingress_firewall_policy_id": null, + "description": "", + "project_id": "23c8a121505047b6869edf39f3062712", + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + }, + { + "status": "INACTIVE", + "public": false, + "egress_firewall_policy_id": "d939df29-fe76-4089-90c3-3778e4d53141", + "name": "fwg-1475475043", + "admin_state_up": true, + "ports": [ ], + "tenant_id": "0af57070695044ea9a70f04779e6aa1f", + "id": "ca971b45-70ce-4879-9734-b6cac1d00845", + "ingress_firewall_policy_id": "d939df29-fe76-4089-90c3-3778e4d53141", + "description": "", + "project_id": "0af57070695044ea9a70f04779e6aa1f", + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + } + ], + "firewall_groups_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ + fwaas/firewall_groups?marker=cd600d47-0045-483f-87a1-5041ae2f513b&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_policies.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_policies.rst new file mode 100644 index 0000000..f9a3392 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_policies.rst @@ -0,0 +1,167 @@ +:original_name: vpc_firewall_0006.html + +.. _vpc_firewall_0006: + +Querying Firewall Policies +========================== + +Function +-------- + +This API is used to query all firewall policies accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/fwaas/firewall_policies + +Example of querying policies by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_policies?limit=2&marker=6b70e321-0c21-4b83-bb8a-a886d1414a5f&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0006__table2168229184411: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the firewall policy ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the firewall policy name is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Specifies that the firewall policy description is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID of the firewall policy is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-------------------------+-------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=====================================================================================+======================================================================================================================================================================================================================+ + | firewall_policies | Array of :ref:`firewall Policy ` object | Specifies the firewall policies. For details, see :ref:`Table 3 `. | + +-------------------------+-------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | firewall_policies_links | Array of :ref:`firewall_policies_link ` object | **firewall_policies_link** object For details, see :ref:`Table 4 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-------------------------+-------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0006__table17002720121127: + +.. table:: **Table 3** **firewall_Policy** object + + +----------------+------------------+------------------------------------------------------------------+ + | Attribute | Type | Description | + +================+==================+==================================================================+ + | id | String | Specifies the UUID of the firewall policy. | + +----------------+------------------+------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall policy. | + +----------------+------------------+------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall policy. | + +----------------+------------------+------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------+------------------+------------------------------------------------------------------+ + | firewall_rules | Array of strings | Specifies the rules referenced by the firewall policy. | + +----------------+------------------+------------------------------------------------------------------+ + | audited | Boolean | Specifies the audit flag. | + +----------------+------------------+------------------------------------------------------------------+ + | public | Boolean | Specifies whether the policy can be shared by different tenants. | + +----------------+------------------+------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------+------------------+------------------------------------------------------------------+ + +.. _vpc_firewall_0006__table25150247450: + +.. table:: **Table 4** **firewall_policies_link** object + + +------+--------+----------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+======================================================================+ + | href | String | Specifies the API link. | + +------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +------+--------+----------------------------------------------------------------------+ + +Example +------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_policies + +Example response + +.. code-block:: + + { + "firewall_policies": [ + { + "description": "", + "firewall_rules": [ + "6c6803e0-ca8c-4aa9-afb3-4f89275b6c32" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "6b70e321-0c21-4b83-bb8a-a886d1414a5f", + "audited": false, + "name": "fwp1", + "project_id": "23c8a121505047b6869edf39f3062712" + }, + { + "description": "", + "firewall_rules": [ + "6c6803e0-ca8c-4aa9-afb3-4f89275b6c32" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "fce92002-5a15-465d-aaca-9b44453bb738", + "audited": false, + "name": "fwp2", + "project_id": "23c8a121505047b6869edf39f3062712" + } + ], + "firewall_policies_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ + fwaas/firewall_policies?marker=6b70e321-0c21-4b83-bb8a-a886d1414a5f&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_rules.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_rules.rst new file mode 100644 index 0000000..600e66e --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/querying_firewall_rules.rst @@ -0,0 +1,213 @@ +:original_name: vpc_firewall_0001.html + +.. _vpc_firewall_0001: + +Querying Firewall Rules +======================= + +Function +-------- + +This API is used to query all firewall rules accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/fwaas/firewall_rules + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_rules?name={firewall_rule_name}&tenant_id={tenant_id}&public={is_public}&protocol={protocol}&ip_version={ip_version}&action={action}&enabled={is_enabled} + +Example of querying rules by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_rules?limit=2&marker=2a193015-4a88-4aa1-84ad-d4955adae707&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_firewall_0001__table997509428: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the firewall rule ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the firewall rule name is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Specifies that the firewall rule description is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | No | Integer | Specifies that the IP address version is used as the filtering condition. | + | | | | | + | | | | The value can be **4** (IPv4) or **6** (IPv6). | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | No | String | Specifies that the firewall rule action is used as the filtering condition. | + | | | | | + | | | | The value can be **allow** or **deny**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enabled | No | Boolean | Specifies that the firewall rule is enabled is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+====================================================================================+======================================================================================================================================================================================================================+ + | firewall_rules | Array of :ref:`Firewall Rule ` objects | Specifies the firewall rule list. For details, see :ref:`Table 4 `. | + +-----------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | firewall_rules_links | Array of :ref:`firewall_rules_link ` Object | Specifies the pagination information. For details, see :ref:`Table 3 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0001__table2049004519490: + +.. table:: **Table 3** **firewall_rules_link** object + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +.. _vpc_firewall_0001__table38646929121127: + +.. table:: **Table 4** **Firewall Rule** objects + + +------------------------+---------+-------------------------------------------------------------------------+ + | Attribute | Type | Description | + +========================+=========+=========================================================================+ + | id | String | Specifies the UUID of the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | name | String | Specifies the firewall rule name. | + +------------------------+---------+-------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +------------------------+---------+-------------------------------------------------------------------------+ + | protocol | String | Specifies the IP protocol. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_port | String | Specifies the source port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_port | String | Specifies the destination port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP protocol version. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_ip_address | String | Specifies the source IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_ip_address | String | Specifies the destination IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | action | String | Specifies action performed on traffic passing through the firewall. | + +------------------------+---------+-------------------------------------------------------------------------+ + | enabled | Boolean | Specifies whether the firewall rule is enabled. | + +------------------------+---------+-------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/fwaas/firewall_rules + +Example response + +.. code-block:: + + { + "firewall_rules": [ + { + "protocol": "tcp", + "name": "crhfwruleupdate", + "mode": "normal", + "tenant_id": "f480f5d250824e5fafedcf05acf1419c", + "rule_profile": "", + "enabled": true, + "source_port": null, + "source_ip_address": null, + "destination_ip_address": null, + "firewall_policy_id": "b4f81251-c47a-4fe1-8579-6f9271d015d1", + "action": "deny", + "position": 1, + "ip_version": 4, + "shared": false, + "destination_port": null, + "id": "2a193015-4a88-4aa1-84ad-d4955adae707", + "description": "", + "project_id": "f480f5d250824e5fafedcf05acf1419c" + }, + { + "protocol": "tcp", + "name": "update_firewall-role-tommy", + "mode": "mix", + "tenant_id": "a1c6f90c94334bd2953d9a61b8031a68", + "rule_profile": "", + "enabled": false, + "source_port": "20:50", + "source_ip_address": null, + "destination_ip_address": null, + "firewall_policy_id": null, + "action": "deny", + "position": null, + "ip_version": 4, + "shared": true, + "destination_port": "40:60", + "id": "db7a204c-9eb1-40a2-9bd6-ed5cfd3cff32", + "description": "update check parameter", + "project_id": "a1c6f90c94334bd2953d9a61b8031a68" + } + ], + "firewall_rules_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ + fwaas/firewall_rules?marker=2a193015-4a88-4aa1-84ad-d4955adae707&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/removing_a_firewall_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/removing_a_firewall_rule.rst new file mode 100644 index 0000000..7036157 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/removing_a_firewall_rule.rst @@ -0,0 +1,92 @@ +:original_name: vpc_firewall_0012.html + +.. _vpc_firewall_0012: + +Removing a Firewall Rule +======================== + +Function +-------- + +This API is used to remove a firewall rule from a firewall policy. + +URI +--- + +PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id}/remove_rule + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +------------------+--------+-----------+------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +==================+========+===========+==============================================================================+ + | firewall_rule_id | String | Yes | Specifies the firewall rule ID, which uniquely identifies the firewall rule. | + +------------------+--------+-----------+------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+==================+=======================================================================================================================================================================+ + | description | String | Provides supplementary information about the firewall policy. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | audited | Boolean | Each time the firewall policy or the associated firewall rules are changed, this attribute will be set to **False**. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | firewall_rules | Array of strings | Specifies the ID list of the firewall rules associated with the current firewall policy. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the firewall policy ID. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the firewall policy name. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | public | Boolean | If this attribute is set to **true**, the firewall policy is visible to tenants other than its owner. The firewall policy is not visible to other tenants by default. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/fwaas/firewall_policies/afc52ce9-5305-4ec9-9feb-44feb8330341/remove_rule + + { + "firewall_rule_id": "0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1" + } + +Example response + +.. code-block:: + + { + "description": "", + "firewall_rules": [ + "b8243448-cb3c-496e-851c-dadade4c161b" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "afc52ce9-5305-4ec9-9feb-44feb8330341", + "audited": false, + "name": "test-policy", + "project_id": "23c8a121505047b6869edf39f3062712" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_group.rst new file mode 100644 index 0000000..bd7ba75 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_group.rst @@ -0,0 +1,153 @@ +:original_name: vpc_firewall_0016.html + +.. _vpc_firewall_0016: + +Updating a Firewall Group +========================= + +Function +-------- + +This API is used to update a firewall group. + +URI +--- + +PUT /v2.0/fwaas/firewall_groups/{firewall_group_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +----------------+------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +================+========================================================================+===========+========================================================================================================+ + | firewall_group | :ref:`firewall_group `\ object | Yes | Specifies the firewall group. For details, see :ref:`Table 2 `. | + +----------------+------------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0016__table1368812022812: + +.. table:: **Table 2** **Firewall Group** objects + + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +============================+=================+==================+==============================================================+ + | name | No | String | Specifies the name of the firewall group. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the firewall group. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | ingress_firewall_policy_id | No | String | Specifies the firewall policy for inbound traffic. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | egress_firewall_policy_id | No | String | Specifies the firewall policy for outbound traffic. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | ports | No | Array of strings | Specifies the list of ports bound with the firewall group. | + | | | | | + | | | | The value must be the port ID of the distributed router. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status of the firewall. | + | | | | | + | | | | The value can be **true** or **false**. | + +----------------------------+-----------------+------------------+--------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +----------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+=========================================================================+=========================================================================================================+ + | firewall_group | :ref:`firewall_group `\ object | Specifies the firewall group. For details, see :ref:`Table 4 `. | + +----------------+-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0016__table31629250121127: + +.. table:: **Table 4** **Firewall Group** objects + + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +============================+=======================+===========================================================================+ + | id | String | Specifies the UUID of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ingress_firewall_policy_id | String | Specifies the firewall policy for inbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | egress_firewall_policy_id | String | Specifies the firewall policy for outbound traffic. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | ports | Array of strings | Specifies the list of ports bound with the firewall group. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | status | String | Specifies the status of the firewall policy. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status of the firewall. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the resource is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the resource is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +----------------------------+-----------------------+---------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/fwaas/firewall_groups/2fb0e81f-9f63-44b2-9894-c13a3284594a + + { + "firewall_group": { + "egress_firewall_policy_id": "53f36c32-db25-4856-a0ba-e605fd88c5e9" + } + } + +Example response + +.. code-block:: + + { + "firewall_group": { + "status": "PENDING_UPDATE", + "public": false, + "egress_firewall_policy_id": "53f36c32-db25-4856-a0ba-e605fd88c5e9", + "name": "", + "admin_state_up": true, + "ports": [ + "c133f2bf-6937-4416-bb17-012e1be5cd2d" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "id": "0415f554-26ed-44e7-a881-bdf4e6216e38", + "ingress_firewall_policy_id": "afc52ce9-5305-4ec9-9feb-44feb8330341", + "description": "", + "project_id": "23c8a121505047b6869edf39f3062712", + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_policy.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_policy.rst new file mode 100644 index 0000000..8fbdcde --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_policy.rst @@ -0,0 +1,130 @@ +:original_name: vpc_firewall_0009.html + +.. _vpc_firewall_0009: + +Updating a Firewall Policy +========================== + +Function +-------- + +This API is used to update a firewall policy. + +URI +--- + +PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+--------------------------------------------------------------------------+-----------+------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+==========================================================================+===========+==================================================================================================================+ + | firewall_policy | :ref:`firewall_policy `\ object | Yes | Specifies the firewall policy objects. For details, see :ref:`Table 2 `. | + +-----------------+--------------------------------------------------------------------------+-----------+------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0009__table17002720121127: + +.. table:: **Table 2** **Firewall Policy** objects + + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+==================+=================================================================+ + | name | No | String | Specifies the name of the firewall policy. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the firewall policy. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | firewall_rules | No | Array of strings | Specifies the firewall rules referenced by the firewall policy. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + | audited | No | Boolean | Specifies the audit flag. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +-----------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+=========================================================================+=================================================================================================================+ + | firewall_policy | :ref:`firewall_policy `\ object | Specifies the firewall policy objects. For details, see :ref:`Table 4 `. | + +-----------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0009__table6763048152111: + +.. table:: **Table 4** **Firewall Policy** objects + + +----------------+------------------+---------------------------------------------------------------------------+ + | Attribute | Type | Description | + +================+==================+===========================================================================+ + | id | String | Specifies the UUID of the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | name | String | Specifies the name of the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +----------------+------------------+---------------------------------------------------------------------------+ + | firewall_rules | Array of strings | Specifies the firewall rules referenced by the firewall policy. | + +----------------+------------------+---------------------------------------------------------------------------+ + | audited | Boolean | Specifies the audit flag. | + +----------------+------------------+---------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall policy can be shared by different tenants. | + +----------------+------------------+---------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +----------------+------------------+---------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/fwaas/firewall_policies/2fb0e81f-9f63-44b2-9894-c13a3284594a + + { + "firewall_policy": { + "firewall_rules": [ + "0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1" + ] + } + } + +Example response + +.. code-block:: + + { + "firewall_policy": { + "description": "", + "firewall_rules": [ + "0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1" + ], + "tenant_id": "23c8a121505047b6869edf39f3062712", + "public": false, + "id": "2fb0e81f-9f63-44b2-9894-c13a3284594a", + "audited": false, + "name": "test-policy", + "project_id": "23c8a121505047b6869edf39f3062712" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_rule.rst new file mode 100644 index 0000000..a2628e7 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/firewall/updating_a_firewall_rule.rst @@ -0,0 +1,166 @@ +:original_name: vpc_firewall_0004.html + +.. _vpc_firewall_0004: + +Updating a Firewall Rule +======================== + +Function +-------- + +This API is used to update a firewall rule. + +URI +--- + +PUT /v2.0/fwaas/firewall_rules/{firewall_rule_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +---------------+------------------------------------------------------------------------+-----------+----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===============+========================================================================+===========+================================================================================================================+ + | firewall_rule | :ref:`firewall_rule `\ object | Yes | Specifies the firewall rule objects. For details, see :ref:`Table 2 `. | + +---------------+------------------------------------------------------------------------+-----------+----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0004__table38646929121127: + +.. table:: **Table 2** **Firewall Rule** objects + + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +========================+=================+=================+==============================================================================================+ + | name | No | String | Specifies the firewall rule name. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the firewall rule. | + | | | | | + | | | | The value can contain a maximum of 255 characters. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | protocol | No | String | Specifies the IP protocol. | + | | | | | + | | | | The value can be **TCP**, **UDP**, **ICMP**, or a value ranging from 0 to 255. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | source_port | No | String | Specifies the source port number or port number range. | + | | | | | + | | | | The value can be an integer from 1 to 65535 or a port number range in the format of **a:b**. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | destination_port | No | String | Specifies the destination port number or port number range. | + | | | | | + | | | | The value can be an integer from 1 to 65535 or a port number range in the format of **a:b**. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | ip_version | No | Integer | Specifies the IP protocol version. | + | | | | | + | | | | The value can be **4** and **6**, indicating IPv4 address and IPv6 address, respectively. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | source_ip_address | No | String | Specifies the source IP address or CIDR block. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | destination_ip_address | No | String | Specifies the destination IP address or CIDR block. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | action | No | String | Specifies action performed on traffic passing through the firewall. | + | | | | | + | | | | The value can be **deny** or **allow**. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + | enabled | No | Boolean | Specifies whether the firewall rule is enabled. | + | | | | | + | | | | The value can be **true** or **false**. | + +------------------------+-----------------+-----------------+----------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +---------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===============+=====================================================================+=============================================================================================================+ + | firewall_rule | :ref:`firewall_rule `\ object | Specifies the firewall rule objects. For details, see :ref:`Table 4 `. | + +---------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_firewall_0004__table96821221510: + +.. table:: **Table 4** **Firewall Rule** objects + + +------------------------+---------+-------------------------------------------------------------------------+ + | Attribute | Type | Description | + +========================+=========+=========================================================================+ + | id | String | Specifies the UUID of the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | name | String | Specifies the firewall rule name. | + +------------------------+---------+-------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the firewall rule. | + +------------------------+---------+-------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + | public | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +------------------------+---------+-------------------------------------------------------------------------+ + | protocol | String | Specifies the IP protocol. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_port | String | Specifies the source port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_port | String | Specifies the destination port number or port number range. | + +------------------------+---------+-------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP protocol version. | + +------------------------+---------+-------------------------------------------------------------------------+ + | source_ip_address | String | Specifies the source IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | destination_ip_address | String | Specifies the destination IP address or CIDR block. | + +------------------------+---------+-------------------------------------------------------------------------+ + | action | String | Specifies action performed on traffic passing through the firewall. | + +------------------------+---------+-------------------------------------------------------------------------+ + | enabled | Boolean | Specifies whether the firewall rule is enabled. | + +------------------------+---------+-------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +------------------------+---------+-------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/fwaas/firewall_rules/b94acf06-efc2-485d-ba67-a61acf2a7e28 + + { + "firewall_rule": { + "action": "deny" + } + } + +Example response + +.. code-block:: + + { + "firewall_rule": { + "protocol": "tcp", + "description": "", + "source_ip_address": null, + "destination_ip_address": null, + "source_port": null, + "destination_port": "80", + "id": "b94acf06-efc2-485d-ba67-a61acf2a7e28", + "name": "ALLOW_HTTP", + "tenant_id": "23c8a121505047b6869edf39f3062712", + "enabled": true, + "action": "deny", + "ip_version": 4, + "public": false, + "project_id": "23c8a121505047b6869edf39f3062712" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/assigning_a_floating_ip_address.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/assigning_a_floating_ip_address.rst new file mode 100644 index 0000000..e6c601a --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/assigning_a_floating_ip_address.rst @@ -0,0 +1,143 @@ +:original_name: vpc_floatingiP_0003.html + +.. _vpc_floatingiP_0003: + +Assigning a Floating IP Address +=============================== + +Function +-------- + +When assigning a floating IP address, you need to obtain the external network ID **floating_network_id** of the floating IP address. + +You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to obtain the UUID of the external network required for assigning a floating IP address. + +URI +--- + +POST /v2.0/floatingips + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +------------+---------------------------------------------------------------------+-----------+---------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +============+=====================================================================+===========+=====================================================================================================================+ + | floatingip | :ref:`floatingip ` object | Yes | Specifies the floating IP address list. For details, see :ref:`Table 2 `. | + +------------+---------------------------------------------------------------------+-----------+---------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_floatingip_0003__table15863423175513: + +.. table:: **Table 2** **floatingip** objects + + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=====================+=================+=================+======================================================================================================+ + | floating_ip_address | No | String | Specifies the floating IP address. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------+ + | floating_network_id | Yes | String | Specifies the external network ID. | + | | | | | + | | | | You can only use fixed external network. | + | | | | | + | | | | You can use **GET /v2.0/networks?router:external=True** or | + | | | | | + | | | | **GET /v2.0/networks?name={floating_network}** or | + | | | | | + | | | | run the **neutron net-external-list mode** command to obtain information about the external network. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------+ + | port_id | No | String | Specifies the port ID. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------+ + | fixed_ip_address | No | String | Specifies the private IP address of the associated port. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+=================================================================+=================================================================================================================+ + | floatingip | :ref:`floatingip ` object | Specifies the floating IP address list. For details, see :ref:`Table 4 `. | + +------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_floatingip_0003__table8139247714: + +.. table:: **Table 4** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IP address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the DNS name. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the DNS domain. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/floatingips + + { + "floatingip": { + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975" + } + } + +Example response + +.. code-block:: + + { + "floatingip": { + "id": "b997e0d4-3359-4c74-8f88-bc0af81cd5a2", + "status": "DOWN", + "router_id": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": null, + "floating_ip_address": "88.88.215.205", + "port_id": null, + "dns_name": "ecs-80-158-78-239", + "dns_domain": "reverse.domain-name.com", + "created_at": "2018-09-20T02:10:02", + "updated_at": "2018-09-20T02:10:02" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/deleting_a_floating_ip_address.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/deleting_a_floating_ip_address.rst new file mode 100644 index 0000000..b594a38 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/deleting_a_floating_ip_address.rst @@ -0,0 +1,61 @@ +:original_name: vpc_floatingiP_0005.html + +.. _vpc_floatingiP_0005: + +Deleting a Floating IP Address +============================== + +Function +-------- + +This API is used to delete a floating IP address. + +URI +--- + +DELETE /v2.0/floatingips/{floatingip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_floatingip_0005__table49321613135118: + +.. table:: **Table 1** Parameter description + + ============= ========= ====== ===================================== + Parameter Mandatory Type Description + ============= ========= ====== ===================================== + floatingip_id Yes String Specifies the floating IP address ID. + ============= ========= ====== ===================================== + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/floatingips/a95ec431-8473-463b-aede-34fb048ee3a7 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/index.rst new file mode 100644 index 0000000..15c5a6b --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_floatingiP_0000.html + +.. _vpc_floatingiP_0000: + +Floating IP Address +=================== + +- :ref:`Querying Floating IP Addresses ` +- :ref:`Querying a Floating IP Address ` +- :ref:`Assigning a Floating IP Address ` +- :ref:`Updating a Floating IP Address ` +- :ref:`Deleting a Floating IP Address ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_floating_ip_addresses + querying_a_floating_ip_address + assigning_a_floating_ip_address + updating_a_floating_ip_address + deleting_a_floating_ip_address diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/querying_a_floating_ip_address.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/querying_a_floating_ip_address.rst new file mode 100644 index 0000000..8561174 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/querying_a_floating_ip_address.rst @@ -0,0 +1,123 @@ +:original_name: vpc_floatingiP_0002.html + +.. _vpc_floatingiP_0002: + +Querying a Floating IP Address +============================== + +Function +-------- + +This API is used to query details about a specified floating IP address, including the floating IP address status, ID of the router to which the floating IP address belongs, and external network ID of the floating IP address. + +URI +--- + +GET /v2.0/floatingips/{floatingip_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+=================================================================+=================================================================================================================+ + | floatingip | :ref:`floatingip ` object | Specifies the floating IP address list. For details, see :ref:`Table 2 `. | + +------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_floatingip_0002__table8139247714: + +.. table:: **Table 2** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IP address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **port_id** is null if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the DNS name. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the DNS domain. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time when the floating IP address was created. | + | | | | + | | | UTC time is used. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time when the floating IP address was updated. | + | | | | + | | | UTC time is used. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/floatingips/1a3a2818-d9b4-4a9c-8a19-5252c499d1cd + +Example response + +.. code-block:: + + { + "floatingip": { + "id": "1a3a2818-d9b4-4a9c-8a19-5252c499d1cd", + "status": "DOWN", + "router_id": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": null, + "floating_ip_address": "99.99.99.84", + "port_id": null, + "dns_name": "ecs-80-158-78-239", + "dns_domain": "reverse.domain-name.com", + "created_at": "2017-10-19T12:21:28", + "updated_at": "2018-07-30T12:52:13" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/querying_floating_ip_addresses.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/querying_floating_ip_addresses.rst new file mode 100644 index 0000000..6b4651b --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/querying_floating_ip_addresses.rst @@ -0,0 +1,178 @@ +:original_name: vpc_floatingiP_0001.html + +.. _vpc_floatingiP_0001: + +Querying Floating IP Addresses +============================== + +Function +-------- + +This API is used to query all floating IP addresses accessible to the tenant submitting the request. + +You can query the detailed information about a specified floating IP address using the API for :ref:`Querying a Floating IP Address `. + +URI +--- + +GET /v2.0/floatingips + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_floatingip_0001__table107561756154818: + +.. table:: **Table 1** Parameter description + + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=====================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies the floating IP address ID. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | floating_ip_address | No | String | Specifies the floating IPv4 address. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | floating_network_id | No | String | Specifies the external network ID. | + | | | | | + | | | | You can only use fixed external network. | + | | | | | + | | | | You can use **GET /v2.0/networks?router:external=True** or | + | | | | | + | | | | **GET /v2.0/networks?name={floating_network}** or run the **neutron net-external-list** command to obtain information about the external network. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router_id | No | String | Specifies the ID of the belonged router. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_id | No | String | Specifies the port ID. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ip_address | No | String | Specifies the private IP address of the associated port. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies the project ID. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | Integer | No | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | String | No | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | page_reverse | Boolean | No | Specifies the page direction. The value can be **True** or **False**. | + +---------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/floatingips?id={fip_id}&router_id={router_id}&floating_network_id={net_id}&floating_ip_address={floating_ip}&port_id={port_id}&fixed_ip_address={fixed_ip}&tenant_id={tenant_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-------------+---------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=============+===========================================================================+=================================================================================================================+ + | floatingips | Array of :ref:`floatingip ` objects | Specifies the floating IP address list. For details, see :ref:`Table 3 `. | + +-------------+---------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_floatingip_0001__table8139247714: + +.. table:: **Table 3** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IP address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + | | | | + | | | .. note:: | + | | | | + | | | The value of **port_id** is null if the EIP is bound to a dedicated load balancer. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the DNS name. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the DNS domain. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time when the floating IP address was created. | + | | | | + | | | UTC time is used. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time when the floating IP address was updated. | + | | | | + | | | UTC time is used. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/floatingips?limit=1 + +Example response + +.. code-block:: + + { + "floatingips": [ + { + "id": "1a3a2818-d9b4-4a9c-8a19-5252c499d1cd", + "status": "DOWN", + "router_id": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": null, + "floating_ip_address": "99.99.99.84", + "port_id": null, + "dns_name": "ecs-80-158-78-239", + "dns_domain": "reverse.domain-name.com", + "created_at": "2017-10-19T12:21:28", + "updated_at": "2018-07-30T12:52:13" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/updating_a_floating_ip_address.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/updating_a_floating_ip_address.rst new file mode 100644 index 0000000..2ce3c72 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/floating_ip_address/updating_a_floating_ip_address.rst @@ -0,0 +1,189 @@ +:original_name: vpc_floatingiP_0004.html + +.. _vpc_floatingiP_0004: + +Updating a Floating IP Address +============================== + +Function +-------- + +This API is used to update a floating IP address. + +During the update, the ID of the floating IP address must be provided in the URL. + +If **port_id** is left blank, the floating IP address has been unbound from the port. + +.. note:: + + This API has the following constraints: + + - If you want to bind a floating IP address in the **error** state, unbind the IP address first. + - Do not associate a port that has a floating IP address associated to another floating IP address. You must first disassociate the port from the IP address and then associate it with another IP address. + - This API cannot be used to bind an EIP to or unbind an EIP from a dedicated load balancer. + +URI +--- + +PUT /v2.0/floatingips/{floatingip_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_floatingip_0004__table5388109319164: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+============================================================================================================================================================+ + | floatingip_id | Yes | String | Specifies the floating IP address ID. | + | | | | | + | | | | This parameter is not required when you assign a floating IP address. This parameter is mandatory when you query, update, or delete a floating IP address. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +.. table:: **Table 2** Request parameter + + +------------+-------------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +============+===================================================================+===========+===================================================================================================================+ + | floatingip | :ref:`floatingip ` object | Yes | Specifies the floating IP address list. For details, see :ref:`Table 3 `. | + +------------+-------------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_floatingip_0004__table547993685510: + +.. table:: **Table 3** **floatingip** objects + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================+ + | port_id | No | String | Specifies the port ID. | + | | | | | + | | | | Leaving this parameter blank does not unbind the EIP from the dedicated load balancer. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 4** Response parameter + + +------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+=================================================================+=================================================================================================================+ + | floatingip | :ref:`floatingip ` object | Specifies the floating IP address list. For details, see :ref:`Table 5 `. | + +------------+-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +.. _vpc_floatingip_0004__table8139247714: + +.. table:: **Table 5** **floatingip** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+================================================================================================+ + | status | String | Specifies the floating IP address status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + | | | | + | | | - **DOWN** indicates that the floating IP address has not been bound. | + | | | - **ACTIVE** indicates that the floating IP address has been bound. | + | | | - **ERROR** indicates that the floating IP address is abnormal. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | id | String | Specifies the floating IP address ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_ip_address | String | Specifies the floating IP address. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | floating_network_id | String | Specifies the external network ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | router_id | String | Specifies the ID of the belonged router. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | port_id | String | Specifies the port ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | fixed_ip_address | String | Specifies the private IP address of the associated port. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the DNS name. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the DNS domain. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request 1 (Binding a floating IP address to a port) + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/floatingips/b997e0d4-3359-4c74-8f88-bc0af81cd5a2 + + { + "floatingip": { + "port_id": "f91f5763-c5a2-4458-979d-61e48b3c3fac" + } + } + +Example response 1 (Binding a floating IP address to a port) + +.. code-block:: + + { + "floatingip": { + "id": "b997e0d4-3359-4c74-8f88-bc0af81cd5a2", + "status": "DOWN", + "router_id": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": "192.168.10.3", + "floating_ip_address": "88.88.215.205", + "port_id": 00587256-27e3-489b-96bf-ea80c1da4aeb, + "dns_name": "ecs-80-158-78-239", + "dns_domain": "reverse.domain-name.com", + "created_at": "2018-09-20T02:10:02", + "updated_at": "2018-09-20T02:10:07" + } + } + +Example request 2 (Unbinding a floating IP address from a port) + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/floatingips/b997e0d4-3359-4c74-8f88-bc0af81cd5a2 + + { + "floatingip": { + "port_id": null + } + } + +Example response 2 (Unbinding a floating IP address from a port) + +.. code-block:: + + { + "floatingip": { + "id": "b997e0d4-3359-4c74-8f88-bc0af81cd5a2", + "status": "DOWN", + "router_id": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "floating_network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "fixed_ip_address": null, + "floating_ip_address": "88.88.215.205", + "port_id": null, + "dns_name": "ecs-80-158-78-239", + "dns_domain": "reverse.domain-name.com", + "created_at": "2018-09-20T02:10:02", + "updated_at": "2018-09-20T02:10:07" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/index.rst new file mode 100644 index 0000000..9ae985f --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/index.rst @@ -0,0 +1,30 @@ +:original_name: vpc_open_0000.html + +.. _vpc_open_0000: + +Native OpenStack Neutron APIs (V2.0) +==================================== + +- :ref:`API Version Information ` +- :ref:`Port ` +- :ref:`Network ` +- :ref:`Subnet ` +- :ref:`Router ` +- :ref:`Floating IP Address ` +- :ref:`Firewall ` +- :ref:`Security Group ` +- :ref:`Subnet Pool ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + api_version_information/index + port/index + network/index + subnet/index + router/index + floating_ip_address/index + firewall/index + security_group/index + subnet_pool/index diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/network/creating_a_network.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/network/creating_a_network.rst new file mode 100644 index 0000000..99a7d49 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/network/creating_a_network.rst @@ -0,0 +1,164 @@ +:original_name: vpc_network_0003.html + +.. _vpc_network_0003: + +Creating a Network +================== + +Function +-------- + +This API is used to create a network. + +URI +--- + +POST /v2.0/networks + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------+---------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+===============================================================+===========+=================================================================================================+ + | network | :ref:`network ` object | Yes | Specifies the network. For details, see :ref:`Table 2 `. | + +-----------+---------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0003__table49902238182444: + +.. table:: **Table 2** **network** objects + + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=======================+=================+=================+==========================================================================================================================================================================================+ + | name | No | String | Specifies the network name. | + | | | | | + | | | | The name cannot be the same as the **admin_external_net** value. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status. | + | | | | | + | | | | The value can only be **true**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | provider:network_type | No | String | Specifies the network type. Only the VXLAN and GENEVE networks are supported. This is an extended attribute. | + | | | | | + | | | | Tenants can create only networks whose type is **geneve**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | No | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping settings of all VMs in the network do not take effect. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +-----------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+==============================================================+================================================================================================+ + | network | :ref:`network ` object | Specifies the network. For details, see :ref:`Table 4 `. | + +-----------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0003__table6247102344219: + +.. table:: **Table 4** **network** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+==========================================================================================================================================================================================+ + | status | String | Specifies the network status. The value can be **ACTIVE**, **BUILD**, **DOWN**, or **ERROR**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnets | Array of strings | Specifies IDs of the subnets associated with this network. The IDs are in a list. | + | | | | + | | | Only one subnet can be associated with each network. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the network name. | + | | | | + | | | The name cannot be the same as the **admin_external_net** value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. This is an extended attribute. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the network ID. | + | | | | + | | | This parameter is not mandatory when you query networks. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | provider:network_type | String | Specifies the network type. Only the VXLAN and GENEVE networks are supported. This is an extended attribute. | + | | | | + | | | Tenants can create only networks whose type is **geneve**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping settings of all VMs in the network do not take effect. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the default private network DNS domain address. The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the network is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the network is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/networks + + { + "network": { + "name": "network-test", + "shared": false, + "admin_state_up": true + } + } + +Example response + +.. code-block:: + + { + "network": { + "id": "c360322d-5315-45d7-b7d2-481f98c56edb", + "name": "network-test", + "status": "ACTIVE", + "shared": false, + "subnets": [], + "availability_zone_hints": [], + "availability_zones": [ + "az2.dc2", + "az5.dc5" + ], + "admin_state_up": true, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "provider:network_type": "vxlan", + "router:external": false, + "port_security_enabled": true, + "created_at": "2018-09-20T01:53:18", + "updated_at": "2018-09-20T01:53:20" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/network/deleting_a_network.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/network/deleting_a_network.rst new file mode 100644 index 0000000..97cc5aa --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/network/deleting_a_network.rst @@ -0,0 +1,61 @@ +:original_name: vpc_network_0005.html + +.. _vpc_network_0005: + +Deleting a Network +================== + +Function +-------- + +This API is used to delete a network. + +URI +--- + +DELETE /v2.0/networks/{network_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_network_0005__table1710134691014: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + network_id Yes Specifies the network ID. + ========== ========= ========================= + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/networks/60c809cb-6731-45d0-ace8-3bf5626421a9 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/network/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/network/index.rst new file mode 100644 index 0000000..4bfc31d --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/network/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_network_0000.html + +.. _vpc_network_0000: + +Network +======= + +- :ref:`Querying Networks ` +- :ref:`Querying Network Details ` +- :ref:`Creating a Network ` +- :ref:`Updating a Network ` +- :ref:`Deleting a Network ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_networks + querying_network_details + creating_a_network + updating_a_network + deleting_a_network diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/network/querying_network_details.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/network/querying_network_details.rst new file mode 100644 index 0000000..63a40af --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/network/querying_network_details.rst @@ -0,0 +1,142 @@ +:original_name: vpc_network_0002.html + +.. _vpc_network_0002: + +Querying Network Details +======================== + +Function +-------- + +This API is used to query details about a network. + +URI +--- + +GET /v2.0/networks/{network_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_network_0002__table1710134691014: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + network_id Yes Specifies the network ID. + ========== ========= ========================= + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+===============================================================+=================================================================================================+ + | network | :ref:`network ` object | Specifies the network. For details, see :ref:`Table 3 `. | + +-----------+---------------------------------------------------------------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0002__table49902238182444: + +.. table:: **Table 3** **network** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+==========================================================================================================================================================================================+ + | status | String | Specifies the network status. The value can be **ACTIVE**, **BUILD**, **DOWN**, or **ERROR**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnets | Array of strings | Specifies IDs of the subnets associated with this network. The IDs are in a list. | + | | | | + | | | Only one subnet can be associated with each network. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the network name. | + | | | | + | | | The name cannot be the same as the **admin_external_net** value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. This is an extended attribute. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the network ID. | + | | | | + | | | This parameter is not mandatory when you query networks. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | provider:network_type | String | Specifies the network type. Only the VXLAN and GENEVE networks are supported. This is an extended attribute. | + | | | | + | | | Tenants can create only networks whose type is **geneve**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping settings of all VMs in the network do not take effect. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the default private network DNS domain address. The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the network is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the network is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/networks/0133cd73-34d4-4d4c-bf1f-e65b24603206 + +Example response + +.. code-block:: + + { + "network": { + "id": "0133cd73-34d4-4d4c-bf1f-e65b24603206", + "name": "3804f26c-7862-43b6-ad3c-48445f42de89", + "status": "ACTIVE", + "shared": false, + "subnets": [ + "423796f5-e02f-476f-bf02-2b88c8ddac8b" + ], + "availability_zone_hints": [], + "availability_zones": [ + "az2.dc2", + "az5.dc5" + ], + "admin_state_up": true, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "provider:network_type": "vxlan", + "router:external": false, + "port_security_enabled": true, + "created_at": "2018-03-23T03:51:58", + "updated_at": "2018-03-23T03:51:58" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/network/querying_networks.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/network/querying_networks.rst new file mode 100644 index 0000000..ab19c3a --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/network/querying_networks.rst @@ -0,0 +1,216 @@ +:original_name: vpc_network_0001.html + +.. _vpc_network_0001: + +Querying Networks +================= + +Function +-------- + +This API is used to query all networks accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/networks + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/networks?id={network_id}&status={network_status}&name={network_name}&admin_state_up=${admin_state_up}&tenant_id={tenant_id}&shared={is_shared}&provider:network_type={geneve} + +Example of querying ports by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/networks?limit=2&marker=0133cd73-34d4-4d4c-bf1f-e65b24603206&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_network_0001__table1410155047: + +.. table:: **Table 1** Parameter description + + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=======================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the network ID is used as the filtering condition. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the network name is used as the filtering condition. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies that the admin state is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | provider:network_type | No | String | Specifies that the network type is used as the filtering condition. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | No | Boolean | Specifies that whether the network can be shared by multiple tenants is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | No | String | Specifies that the network status is used as the filtering condition. | + | | | | | + | | | | The value can be **ACTIVE**, **BUILD**, or **DOWN**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | No | Boolean | Specifies whether the network is an external network is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------------+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+==============================================================================+======================================================================================================================================================================================================================+ + | networks | Array of :ref:`network ` objects | Specifies the network list. For details, see :ref:`Table 3 `. | + +-----------------------+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | networks_links | Array of :ref:`networks_link ` objects | Specifies the pagination information. For details, see :ref:`Table 4 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0001__table49902238182444: + +.. table:: **Table 3** **network** object + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+==========================================================================================================================================================================================+ + | status | String | Specifies the network status. The value can be **ACTIVE**, **BUILD**, **DOWN**, or **ERROR**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnets | Array of strings | Specifies IDs of the subnets associated with this network. The IDs are in a list. | + | | | | + | | | Only one subnet can be associated with each network. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the network name. | + | | | | + | | | The name cannot be the same as the **admin_external_net** value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. This is an extended attribute. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the network ID. | + | | | | + | | | This parameter is not mandatory when you query networks. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | provider:network_type | String | Specifies the network type. Only the VXLAN and GENEVE networks are supported. This is an extended attribute. | + | | | | + | | | Tenants can create only networks whose type is **geneve**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping settings of all VMs in the network do not take effect. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the default private network DNS domain address. The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the network is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the network is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0001__table1296611517358: + +.. table:: **Table 4** **networks_link** object + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/networks?limit=1 + +Example response + +.. code-block:: + + { + "networks": [ + { + "id": "0133cd73-34d4-4d4c-bf1f-e65b24603206", + "name": "3804f26c-7862-43b6-ad3c-48445f42de89", + "status": "ACTIVE", + "shared": false, + "subnets": [ + "423796f5-e02f-476f-bf02-2b88c8ddac8b" + ], + "availability_zone_hints": [], + "availability_zones": [ + "az2.dc2", + "az5.dc5" + ], + "admin_state_up": true, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "provider:network_type": "vxlan", + "router:external": false, + "port_security_enabled": true, + "created_at": "2018-03-23T03:51:58", + "updated_at": "2018-03-23T03:51:58" + } + ], + "networks_links": [ + { + "rel": "next", + "href": "https://{Endpoint}/v2.0/networks?limit=1&marker=0133cd73-34d4-4d4c-bf1f-e65b24603206" + }, + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/subnets?limit=1&marker=0133cd73-34d4-4d4c-bf1f-e65b24603206&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/network/updating_a_network.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/network/updating_a_network.rst new file mode 100644 index 0000000..40a4414 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/network/updating_a_network.rst @@ -0,0 +1,172 @@ +:original_name: vpc_network_0004.html + +.. _vpc_network_0004: + +Updating a Network +================== + +Function +-------- + +This API is used to update a network. + +URI +--- + +PUT /v2.0/networks/{network_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_network_0004__table1710134691014: + +.. table:: **Table 1** Parameter description + + ========== ========= ========================= + Name Mandatory Description + ========== ========= ========================= + network_id Yes Specifies the network ID. + ========== ========= ========================= + +Request Message +--------------- + +.. table:: **Table 2** Request parameter + + +-----------------+---------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+===============================================================+=================+=================================================================================================+ + | network | :ref:`network ` object | Yes | Specifies the network. For details, see :ref:`Table 3 `. | + | | | | | + | | | | You must specify at least one attribute when updating a network. | + +-----------------+---------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0004__table49902238182444: + +.. table:: **Table 3** **network** objects + + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=======================+=================+=================+==========================================================================================================================================================================================+ + | name | No | String | Specifies the network name. | + | | | | | + | | | | The name cannot be the same as the **admin_external_net** value. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status. | + | | | | | + | | | | The value can only be **true**. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | No | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping settings of all VMs in the network do not take effect. | + +-----------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 4** Response parameter + + +-----------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+==============================================================+================================================================================================+ + | network | :ref:`network ` object | Specifies the network. For details, see :ref:`Table 5 `. | + +-----------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + +.. _vpc_network_0004__table6247102344219: + +.. table:: **Table 5** **network** objects + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+==========================================================================================================================================================================================+ + | status | String | Specifies the network status. The value can be **ACTIVE**, **BUILD**, **DOWN**, or **ERROR**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnets | Array of strings | Specifies IDs of the subnets associated with this network. The IDs are in a list. | + | | | | + | | | Only one subnet can be associated with each network. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the network name. | + | | | | + | | | The name cannot be the same as the **admin_external_net** value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. This is an extended attribute. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the firewall rule can be shared by different tenants. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | Specifies the network ID. | + | | | | + | | | This parameter is not mandatory when you query networks. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | provider:network_type | String | Specifies the network type. Only the VXLAN and GENEVE networks are supported. This is an extended attribute. | + | | | | + | | | Tenants can create only networks whose type is **geneve**. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping settings of all VMs in the network do not take effect. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_domain | String | Specifies the default private network DNS domain address. The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the network is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the network is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/networks/c360322d-5315-45d7-b7d2-481f98c56edb + + { + "network": { + "name": "network-test02" + } + } + +Example response + +.. code-block:: + + { + "network": { + "id": "c360322d-5315-45d7-b7d2-481f98c56edb", + "name": "network-test02", + "status": "ACTIVE", + "shared": false, + "subnets": [], + "availability_zone_hints": [], + "availability_zones": [ + "az2.dc2", + "az5.dc5" + ], + "admin_state_up": true, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "provider:network_type": "vxlan", + "router:external": false, + "port_security_enabled": true, + "created_at": "2018-09-20T01:53:18", + "updated_at": "2018-09-20T01:55:47" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/port/creating_a_port.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/port/creating_a_port.rst new file mode 100644 index 0000000..8cdbbdd --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/port/creating_a_port.rst @@ -0,0 +1,376 @@ +:original_name: vpc_port02_0003.html + +.. _vpc_port02_0003: + +Creating a Port +=============== + +Function +-------- + +This API is used to create a port. + +URI +--- + +POST /v2.0/ports + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------+-----------------------------------------------------------+-----------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+===========================================================+===========+=========================================================================================================+ + | port | :ref:`port ` object | Yes | Specifies the port object list. For details, see :ref:`Table 2 `. | + +-----------+-----------------------------------------------------------+-----------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0003__table15919752145624: + +.. table:: **Table 2** **port** objects + + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=======================+=================+====================================================================================================+==================================================================================================================================================================================================================================================================================================================================================================================================================+ + | name | No | String | Specifies the port name. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | Yes | String | - Specifies the ID of the network to which the port belongs. | + | | | | - The network ID must be a real one in the network environment. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ips | No | Array of :ref:`fixed_ip ` objects | Specifies the port IP address. For details, see :ref:`Table 3 `. For example, the value is **"fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}]**. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups | No | Array of strings | Specifies the UUID of the security group, for example, **"security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]**. This is an extended attribute. | + | | | | | + | | | | This parameter cannot be left blank. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allowed_address_pairs | No | Array of :ref:`allow_address_pair ` objects | Specifies the IP address and MAC address pair. This is an extended attribute. For details, see :ref:`Table 4 `. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | - The IP address cannot be **0.0.0.0**. | + | | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | | - In the hardware SDN networking plan, the **ip_address** attribute value cannot be in CIDR format. | + | | | | - To assign a virtual IP address to an ECS, the IP address configured in **allowed_address_pairs** must be an existing ECS NIC IP address. Otherwise, the virtual IP address cannot be used for communication. | + | | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | No | Array of :ref:`extra_dhcp_opt ` objects | Specifies the extended DHCP option. This is an extended attribute. For details, see :ref:`Table 5 `. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:profile | No | Object | Specifies the user-defined settings. This is an extended attribute. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | - The **internal_elb** field is in boolean type and is available to common tenants. Set the value of this parameter to **true** only when you assign a virtual IP address to an internal network load balancer. Common tenants do not have the permission to change the value of this field, which is maintained by the system. | + | | | | | + | | | | Example: | + | | | | | + | | | | {"internal_elb": true} | + | | | | | + | | | | - The **disable_security_groups** field is in boolean type and is available to common tenants. The default value is **false**. In high-performance communication scenarios, you can set the parameter value to **true**, which makes this parameter to be available to common tenants. You can specify this parameter when creating a port. Currently, the value of this parameter can only be set to **true**. | + | | | | | + | | | | Example: | + | | | | | + | | | | {"disable_security_groups": true }, | + | | | | | + | | | | Currently, the value can only be set to **true**. When the value is set to **true**, the FWaaS function does not take effect. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vnic_type | No | String | Specifies the type of the bound vNIC. | + | | | | | + | | | | **normal**: Softswitch | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | No | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | No | String | Specifies the device to which the port belongs. Currently, only **""** and **neutron:VIP_PORT** are supported. **neutron:VIP_PORT** indicates the port of a virtual IP address. | + +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0003__table335683819394: + +.. table:: **Table 3** **fixed_ip** objects + + +-----------------+-----------------+-----------------+-----------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+=================+===========================================================+ + | subnet_id | No | String | Specifies the ID of the subnet to which the port belongs. | + | | | | | + | | | | This parameter cannot be updated. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------+ + | ip_address | No | String | Specifies the port IP address. | + | | | | | + | | | | This parameter cannot be updated. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------+ + +.. _vpc_port02_0003__en-us_topic_0062207355_table57914257: + +.. table:: **Table 4** **allow_address_pair** object + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================================================================================================+ + | ip_address | Yes | String | - Specifies the IP address. | + | | | | - You cannot set it to **0.0.0.0/0**. | + | | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + | | | | - If the value of parameter **allowed_address_pairs** is specified, parameter **ip_address** is mandatory. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | No | String | Specifies the MAC address. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0003__table5056075615524: + +.. table:: **Table 5** **extra_dhcp_opt** objects + + ========= ========= ====== =========================== + Attribute Mandatory Type Description + ========= ========= ====== =========================== + opt_name No String Specifies the option name. + opt_value No String Specifies the option value. + ========= ========= ====== =========================== + +Response Message +---------------- + +.. table:: **Table 6** Response parameter + + +-----------+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=========================================================+=======================================================================================================+ + | port | :ref:`port ` object | Specifies the port information. For details, see :ref:`Table 7 `. | + +-----------+---------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0003__table923516594178: + +.. table:: **Table 7** **port** objects + + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+===================================================================================+==================================================================================================================================================================================================================================================================================================================================================================================================================+ + | id | String | Specifies the port ID. A maximum of 255 characters are allowed. | + | | | | + | | | This parameter is not mandatory when you query ports. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the port name. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the port belongs. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | + | | | | + | | | This value can only be dynamically assigned by the system. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ips | Array of :ref:`fixed_ip ` objects | Specifies the port IP address. For details, see :ref:`Table 8 `. For example, the value is **"fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}]**. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_id | String | Specifies the device ID. | + | | | | + | | | This value is automatically maintained by the system and cannot be set or updated manually. The port with this field specified cannot be deleted. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | Specifies the DHCP, router or Nova to which a device belongs. | + | | | | + | | | The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | | + | | | This parameter value cannot be updated. You can only set **device_owner** to **neutron:VIP_PORT** for a virtual IP address port during port creation. If this parameter of a port is not left blank, the port can only be deleted when this parameter value is **neutron:VIP_PORT**. | + | | | | + | | | The port with this field specified cannot be deleted. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the port status. The value can be **ACTIVE**, **BUILD**, or **DOWN**. | + | | | | + | | | The status of a HANA SR-IOV VM port is always **DOWN**. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups | Array of strings | Specifies the UUID of the security group, for example, **"security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]**. This is an extended attribute. | + | | | | + | | | This parameter cannot be left blank. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allowed_address_pairs | Array of :ref:`allow_address_pair ` objects | Specifies the IP address and MAC address pair. This is an extended attribute. For details, see :ref:`Table 9 `. | + | | | | + | | | Instructions: | + | | | | + | | | - The IP address cannot be **0.0.0.0**. | + | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | - In the hardware SDN networking plan, the **ip_address** attribute value cannot be in CIDR format. | + | | | - To assign a virtual IP address to an ECS, the IP address configured in **allowed_address_pairs** must be an existing ECS NIC IP address. Otherwise, the virtual IP address cannot be used for communication. | + | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the extended DHCP option. This is an extended attribute. For details, see :ref:`Table 10 `. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vif_details | :ref:`binding:vif_details ` object | For details, see :ref:`Table 11 `. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:profile | Object | Specifies the user-defined settings. This is an extended attribute. | + | | | | + | | | Instructions: | + | | | | + | | | - The **internal_elb** field is in boolean type and is available to common tenants. Set the value of this parameter to **true** only when you assign a virtual IP address to an internal network load balancer. Common tenants do not have the permission to change the value of this field, which is maintained by the system. | + | | | | + | | | Example: | + | | | | + | | | {"internal_elb": true} | + | | | | + | | | - The **disable_security_groups** field is in boolean type and is available to common tenants. The default value is **false**. In high-performance communication scenarios, you can set the parameter value to **true**, which makes this parameter to be available to common tenants. You can specify this parameter when creating a port. Currently, the value of this parameter can only be set to **true**. | + | | | | + | | | Example: | + | | | | + | | | {"disable_security_groups": true }, | + | | | | + | | | Currently, the value can only be set to **true**. When the value is set to **true**, the FWaaS function does not take effect. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vnic_type | String | Specifies the type of the bound vNIC. | + | | | | + | | | **normal**: Softswitch | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_assignment | Array of :ref:`dns_assignment ` objects | Specifies the default private network domain name information of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + | | | | + | | | - **hostname**: **dns_name** value of the NIC | + | | | - **ip_address**: Private IPv4 address of the NIC | + | | | - **fqdn**: Default private network fully qualified domain name (FQDN) of the IP address | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the default private network DNS name of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. Before accessing the default private network domain name, ensure that the subnet uses the DNS provided by the current system. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the port is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the port is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0003__table1424105920176: + +.. table:: **Table 8** **fixed_ip** objects + + +-----------------------+-----------------------+-----------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================+ + | subnet_id | String | Specifies the ID of the subnet to which the port belongs. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + +.. _vpc_port02_0003__table13242185941715: + +.. table:: **Table 9** **allow_address_pair** objects + + +-----------------------+-----------------------+---------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=======================================+ + | ip_address | String | Specifies the IP address. | + | | | | + | | | This parameter cannot be **0.0.0.0**. | + +-----------------------+-----------------------+---------------------------------------+ + | mac_address | String | Specifies the MAC address. | + +-----------------------+-----------------------+---------------------------------------+ + +.. _vpc_port02_0003__table1243759131714: + +.. table:: **Table 10** **extra_dhcp_opt** objects + + ========= ====== =========================== + Attribute Type Description + ========= ====== =========================== + opt_name String Specifies the option name. + opt_value String Specifies the option value. + ========= ====== =========================== + +.. _vpc_port02_0003__table72371439857: + +.. table:: **Table 11** **binding:vif_details** object + + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===================+=========+=================================================================================================+ + | primary_interface | Boolean | If the value is true, this is the primary NIC. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | port_filter | Boolean | Specifies the port used for filtering in security groups to protect against MAC or IP spoofing. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | ovs_hybrid_plug | Boolean | Specifies that OVS hybrid plug should be used by Nova APIs. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0003__table1960316535179: + +.. table:: **Table 12** **dns_assignment** object + + +------------+--------+-------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========+===============================================================================+ + | hostname | String | Specifies the host name of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + +------------+--------+-------------------------------------------------------------------------------+ + | fqdn | String | Specifies the private network fully qualified domain name (FQDN) of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/ports + + { + "port": { + "admin_state_up": true, + "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", + "name": "port-test" + } + } + +Example response + +.. code-block:: + + { + "port": { + "id": "a7d98f3c-b42f-460b-96a1-07601e145961", + "name": "port-test", + "status": "DOWN", + "admin_state_up": true, + "fixed_ips": [], + "mac_address": "fa:16:3e:01:f7:90", + "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", + "tenant_id": "db82c9e1415a464ea68048baa8acc6b8", + "project_id": "db82c9e1415a464ea68048baa8acc6b8", + "device_id": "", + "device_owner": "", + "security_groups": [ + "d0d58aa9-cda9-414c-9c52-6c3daf8534e6" + ], + "extra_dhcp_opts": [], + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "binding:vif_details": {}, + "binding:profile": {}, + "port_security_enabled": true, + "created_at": "2018-09-20T01:45:26", + "updated_at": "2018-09-20T01:45:26" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/port/deleting_a_port.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/port/deleting_a_port.rst new file mode 100644 index 0000000..9aa1c55 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/port/deleting_a_port.rst @@ -0,0 +1,66 @@ +:original_name: vpc_port02_0005.html + +.. _vpc_port02_0005: + +Deleting a Port +=============== + +Function +-------- + +This API is used to delete a port. + +Restrictions + +- A port with **device_owner** set to a value other than **neutron:VIP_PORT** cannot be deleted. +- A port with **device_id** specified cannot be deleted. + +URI +--- + +DELETE /v2.0/ports/{port_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_port02_0005__table1855162528: + +.. table:: **Table 1** Parameter description + + +---------+-----------+------------------------------------------------------------+ + | Name | Mandatory | Description | + +=========+===========+============================================================+ + | port_id | Yes | Specifies the port ID, which uniquely identifies the port. | + +---------+-----------+------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/ports/2b098395-046a-4071-b009-312bcee665cb + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/port/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/port/index.rst new file mode 100644 index 0000000..9dcc513 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/port/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_port02_0000.html + +.. _vpc_port02_0000: + +Port +==== + +- :ref:`Querying Ports ` +- :ref:`Querying a Port ` +- :ref:`Creating a Port ` +- :ref:`Updating a Port ` +- :ref:`Deleting a Port ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_ports + querying_a_port + creating_a_port + updating_a_port + deleting_a_port diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/port/querying_a_port.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/port/querying_a_port.rst new file mode 100644 index 0000000..2b79154 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/port/querying_a_port.rst @@ -0,0 +1,275 @@ +:original_name: vpc_port02_0002.html + +.. _vpc_port02_0002: + +Querying a Port +=============== + +Function +-------- + +This API is used to query details about a specified port. + +URI +--- + +GET /v2.0/ports/{port_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_port02_0002__table59011559707: + +.. table:: **Table 1** Parameter description + + +---------+-----------+------------------------------------------------------------+ + | Name | Mandatory | Description | + +=========+===========+============================================================+ + | port_id | Yes | Specifies the port ID, which uniquely identifies the port. | + +---------+-----------+------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+===========================================================+=========================================================================================================+ + | port | :ref:`port ` object | Specifies the port object list. For details, see :ref:`Table 3 `. | + +-----------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0002__table15919752145624: + +.. table:: **Table 3** **port** objects + + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+====================================================================================================+==================================================================================================================================================================================================================================================================================================================================================================================================================+ + | id | String | Specifies the port ID. A maximum of 255 characters are allowed. | + | | | | + | | | This parameter is not mandatory when you query ports. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the port name. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the port belongs. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | + | | | | + | | | This value can only be dynamically assigned by the system. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ips | Array of :ref:`fixed_ip ` objects | Specifies the port IP address. For details, see :ref:`Table 4 `. For example, the value is **"fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}]**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_id | String | Specifies the device ID. | + | | | | + | | | This value is automatically maintained by the system and cannot be set or updated manually. The port with this field specified cannot be deleted. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | Specifies the DHCP, router or Nova to which a device belongs. | + | | | | + | | | The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | | + | | | This parameter value cannot be updated. You can only set **device_owner** to **neutron:VIP_PORT** for a virtual IP address port during port creation. If this parameter of a port is not left blank, the port can only be deleted when this parameter value is **neutron:VIP_PORT**. | + | | | | + | | | The port with this field specified cannot be deleted. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the port status. The value can be **ACTIVE**, **BUILD**, or **DOWN**. | + | | | | + | | | The status of a HANA SR-IOV VM port is always **DOWN**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups | Array of strings | Specifies the UUID of the security group, for example, **"security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]**. This is an extended attribute. | + | | | | + | | | This parameter cannot be left blank. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allowed_address_pairs | Array of :ref:`allow_address_pair ` objects | Specifies the IP address and MAC address pair. This is an extended attribute. For details, see :ref:`Table 5 `. | + | | | | + | | | Instructions: | + | | | | + | | | - The IP address cannot be **0.0.0.0**. | + | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | - In the hardware SDN networking plan, the **ip_address** attribute value cannot be in CIDR format. | + | | | - To assign a virtual IP address to an ECS, the IP address configured in **allowed_address_pairs** must be an existing ECS NIC IP address. Otherwise, the virtual IP address cannot be used for communication. | + | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the extended DHCP option. This is an extended attribute. For details, see :ref:`Table 6 `. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vif_details | :ref:`binding:vif_details ` object | For details, see :ref:`Table 8 `. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:profile | binding:profile object | Specifies the user-defined settings. This is an extended attribute. | + | | | | + | | | Instructions: | + | | | | + | | | - The **internal_elb** field is in boolean type and is available to common tenants. Set the value of this parameter to **true** only when you assign a virtual IP address to an internal network load balancer. Common tenants do not have the permission to change the value of this field, which is maintained by the system. | + | | | | + | | | Example: | + | | | | + | | | {"internal_elb": true} | + | | | | + | | | - The **disable_security_groups** field is in boolean type and is available to common tenants. The default value is **false**. In high-performance communication scenarios, you can set the parameter value to **true**, which makes this parameter to be available to common tenants. You can specify this parameter when creating a port. Currently, the value of this parameter can only be set to **true**. | + | | | | + | | | Example: | + | | | | + | | | {"disable_security_groups": true }, | + | | | | + | | | Currently, the value can only be set to **true**. When the value is set to **true**, the FWaaS function does not take effect. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vnic_type | String | Specifies the type of the bound vNIC. | + | | | | + | | | **normal**: Softswitch | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_assignment | Array of :ref:`dns_assignment ` objects | Specifies the default private network domain name information of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + | | | | + | | | - **hostname**: **dns_name** value of the NIC | + | | | - **ip_address**: Private IPv4 address of the NIC | + | | | - **fqdn**: Default private network fully qualified domain name (FQDN) of the IP address | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the default private network DNS name of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. Before accessing the default private network domain name, ensure that the subnet uses the DNS provided by the current system. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the port is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the port is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0002__table4290920914597: + +.. table:: **Table 4** **fixed_ip** objects + + +-----------------------+-----------------------+-----------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================+ + | subnet_id | String | Specifies the ID of the subnet to which the port belongs. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + +.. _vpc_port02_0002__en-us_topic_0062207355_table57914257: + +.. table:: **Table 5** **allow_address_pair** object + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================================================================================================+ + | ip_address | Yes | String | - Specifies the IP address. | + | | | | - You cannot set it to **0.0.0.0/0**. | + | | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + | | | | - If the value of parameter **allowed_address_pairs** is specified, parameter **ip_address** is mandatory. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | No | String | Specifies the MAC address. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0002__table5056075615524: + +.. table:: **Table 6** **extra_dhcp_opt** objects + + ========= ====== =========================== + Attribute Type Description + ========= ====== =========================== + opt_name String Specifies the option name. + opt_value String Specifies the option value. + ========= ====== =========================== + +.. _vpc_port02_0002__table1960316535179: + +.. table:: **Table 7** **dns_assignment** object + + +------------+--------+-------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========+===============================================================================+ + | hostname | String | Specifies the host name of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + +------------+--------+-------------------------------------------------------------------------------+ + | fqdn | String | Specifies the private network fully qualified domain name (FQDN) of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + +.. _vpc_port02_0002__table72371439857: + +.. table:: **Table 8** **binding:vif_details** object + + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===================+=========+=================================================================================================+ + | primary_interface | Boolean | If the value is true, this is the primary NIC. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | port_filter | Boolean | Specifies the port used for filtering in security groups to protect against MAC or IP spoofing. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | ovs_hybrid_plug | Boolean | Specifies that OVS hybrid plug should be used by Nova APIs. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/ports/791870bd-36a7-4d9b-b015-a78e9b06af08 + +Example response + +.. code-block:: + + { + "port": { + "id": "791870bd-36a7-4d9b-b015-a78e9b06af08", + "name": "port-test", + "status": "DOWN", + "admin_state_up": true, + "fixed_ips": [], + "mac_address": "fa:16:3e:01:e0:b2", + "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", + "tenant_id": "db82c9e1415a464ea68048baa8acc6b8", + "project_id": "db82c9e1415a464ea68048baa8acc6b8", + "device_id": "", + "device_owner": "", + "security_groups": [ + "d0d58aa9-cda9-414c-9c52-6c3daf8534e6" + ], + "extra_dhcp_opts": [], + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "binding:vif_details": {}, + "binding:profile": {}, + "port_security_enabled": true, + "created_at": "2018-09-13T01:43:41", + "updated_at": "2018-09-13T01:43:41" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/port/querying_ports.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/port/querying_ports.rst new file mode 100644 index 0000000..e172adb --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/port/querying_ports.rst @@ -0,0 +1,658 @@ +:original_name: vpc_port02_0001.html + +.. _vpc_port02_0001: + +Querying Ports +============== + +Function +-------- + +Queries all networks accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/ports + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/ports?id={port_id}&name={port_name}&admin_state_up={is_admin_status_up}&network_id={network_id}&mac_address={port_mac}&device_id={port_device_id}&device_owner={device_owner}&tenant_id={tenant_id}&status={port_status}&fixed_ips=ip_address={ip_address}&fixed_ips=subnet_id={subnet_id} + +Example of querying ports by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/ports?limit=2&marker=791870bd-36a7-4d9b-b015-a78e9b06af08&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_port02_0001__table534412611487: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+==================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the port ID is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the port name is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies that the admin state is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | No | String | Specifies that the network ID is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | No | String | Specifies that the MAC address is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_id | No | String | Specifies that the device ID is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | No | String | Specifies that the device owner is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | No | String | Specifies that the port status is used as the filtering condition. | + | | | | | + | | | | The value can be **ACTIVE**, **BUILD**, or **DOWN**. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ips | No | Array of strings | Specifies that the IP address is used as the filtering condition. The value can be **fixed_ips=ip_address** or **fixed_ips=subnet_id**. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Parameter +------------------ + +.. table:: **Table 2** Response parameter + + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=========================================================================+======================================================================================================================================================================================================================+ + | ports | Array of :ref:`port ` objects | Specifies the port object list. For details, see :ref:`Table 3 `. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ports_links | Array of :ref:`ports_link ` objects | Specifies the pagination information. For details, see :ref:`Table 9 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0001__table15919752145624: + +.. table:: **Table 3** **port** objects + + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+====================================================================================================+==================================================================================================================================================================================================================================================================================================================================================================================================================+ + | id | String | Specifies the port ID. A maximum of 255 characters are allowed. | + | | | | + | | | This parameter is not mandatory when you query ports. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the port name. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the port belongs. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | + | | | | + | | | This value can only be dynamically assigned by the system. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ips | Array of :ref:`fixed_ip ` objects | Specifies the port IP address. For details, see :ref:`Table 4 `. For example, the value is **"fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}]**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_id | String | Specifies the device ID. | + | | | | + | | | This value is automatically maintained by the system and cannot be set or updated manually. The port with this field specified cannot be deleted. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | Specifies the DHCP, router or Nova to which a device belongs. | + | | | | + | | | The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | | + | | | This parameter value cannot be updated. You can only set **device_owner** to **neutron:VIP_PORT** for a virtual IP address port during port creation. If this parameter of a port is not left blank, the port can only be deleted when this parameter value is **neutron:VIP_PORT**. | + | | | | + | | | The port with this field specified cannot be deleted. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the port status. The value can be **ACTIVE**, **BUILD**, or **DOWN**. | + | | | | + | | | The status of a HANA SR-IOV VM port is always **DOWN**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups | Array of strings | Specifies the UUID of the security group, for example, **"security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]**. This is an extended attribute. | + | | | | + | | | This parameter cannot be left blank. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allowed_address_pairs | Array of :ref:`allow_address_pair ` objects | Specifies the IP address and MAC address pair. This is an extended attribute. For details, see :ref:`Table 5 `. | + | | | | + | | | Instructions: | + | | | | + | | | - The IP address cannot be **0.0.0.0**. | + | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | - In the hardware SDN networking plan, the **ip_address** attribute value cannot be in CIDR format. | + | | | - To assign a virtual IP address to an ECS, the IP address configured in **allowed_address_pairs** must be an existing ECS NIC IP address. Otherwise, the virtual IP address cannot be used for communication. | + | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the extended DHCP option. This is an extended attribute. For details, see :ref:`Table 6 `. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vif_details | :ref:`binding:vif_details ` object | For details, see :ref:`Table 7 `. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:profile | Object | Specifies the user-defined settings. This is an extended attribute. | + | | | | + | | | Instructions: | + | | | | + | | | - The **internal_elb** field is in boolean type and is available to common tenants. Set the value of this parameter to **true** only when you assign a virtual IP address to an internal network load balancer. Common tenants do not have the permission to change the value of this field, which is maintained by the system. | + | | | | + | | | Example: | + | | | | + | | | {"internal_elb": true} | + | | | | + | | | - The **disable_security_groups** field is in boolean type and is available to common tenants. The default value is **false**. In high-performance communication scenarios, you can set the parameter value to **true**, which makes this parameter to be available to common tenants. You can specify this parameter when creating a port. Currently, the value of this parameter can only be set to **true**. | + | | | | + | | | Example: | + | | | | + | | | {"disable_security_groups": true }, | + | | | | + | | | Currently, the value can only be set to **true**. When the value is set to **true**, the FWaaS function does not take effect. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vnic_type | String | Specifies the type of the bound vNIC. | + | | | | + | | | **normal**: Softswitch | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_assignment | Array of :ref:`dns_assignment ` objects | Specifies the default private network domain name information of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + | | | | + | | | - **hostname**: **dns_name** value of the NIC | + | | | - **ip_address**: Private IPv4 address of the NIC | + | | | - **fqdn**: Default private network fully qualified domain name (FQDN) of the IP address | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the default private network DNS name of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. Before accessing the default private network domain name, ensure that the subnet uses the DNS provided by the current system. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the port is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the port is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0001__table4290920914597: + +.. table:: **Table 4** **fixed_ip** objects + + +-----------------------+-----------------------+-----------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================+ + | subnet_id | String | Specifies the ID of the subnet to which the port belongs. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + +.. _vpc_port02_0001__en-us_topic_0062207355_table57914257: + +.. table:: **Table 5** **allow_address_pair** object + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================================================================================================+ + | ip_address | Yes | String | - Specifies the IP address. | + | | | | - You cannot set it to **0.0.0.0/0**. | + | | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + | | | | - If the value of parameter **allowed_address_pairs** is specified, parameter **ip_address** is mandatory. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | No | String | Specifies the MAC address. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0001__table5056075615524: + +.. table:: **Table 6** **extra_dhcp_opt** objects + + ========= ====== =========================== + Attribute Type Description + ========= ====== =========================== + opt_name String Specifies the option name. + opt_value String Specifies the option value. + ========= ====== =========================== + +.. _vpc_port02_0001__table72371439857: + +.. table:: **Table 7** **binding:vif_details** object + + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===================+=========+=================================================================================================+ + | primary_interface | Boolean | If the value is true, this is the primary NIC. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | port_filter | Boolean | Specifies the port used for filtering in security groups to protect against MAC or IP spoofing. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | ovs_hybrid_plug | Boolean | Specifies that OVS hybrid plug should be used by Nova APIs. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0001__table1960316535179: + +.. table:: **Table 8** **dns_assignment** object + + +------------+--------+-------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========+===============================================================================+ + | hostname | String | Specifies the host name of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + +------------+--------+-------------------------------------------------------------------------------+ + | fqdn | String | Specifies the private network fully qualified domain name (FQDN) of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + +.. _vpc_port02_0001__table109221759807: + +.. table:: **Table 9** **ports_link** object + + +------+--------+----------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+======================================================================+ + | href | String | Specifies the API link. | + +------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +------+--------+----------------------------------------------------------------------+ + +Example: +-------- + +[Example 1] + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/ports?limit=1 + +- Example response + + .. code-block:: + + { + "ports": [{ + "id": "791870bd-36a7-4d9b-b015-a78e9b06af08", + "name": "port-test", + "status": "DOWN", + "admin_state_up": true, + "fixed_ips": [], + "mac_address": "fa:16:3e:01:e0:b2", + "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", + "tenant_id": "db82c9e1415a464ea68048baa8acc6b8", + "project_id": "db82c9e1415a464ea68048baa8acc6b8", + "device_id": "", + "device_owner": "", + "security_groups": ["d0d58aa9-cda9-414c-9c52-6c3daf8534e6"], + "extra_dhcp_opts": [], + "allowed_address_pairs": [], + "binding: vnic_type": "normal", + "binding: vif_details": {}, + "binding: profile": {}, + "port_security_enabled": true, + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41" + }], + "ports_links": [ + { + "rel": "next", + "href": "https://{Endpoint}/v2.0/ports?limit=1&marker=791870bd-36a7-4d9b-b015-a78e9b06af08" + }, + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ports?limit=1&marker=791870bd-36a7-4d9b-b015-a78e9b06af08&page_reverse=True" + } + ] + } + +[Example 2] + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/ports?mac_address=fa:16:3e:f1:0b:09 + +- Example response + + .. code-block:: + + { + "ports": [ + { + "admin_state_up": true, + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "device_id": "e6c05704-c907-4cc1-8106-69b0996c43b9", + "device_owner": "compute:az3.dc1", + "port_security_enabled":true, + "extra_dhcp_opts": [], + "fixed_ips": [ + { + "ip_address": "172.16.0.37", + "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5" + } + ], + "dns_assignment": [ + { + "hostname": "ip-172-16-0-37", + "ip_address": "172.16.0.37", + "fqdn": "ip-172-16-0-37.xxx.compute.internal." + } + ], + "dns_name": "ip-172-16-0-37", + "id": "7bb64706-6e46-4f94-a28a-4bc7caaab87d", + "mac_address": "fa:16:3e:f1:0b:09", + "name": "port_vm_50_3", + "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", + "security_groups": [ + "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2" + ], + "status": "ACTIVE", + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "project_id": "6c9298ec8c874f7f99688489ab65f90e", + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41" + } + ], + "ports_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ports?mac_address=fa%3A16%3A3e%3Af1%3A0b%3A09&marker=7bb64706-6e46-4f94-a28a-4bc7caaab87d&page_reverse=True" + } + ] + } + +[Example 3] + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/ports?admin_state_up=False + +- Example response + + .. code-block:: + + { + "ports": [ + + { + "admin_state_up": false, + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "device_id": "", + "device_owner": "", + "port_security_enabled":true, + "extra_dhcp_opts": [], + "fixed_ips": [ + { + "ip_address": "10.100.100.62", + "subnet_id": "9b28f20c-0234-419f-a0b4-4a84f182f64b" + } + ], + "dns_name": "", + "id": "ffc0bdee-8413-4fa2-bd82-fa8efe5b3a87", + "mac_address": "fa:16:3e:2b:bc:57", + "name": "small_net_port", + "network_id": "b299b151-7a66-4c6f-a313-cdd3b5724296", + "security_groups": [ + "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2" + ], + "status": "DOWN", + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "project_id": "6c9298ec8c874f7f99688489ab65f90e", + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41" + } + ], + "ports_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ports?admin_state_up=False&marker=ffc0bdee-8413-4fa2-bd82-fa8efe5b3a87&page_reverse=True" + } + ] + } + +[Example 4] + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/ports?device_id=e6c05704-c907-4cc1-8106-69b0996c43b9 + +- Example response + + .. code-block:: + + { + "ports": [ + { + "admin_state_up": true, + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "device_id": "e6c05704-c907-4cc1-8106-69b0996c43b9", + "device_owner": "compute:az3.dc1", + "port_security_enabled":true, + "extra_dhcp_opts": [], + "fixed_ips": [ + { + "ip_address": "10.1.0.37", + "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5" + } + ], + "dns_assignment": [ + { + "hostname": "ip-10-1-0-37", + "ip_address": "10.1.0.37", + "fqdn": "ip-10-1-0-37.xxx.compute.internal."//xxx indicates the region name. + } + ], + "dns_name": "ip-10-1-0-37", + "id": "7bb64706-6e46-4f94-a28a-4bc7caaab87d", + "mac_address": "fa:16:3e:f1:0b:09", + "name": "port_vm_50_3", + "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", + "security_groups": [ + "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2" + ], + "status": "ACTIVE", + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "project_id": "6c9298ec8c874f7f99688489ab65f90e" , + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41" + } + ], + "ports_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ports?device_id=77307088-ae60-49fb-9146-924dcf1d1402&marker=7bb64706-6e46-4f94-a28a-4bc7caaab87d&page_reverse=True" + } + ] + } + +[Example 5] + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/ports?tenant_id=6c9298ec8c874f7f99688489ab65f90e&name=port_vm_50_3 + +- Example response + + .. code-block:: + + { + "ports": [ + { + "admin_state_up": true, + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "device_id": "e6c05704-c907-4cc1-8106-69b0996c43b9", + "device_owner": "compute:az3.dc1", + "port_security_enabled":true, + "extra_dhcp_opts": [], + "fixed_ips": [ + { + "ip_address": "10.1.0.37", + "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5" + } + ], + "dns_assignment": [ + { + "hostname": "ip-10-1-0-37", + "ip_address": "10.1.0.37", + "fqdn": "ip-10-1-0-37.xxx.compute.internal."//xxx indicates the region name. + } + ], + "dns_name": "ip-10-1-0-37", + "id": "7bb64706-6e46-4f94-a28a-4bc7caaab87d", + "mac_address": "fa:16:3e:f1:0b:09", + "name": "port_vm_50_3", + "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", + "security_groups": [ + "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2" + ], + "status": "ACTIVE", + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "project_id": "6c9298ec8c874f7f99688489ab65f90e" , + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41" + } + ] + , + "ports_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ports?tenant_id=6c9298ec8c874f7f99688489ab65f90e&name=port_vm_50_3&marker=7bb64706-6e46-4f94-a28a-4bc7caaab87d&page_reverse=True" + } + ] + } + +[Example 6] + +- Example request + + .. code-block:: text + + GET https://{Endpoint}/v2.0/ports?name=port_vm_50_3 + +- Example response + + .. code-block:: + + { + "ports": [ + { + "status": "DOWN", + "allowed_address_pairs": [], + "extra_dhcp_opts": [], + "device_owner": "", + "port_security_enabled":true, + "fixed_ips": [ + { + "subnet_id": "391c74f7-e3b1-405c-8473-2f71a0aec7dc", + "ip_address": "10.1.0.33" + } + ], + "dns_name": "", + "id": "0f405555-739f-4a19-abb7-ec11d005b3a9", + "security_groups": [ + "043548bc-1020-4be0-885a-caac8530e8f6" + ], + "device_id": "", + "port_security_enabled":true, + "name": "port_vm_50_3", + "admin_state_up": true, + "network_id": "9898a82d-7795-4ad5-bf2c-0ed8b822be4f", + "tenant_id": "3e4a1816927f405cacbc3dca1e05111e", + "project_id": "3e4a1816927f405cacbc3dca1e05111e", + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41", + "binding:vnic_type": "normal", + "mac_address": "fa:16:3e:b0:d9:cf" + }, + { + "status": "ACTIVE", + "allowed_address_pairs": [], + "extra_dhcp_opts": [], + "device_owner": "compute:az3.dc1", + "port_security_enabled":true, + "fixed_ips": [ + { + "subnet_id": "b3ac1347-63f2-4e82-b853-3d86416a0db5", + "ip_address": "10.1.0.37" + } + ], + "dns_assignment": [ + { + "hostname": "ip-10-1-0-37", + "ip_address": "10.1.0.37", + "fqdn": "ip-10-1-0-37.xxx.compute.internal."//xxx indicates the region name. + } + ], + "dns_name": "ip-10-1-0-37", + "id": "7bb64706-6e46-4f94-a28a-4bc7caaab87d", + "security_groups": [ + "ef69bc60-2f4b-4f97-b95b-e3b68df0c0b2" + ], + "device_id": "e6c05704-c907-4cc1-8106-69b0996c43b9", + "name": "port_vm_50_3", + "admin_state_up": true, + "network_id": "a54e1b19-ce78-4b7e-b28b-d2d716cdc161", + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "project_id": "3e4a1816927f405cacbc3dca1e05111e", + "created_at": "2018-09-13T01: 43: 41", + "updated_at": "2018-09-13T01: 43: 41", + "binding:vnic_type": "normal", + "binding:vnic_type": "normal", + "mac_address": "fa:16:3e:f1:0b:09" + } + ] + , + "ports_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ports?name=port_vm_50_3&marker=0f405555-739f-4a19-abb7-ec11d005b3a9&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/port/updating_a_port.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/port/updating_a_port.rst new file mode 100644 index 0000000..fac582c --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/port/updating_a_port.rst @@ -0,0 +1,365 @@ +:original_name: vpc_port02_0004.html + +.. _vpc_port02_0004: + +Updating a Port +=============== + +Function +-------- + +This API is used to update a port. + +URI +--- + +PUT /v2.0/ports/{port_id} + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_port02_0004__table1855162528: + +.. table:: **Table 1** Parameter description + + +---------+-----------+------------------------------------------------------------+ + | Name | Mandatory | Description | + +=========+===========+============================================================+ + | port_id | Yes | Specifies the port ID, which uniquely identifies the port. | + +---------+-----------+------------------------------------------------------------+ + +Request Message +--------------- + +.. table:: **Table 2** Request parameter + + +-----------------+-----------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+===========================================================+=================+=========================================================================================================+ + | port | :ref:`port ` object | Yes | Specifies the port object list. For details, see :ref:`Table 3 `. | + | | | | | + | | | | You must specify at least one attribute when updating a port. | + +-----------------+-----------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0004__table17891153981819: + +.. table:: **Table 3** **port** objects + + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=======================+=================+==================================================================================+==================================================================================================================================================================================================================================================================================================================================================================================================================+ + | name | No | String | Specifies the port name. | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups | No | Array of strings | Specifies the UUID of the security group, for example, **"security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]**. This is an extended attribute. | + | | | | | + | | | | This parameter cannot be left blank. | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allowed_address_pairs | No | Array of :ref:`allow_address_pair ` objects | Specifies the IP address and MAC address pair. This is an extended attribute. For details, see :ref:`Table 4 `. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | - The IP address cannot be **0.0.0.0**. | + | | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | | - In the hardware SDN networking plan, the **ip_address** attribute value cannot be in CIDR format. | + | | | | - To assign a virtual IP address to an ECS, the IP address configured in **allowed_address_pairs** must be an existing ECS NIC IP address. Otherwise, the virtual IP address cannot be used for communication. | + | | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | No | Array of :ref:`extra_dhcp_opt ` objects | Specifies the extended DHCP option. This is an extended attribute. For details, see :ref:`Table 5 `. | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:profile | No | Object | Specifies the user-defined settings. This is an extended attribute. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | - The **internal_elb** field is in boolean type and is available to common tenants. Set the value of this parameter to **true** only when you assign a virtual IP address to an internal network load balancer. Common tenants do not have the permission to change the value of this field, which is maintained by the system. | + | | | | | + | | | | Example: | + | | | | | + | | | | {"internal_elb": true} | + | | | | | + | | | | - The **disable_security_groups** field is in boolean type and is available to common tenants. The default value is **false**. In high-performance communication scenarios, you can set the parameter value to **true**, which makes this parameter to be available to common tenants. You can specify this parameter when creating a port. Currently, the value of this parameter can only be set to **true**. | + | | | | | + | | | | Example: | + | | | | | + | | | | {"disable_security_groups": true }, | + | | | | | + | | | | Currently, the value can only be set to **true**. When the value is set to **true**, the FWaaS function does not take effect. | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vnic_type | No | String | Specifies the type of the bound vNIC. | + | | | | | + | | | | **normal**: Softswitch | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | No | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect. | + +-----------------------+-----------------+----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0004__table1389733912184: + +.. table:: **Table 4** **allow_address_pair** object + + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+====================================================================================================================================================+ + | ip_address | Yes | String | - Specifies the IP address. | + | | | | - You cannot set it to **0.0.0.0/0**. | + | | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + | | | | - If the value of parameter **allowed_address_pairs** is specified, parameter **ip_address** is mandatory. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | No | String | Specifies the MAC address. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0004__table10898183911816: + +.. table:: **Table 5** **extra_dhcp_opt** objects + + ========= ========= ====== =========================== + Attribute Mandatory Type Description + ========= ========= ====== =========================== + opt_name No String Specifies the option name. + opt_value No String Specifies the option value. + ========= ========= ====== =========================== + +Response Message +---------------- + +.. table:: **Table 6** Response parameter + + +-----------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+===========================================================+=========================================================================================================+ + | port | :ref:`port ` object | Specifies the port object list. For details, see :ref:`Table 7 `. | + +-----------+-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0004__table15919752145624: + +.. table:: **Table 7** **port** objects + + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+====================================================================================================+==================================================================================================================================================================================================================================================================================================================================================================================================================+ + | id | String | Specifies the port ID. A maximum of 255 characters are allowed. | + | | | | + | | | This parameter is not mandatory when you query ports. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the port name. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the port belongs. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | + | | | | + | | | This value can only be dynamically assigned by the system. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | fixed_ips | Array of :ref:`fixed_ip ` objects | Specifies the port IP address. For details, see :ref:`Table 8 `. For example, the value is **"fixed_ips": [{"subnet_id": "4dc70db6-cb7f-4200-9790-a6a910776bba", "ip_address": "192.169.25.79"}]**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_id | String | Specifies the device ID. | + | | | | + | | | This value is automatically maintained by the system and cannot be set or updated manually. The port with this field specified cannot be deleted. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | device_owner | String | Specifies the DHCP, router or Nova to which a device belongs. | + | | | | + | | | The value can be **network:dhcp**, **network:router_interface_distributed**, **compute:xxx**, or **neutron:VIP_PORT**. (In value **compute:xxx**, **xxx** specifies the AZ name, for example, **compute:aa-bb-cc** indicates that the private IP address is used by an ECS in the **aa-bb-cc** AZ). | + | | | | + | | | This parameter value cannot be updated. You can only set **device_owner** to **neutron:VIP_PORT** for a virtual IP address port during port creation. If this parameter of a port is not left blank, the port can only be deleted when this parameter value is **neutron:VIP_PORT**. | + | | | | + | | | The port with this field specified cannot be deleted. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the port status. The value can be **ACTIVE**, **BUILD**, or **DOWN**. | + | | | | + | | | The status of a HANA SR-IOV VM port is always **DOWN**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups | Array of strings | Specifies the UUID of the security group, for example, **"security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]**. This is an extended attribute. | + | | | | + | | | This parameter cannot be left blank. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allowed_address_pairs | Array of :ref:`allow_address_pair ` objects | Specifies the IP address and MAC address pair. This is an extended attribute. For details, see :ref:`Table 9 `. | + | | | | + | | | Instructions: | + | | | | + | | | - The IP address cannot be **0.0.0.0**. | + | | | - Configure a dedicated security group for the port if the parameter **allowed_address_pairs** has a large CIDR block (subnet mask less than 24). | + | | | - If the value of **allowed_address_pairs** is **1.1.1.1/0**, the source/destination check is disabled. | + | | | - In the hardware SDN networking plan, the **ip_address** attribute value cannot be in CIDR format. | + | | | - To assign a virtual IP address to an ECS, the IP address configured in **allowed_address_pairs** must be an existing ECS NIC IP address. Otherwise, the virtual IP address cannot be used for communication. | + | | | - Set **allowed_address_pairs** of the cloud server to **1.1.1.1/0**. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extra_dhcp_opts | Array of :ref:`extra_dhcp_opt ` objects | Specifies the extended DHCP option. This is an extended attribute. For details, see :ref:`Table 10 `. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vif_details | :ref:`binding:vif_details ` object | For details, see :ref:`Table 11 `. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:profile | Object | Specifies the user-defined settings. This is an extended attribute. | + | | | | + | | | Instructions: | + | | | | + | | | - The **internal_elb** field is in boolean type and is available to common tenants. Set the value of this parameter to **true** only when you assign a virtual IP address to an internal network load balancer. Common tenants do not have the permission to change the value of this field, which is maintained by the system. | + | | | | + | | | Example: | + | | | | + | | | {"internal_elb": true} | + | | | | + | | | - The **disable_security_groups** field is in boolean type and is available to common tenants. The default value is **false**. In high-performance communication scenarios, you can set the parameter value to **true**, which makes this parameter to be available to common tenants. You can specify this parameter when creating a port. Currently, the value of this parameter can only be set to **true**. | + | | | | + | | | Example: | + | | | | + | | | {"disable_security_groups": true }, | + | | | | + | | | Currently, the value can only be set to **true**. When the value is set to **true**, the FWaaS function does not take effect. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | binding:vnic_type | String | Specifies the type of the bound vNIC. | + | | | | + | | | **normal**: Softswitch | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_security_enabled | Boolean | Specifies whether the security option is enabled for the port. If the option is not enabled, the security group and DHCP snooping do not take effect. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_assignment | Array of :ref:`dns_assignment ` objects | Specifies the default private network domain name information of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. | + | | | | + | | | - **hostname**: **dns_name** value of the NIC | + | | | - **ip_address**: Private IPv4 address of the NIC | + | | | - **fqdn**: Default private network fully qualified domain name (FQDN) of the IP address | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_name | String | Specifies the default private network DNS name of the primary NIC. This is an extended attribute. | + | | | | + | | | The system automatically sets this parameter, and you are not allowed to configure or change the parameter value. Before accessing the default private network domain name, ensure that the subnet uses the DNS provided by the current system. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the port is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the port is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0004__table4290920914597: + +.. table:: **Table 8** **fixed_ip** objects + + +-----------------------+-----------------------+-----------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================+ + | subnet_id | String | Specifies the ID of the subnet to which the port belongs. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + | | | | + | | | This parameter cannot be updated. | + +-----------------------+-----------------------+-----------------------------------------------------------+ + +.. _vpc_port02_0004__en-us_topic_0062207355_table57914257: + +.. table:: **Table 9** **allow_address_pair** objects + + +-----------------------+-----------------------+---------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=======================================+ + | ip_address | String | Specifies the IP address. | + | | | | + | | | This parameter cannot be **0.0.0.0**. | + +-----------------------+-----------------------+---------------------------------------+ + | mac_address | String | Specifies the MAC address. | + +-----------------------+-----------------------+---------------------------------------+ + +.. _vpc_port02_0004__table5056075615524: + +.. table:: **Table 10** **extra_dhcp_opt** objects + + ========= ====== =========================== + Attribute Type Description + ========= ====== =========================== + opt_name String Specifies the option name. + opt_value String Specifies the option value. + ========= ====== =========================== + +.. _vpc_port02_0004__table72371439857: + +.. table:: **Table 11** **binding:vif_details** object + + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | Name | Type | Description | + +===================+=========+=================================================================================================+ + | primary_interface | Boolean | If the value is true, this is the primary NIC. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | port_filter | Boolean | Specifies the port used for filtering in security groups to protect against MAC or IP spoofing. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + | ovs_hybrid_plug | Boolean | Specifies that OVS hybrid plug should be used by Nova APIs. | + +-------------------+---------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_port02_0004__table1960316535179: + +.. table:: **Table 12** **dns_assignment** object + + +------------+--------+-------------------------------------------------------------------------------+ + | Name | Type | Description | + +============+========+===============================================================================+ + | hostname | String | Specifies the host name of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + | ip_address | String | Specifies the port IP address. | + +------------+--------+-------------------------------------------------------------------------------+ + | fqdn | String | Specifies the private network fully qualified domain name (FQDN) of the port. | + +------------+--------+-------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/ports/7a9a954a-eb41-4954-a300-11ab17a361a2 + + { + "port": { + "name": "port-test02" + } + } + +Example response + +.. code-block:: + + { + "port": { + "id": "a7d98f3c-b42f-460b-96a1-07601e145961", + "name": "port-test02", + "status": "DOWN", + "admin_state_up": true, + "fixed_ips": [], + "mac_address": "fa:16:3e:01:f7:90", + "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171", + "tenant_id": "db82c9e1415a464ea68048baa8acc6b8", + "project_id": "db82c9e1415a464ea68048baa8acc6b8", + "device_id": "", + "device_owner": "", + "security_groups": [ + "d0d58aa9-cda9-414c-9c52-6c3daf8534e6" + ], + "extra_dhcp_opts": [], + "allowed_address_pairs": [], + "binding:vnic_type": "normal", + "binding:vif_details": {}, + "binding:profile": {}, + "port_security_enabled": true, + "created_at": "2018-09-20T01:45:26", + "updated_at": "2018-09-20T01:48:56" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/adding_an_interface_to_a_router.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/adding_an_interface_to_a_router.rst new file mode 100644 index 0000000..70149a7 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/adding_an_interface_to_a_router.rst @@ -0,0 +1,86 @@ +:original_name: vpc_router_0006.html + +.. _vpc_router_0006: + +Adding an Interface to a Router +=============================== + +Function +-------- + +This API is used to add an interface to a router. + +Restrictions + +- When a port is used, the port can have only one IP address. +- When a subnet is used, the gateway IP address must be configured for the subnet. +- A router cannot be added to networks whose **provider:network_type** is **geneve**. +- Only one router can be added to a subnet. + +URI +--- + +PUT /v2.0/routers/{router_id}/add_router_interface + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+=================+=================+===========================================================================================================================+ + | subnet_id | String | No | Specifies the subnet ID. Either **subnet_id** or **port_id** is used. | + | | | | | + | | | | Use the gateway IP address of the subnet to create a router interface. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + | port_id | String | No | Specifies the port ID. Either **subnet_id** or **port_id** is used. Use the port IP address to create a router interface. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + ========== ====== ========================= + Parameter Type Description + ========== ====== ========================= + subnet_id String Specifies the subnet ID. + tenant_id String Specifies the project ID. + project_id String Specifies the project ID. + port_id String Specifies the port ID. + id String Specifies the router ID. + ========== ====== ========================= + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/routers/5b8e885c-1347-4ac2-baf9-2249c8ed1270/add_router_interface + + {"subnet_id": "ab78be2d-782f-42a5-aa72-35879f6890ff"} + +Example response + +.. code-block:: + + { + "subnet_id": "ab78be2d-782f-42a5-aa72-35879f6890ff", + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "project_id": "6fbe9263116a4b68818cf1edce16bc4f", + "port_id": "40e86635-b2a3-45de-a7c8-3cced5b7e755", + "id": "5b8e885c-1347-4ac2-baf9-2249c8ed1270" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/creating_a_router.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/creating_a_router.rst new file mode 100644 index 0000000..44cbdce --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/creating_a_router.rst @@ -0,0 +1,185 @@ +:original_name: vpc_router_0003.html + +.. _vpc_router_0003: + +Creating a Router +================= + +Function +-------- + +This API is used to create a router. + +URI +--- + +POST /v2.0/routers + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------+----------------------------------------+-----------+-----------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+========================================+===========+===============================================================================================+ + | router | :ref:`router ` object | Yes | Specifies the router. For details, see :ref:`Table 2 `. | + +-----------+----------------------------------------+-----------+-----------------------------------------------------------------------------------------------+ + +.. _vpc_router_0003__table24153696181443: + +.. table:: **Table 2** **router** objects + + +-----------------------+-----------------+----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=======================+=================+============================================================================+========================================================================================================================+ + | name | No | String | Specifies the router name. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------+----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status. | + | | | | | + | | | | The value can only be **true**. | + +-----------------------+-----------------+----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | external_gateway_info | No | :ref:`external_gateway_info ` object | Specifies the external gateway. This is an extended attribute. For details, see the **external_gateway_info** objects. | + +-----------------------+-----------------+----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0003__table11448068181443: + +.. table:: **Table 3** **external_gateway_info** objects + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+=================+===========================================================================================================================================================+ + | network_id | No | String | Specifies the UUID of the external network. | + | | | | | + | | | | You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to query information about the external network. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_snat | No | Boolean | Specifies whether the SNAT function is enabled. | + | | | | | + | | | | The default value is **false**. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 4** Response parameter + + +-----------+------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+============================================================+==============================================================================================+ + | router | :ref:`router ` object | Specifies the router. For details, see :ref:`Table 5 `. | + +-----------+------------------------------------------------------------+----------------------------------------------------------------------------------------------+ + +.. _vpc_router_0003__table1923815121475: + +.. table:: **Table 5** **router** objects + + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+======================================================================+================================================================================================================================+ + | id | String | Specifies the router ID. | + | | | | + | | | This parameter is not mandatory when you query routers. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the router name. | + | | | | + | | | The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the router status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | external_gateway_info | :ref:`external_gateway_info ` object | Specifies the external gateway. This is an extended attribute. For details, see the **external_gateway_info** objects. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | Specifies a route list. This is an extended attribute. For details, see :ref:`Table 7 `. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the router is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the router is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. table:: **Table 6** **external_gateway_info** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================================================================================================================+ + | network_id | String | Specifies the UUID of the external network. | + | | | | + | | | You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to query information about the external network. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_snat | Boolean | Specifies whether the SNAT function is enabled. | + | | | | + | | | The default value is **false**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0003__table18829650181443: + +.. table:: **Table 7** **route** objects + + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+=============================================================================================================+ + | destination | String | Specifies the IP address range. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/routers + { + "router": { + "name": "router-test2", + "admin_state_up": true + } + } + +Example response + +.. code-block:: + + { + "router": { + "id": "f5dbdfe0-86f9-4b0a-9a32-6be143f0a076", + "name": "router-test2", + "status": "ACTIVE", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "admin_state_up": true, + "external_gateway_info": { + "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "enable_snat": false + }, + "routes": [], + "created_at": "2018-09-20T02:06:07", + "updated_at": "2018-09-20T02:06:09" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/deleting_a_router.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/deleting_a_router.rst new file mode 100644 index 0000000..3061a1b --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/deleting_a_router.rst @@ -0,0 +1,49 @@ +:original_name: vpc_router_0005.html + +.. _vpc_router_0005: + +Deleting a Router +================= + +Function +-------- + +This API is used to delete a router. + +URI +--- + +DELETE /v2.0/routers/{router_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/routers/0735a367-2caf-48fb-85aa-6082266f342e + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/index.rst new file mode 100644 index 0000000..2ea98de --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/index.rst @@ -0,0 +1,26 @@ +:original_name: vpc_router_0000.html + +.. _vpc_router_0000: + +Router +====== + +- :ref:`Querying Routers ` +- :ref:`Querying a Router ` +- :ref:`Creating a Router ` +- :ref:`Updating a Router ` +- :ref:`Deleting a Router ` +- :ref:`Adding an Interface to a Router ` +- :ref:`Removing an Interface from a Router ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_routers + querying_a_router + creating_a_router + updating_a_router + deleting_a_router + adding_an_interface_to_a_router + removing_an_interface_from_a_router diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/querying_a_router.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/querying_a_router.rst new file mode 100644 index 0000000..45f2349 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/querying_a_router.rst @@ -0,0 +1,142 @@ +:original_name: vpc_router_0002.html + +.. _vpc_router_0002: + +Querying a Router +================= + +Function +-------- + +This API is used to query details about a router. + +URI +--- + +GET /v2.0/routers/{router_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=============================================================+===============================================================================================+ + | router | :ref:`router ` object | Specifies the router. For details, see :ref:`Table 2 `. | + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. _vpc_router_0002__table24153696181443: + +.. table:: **Table 2** **router** objects + + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+======================================================================+================================================================================================================================+ + | id | String | Specifies the router ID. | + | | | | + | | | This parameter is not mandatory when you query routers. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the router name. | + | | | | + | | | The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the router status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | external_gateway_info | :ref:`external_gateway_info ` object | Specifies the external gateway. This is an extended attribute. For details, see the **external_gateway_info** objects. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | Specifies a route list. This is an extended attribute. For details, see :ref:`Table 4 `. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the router is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the router is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. table:: **Table 3** **external_gateway_info** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================================================================================================================+ + | network_id | String | Specifies the UUID of the external network. | + | | | | + | | | You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to query information about the external network. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_snat | Boolean | Specifies whether the SNAT function is enabled. | + | | | | + | | | The default value is **false**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0002__table18829650181443: + +.. table:: **Table 4** **route** objects + + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+=============================================================================================================+ + | destination | String | Specifies the IP address range. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/routers/01ab4be1-4447-45fb-94be-3ee787ed4ebe + +Example response + +.. code-block:: + + { + "router": { + "id": "01ab4be1-4447-45fb-94be-3ee787ed4ebe", + "name": "xiaoleizi-tag", + "status": "ACTIVE", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "admin_state_up": true, + "external_gateway_info": { + "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "enable_snat": false + }, + "routes": [ + { + "destination": "0.0.0.0/0", + "nexthop": "172.16.0.124" + } + ], + "created_at": "2018-03-23T09:26:08", + "updated_at": "2018-08-24T08:49:53" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/querying_routers.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/querying_routers.rst new file mode 100644 index 0000000..d4aed7b --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/querying_routers.rst @@ -0,0 +1,218 @@ +:original_name: vpc_router_0001.html + +.. _vpc_router_0001: + +Querying Routers +================ + +Function +-------- + +This API is used to query all routers accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/routers + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/routers?id={id}&name={name}&admin_state_up={admin_state_up}&tenant_id={tenant_id}&status={status} + +Example of querying routers by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/routers?limit=2&marker=01ab4be1-4447-45fb-94be-3ee787ed4ebe&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_router_0001__table966161441716: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the router ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies that the admin state is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | No | String | Specifies that the router status is used as the filtering condition. | + | | | | | + | | | | The value can be **ACTIVE**, **DOWN**, or **ERROE**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+==========================================================================+======================================================================================================================================================================================================================+ + | routers | Array of :ref:`router ` objects | Specifies the router list. For details, see :ref:`Table 3 `. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | routers_links | Array of :ref:`routers_link ` objects | Specifies the pagination information. For details, see :ref:`Table 6 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0001__table24153696181443: + +.. table:: **Table 3** **router** objects + + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+============================================================================+================================================================================================================================+ + | id | String | Specifies the router ID. | + | | | | + | | | This parameter is not mandatory when you query routers. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the router name. | + | | | | + | | | The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the router status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | external_gateway_info | :ref:`external_gateway_info ` object | Specifies the external gateway. This is an extended attribute. For details, see the **external_gateway_info** objects. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | Specifies a route list. This is an extended attribute. For details, see :ref:`Table 5 `. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the router is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the router is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0001__table11448068181443: + +.. table:: **Table 4** **external_gateway_info** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================================================================================================================+ + | network_id | String | Specifies the UUID of the external network. | + | | | | + | | | You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to query information about the external network. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_snat | Boolean | Specifies whether the SNAT function is enabled. | + | | | | + | | | The default value is **false**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0001__table18829650181443: + +.. table:: **Table 5** **route** objects + + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+=============================================================================================================+ + | destination | String | Specifies the IP address range. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0001__table25150247450: + +.. table:: **Table 6** **routers_link** object + + +------+--------+----------------------------------------------------------------------+ + | Name | Type | Description | + +======+========+======================================================================+ + | href | String | Specifies the API link. | + +------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +------+--------+----------------------------------------------------------------------+ + +Example +------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/routers?limit=1 + +Example response + +.. code-block:: + + { + "routers": [ + { + "id": "01ab4be1-4447-45fb-94be-3ee787ed4ebe", + "name": "xiaoleizi-tag", + "status": "ACTIVE", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "admin_state_up": true, + "external_gateway_info": { + "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "enable_snat": false + }, + "routes": [ + { + "destination": "0.0.0.0/0", + "nexthop": "172.16.0.124" + } + ], + "created_at": "2018-03-23T09:26:08", + "updated_at": "2018-08-24T08:49:53" + } + ], + "routers_links": [ + { + "rel": "next", + "href": "https://{Endpoint}/v2.0/routers?limit=1&marker=01ab4be1-4447-45fb-94be-3ee787ed4ebe" + }, + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/routers?limit=1&marker=01ab4be1-4447-45fb-94be-3ee787ed4ebe&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/removing_an_interface_from_a_router.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/removing_an_interface_from_a_router.rst new file mode 100644 index 0000000..4433e4d --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/removing_an_interface_from_a_router.rst @@ -0,0 +1,83 @@ +:original_name: vpc_router_0007.html + +.. _vpc_router_0007: + +Removing an Interface from a Router +=================================== + +Function +-------- + +Removing an interface from a router will also remove the port. + +Restrictions + +You are not allowed to remove an interface from a router if there are load balancers in the subnet. + +URI +--- + +PUT /v2.0/routers/{router_id}/remove_router_interface + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+=================+=================+===========================================================================================================================+ + | subnet_id | String | No | Specifies the subnet ID. Either **subnet_id** or **port_id** must be specified. | + | | | | | + | | | | Use the gateway IP address of the subnet to create a router interface. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + | port_id | String | No | Specifies the port ID. Either **subnet_id** or **port_id** is used. Use the port IP address to create a router interface. | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + ========== ====== ========================= + Parameter Type Description + ========== ====== ========================= + subnet_id String Specifies the subnet ID. + tenant_id String Specifies the project ID. + project_id String Specifies the project ID. + port_id String Specifies the port ID. + id String Specifies the router ID. + ========== ====== ========================= + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/routers/b625c58c-0cfe-49e0-acc8-f2374f8187ff/remove_router_interface + + {"subnet_id": "4b910a10-0860-428b-b463-d84dbc5e288e"} + +Example response + +.. code-block:: + + { + "subnet_id": "4b910a10-0860-428b-b463-d84dbc5e288e", + "tenant_id": "3d72597871904daeb6887f75f848b531", + "project_id": "3d72597871904daeb6887f75f848b531", + "port_id": "34d7d063-8f40-4958-b420-096db40d4067", + "id": "b625c58c-0cfe-49e0-acc8-f2374f8187ff" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/router/updating_a_router.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/router/updating_a_router.rst new file mode 100644 index 0000000..a315e38 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/router/updating_a_router.rst @@ -0,0 +1,206 @@ +:original_name: vpc_router_0004.html + +.. _vpc_router_0004: + +Updating a Router +================= + +Function +-------- + +This API is used to update a router. + +URI +--- + +PUT /v2.0/routers/{router_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==============================================================+================================================================================================+ + | router | Yes | :ref:`router ` object | Specifies the router. For details, see :ref:`Table 2 `. | + | | | | | + | | | | You must specify at least one attribute when updating a router. | + +-----------------+-----------------+--------------------------------------------------------------+------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0004__table128801154104715: + +.. table:: **Table 2** **router** objects + + +-----------------------+-----------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=======================+=================+==========================================================================+===============================================================================================================================+ + | name | No | String | Specifies the router name. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status. | + | | | | | + | | | | The value can only be **true**. | + +-----------------------+-----------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | external_gateway_info | No | :ref:`external_gateway_info ` object | Specifies the external gateway. This is an extended attribute. For details, see the **external_gateway_info** objects. | + +-----------------------+-----------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | routes | No | Array of :ref:`route ` objects | Specifies a route list. This is an extended attribute. For details, see :ref:`Table 4 `. | + +-----------------------+-----------------+--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0004__table189345484710: + +.. table:: **Table 3** **external_gateway_info** objects + + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+=================+===========================================================================================================================================================+ + | network_id | No | String | Specifies the UUID of the external network. | + | | | | | + | | | | You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to query information about the external network. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_snat | No | Boolean | Specifies whether the SNAT function is enabled. | + | | | | | + | | | | The default value is **false**. | + +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0004__table5893155464718: + +.. table:: **Table 4** **route** objects + + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=================+=================+=================+=============================================================================================================+ + | destination | No | String | Specifies the IP address range. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | The prefix cannot be the same as that of a direct route. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------+ + | nexthop | No | String | Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 5** Response parameter + + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=============================================================+===============================================================================================+ + | router | :ref:`router ` object | Specifies the router. For details, see :ref:`Table 6 `. | + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. _vpc_router_0004__table24153696181443: + +.. table:: **Table 6** **router** objects + + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+============================================================================+================================================================================================================================+ + | id | String | Specifies the router ID. | + | | | | + | | | This parameter is not mandatory when you query routers. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the router name. | + | | | | + | | | The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | Boolean | Specifies the administrative status. | + | | | | + | | | The value can only be **true**. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | status | String | Specifies the router status. The value can be **ACTIVE**, **DOWN**, or **ERROR**. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | external_gateway_info | :ref:`external_gateway_info ` object | Specifies the external gateway. This is an extended attribute. For details, see the **external_gateway_info** objects. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | routes | Array of :ref:`route ` objects | Specifies a route list. This is an extended attribute. For details, see :ref:`Table 8 `. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the router is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the router is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0004__table11448068181443: + +.. table:: **Table 7** **external_gateway_info** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+===========================================================================================================================================================+ + | network_id | String | Specifies the UUID of the external network. | + | | | | + | | | You can use **GET /v2.0/networks?router:external=True** or run the **neutron net-external-list** command to query information about the external network. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_snat | Boolean | Specifies whether the SNAT function is enabled. | + | | | | + | | | The default value is **false**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_router_0004__table18829650181443: + +.. table:: **Table 8** **route** objects + + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=============+========+=============================================================================================================+ + | destination | String | Specifies the IP address range. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + | nexthop | String | Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router. | + +-------------+--------+-------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/routers/f5dbdfe0-86f9-4b0a-9a32-6be143f0a076 + { + "router": { + "name": "router-220" + } + } + +Example response + +.. code-block:: + + { + "router": { + "id": "f5dbdfe0-86f9-4b0a-9a32-6be143f0a076", + "name": "router-220", + "status": "ACTIVE", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "admin_state_up": true, + "external_gateway_info": { + "network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975", + "enable_snat": false + }, + "routes": [], + "created_at": "2018-09-20T02:06:07", + "updated_at": "2018-09-20T02:06:09" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/creating_a_security_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/creating_a_security_group.rst new file mode 100644 index 0000000..d27d530 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/creating_a_security_group.rst @@ -0,0 +1,202 @@ +:original_name: vpc_sg02_0003.html + +.. _vpc_sg02_0003: + +Creating a Security Group +========================= + +Function +-------- + +This API is used to create a security group. + +URI +--- + +POST /v2.0/security-groups + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +----------------+-----------+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +================+===========+===================================================================+===================================================================================================+ + | security_group | Yes | :ref:`security_group `\ object | Specifies the security group. For details, see :ref:`Table 2 `. | + +----------------+-----------+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0003__table513726041607: + +.. table:: **Table 2** **Security Group** objects + + +-------------+-----------+--------+--------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=============+===========+========+==============================================================+ + | name | No | String | Specifies the security group name. | + +-------------+-----------+--------+--------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the security group. | + +-------------+-----------+--------+--------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+=====================================================================+=====================================================================================================+ + | security_group | :ref:`security_group `\ object | Specifies the security group. For details, see :ref:`Table 4 `. | + +----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0003__table32081555104215: + +.. table:: **Table 4** **Security Group** objects + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+================================================================================+=============================================================================================================+ + | id | String | Specifies the security group ID. | + | | | | + | | | This parameter is not mandatory when you query security groups. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`Security Group Rule ` objects | Specifies the security group rule list. For details, see :ref:`Table 5 `. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0003__table655457801607: + +.. table:: **Table 5** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/security-groups + + { + "security_group": { + "name": "sg-test" + } + } + +Example response + +.. code-block:: + + { + "security_group": { + "id": "d29ae17d-f355-4992-8747-1fb66cc9afd2", + "name": "sg-test", + "description": "", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "security_group_rules": [ + { + "id": "3f51e52c-0e85-40f7-a137-85927392e436", + "direction": "egress", + "protocol": null, + "ethertype": "IPv4", + "description": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2", + "remote_address_group_id": null + }, + { + "id": "6332de3e-98fb-4f8c-b44a-fcb8ff09881e", + "direction": "egress", + "protocol": null, + "ethertype": "IPv6", + "description": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2", + "remote_address_group_id": null + } + ], + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/creating_a_security_group_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/creating_a_security_group_rule.rst new file mode 100644 index 0000000..adff74b --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/creating_a_security_group_rule.rst @@ -0,0 +1,187 @@ +:original_name: vpc_sg02_0008.html + +.. _vpc_sg02_0008: + +Creating a Security Group Rule +============================== + +Function +-------- + +This API is used to create a security group rule. + +URI +--- + +POST /v2.0/security-group-rules + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +---------------------+----------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=====================+======================================================================+===========+========================================================================================================+ + | security_group_rule | :ref:`security_group_rule ` object | Yes | Specifies the security group rule. For details, see :ref:`Table 2 `. | + +---------------------+----------------------------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0008__table655457801607: + +.. table:: **Table 2** **Security Group Rule** objects + + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=========================+=================+=================+=============================================================================================================================================================================================+ + | description | No | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | Yes | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | No | String | Specifies the peer ID of the belonged security group. | + | | | | | + | | | | Either **remote_group_id** or **remote_ip_prefix** is used. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | Yes | String | Specifies the direction of the traffic for which the security group rule takes effect. | + | | | | | + | | | | The value can be **ingress** or **egress**. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | No | String | Specifies the peer IP address segment. | + | | | | | + | | | | Either **remote_ip_prefix** or **remote_group_id** is used. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | No | String | Specifies the protocol type or the IP protocol number. | + | | | | | + | | | | The value can be **tcp**, **udp**, **icmp** or an IP protocol number | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | No | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + | | | | | + | | | | The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.) | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | No | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | | + | | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | | + | | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + | | | | | + | | | | The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.) | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | No | String | Specifies the network type. | + | | | | | + | | | | The value can be **IPv4** or **IPv6**. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | No | String | - Specifies the remote IP address group ID. You can log in to the management console and view the ID on the IP address group page. | + | | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +---------------------+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=====================+=======================================================================+=========================================================================================================+ + | security_group_rule | :ref:`security_group_rule ` object | Specifies the security group rule. For details, see :ref:`Table 4 `. | + +---------------------+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0008__table1794215178501: + +.. table:: **Table 4** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/security-group-rules + + { + "security_group_rule": { + "security_group_id": "5cb9c1ee-00e0-4d0f-9623-55463cd26ff8", + "direction": "egress", + "protocol": "tcp", + "remote_ip_prefix": "10.10.0.0/24" + } + } + +Example response + +.. code-block:: + + { + "security_group_rule": { + "remote_group_id": null, + "direction": "egress", + "remote_ip_prefix": "10.10.0.0/24", + "protocol": "tcp", + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "port_range_max": null, + "security_group_id": "5cb9c1ee-00e0-4d0f-9623-55463cd26ff8", + "port_range_min": null, + "ethertype": "IPv4", + "description": null, + "id": "7c336b04-1603-4911-a6f4-f2af1d9a0488", + "project_id": "6fbe9263116a4b68818cf1edce16bc4f", + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/deleting_a_security_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/deleting_a_security_group.rst new file mode 100644 index 0000000..cfd8108 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/deleting_a_security_group.rst @@ -0,0 +1,49 @@ +:original_name: vpc_sg02_0005.html + +.. _vpc_sg02_0005: + +Deleting a Security Group +========================= + +Function +-------- + +This API is used to delete a security group. + +URI +--- + +DELETE /v2.0/security-groups/{security_group_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/security-groups/a7ebb1d8-71e5-42e5-9030-4e0fca059d50 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/deleting_a_security_group_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/deleting_a_security_group_rule.rst new file mode 100644 index 0000000..354d539 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/deleting_a_security_group_rule.rst @@ -0,0 +1,49 @@ +:original_name: vpc_sg02_0009.html + +.. _vpc_sg02_0009: + +Deleting a Security Group Rule +============================== + +Function +-------- + +This API is used to delete a security group rule. + +URI +--- + +DELETE /v2.0/security-group-rules/{security_group_rule_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/security-group-rules/07adc044-3f21-4eeb-bd57-5e5eb6024b7f + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/index.rst new file mode 100644 index 0000000..ed54f4f --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/index.rst @@ -0,0 +1,30 @@ +:original_name: vpc_sg02_0000.html + +.. _vpc_sg02_0000: + +Security Group +============== + +- :ref:`Querying Security Groups ` +- :ref:`Querying a Security Group ` +- :ref:`Creating a Security Group ` +- :ref:`Updating a Security Group ` +- :ref:`Deleting a Security Group ` +- :ref:`Querying Security Group Rules ` +- :ref:`Querying a Security Group Rule ` +- :ref:`Creating a Security Group Rule ` +- :ref:`Deleting a Security Group Rule ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_security_groups + querying_a_security_group + creating_a_security_group + updating_a_security_group + deleting_a_security_group + querying_security_group_rules + querying_a_security_group_rule + creating_a_security_group_rule + deleting_a_security_group_rule diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_a_security_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_a_security_group.rst new file mode 100644 index 0000000..6ae0ab5 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_a_security_group.rst @@ -0,0 +1,178 @@ +:original_name: vpc_sg02_0002.html + +.. _vpc_sg02_0002: + +Querying a Security Group +========================= + +Function +-------- + +This API is used to query details about a specific security group. + +URI +--- + +GET /v2.0/security-groups/{security_group_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +----------------+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+===================================================================+===================================================================================================+ + | security_group | :ref:`security_group `\ object | Specifies the security group. For details, see :ref:`Table 2 `. | + +----------------+-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0002__table513726041607: + +.. table:: **Table 2** **Security Group** objects + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+================================================================================+=============================================================================================================+ + | id | String | Specifies the security group ID. | + | | | | + | | | This parameter is not mandatory when you query security groups. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`Security Group Rule ` objects | Specifies the security group rule list. For details, see :ref:`Table 3 `. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0002__table655457801607: + +.. table:: **Table 3** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/security-groups/0431c9c5-1660-42e0-8a00-134bec7f03e2 + +Example response + +.. code-block:: + + { + "security_group": { + "id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "name": "sg-ad3f", + "description": "", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "security_group_rules": [ + { + "id": "d90e55ba-23bd-4d97-b722-8cb6fb485d69", + "direction": "ingress", + "protocol": null, + "ethertype": "IPv4", + "description": null, + "remote_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "remote_address_group_id": "0150a3a7-82ca-4569-865c-04e46e5e9249" + }, + { + "id": "aecff4d4-9ce9-489c-86a3-803aedec65f7", + "direction": "egress", + "protocol": null, + "ethertype": "IPv4", + "description": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "remote_address_group_id": null + } + ], + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_a_security_group_rule.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_a_security_group_rule.rst new file mode 100644 index 0000000..aa68229 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_a_security_group_rule.rst @@ -0,0 +1,125 @@ +:original_name: vpc_sg02_0007.html + +.. _vpc_sg02_0007: + +Querying a Security Group Rule +============================== + +Function +-------- + +This API is used to query details about a specific security group rule. + +URI +--- + +GET /v2.0/security-group-rules/{security_group_rule_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +---------------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=====================+========================================================================+========================================================================================================+ + | security_group_rule | :ref:`security_group_rule `\ object | Specifies the security group rule. For details, see :ref:`Table 2 `. | + +---------------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0007__table655457801607: + +.. table:: **Table 2** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/security-group-rules/1755bc80-cf3a-4f57-8ae9-d9796482ddc0 + +Example response + +.. code-block:: + + { + "security_group_rule": { + "remote_group_id": null, + "direction": "egress", + "remote_ip_prefix": null, + "protocol": null, + "tenant_id": "6fbe9263116a4b68818cf1edce16bc4f", + "port_range_max": null, + "security_group_id": "723bc02c-d7f7-49b5-b6ff-d08320f315e2", + "port_range_min": null, + "ethertype": "IPv4", + "description": null, + "id": "1755bc80-cf3a-4f57-8ae9-d9796482ddc0", + "project_id": "6fbe9263116a4b68818cf1edce16bc4f", + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_security_group_rules.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_security_group_rules.rst new file mode 100644 index 0000000..4103876 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_security_group_rules.rst @@ -0,0 +1,238 @@ +:original_name: vpc_sg02_0006.html + +.. _vpc_sg02_0006: + +Querying Security Group Rules +============================= + +Function +-------- + +This API is used to query all security group rules accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/security-group-rules + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/security-group-rules?security_group_id={security_group_id}&remote_group_id={remote_group_id}&direction={direction}&remote_ip_prefix={remote_ip_prefix}&protocol={protocol}&port_range_max={port_range_max}&port_range_min={port_range_min}ðertype={ethertype}&tenant_id ={tenant_id} + +Example of querying security group rules by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/networks?limit=2&marker=07adc044-3f21-4eeb-bd57-5e5eb6024b7f&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg02_0006__table15294154210275: + +.. table:: **Table 1** Parameter description + + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +===================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the security group rule ID is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Specifies that the description is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | No | String | Specifies the ID of the remote security group associated with the security group rule is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | No | String | Specifies the ID of the corresponding security group is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | No | String | Specifies the security group rule direction is used as the filtering condition. The value can be **ingress** or **egress**. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | No | String | Specifies that the IP protocol is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | No | String | Specifies the remote IP address range matching the security group rule is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | No | String | Specifies that the network type is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | No | Integer | Specifies that the maximum port is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | No | Integer | Specifies that the minimum port is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +----------------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============================+====================================================================================+======================================================================================================================================================================================================================+ + | security_group_rules | Array of :ref:`Security Group Rule ` objects | Specifies the security group rule list. For details, see :ref:`Table 3 `. | + +----------------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules_links | Array of :ref:`SecurityGroupRulesLink ` objects | Shows pagination information about security group rules. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +----------------------------+------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0006__table655457801607: + +.. table:: **Table 3** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0006__table1318194661915: + +.. table:: **Table 4** **SecurityGroupRulesLink** objects + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/security-group-rules + +Example response + +.. code-block:: + + { + "security_group_rules": [ + { + "remote_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967", + "direction": "ingress", + "remote_ip_prefix": null, + "protocol": null, + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "port_range_max": null, + "security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967", + "port_range_min": null, + "ethertype": "IPv6", + "description": null, + "id": "07adc044-3f21-4eeb-bd57-5e5eb6024b7f", + "project_id": "6c9298ec8c874f7f99688489ab65f90e", + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34" + }, + { + "remote_group_id": null, + "direction": "egress", + "remote_ip_prefix": null, + "protocol": null, + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "port_range_max": null, + "security_group_id": "328fb454-a2ee-4a11-bdb1-ee19bbdfde43", + "port_range_min": null, + "ethertype": "IPv6", + "description": null, + "id": "09358f83-f4a5-4386-9563-a1e3c373d655", + "project_id": "6c9298ec8c874f7f99688489ab65f90e", + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34" + }, + { + "remote_group_id": "4c763030-366e-428c-be2b-d48f6baf5297", + "direction": "ingress", + "remote_ip_prefix": null, + "protocol": null, + "tenant_id": "6c9298ec8c874f7f99688489ab65f90e", + "port_range_max": null, + "security_group_id": "4c763030-366e-428c-be2b-d48f6baf5297", + "port_range_min": null, + "ethertype": "IPv6", + "description": null, + "id": "219a6f56-1069-458b-bec0-df9270e7a074", + "project_id": "6c9298ec8c874f7f99688489ab65f90e", + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34" + } + ], + "security_group_rules_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/ + security-group-rules?marker=07adc044-3f21-4eeb-bd57-5e5eb6024b7f&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_security_groups.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_security_groups.rst new file mode 100644 index 0000000..dc6b9e5 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/querying_security_groups.rst @@ -0,0 +1,242 @@ +:original_name: vpc_sg02_0001.html + +.. _vpc_sg02_0001: + +Querying Security Groups +======================== + +Function +-------- + +This API is used to query all security groups accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/security-groups + +Example of querying security groups by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/security-groups?limit=2&marker=0431c9c5-1660-42e0-8a00-134bec7f03e2&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_sg02_0001__table1687161718223: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the name is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Specifies that the description is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+================================================================================+======================================================================================================================================================================================================================+ + | security_groups | Array of :ref:`Security Group ` objects | Specifies the security group list. For details, see :ref:`Table 3 `. | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_groups_links | Array of :ref:`SecurityGroupsLink ` objects | Shows pagination information about security groups. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+--------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0001__table513726041607: + +.. table:: **Table 3** **Security Group** objects + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+================================================================================+=============================================================================================================+ + | id | String | Specifies the security group ID. | + | | | | + | | | This parameter is not mandatory when you query security groups. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`Security Group Rule ` objects | Specifies the security group rule list. For details, see :ref:`Table 4 `. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0001__table655457801607: + +.. table:: **Table 4** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0001__table1318194661915: + +.. table:: **Table 5** **SecurityGroupsLink** objects + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/security-groups?limit=1 + +Example response + +.. code-block:: + + { + "security_groups": [ + { + "id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "name": "sg-ad3f", + "description": "", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "security_group_rules": [ + { + "id": "d90e55ba-23bd-4d97-b722-8cb6fb485d69", + "direction": "ingress", + "protocol": null, + "ethertype": "IPv4", + "description": null, + "remote_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "remote_address_group_id": "0150a3a7-82ca-4569-865c-04e46e5e9249" + }, + { + "id": "aecff4d4-9ce9-489c-86a3-803aedec65f7", + "direction": "egress", + "protocol": null, + "ethertype": "IPv4", + "description": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "0431c9c5-1660-42e0-8a00-134bec7f03e2", + "remote_address_group_id": null + } + ], + "created_at": "2018-09-12T08:24:14", + "updated_at": "2018-09-12T08:24:14" + } + ], + "security_groups_links": [ + { + "rel": "next", + "href": "https://{Endpoint}/v2.0/security-groups?limit=1&marker=0431c9c5-1660-42e0-8a00-134bec7f03e2" + }, + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/security-groups?limit=1&marker=0431c9c5-1660-42e0-8a00-134bec7f03e2&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/updating_a_security_group.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/updating_a_security_group.rst new file mode 100644 index 0000000..64d04f4 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/security_group/updating_a_security_group.rst @@ -0,0 +1,204 @@ +:original_name: vpc_sg02_0004.html + +.. _vpc_sg02_0004: + +Updating a Security Group +========================= + +Function +-------- + +This API is used to update a security group. + +URI +--- + +PUT /v2.0/security-groups/{security_group_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+===================================================================+=================+===================================================================================================+ + | security_group | :ref:`security_group `\ object | Yes | Specifies the security group. For details, see :ref:`Table 2 `. | + | | | | | + | | | | You must specify at least one attribute when updating a security group. | + +-----------------+-------------------------------------------------------------------+-----------------+---------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0004__table513726041607: + +.. table:: **Table 2** **Security Group** objects + + +-------------+-----------+--------+--------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +=============+===========+========+==============================================================+ + | name | No | String | Specifies the security group name. | + +-------------+-----------+--------+--------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the security group. | + +-------------+-----------+--------+--------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +----------------+--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +================+====================================================================+==============================================================================================================+ + | security_group | :ref:`security_group ` object | Specifies the security group objects. For details, see :ref:`Table 4 `. | + +----------------+--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0004__table166682044134519: + +.. table:: **Table 4** **Security Group** objects + + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+================================================================================+=============================================================================================================+ + | id | String | Specifies the security group ID. | + | | | | + | | | This parameter is not mandatory when you query security groups. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the security group name. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`Security Group Rule ` objects | Specifies the security group rule list. For details, see :ref:`Table 5 `. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+--------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. _vpc_sg02_0004__table655457801607: + +.. table:: **Table 5** **Security Group Rule** objects + + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+=============================================================================================================================================================================================+ + | id | String | Specifies the security group rule ID. | + | | | | + | | | This parameter is not mandatory when you query security group rules. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | Specifies the ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | Specifies the peer ID of the belonged security group. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Specifies the direction of the traffic for which the security group rule takes effect. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Specifies the peer IP address segment. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Specifies the protocol type or the IP protocol number. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_max | Integer | Specifies the maximum port number. When ICMP is used, the value is the ICMP code. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | port_range_min | Integer | Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type. | + | | | | + | | | When the TCP or UDP protocol is used, both **port_range_max** and **port_range_min** must be specified, and the **port_range_max** value must be greater than the **port_range_min** value. | + | | | | + | | | When the ICMP protocol is used, if you specify the ICMP code (**port_range_max**), you must also specify the ICMP type (**port_range_min**). | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | Specifies the network type. | + | | | | + | | | IPv4 and IPv6 are supported. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | - Specifies the remote IP address group ID. | + | | | - The value is exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the security group rule is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the security group rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/security-groups/d29ae17d-f355-4992-8747-1fb66cc9afd2 + + { + "security_group": { + "name": "sg-test02" + } + } + +Example response + +.. code-block:: + + { + "security_group": { + "id": "d29ae17d-f355-4992-8747-1fb66cc9afd2", + "name": "sg-test02", + "description": "", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "security_group_rules": [ + { + "id": "6332de3e-98fb-4f8c-b44a-fcb8ff09881e", + "direction": "egress", + "protocol": null, + "ethertype": "IPv6", + "description": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2", + "remote_address_group_id": "0150a3a7-82ca-4569-865c-04e46e5e9249" + }, + { + "id": "3f51e52c-0e85-40f7-a137-85927392e436", + "direction": "egress", + "protocol": null, + "ethertype": "IPv4", + "description": null, + "remote_group_id": null, + "remote_ip_prefix": null, + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "port_range_max": null, + "port_range_min": null, + "security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2", + "remote_address_group_id": null + } + ], + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:16:31" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/creating_a_subnet.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/creating_a_subnet.rst new file mode 100644 index 0000000..1ec9962 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/creating_a_subnet.rst @@ -0,0 +1,254 @@ +:original_name: vpc_subnet02_0003.html + +.. _vpc_subnet02_0003: + +Creating a Subnet +================= + +Function +-------- + +This API is used to create a subnet. + +URI +--- + +POST /v2.0/subnets + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------+---------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +===========+===============================================================+===========+=================================================================================================+ + | subnet | :ref:`subnet ` object | Yes | Specifies the subnet. For details, see :ref:`Table 2 `. | + +-----------+---------------------------------------------------------------+-----------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0003__table12211980105515: + +.. table:: **Table 2** **subnet** objects + + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +==================+=================+============================================================================+=================================================================================================================================================================================================================================================+ + | name | No | String | Specifies the subnet name. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | No | Integer | Specifies the IP address version. | + | | | | | + | | | | Supported versions: IPv4 | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | Yes | String | Specifies the ID of the network to which the subnet belongs. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | Yes | String | Specifies the CIDR format. | + | | | | | + | | | | Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the subnet mask cannot be greater than 28. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | No | String | The gateway IP address cannot conflict with IP addresses configured for **allocation_pools**. | + | | | | | + | | | | This attribute cannot be modified. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allocation_pools | No | Array of :ref:`allocation_pool ` objects | Specifies the available IP address pool. For details, see the **allocation_pool** objects. | + | | | | | + | | | | :ref:`Table 3 ` | + | | | | | + | | | | Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ] | + | | | | | + | | | | The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in IPv4 subnet 192.168.1.0/24, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. | + | | | | | + | | | | By default, the IP addresses reserved by the system are not in the IP address pool specified by **allocation_pool**. | + | | | | | + | | | | When updating an IP address pool, the **allocation_pool** value can contain neither gateway nor broadcast IP addresses. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_nameservers | No | Array of strings | Specifies the DNS server address. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"] | + | | | | | + | | | | A maximum of five DNS server addresses are supported. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host_routes | No | Array of :ref:`host_route ` objects | Specifies the static VM routes. For details, see :ref:`Table 4 `. | + | | | | | + | | | | Static routes are not supported, and entered information will be ignored. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | No | Boolean | Specifies whether to enable the DHCP function. Value **false** indicates that the DHCP function is not enabled. | + | | | | | + | | | | The value can only be **true**. | + +------------------+-----------------+----------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0003__table24611730: + +.. table:: **Table 3** **allocation_pool** objects + + +-----------+-----------+--------+---------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+===================================================+ + | start | No | String | Specifies the start IP address of a network pool. | + +-----------+-----------+--------+---------------------------------------------------+ + | end | No | String | Specifies the end IP address of a network pool. | + +-----------+-----------+--------+---------------------------------------------------+ + +.. _vpc_subnet02_0003__table5232330: + +.. table:: **Table 4** **host_route** objects + + +-------------+-----------+--------+-----------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+===============================================+ + | destination | No | String | Specifies the destination subnet of a route. | + +-------------+-----------+--------+-----------------------------------------------+ + | nexthop | No | String | Specifies the next-hop IP address of a route. | + +-------------+-----------+--------+-----------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 5** Response parameter + + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=============================================================+===============================================================================================+ + | subnet | :ref:`subnet ` object | Specifies the subnet. For details, see :ref:`Table 6 `. | + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0003__table176735992713: + +.. table:: **Table 6** **subnet** objects + + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=================================================================================+=====================================================================================================================================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet ID. | + | | | | + | | | This parameter is not mandatory when you query subnets. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet name. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the subnet belongs. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the CIDR format. | + | | | | + | | | Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the subnet mask cannot be greater than 28. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | The gateway IP address cannot conflict with IP addresses configured for **allocation_pools**. | + | | | | + | | | This attribute cannot be modified. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allocation_pools | Array of :ref:`allocation_pool ` objects | Specifies the available IP address pool. For details, see the **allocation_pool** objects. | + | | | | + | | | :ref:`Table 7 ` | + | | | | + | | | Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ] | + | | | | + | | | The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in subnet **192.168.1.0/24**, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. By default, the IP addresses reserved by the system are not in the IP address pool specified by **allocation_pool**. | + | | | | + | | | When updating an IP address pool, the **allocation_pool** value can contain neither gateway nor broadcast IP addresses. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_nameservers | Array of strings | Specifies the DNS server address. | + | | | | + | | | Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"] | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host_routes | Array of :ref:`host_route ` objects | Specifies the static VM routes. For details, see :ref:`Table 8 `. | + | | | | + | | | Static routes are not supported, and entered information will be ignored. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | Boolean | Specifies whether to enable the DHCP function. Value **false** indicates that the DHCP function is not enabled. | + | | | | + | | | The value can only be **true**. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0003__table1777145918276: + +.. table:: **Table 7** **allocation_pool** objects + + ========= ====== ================================================= + Parameter Type Remarks + ========= ====== ================================================= + start String Specifies the start IP address of a network pool. + end String Specifies the end IP address of a network pool. + ========= ====== ================================================= + +.. _vpc_subnet02_0003__table177865912715: + +.. table:: **Table 8** **host_route** objects + + =========== ====== ============================================= + Parameter Type Remarks + =========== ====== ============================================= + destination String Specifies the destination subnet of a route. + nexthop String Specifies the next-hop IP address of a route. + =========== ====== ============================================= + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/subnets + + { + "subnet": { + "name": "subnet-test", + "network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206", + "cidr": "172.16.2.0/24", + "enable_dhcp": true + } + } + +Example response + +.. code-block:: + + { + "subnet": { + "name": "subnet-test", + "cidr": "172.16.2.0/24", + "id": "98bac90c-0ba7-4a63-8995-097da9bead1c", + "enable_dhcp": true, + "network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "dns_nameservers": [], + "allocation_pools": [ + { + "start": "172.16.2.2", + "end": "172.16.2.251" + } + ], + "host_routes": [], + "ip_version": 4, + "gateway_ip": "172.16.2.1", + "created_at": "2018-09-20T02:02:16", + "updated_at": "2018-09-20T02:02:16" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/deleting_a_subnet.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/deleting_a_subnet.rst new file mode 100644 index 0000000..1a09dbe --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/deleting_a_subnet.rst @@ -0,0 +1,49 @@ +:original_name: vpc_subnet02_0005.html + +.. _vpc_subnet02_0005: + +Deleting a Subnet +================= + +Function +-------- + +This API is used to delete a subnet. + +URI +--- + +DELETE /v2.0/subnets/{subnet_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/subnets/74259164-e63a-4ad9-9c77-a1bd2c9aa187 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/index.rst new file mode 100644 index 0000000..3ccb5c3 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_subnet02_0000.html + +.. _vpc_subnet02_0000: + +Subnet +====== + +- :ref:`Querying Subnets ` +- :ref:`Querying a Subnet ` +- :ref:`Creating a Subnet ` +- :ref:`Updating a Subnet ` +- :ref:`Deleting a Subnet ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_subnets + querying_a_subnet + creating_a_subnet + updating_a_subnet + deleting_a_subnet diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/querying_a_subnet.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/querying_a_subnet.rst new file mode 100644 index 0000000..157cdc1 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/querying_a_subnet.rst @@ -0,0 +1,159 @@ +:original_name: vpc_subnet02_0002.html + +.. _vpc_subnet02_0002: + +Querying a Subnet +================= + +Function +-------- + +This API is used to query details about a subnet. + +URI +--- + +GET /v2.0/subnets/{subnet_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=============================================================+===============================================================================================+ + | subnet | :ref:`subnet ` object | Specifies the subnet. For details, see :ref:`Table 2 `. | + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0002__table176735992713: + +.. table:: **Table 2** **subnet** objects + + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=================================================================================+================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet ID. | + | | | | + | | | This parameter is not mandatory when you query subnets. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet name. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the subnet belongs. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the CIDR format. | + | | | | + | | | Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the subnet mask cannot be greater than 28. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | The gateway IP address cannot conflict with IP addresses configured for **allocation_pools**. | + | | | | + | | | This attribute cannot be modified. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allocation_pools | Array of :ref:`allocation_pool ` objects | Specifies the available IP address pool. For details, see :ref:`Table 3 `. | + | | | | + | | | Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ] | + | | | | + | | | The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in subnet **192.168.1.0/24**, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. | + | | | | + | | | When updating an IP address pool, the **allocation_pool** value can contain neither gateway nor broadcast IP addresses. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_nameservers | Array of strings | Specifies the DNS server address. | + | | | | + | | | Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"] | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host_routes | Array of :ref:`host_route ` objects | Specifies the static VM routes. For details, see :ref:`Table 4 `. | + | | | | + | | | Static routes are not supported, and entered information will be ignored. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | Boolean | Specifies whether to enable the DHCP function. Value **false** indicates that the DHCP function is not enabled. | + | | | | + | | | The value can only be **true**. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0002__table1777145918276: + +.. table:: **Table 3** **allocation_pool** objects + + ========= ====== ================================================= + Parameter Type Remarks + ========= ====== ================================================= + start String Specifies the start IP address of a network pool. + end String Specifies the end IP address of a network pool. + ========= ====== ================================================= + +.. _vpc_subnet02_0002__table177865912715: + +.. table:: **Table 4** **host_route** objects + + =========== ====== ============================================= + Parameter Type Remarks + =========== ====== ============================================= + destination String Specifies the destination subnet of a route. + nexthop String Specifies the next-hop IP address of a route. + =========== ====== ============================================= + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnets/011fc878-5521-4654-a1ad-f5b0b5820302 + +Example response + +.. code-block:: + + { + "subnet": { + "name": "kesmdemeet", + "cidr": "172.16.236.0/24", + "id": "011fc878-5521-4654-a1ad-f5b0b5820302", + "enable_dhcp": true, + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "dns_nameservers": [], + "allocation_pools": [ + { + "start": "172.16.236.2", + "end": "172.16.236.251" + } + ], + "host_routes": [], + "ip_version": 4, + "gateway_ip": "172.16.236.1", + "created_at": "2018-03-26T08:23:43", + "updated_at": "2018-03-26T08:23:44" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/querying_subnets.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/querying_subnets.rst new file mode 100644 index 0000000..ca86bf9 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/querying_subnets.rst @@ -0,0 +1,286 @@ +:original_name: vpc_subnet02_0001.html + +.. _vpc_subnet02_0001: + +Querying Subnets +================ + +Function +-------- + +This API is used to query all subnets accessible to the tenant submitting the request. + +URI +--- + +GET /v2.0/subnets + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnets?name={subnet_name}&ip_version={ip_version}&network_id={network_id}&cidr={subnet_cidr_address}&gateway_ip={subnet_gateway}&tenant_id={tenant_id}&enable_dhcp={is_enable_dhcp} + +Example of querying networks by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnets?limit=2&marker=011fc878-5521-4654-a1ad-f5b0b5820302&page_reverse=False + +:ref:`Table 1 ` describes the parameters. + +.. _vpc_subnet02_0001__table3825412149: + +.. table:: **Table 1** Parameter description + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Name | Mandatory | Type | Description | + +=================+=================+=================+========================================================================================================================================================================================================================+ + | id | No | String | Specifies that the ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | String | Specifies that the subnet name is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | No | Boolean | Specifies whether DHCP is enabled for the subnet is used as the filtering condition. | + | | | | | + | | | | The value can be **true** or **false**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | No | String | Specifies that the CIDR block is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | No | String | Specifies that the network ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | No | String | Specifies that the IP address version is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | No | String | Specifies that the gateway IP address is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | No | String | Specifies that the project ID is used as the filtering condition. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID. | + | | | | | + | | | | This parameter can work together with the parameter **limit**. | + | | | | | + | | | | - If parameters **marker** and **limit** are not passed, all resource records will be returned. | + | | | | - If the parameter **marker** is not passed and the value of parameter **limit** is set to **10**, the first 10 resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the value of parameter **limit** is set to **10**, the 11th to 20th resource records will be returned. | + | | | | - If the value of the parameter **marker** is set to the resource ID of the 10th record and the parameter **limit** is not passed, resource records starting from the 11th records (including 11th) will be returned. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Integer | Specifies the number of records that will be returned on each page. The value is from 0 to intmax. | + | | | | | + | | | | **limit** can be used together with **marker**. For details, see the parameter description of **marker**. | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 2** Response parameter + + +-----------------------+-------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+===============================================================================+======================================================================================================================================================================================================================+ + | subnets | Array of :ref:`subnet ` objects | Specifies the subnet list. For details, see :ref:`Table 3 `. | + +-----------------------+-------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnets_links | Array of :ref:`subnets_link ` objects | Specifies the pagination information. For details, see :ref:`Table 6 `. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+-------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0001__table176735992713: + +.. table:: **Table 3** **subnet** objects + + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=================================================================================+=================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet ID. | + | | | | + | | | This parameter is not mandatory when you query subnets. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet name. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the subnet belongs. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the CIDR format. | + | | | | + | | | Only the IPv4 addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the IPv4 mask cannot be greater than 28. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | The gateway IP address cannot conflict with IP addresses configured for **allocation_pools**. | + | | | | + | | | This attribute cannot be modified. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allocation_pools | Array of :ref:`allocation_pool ` objects | Specifies available IP address pools. For details, see :ref:`Table 4 `. | + | | | | + | | | Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ] | + | | | | + | | | The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in IPv4 subnet 192.168.1.0/24, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. | + | | | | + | | | By default, the IP addresses reserved by the system are not in the IP address pool specified by **allocation_pool**. | + | | | | + | | | When updating an IP address pool, the **allocation_pool** value can contain neither gateway nor broadcast IP addresses. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_nameservers | Array of strings | Specifies the DNS server address. | + | | | | + | | | Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"] | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host_routes | Array of :ref:`host_route ` objects | Specifies the static VM routes. For details, see :ref:`Table 5 `. | + | | | | + | | | Static routes are not supported, and entered information will be ignored. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | Boolean | Specifies whether to enable the DHCP function. Value **false** indicates that the DHCP function is not enabled. | + | | | | + | | | The value can only be **true**. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0001__table1777145918276: + +.. table:: **Table 4** **allocation_pool** objects + + ========= ====== ================================================= + Parameter Type Description + ========= ====== ================================================= + start String Specifies the start IP address of a network pool. + end String Specifies the end IP address of a network pool. + ========= ====== ================================================= + +.. _vpc_subnet02_0001__table177865912715: + +.. table:: **Table 5** **host_route** objects + + =========== ====== ============================================= + Parameter Type Description + =========== ====== ============================================= + destination String Specifies the destination subnet of a route. + nexthop String Specifies the next-hop IP address of a route. + =========== ====== ============================================= + +.. _vpc_subnet02_0001__table10817112933915: + +.. table:: **Table 6** **subnets_link** object + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +Example +------- + +Example request 1 + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnets?limit=1 + +Example response 1 + +.. code-block:: + + { + "subnets": [ + { + "name": "kesmdemeet", + "cidr": "172.16.236.0/24", + "id": "011fc878-5521-4654-a1ad-f5b0b5820302", + "enable_dhcp": true, + "network_id": "48efad0c-079d-4cc8-ace0-dce35d584124", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "dns_nameservers": [], + "allocation_pools": [ + { + "start": "172.16.236.2", + "end": "172.16.236.251" + } + ], + "host_routes": [], + "ip_version": 4, + "gateway_ip": "172.16.236.1", + "created_at": "2018-03-26T08:23:43", + "updated_at": "2018-03-26T08:23:44" + } + ], + "subnets_links": [ + { + "rel": "next", + "href": "https://{Endpoint}/v2.0/subnets?limit=1&marker=011fc878-5521-4654-a1ad-f5b0b5820302" + }, + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/subnets?limit=1&marker=011fc878-5521-4654-a1ad-f5b0b5820302&page_reverse=True" + } + ] + } + +Example request 2 + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnets?id=011fc878-5521-4654-a1ad-f5b0b5820322 + +Example response 2 + +.. code-block:: + + { + "subnets": [ + { + "id": "011fc878-5521-4654-a1ad-f5b0b5820322", + "name": "elb_alpha_vpc0_subnet0_172_16_0_0_24", + "tenant_id": "0c55e5b2b100d5202ff6c01a2fac4580", + "network_id": "3053b502-11b2-4599-bcf4-d9d06b6118b2", + "ip_version": 6, + "cidr": "2001:db8:a583:a0::/64", + "subnetpool_id": "cb03d100-8687-4c0a-9441-ea568dcae47d", + "allocation_pools": [{ + "start": "2001:db8:a583:a0::2", + "end": "2001:db8:a583:a0:ffff:ffff:ffff:fffc" + }], + "gateway_ip": "2001:db8:a583:a0::1", + "enable_dhcp": true, + "ipv6_ra_mode": "dhcpv6-stateful", + "ipv6_address_mode": "dhcpv6-stateful", + "description": "", + "dns_nameservers": [], + "host_routes": [], + "project_id": "0c55e5b2b100d5202ff6c01a2fac4580", + "created_at": "2021-07-01T07:59:28", + "updated_at": "2021-07-01T07:59:28" + } + ], + "subnets_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/subnets?limit=1&id=011fc878-5521-4654-a1ad-f5b0b5820322&marker=011fc878-5521-4654-a1ad-f5b0b5820302&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/updating_a_subnet.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/updating_a_subnet.rst new file mode 100644 index 0000000..31bdf25 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet/updating_a_subnet.rst @@ -0,0 +1,241 @@ +:original_name: vpc_subnet02_0004.html + +.. _vpc_subnet02_0004: + +Updating a Subnet +================= + +Function +-------- + +This API is used to update information about a subnet. + +Restrictions + +When updating the **allocation_pools** field, neither gateway nor broadcast IP addresses can be included. + +URI +--- + +PUT /v2.0/subnets/{subnet_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+---------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+===============================================================+=================+=================================================================================================+ + | subnet | :ref:`subnet ` object | Yes | Specifies the subnet. For details, see :ref:`Table 2 `. | + | | | | | + | | | | You must specify at least one attribute when updating a subnet. | + +-----------------+---------------------------------------------------------------+-----------------+-------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0004__table12211980105515: + +.. table:: **Table 2** **subnet** objects + + +------------------+-----------------+----------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +==================+=================+============================================================================+=====================================================================================================================================================================================================================================================================================================================================================================+ + | name | No | String | Specifies the subnet name. | + +------------------+-----------------+----------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allocation_pools | No | Array of :ref:`allocation_pool ` objects | Specifies the available IP address pool. For details about the **allocation_pool** objects, see :ref:`Table 3 `. | + | | | | | + | | | | Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ] | + | | | | | + | | | | The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in subnet **192.168.1.0/24**, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. By default, the IP addresses reserved by the system are not in the IP address pool specified by **allocation_pool**. | + | | | | | + | | | | When updating an IP address pool, the **allocation_pool** value can contain neither gateway nor broadcast IP addresses. | + +------------------+-----------------+----------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_nameservers | No | Array of strings | Specifies the DNS server address. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"] | + | | | | | + | | | | A maximum of five DNS server addresses are supported. | + +------------------+-----------------+----------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host_routes | No | Array of :ref:`host_route ` objects | Specifies the static VM routes. For details, see :ref:`Table 4 `. | + | | | | | + | | | | Static routes are not supported, and entered information will be ignored. | + +------------------+-----------------+----------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | No | Boolean | Specifies whether to enable the DHCP function. Value **false** indicates that the DHCP function is not enabled. | + | | | | | + | | | | The value can only be **true**. | + +------------------+-----------------+----------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0004__table24611730: + +.. table:: **Table 3** **allocation_pool** objects + + +-----------+-----------+--------+---------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+===================================================+ + | start | No | String | Specifies the start IP address of a network pool. | + +-----------+-----------+--------+---------------------------------------------------+ + | end | No | String | Specifies the end IP address of a network pool. | + +-----------+-----------+--------+---------------------------------------------------+ + +.. _vpc_subnet02_0004__table5232330: + +.. table:: **Table 4** **host_route** objects + + +-------------+-----------+--------+-----------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+===============================================+ + | destination | No | String | Specifies the destination subnet of a route. | + +-------------+-----------+--------+-----------------------------------------------+ + | nexthop | No | String | Specifies the next-hop IP address of a route. | + +-------------+-----------+--------+-----------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 5** Response parameter + + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+=============================================================+===============================================================================================+ + | subnet | :ref:`subnet ` object | Specifies the subnet. For details, see :ref:`Table 6 `. | + +-----------+-------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0004__table176735992713: + +.. table:: **Table 6** **subnet** objects + + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=================================================================================+=================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet ID. | + | | | | + | | | This parameter is not mandatory when you query subnets. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet name. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | network_id | String | Specifies the ID of the network to which the subnet belongs. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cidr | String | Specifies the CIDR format. | + | | | | + | | | Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the subnet mask cannot be greater than 28. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | gateway_ip | String | The gateway IP address cannot conflict with IP addresses configured for **allocation_pools**. | + | | | | + | | | This attribute cannot be modified. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | allocation_pools | Array of :ref:`allocation_pool ` objects | Specifies the available IP address pool. For details, see the **allocation_pool** objects. | + | | | | + | | | :ref:`Table 7 ` | + | | | | + | | | Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ] | + | | | | + | | | The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in IPv4 subnet 192.168.1.0/24, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. | + | | | | + | | | By default, the IP addresses reserved by the system are not in the IP address pool specified by **allocation_pool**. | + | | | | + | | | When updating an IP address pool, the **allocation_pool** value can contain neither gateway nor broadcast IP addresses. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | dns_nameservers | Array of strings | Specifies the DNS server address. | + | | | | + | | | Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"] | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | host_routes | Array of :ref:`host_route ` objects | Specifies the static VM routes. For details, see :ref:`Table 8 `. | + | | | | + | | | Static routes are not supported, and entered information will be ignored. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enable_dhcp | Boolean | Specifies whether to enable the DHCP function. Value **false** indicates that the DHCP function is not enabled. | + | | | | + | | | The value can only be **true**. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnet02_0004__table1777145918276: + +.. table:: **Table 7** **allocation_pool** objects + + ========= ====== ================================================= + Parameter Type Remarks + ========= ====== ================================================= + start String Specifies the start IP address of a network pool. + end String Specifies the end IP address of a network pool. + ========= ====== ================================================= + +.. _vpc_subnet02_0004__table177865912715: + +.. table:: **Table 8** **host_route** objects + + =========== ====== ============================================= + Parameter Type Remarks + =========== ====== ============================================= + destination String Specifies the destination subnet of a route. + nexthop String Specifies the next-hop IP address of a route. + =========== ====== ============================================= + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/subnets/98bac90c-0ba7-4a63-8995-097da9bead1c + + { + "subnet": { + "name": "subnet-test" + } + } + +Example response + +.. code-block:: + + { + "subnet": { + "name": "subnet-test", + "cidr": "172.16.2.0/24", + "id": "98bac90c-0ba7-4a63-8995-097da9bead1c", + "enable_dhcp": true, + "network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206", + "tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "project_id": "bbfe8c41dd034a07bebd592bf03b4b0c", + "dns_nameservers": [], + "allocation_pools": [ + { + "start": "172.16.2.2", + "end": "172.16.2.251" + } + ], + "host_routes": [], + "ip_version": 4, + "gateway_ip": "172.16.2.1", + "created_at": "2018-09-20T02:02:16", + "updated_at": "2018-09-20T02:03:03" + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/creating_a_subnet_pool.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/creating_a_subnet_pool.rst new file mode 100644 index 0000000..15fe549 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/creating_a_subnet_pool.rst @@ -0,0 +1,193 @@ +:original_name: vpc_subnetpools_0001.html + +.. _vpc_subnetpools_0001: + +Creating a Subnet Pool +====================== + +Function +-------- + +This API is used to create a subnet pool. + +URI +--- + +POST /v2.0/subnetpools + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +------------+---------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +============+===================================================+===========+==============================================================================================================+ + | subnetpool | :ref:`subnetpool `\ object | Yes | Specifies the subnet pool list. For details, see :ref:`Table 2 `. | + +------------+---------------------------------------------------+-----------+--------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0001__table12211980105515: + +.. table:: **Table 2** **subnetpool** objects + + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +===================+=================+==================+=====================================================================================================================================================================================================================================================+ + | name | Yes | String | Specifies the subnet pool name. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_quota | No | Integer | Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, **default_quota** is measured in units of /32. For IPv6 subnet pools, **default_quota** is measured in units of /64. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | prefixes | Yes | Array of strings | Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | min_prefixlen | No | Integer | Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is **8**, and that of an IPv6 subnet is **64**. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | min_prefixlen =< default_prefixlen =< max_prefixlen | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_prefixlen | No | Integer | Specifies the default prefix to be allocated to a subnet if the **cidr** or **prefixlen** is not specified when you create the subnet. The default value is **8** for an IPv4 subnet and **64** for an IPv6 subnet. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | min_prefixlen =< default_prefixlen =< max_prefixlen | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | max_prefixlen | No | Integer | Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is **32**, and that of an IPv6 subnet is **128**. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | min_prefixlen =< default_prefixlen =< max_prefixlen | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the subnet pool. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | is_default | No | Boolean | Specifies whether this is the default subnet pool. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | revision_number | No | Integer | Specifies the revision number of the subnet pool. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +------------+----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+======================================================================+============================================================================================================+ + | subnetpool | :ref:`subnetpool `\ object | Specifies the subnet pool list. For details, see :ref:`Table 4 `. | + +------------+----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0001__table149662441462: + +.. table:: **Table 4** **subnetpool** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=====================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet pool ID. | + | | | | + | | | This parameter is not mandatory when you query subnet pools. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet pool name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 and IPv6 | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_quota | Integer | Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, **default_quota** is measured in units of /32. For IPv6 subnet pools, **default_quota** is measured in units of /64. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet pool is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet pool rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | prefixes | Array of strings | Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | min_prefixlen | Integer | Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is **8**, and that of an IPv6 subnet is **64**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | address_scope_id | String | Specifies the ID of the address range allocated to the subnet pool. | + | | | | + | | | Only the administrator can specify this attribute. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the network can be shared to all projects. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_prefixlen | Integer | Specifies the default prefix to be allocated to a subnet if the **cidr** or **prefixlen** is not specified when you create the subnet. The default value is **8** for an IPv4 subnet and **64** for an IPv6 subnet. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | max_prefixlen | Integer | Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is **32**, and that of an IPv6 subnet is **128**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | is_default | Boolean | Specifies whether this is the default subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | revision_number | Integer | Specifies the revision number of the subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of strings | Specifies the tags. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + POST https://{Endpoint}/v2.0/subnetpools + + { + "subnetpool": { + "name": "my-subnet-pool", + "prefixes": [ + "192.168.0.0/16", + "10.10.0.0/21" + ], + "default_prefixlen": 25, + "min_prefixlen": 24, + "max_prefixlen": 30, + "shared": false + } + } + +Example response + +.. code-block:: + + { + "subnetpool": { + "address_scope_id": null, + "default_prefixlen": 25, + "default_quota": null, + "description": "", + "id": "f49a1319-423a-4ee6-ba54-1d95a4f6cc68", + "ip_version": 4, + "is_default": false, + "max_prefixlen": 30, + "min_prefixlen": 24, + "name": "my-subnet-pool", + "prefixes": [ + "10.10.0.0/21", + "192.168.0.0/16" + ], + "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "revision_number": 1, + "shared": false, + "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34", + "tags": [] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/deleting_a_subnet_pool.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/deleting_a_subnet_pool.rst new file mode 100644 index 0000000..0878eeb --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/deleting_a_subnet_pool.rst @@ -0,0 +1,49 @@ +:original_name: vpc_subnetpools_0005.html + +.. _vpc_subnetpools_0005: + +Deleting a Subnet Pool +====================== + +Function +-------- + +This API is used to delete a subnet pool. + +URI +--- + +DELETE /v2.0/subnetpools/{subnetpool_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +None + +Example: +-------- + +Example request + +.. code-block:: text + + DELETE https://{Endpoint}/v2.0/subnetpools/03f761e6-eee0-43fc-a921-8acf64c14988 + +Example response + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/index.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/index.rst new file mode 100644 index 0000000..e9f75f1 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_subnetpools_0000.html + +.. _vpc_subnetpools_0000: + +Subnet Pool +=========== + +- :ref:`Creating a Subnet Pool ` +- :ref:`Querying Subnet Pools ` +- :ref:`Querying a Subnet Pool ` +- :ref:`Updating a Subnet Pool ` +- :ref:`Deleting a Subnet Pool ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_subnet_pool + querying_subnet_pools + querying_a_subnet_pool + updating_a_subnet_pool + deleting_a_subnet_pool diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/querying_a_subnet_pool.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/querying_a_subnet_pool.rst new file mode 100644 index 0000000..ee64243 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/querying_a_subnet_pool.rst @@ -0,0 +1,138 @@ +:original_name: vpc_subnetpools_0003.html + +.. _vpc_subnetpools_0003: + +Querying a Subnet Pool +====================== + +Function +-------- + +This API is used to query details about the specific subnet pool. + +URI +--- + +GET /v2.0/subnetpools/{subnetpool_id} + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +------------+----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+======================================================================+============================================================================================================+ + | subnetpool | :ref:`subnetpool `\ object | Specifies the subnet pool list. For details, see :ref:`Table 2 `. | + +------------+----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0003__table149662441462: + +.. table:: **Table 2** **subnetpool** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=====================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet pool ID. | + | | | | + | | | This parameter is not mandatory when you query subnet pools. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet pool name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 and IPv6 | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_quota | Integer | Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, **default_quota** is measured in units of /32. For IPv6 subnet pools, **default_quota** is measured in units of /64. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet pool is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet pool rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | prefixes | Array of strings | Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | min_prefixlen | Integer | Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is **8**, and that of an IPv6 subnet is **64**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | address_scope_id | String | Specifies the ID of the address range allocated to the subnet pool. | + | | | | + | | | Only the administrator can specify this attribute. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the network can be shared to all projects. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_prefixlen | Integer | Specifies the default prefix to be allocated to a subnet if the **cidr** or **prefixlen** is not specified when you create the subnet. The default value is **8** for an IPv4 subnet and **64** for an IPv6 subnet. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | max_prefixlen | Integer | Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is **32**, and that of an IPv6 subnet is **128**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | is_default | Boolean | Specifies whether this is the default subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | revision_number | Integer | Specifies the revision number of the subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of strings | Specifies the tags. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnetpools/03f761e6-eee0-43fc-a921-8acf64c14988 + +Response +-------- + +Example response + +.. code-block:: + + { + "subnetpool": { + "min_prefixlen": 64, + "address_scope_id": null, + "default_prefixlen": 64, + "id": "03f761e6-eee0-43fc-a921-8acf64c14988", + "max_prefixlen": 64, + "name": "my-subnet-pool", + "default_quota": null, + "is_default": false, + "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "created_at": "2016-03-08T20:19:41", + "prefixes": [ + "2001:db8:0:2::/64", + "2001:db8::/63" + ], + "updated_at": "2016-03-08T20:19:41", + "ip_version": 6, + "shared": false, + "description": "", + "revision_number": 2, + "tags": [] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/querying_subnet_pools.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/querying_subnet_pools.rst new file mode 100644 index 0000000..d160051 --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/querying_subnet_pools.rst @@ -0,0 +1,193 @@ +:original_name: vpc_subnetpools_0002.html + +.. _vpc_subnetpools_0002: + +Querying Subnet Pools +===================== + +Function +-------- + +This API is used to query subnet pools. Pagination query is supported. + +URI +--- + +GET /v2.0/subnetpools + +Example: + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnetpools?fields=id&fields=name&fields=prefixes&fields=default_prefixlen&fields=address_scope_id&fields=is_default + +Example of querying subnet pools by page + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnetpools?limit=2&marker=03f761e6-eee0-43fc-a921-8acf64c14988&page_reverse=False + +Request Message +--------------- + +None + +Response Message +---------------- + +.. table:: **Table 1** Response parameter + + +-----------------------+--------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+======================================================================================+======================================================================================================================================================================================================================+ + | subnetpools | Array of :ref:`subnetpool ` objects | Specifies the subnet pool list. For details, see :ref:`Table 2 `. | + +-----------------------+--------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnetpools_links | Array of :ref:`SecuritypoolsLink ` objects | Shows pagination information about subnet pools. | + | | | | + | | | The value of **rel** will be **next** and that of **href** will be a link only when **limit** is used for filtering and the number of resources exceeds the value of **limit** or 2000 (default value of **limit**). | + +-----------------------+--------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0002__table149662441462: + +.. table:: **Table 2** **subnetpool** objects + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=====================================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet pool ID. | + | | | | + | | | This parameter is not mandatory when you query subnet pools. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet pool name. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 and IPv6 | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_quota | Integer | Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, **default_quota** is measured in units of /32. For IPv6 subnet pools, **default_quota** is measured in units of /64. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet pool is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet pool rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | prefixes | Array of strings | Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | min_prefixlen | Integer | Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is **8**, and that of an IPv6 subnet is **64**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | address_scope_id | String | Specifies the ID of the address range allocated to the subnet pool. | + | | | | + | | | Only the administrator can specify this attribute. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the network can be shared to all projects. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_prefixlen | Integer | Specifies the default prefix to be allocated to a subnet if the **cidr** or **prefixlen** is not specified when you create the subnet. The default value is **8** for an IPv4 subnet and **64** for an IPv6 subnet. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | max_prefixlen | Integer | Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is **32**, and that of an IPv6 subnet is **128**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | is_default | Boolean | Specifies whether this is the default subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | revision_number | Integer | Specifies the revision number of the subnet pool. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of strings | Specifies the tags. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0002__table1318194661915: + +.. table:: **Table 3** **SubnetpoolsLink** objects + + +-----------+--------+----------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+========+======================================================================+ + | href | String | Specifies the API link. | + +-----------+--------+----------------------------------------------------------------------+ + | rel | String | Specifies the relationship between the API link and the API version. | + +-----------+--------+----------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + GET https://{Endpoint}/v2.0/subnetpools + +Example response + +.. code-block:: + + { + "subnetpools": + { + "min_prefixlen": 64, + "address_scope_id": null, + "default_prefixlen": 64, + "id": "03f761e6-eee0-43fc-a921-8acf64c14988", + "max_prefixlen": 64, + "name": "my-subnet-pool-ipv6", + "default_quota": null, + "is_default": false, + "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "prefixes": [ + "2001:db8:0:2::/64", + "2001:db8::/63" + ], + "ip_version": 6, + "shared": false, + "description": "", + "revision_number": 2, + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34", + "tags": [] + }, + { + "min_prefixlen": 24, + "address_scope_id": null, + "default_prefixlen": 25, + "id": "f49a1319-423a-4ee6-ba54-1d95a4f6cc68", + "max_prefixlen": 30, + "name": "my-subnet-pool-ipv4", + "default_quota": null, + "is_default": false, + "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "prefixes": [ + "10.10.0.0/21", + "192.168.0.0/16" + ], + "ip_version": 4, + "shared": false, + "description": "", + "revision_number": 2, + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34", + "tags": [] + } + ], + "subnetpools_links": [ + { "rel": "previous", + "href": "https://{Endpoint}/v2.0/subnetpools?marker=03f761e6-eee0-43fc-a921-8acf64c14988&page_reverse=True" + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/updating_a_subnet_pool.rst b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/updating_a_subnet_pool.rst new file mode 100644 index 0000000..a9a1b7e --- /dev/null +++ b/api-ref/source/native_openstack_neutron_apis_v2.0/subnet_pool/updating_a_subnet_pool.rst @@ -0,0 +1,193 @@ +:original_name: vpc_subnetpools_0004.html + +.. _vpc_subnetpools_0004: + +Updating a Subnet Pool +====================== + +Function +-------- + +This API is used to update a subnet pool. + +URI +--- + +PUT /v2.0/subnetpools/{subnetpool_id} + +Request Message +--------------- + +.. table:: **Table 1** Request parameter + + +-----------------+--------------------------------------------------------------------+-----------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Mandatory | Description | + +=================+====================================================================+=================+==============================================================================================================+ + | subnetpool | :ref:`subnetpool ` object | Yes | Specifies the subnet pool list. For details, see :ref:`Table 2 `. | + | | | | | + | | | | You must specify at least one attribute when updating the subnet pool. | + +-----------------+--------------------------------------------------------------------+-----------------+--------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0004__table12211980105515: + +.. table:: **Table 2** **subnetpool** objects + + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Mandatory | Type | Description | + +===================+=================+==================+=====================================================================================================================================================================================================================================================+ + | name | No | String | Specifies the subnet pool name. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_quota | No | Integer | Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, **default_quota** is measured in units of /32. For IPv6 subnet pools, **default_quota** is measured in units of /64. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | prefixes | No | Array of strings | Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | min_prefixlen | No | Integer | Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is **8**, and that of an IPv6 subnet is **64**. Instructions: | + | | | | | + | | | | min_prefixlen =< default_prefixlen =< max_prefixlen | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_prefixlen | No | Integer | Specifies the default prefix to be allocated to a subnet if the **cidr** or **prefixlen** is not specified when you create the subnet. The default value is **8** for an IPv4 subnet and **64** for an IPv6 subnet. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | min_prefixlen =< default_prefixlen =< max_prefixlen | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | max_prefixlen | No | Integer | Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is **32**, and that of an IPv6 subnet is **128**. | + | | | | | + | | | | Instructions: | + | | | | | + | | | | min_prefixlen =< default_prefixlen =< max_prefixlen | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the subnet pool. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | is_default | No | Boolean | Specifies whether this is the default subnet pool. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | revision_number | No | Integer | Specifies the revision number of the subnet pool. | + +-------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Message +---------------- + +.. table:: **Table 3** Response parameter + + +------------+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +============+====================================================================+============================================================================================================+ + | subnetpool | :ref:`subnetpool ` object | Specifies the subnet pool list. For details, see :ref:`Table 4 `. | + +------------+--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +.. _vpc_subnetpools_0004__table149662441462: + +.. table:: **Table 4** **subnetpool** objects + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=======================+=======================+=============================================================================================================================================================================================================================================+ + | id | String | Specifies the subnet pool ID. | + | | | | + | | | This parameter is not mandatory when you query subnet pools. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Specifies the subnet pool name. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Specifies the IP address version. | + | | | | + | | | Supported versions: IPv4 and IPv6 | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_quota | Integer | Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, default_quota is measured in units of /32. For IPv6 subnet pools, default_quota is measured in units of /64. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Specifies the time (UTC) when the subnet pool is created. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Specifies the time (UTC) when the subnet pool rule is updated. | + | | | | + | | | Format: *yyyy-MM-ddTHH:mm:ss* | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | prefixes | Array of strings | Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | min_prefixlen | Integer | Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is **8**, and that of an IPv6 subnet is **64**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | address_scope_id | String | Specifies the ID of the address range allocated to the subnet pool. | + | | | | + | | | Only the administrator can specify this attribute. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | shared | Boolean | Specifies whether the network can be shared to all projects. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | Specifies the project ID. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | default_prefixlen | Integer | Specifies the default prefix to be allocated to a subnet if the **cidr** or **prefixlen** is not specified when you create the subnet. The default value is **8** for an IPv4 subnet and **64** for an IPv6 subnet. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | max_prefixlen | Integer | Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is **32**, and that of an IPv6 subnet is **128**. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the subnet pool. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | is_default | Boolean | Specifies whether this is the default subnet pool. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | revision_number | Integer | Specifies the revision number of the subnet pool. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of strings | Specifies the tags. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example: +-------- + +Example request + +.. code-block:: text + + PUT https://{Endpoint}/v2.0/subnetpools/03f761e6-eee0-43fc-a921-8acf64c14988 + + { + "subnetpool": { + "name": "my-new-subnetpool-name", + "prefixes": [ + "2001:db8::/64", + "2001:db8:0:1::/64", + "2001:db8:0:2::/64" + ], + "min_prefixlen": 64, + "default_prefixlen": 64, + "max_prefixlen": 64 + } + } + +Example response + +.. code-block:: + + { + "subnetpool": { + "name": "my-new-subnetpool-name", + "default_quota": null, + "is_default": false, + "project_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08", + "prefixes": [ + "2001:db8::/63", + "2001:db8:0:2::/64" + ], + "min_prefixlen": 64, + "address_scope_id": null, + "ip_version": 6, + "shared": false, + "default_prefixlen": 64, + "id": "03f761e6-eee0-43fc-a921-8acf64c14988", + "max_prefixlen": 64, + "description": "", + "revision_number": 2, + "created_at": "2018-09-20T02:15:34", + "updated_at": "2018-09-20T02:15:34", + "tags": [] + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/permissions_policies_and_supported_actions/bandwidth.rst b/api-ref/source/permissions_policies_and_supported_actions/bandwidth.rst new file mode 100644 index 0000000..9457163 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/bandwidth.rst @@ -0,0 +1,16 @@ +:original_name: vpc_permission_0003.html + +.. _vpc_permission_0003: + +Bandwidth +========= + ++----------------------+------------------------------------------------+-----------------------+ +| Permission | API | Action | ++======================+================================================+=======================+ +| Queries a bandwidth. | GET /v1/{project_id}/bandwidths/{bandwidth_id} | vpc:bandwidths:get | ++----------------------+------------------------------------------------+-----------------------+ +| Queries bandwidths. | GET /v1/{project_id}/bandwidths | vpc:bandwidths:list | ++----------------------+------------------------------------------------+-----------------------+ +| Updates a bandwidth. | PUT /v1/{project_id}/bandwidths/{bandwidth_id} | vpc:bandwidths:update | ++----------------------+------------------------------------------------+-----------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/bandwidth_v2.0.rst b/api-ref/source/permissions_policies_and_supported_actions/bandwidth_v2.0.rst new file mode 100644 index 0000000..25a93b6 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/bandwidth_v2.0.rst @@ -0,0 +1,18 @@ +:original_name: vpc_permission_0018.html + +.. _vpc_permission_0018: + +Bandwidth (V2.0) +================ + ++-----------------------------------------+----------------------------------------------------------+-----------------------+ +| Permission | API | Action | ++=========================================+==========================================================+=======================+ +| Allocates a shared bandwidth. | POST /v2.0/{project_id}/bandwidths | vpc:bandwidths:create | ++-----------------------------------------+----------------------------------------------------------+-----------------------+ +| Deletes a shared bandwidth. | DELETE /v2.0/{project_id}/bandwidths/{bandwidth_id} | vpc:bandwidths:delete | ++-----------------------------------------+----------------------------------------------------------+-----------------------+ +| Adds an EIP to a shared bandwidth. | POST /v2.0/{project_id}/bandwidths/{bandwidth_id}/insert | vpc:publicIps:insert | ++-----------------------------------------+----------------------------------------------------------+-----------------------+ +| Removes an EIP from a shared bandwidth. | POST /v2.0/{project_id}/bandwidths/{bandwidth_id}/remove | vpc:publicIps:remove | ++-----------------------------------------+----------------------------------------------------------+-----------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/elastic_ip.rst b/api-ref/source/permissions_policies_and_supported_actions/elastic_ip.rst new file mode 100644 index 0000000..759bf1f --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/elastic_ip.rst @@ -0,0 +1,20 @@ +:original_name: vpc_permission_0002.html + +.. _vpc_permission_0002: + +Elastic IP +========== + ++-----------------+-------------------------------------------------+----------------------+ +| Permission | API | Action | ++=================+=================================================+======================+ +| Assigns an EIP. | POST /v1/{project_id}/publicips | vpc:publicIps:create | ++-----------------+-------------------------------------------------+----------------------+ +| Queries an EIP. | GET /v1/{project_id}/publicips/{publicip_id} | vpc:publicIps:get | ++-----------------+-------------------------------------------------+----------------------+ +| Queries EIPs. | GET /v1/{project_id}/publicips | vpc:publicIps:list | ++-----------------+-------------------------------------------------+----------------------+ +| Updates an EIP. | PUT /v1/{project_id}/publicips/{publicip_id} | vpc:publicIps:update | ++-----------------+-------------------------------------------------+----------------------+ +| Release an EIP. | DELETE /v1/{project_id}/publicips/{publicip_id} | vpc:publicIps:delete | ++-----------------+-------------------------------------------------+----------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/firewall_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/firewall_openstack_neutron_api.rst new file mode 100644 index 0000000..07d236e --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/firewall_openstack_neutron_api.rst @@ -0,0 +1,46 @@ +:original_name: vpc_permission_0015.html + +.. _vpc_permission_0015: + +Firewall (OpenStack Neutron API) +================================ + ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Permission | API | Action | ++================================+====================================================================+====================================+ +| Queries all firewall rules. | GET /v2.0/fwaas/firewall_rules | vpc:firewallRules:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Queries a firewall rule. | GET /v2.0/fwaas/firewall_rules/{firewall_rule_id} | vpc:firewallRules:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Creates a firewall rule. | POST /v2.0/fwaas/firewall_rules | vpc:firewallRules:create | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Updates a firewall rule. | PUT /v2.0/fwaas/firewall_rules/{firewall_rule_id} | vpc:firewallRules:update | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Deletes a firewall rule. | DELETE /v2.0/fwaas/firewall_rules/{firewall_rule_id} | vpc:firewallRules:delete | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Queries all firewall policies. | GET /v2.0/fwaas/firewall_policies | vpc:firewallPolicies:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Queries a firewall policy. | GET /v2.0/fwaas/firewall_policies/{firewall_policy_id} | vpc:firewallPolicies:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Creates a firewall policy. | POST /v2.0/fwaas/firewall_policies | vpc:firewallPolicies:create | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Updates a firewall policy. | PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id} | vpc:firewallPolicies:update | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Deletes a firewall policy. | DELETE /v2.0/fwaas/firewall_policies/{firewall_policy_id} | vpc:firewallPolicies:delete | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Inserts a firewall rule. | PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id}/insert_rule | - vpc:firewallPolicies:addRule | +| | | - vpc:firewallPolicies:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Removes a firewall rule. | PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id}/remove_rule | - vpc:firewallPolicies:removeRule | +| | | - vpc:firewallPolicies:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Queries all firewall groups. | GET /v2.0/fwaas/firewall_groups | vpc:firewallGroups:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Queries a firewall group. | GET /v2.0/fwaas/firewall_groups/{firewall_group_id} | vpc:firewallGroups:get | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Creates a firewall group. | POST /v2.0/fwaas/firewall_groups | vpc:firewallGroups:create | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Updates a firewall group. | PUT /v2.0/fwaas/firewall_groups/{firewall_group_id} | vpc:firewallGroups:update | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ +| Deletes a firewall group. | DELETE /v2.0/fwaas/firewall_groups/{firewall_group_id} | vpc:firewallGroups:delete | ++--------------------------------+--------------------------------------------------------------------+------------------------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/floating_ip_address_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/floating_ip_address_openstack_neutron_api.rst new file mode 100644 index 0000000..0fa68d6 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/floating_ip_address_openstack_neutron_api.rst @@ -0,0 +1,20 @@ +:original_name: vpc_permission_0014.html + +.. _vpc_permission_0014: + +Floating IP Address (OpenStack Neutron API) +=========================================== + ++--------------------------------+------------------------------------------+------------------------+ +| Permission | API | Action | ++================================+==========================================+========================+ +| Queries floating IP addresses. | GET /v2.0/floatingips | vpc:floatingIps:get | ++--------------------------------+------------------------------------------+------------------------+ +| Queries a floating IP address. | GET /v2.0/floatingips/{floatingip_id} | vpc:floatingIps:get | ++--------------------------------+------------------------------------------+------------------------+ +| Creates a floating IP address. | POST /v2.0/floatingips | vpc:floatingIps:create | ++--------------------------------+------------------------------------------+------------------------+ +| Updates a floating IP address. | PUT /v2.0/floatingips/{floatingip_id} | vpc:floatingIps:update | ++--------------------------------+------------------------------------------+------------------------+ +| Deletes a floating IP address. | DELETE /v2.0/floatingips/{floatingip_id} | vpc:floatingIps:delete | ++--------------------------------+------------------------------------------+------------------------+ 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..6194ba3 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/index.rst @@ -0,0 +1,50 @@ +:original_name: vpc_permission_0000.html + +.. _vpc_permission_0000: + +Permissions Policies and Supported Actions +========================================== + +- :ref:`VPC ` +- :ref:`Subnet ` +- :ref:`Elastic IP ` +- :ref:`Bandwidth ` +- :ref:`Bandwidth (V2.0) ` +- :ref:`VPC Peering Connection ` +- :ref:`VPC Route ` +- :ref:`Route Table ` +- :ref:`Quota ` +- :ref:`Private IP Address ` +- :ref:`Security Group ` +- :ref:`Port (OpenStack Neutron API) ` +- :ref:`Network (OpenStack Neutron API) ` +- :ref:`Subnet (OpenStack Neutron API) ` +- :ref:`Router (OpenStack Neutron API) ` +- :ref:`Floating IP Address (OpenStack Neutron API) ` +- :ref:`Firewall (OpenStack Neutron API) ` +- :ref:`Security Group (OpenStack Neutron API) ` +- :ref:`Precautions for API Permissions ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + vpc + subnet + elastic_ip + bandwidth + bandwidth_v2.0 + vpc_peering_connection + vpc_route + route_table + quota + private_ip_address + security_group + port_openstack_neutron_api + network_openstack_neutron_api + subnet_openstack_neutron_api + router_openstack_neutron_api + floating_ip_address_openstack_neutron_api + firewall_openstack_neutron_api + security_group_openstack_neutron_api + precautions_for_api_permissions diff --git a/api-ref/source/permissions_policies_and_supported_actions/network_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/network_openstack_neutron_api.rst new file mode 100644 index 0000000..9d9979c --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/network_openstack_neutron_api.rst @@ -0,0 +1,20 @@ +:original_name: vpc_permission_0011.html + +.. _vpc_permission_0011: + +Network (OpenStack Neutron API) +=============================== + ++--------------------+------------------------------------+---------------------+ +| Permission | API | Action | ++====================+====================================+=====================+ +| Queries networks. | GET /v2.0/networks | vpc:networks:get | ++--------------------+------------------------------------+---------------------+ +| Queries a network. | GET /v2.0/networks/{network_id} | vpc:networks:get | ++--------------------+------------------------------------+---------------------+ +| Creates a network. | POST /v2.0/networks | vpc:networks:create | ++--------------------+------------------------------------+---------------------+ +| Updates a network. | PUT /v2.0/networks/{network_id} | vpc:networks:update | ++--------------------+------------------------------------+---------------------+ +| Deletes a network. | DELETE /v2.0/networks/{network_id} | vpc:networks:delete | ++--------------------+------------------------------------+---------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/port_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/port_openstack_neutron_api.rst new file mode 100644 index 0000000..ba697bb --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/port_openstack_neutron_api.rst @@ -0,0 +1,16 @@ +:original_name: vpc_permission_0010.html + +.. _vpc_permission_0010: + +Port (OpenStack Neutron API) +============================ + +=============== ============================ ================ +Permission API Action +=============== ============================ ================ +Queries ports. GET /v2.0/ports vpc:ports:get +Queries a port. GET /v2.0/ports/{port_id} vpc:ports:get +Creates a port. POST /v2.0/ports vpc:ports:create +Updates a port. PUT /v2.0/ports/{port_id} vpc:ports:update +Deletes a port. DELETE /v2.0/ports/{port_id} vpc:ports:delete +=============== ============================ ================ diff --git a/api-ref/source/permissions_policies_and_supported_actions/precautions_for_api_permissions.rst b/api-ref/source/permissions_policies_and_supported_actions/precautions_for_api_permissions.rst new file mode 100644 index 0000000..da503a8 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/precautions_for_api_permissions.rst @@ -0,0 +1,8 @@ +:original_name: vpc_permission_0017.html + +.. _vpc_permission_0017: + +Precautions for API Permissions +=============================== + +If you have insufficient permissions, response code **200** will be returned when you query network resources and an empty list will be displayed. diff --git a/api-ref/source/permissions_policies_and_supported_actions/private_ip_address.rst b/api-ref/source/permissions_policies_and_supported_actions/private_ip_address.rst new file mode 100644 index 0000000..0b5f8da --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/private_ip_address.rst @@ -0,0 +1,18 @@ +:original_name: vpc_permission_0007.html + +.. _vpc_permission_0007: + +Private IP Address +================== + ++-------------------------------+-----------------------------------------------------+-----------------------+ +| Permission | API | Action | ++===============================+=====================================================+=======================+ +| Assigns a private IP address. | POST /v1/{project_id}/privateips | vpc:privateIps:create | ++-------------------------------+-----------------------------------------------------+-----------------------+ +| Queries a private IP address. | GET /v1/{project_id}/privateips/{privateip_id} | vpc:privateIps:get | ++-------------------------------+-----------------------------------------------------+-----------------------+ +| Queries private IP addresses. | GET /v1/{project_id}/subnets/{subnet_id}/privateips | vpc:privateIps:list | ++-------------------------------+-----------------------------------------------------+-----------------------+ +| Deletes a private IP address. | DELETE /v1/{project_id}/privateips/{privateip_id} | vpc:privateIps:delete | ++-------------------------------+-----------------------------------------------------+-----------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/quota.rst b/api-ref/source/permissions_policies_and_supported_actions/quota.rst new file mode 100644 index 0000000..198884d --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/quota.rst @@ -0,0 +1,12 @@ +:original_name: vpc_permission_0006.html + +.. _vpc_permission_0006: + +Quota +===== + +=============== =========================== =============== +Permission API Action +=============== =========================== =============== +Queries quotas. GET /v1/{project_id}/quotas vpc:quotas:list +=============== =========================== =============== diff --git a/api-ref/source/permissions_policies_and_supported_actions/route_table.rst b/api-ref/source/permissions_policies_and_supported_actions/route_table.rst new file mode 100644 index 0000000..14c6790 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/route_table.rst @@ -0,0 +1,24 @@ +:original_name: en-us_topic_0000001234585289.html + +.. _en-us_topic_0000001234585289: + +Route Table +=========== + ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Permission | API | Action | ++===========================================+==========================================================+===========================+ +| Querying Route Tables | GET /v1/{project_id}/routetables | vpc:routeTables:list | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Querying a Route Table | GET /v1/{project_id}/routetables/{routetable_id} | vpc:routeTables:get | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Creating a Route Table | POST /v1/{project_id}/routetables | vpc:routeTables:create | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Updating a Route Table | UPDATE /v1/{project_id}/routetables/{routetable_id} | vpc:routeTables:update | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Associating Subnets with a Route Table | POST /v1/{project_id}/routetables/{routetable_id}/action | vpc:routeTables:associate | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Disassociating Subnets from a Route Table | POST /v1/{project_id}/routetables/{routetable_id}/action | vpc:routeTables:associate | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ +| Deleting a Route Table | DELETE /v1/{project_id}/routetables/{routetable_id} | vpc:routeTables:delete | ++-------------------------------------------+----------------------------------------------------------+---------------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/router_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/router_openstack_neutron_api.rst new file mode 100644 index 0000000..520cbf1 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/router_openstack_neutron_api.rst @@ -0,0 +1,26 @@ +:original_name: vpc_permission_0013.html + +.. _vpc_permission_0013: + +Router (OpenStack Neutron API) +============================== + ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Permission | API | Action | ++=====================================+=======================================================+================================+ +| Queries routers. | GET /v2.0/routers | vpc:routers:get | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Queries a router. | GET /v2.0/routers/{router_id} | vpc:routers:get | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Creates a router. | POST /v2.0/routers | vpc:routers:create | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Updates a router. | PUT /v2.0/routers/{router_id} | vpc:routers:update | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Deletes a router. | DELETE /v2.0/routers/{router_id} | vpc:routers:delete | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Adds an interface to a router. | PUT /v2.0/routers/{router_id}/add_router_interface | - vpc:routers:addInterface | +| | | - vpc:routers:get | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ +| Removes an interface from a router. | PUT /v2.0/routers/{router_id}/remove_router_interface | - vpc:routers:removeInterface | +| | | - vpc:routers:get | ++-------------------------------------+-------------------------------------------------------+--------------------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/security_group.rst b/api-ref/source/permissions_policies_and_supported_actions/security_group.rst new file mode 100644 index 0000000..24c7dc5 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/security_group.rst @@ -0,0 +1,16 @@ +:original_name: vpc_permission_0008.html + +.. _vpc_permission_0008: + +Security Group +============== + ++---------------------------+----------------------------------------------------------+---------------------------+ +| Permission | API | Action | ++===========================+==========================================================+===========================+ +| Creates a security group. | POST /v1/{project_id}/security-groups | vpc:securityGroups:create | ++---------------------------+----------------------------------------------------------+---------------------------+ +| Queries a security group. | GET /v1/{project_id}/security-groups/{security_group_id} | vpc:securityGroups:get | ++---------------------------+----------------------------------------------------------+---------------------------+ +| Queries security groups. | GET /v1/{project_id}/security-groups | vpc:securityGroups:get | ++---------------------------+----------------------------------------------------------+---------------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/security_group_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/security_group_openstack_neutron_api.rst new file mode 100644 index 0000000..6556331 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/security_group_openstack_neutron_api.rst @@ -0,0 +1,28 @@ +:original_name: vpc_permission_0016.html + +.. _vpc_permission_0016: + +Security Group (OpenStack Neutron API) +====================================== + ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Permission | API | Action | ++==============================================+==============================================================+===============================+ +| Queries a security group. | GET /v2.0/security-groups | vpc:securityGroups:get | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Queries details about a security group. | GET /v2.0/security-groups/{security_group_id} | vpc:securityGroups:get | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Creates a security group. | POST /v2.0/security-groups | vpc:securityGroups:create | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Updates a security group. | PUT /v2.0/security-groups/{security_group_id} | vpc:securityGroups:update | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Deletes a security group. | DELETE /v2.0/security-groups/{security_group_id} | vpc:securityGroups:delete | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Queries a security group rule. | GET /v2.0/security-group-rules | vpc:securityGroupRules:get | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Queries details about a security group rule. | GET /v2.0/security-group-rules/{rules_security_groups_id} | vpc:securityGroupRules:get | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Creates a security group rule. | POST /v2.0/security-group-rules | vpc:securityGroupRules:create | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ +| Deletes a security group rule. | DELETE /v2.0/security-group-rules/{rules_security_groups_id} | vpc:securityGroupRules:delete | ++----------------------------------------------+--------------------------------------------------------------+-------------------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/subnet.rst b/api-ref/source/permissions_policies_and_supported_actions/subnet.rst new file mode 100644 index 0000000..514c023 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/subnet.rst @@ -0,0 +1,20 @@ +:original_name: vpc_permission_0001.html + +.. _vpc_permission_0001: + +Subnet +====== + ++-------------------+-----------------------------------------------------------+--------------------+ +| Permission | API | Action | ++===================+===========================================================+====================+ +| Creates a subnet. | POST /v1/{project_id}/subnets | vpc:subnets:create | ++-------------------+-----------------------------------------------------------+--------------------+ +| Queries a subnet. | GET /v1/{project_id}/subnets/{subnet_id} | vpc:subnets:get | ++-------------------+-----------------------------------------------------------+--------------------+ +| Queries subnets. | GET /v1/{project_id}/subnets | vpc:subnets:get | ++-------------------+-----------------------------------------------------------+--------------------+ +| Updates a subnet. | PUT /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id} | vpc:subnets:update | ++-------------------+-----------------------------------------------------------+--------------------+ +| Deletes a subnet. | DELETE /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id} | vpc:subnets:delete | ++-------------------+-----------------------------------------------------------+--------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/subnet_openstack_neutron_api.rst b/api-ref/source/permissions_policies_and_supported_actions/subnet_openstack_neutron_api.rst new file mode 100644 index 0000000..de370e4 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/subnet_openstack_neutron_api.rst @@ -0,0 +1,16 @@ +:original_name: vpc_permission_0012.html + +.. _vpc_permission_0012: + +Subnet (OpenStack Neutron API) +============================== + +================= ================================ ================== +Permission API Action +================= ================================ ================== +Queries subnets. GET /v2.0/subnets vpc:subnets:get +Queries a subnet. GET /v2.0/subnets/{subnet_id} vpc:subnets:get +Creates a subnet. POST /v2.0/subnets vpc:subnets:create +Updates a subnet. PUT /v2.0/subnets/{subnet_id} vpc:subnets:update +Deletes a subnet. DELETE /v2.0/subnets/{subnet_id} vpc:subnets:delete +================= ================================ ================== diff --git a/api-ref/source/permissions_policies_and_supported_actions/vpc.rst b/api-ref/source/permissions_policies_and_supported_actions/vpc.rst new file mode 100644 index 0000000..b2892f1 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/vpc.rst @@ -0,0 +1,16 @@ +:original_name: vpc_permission_0022.html + +.. _vpc_permission_0022: + +VPC +=== + +============== ===================================== =============== +Permission API Action +============== ===================================== =============== +Creates a VPC. POST /v1/{project_id}/vpcs vpc:vpcs:create +Queries a VPC. GET /v1/{project_id}/vpcs/{vpc_id} vpc:vpcs:get +Queries VPCs. GET /v1/{project_id}/vpcs vpc:vpcs:list +Updates a VPC. PUT /v1/{project_id}/vpcs/{vpc_id} vpc:vpcs:update +Deletes a VPC. DELETE /v1/{project_id}/vpcs/{vpc_id} vpc:vpcs:delete +============== ===================================== =============== diff --git a/api-ref/source/permissions_policies_and_supported_actions/vpc_peering_connection.rst b/api-ref/source/permissions_policies_and_supported_actions/vpc_peering_connection.rst new file mode 100644 index 0000000..28a85fb --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/vpc_peering_connection.rst @@ -0,0 +1,24 @@ +:original_name: vpc_permission_0005.html + +.. _vpc_permission_0005: + +VPC Peering Connection +====================== + ++------------------------------------+--------------------------------------------+---------------------+ +| Permission | API | Action | ++====================================+============================================+=====================+ +| Querying VPC peering connections | GET /v2.0/vpc/peerings | vpc:peerings:get | ++------------------------------------+--------------------------------------------+---------------------+ +| Querying a VPC peering connection | GET /v2.0/vpc/peerings/{peering_id} | vpc:peerings:get | ++------------------------------------+--------------------------------------------+---------------------+ +| Creating a VPC peering connection | POST /v2.0/vpc/peerings | vpc:peerings:create | ++------------------------------------+--------------------------------------------+---------------------+ +| Accepting a VPC peering connection | PUT /v2.0/vpc/peerings/{peering_id}/accept | vpc:peerings:accept | ++------------------------------------+--------------------------------------------+---------------------+ +| Refusing a VPC peering connection | PUT /v2.0/vpc/peerings/{peering_id}/reject | vpc:peerings:reject | ++------------------------------------+--------------------------------------------+---------------------+ +| Updating a VPC peering connection | PUT /v2.0/vpc/peerings/{peering_id} | vpc:peerings:update | ++------------------------------------+--------------------------------------------+---------------------+ +| Deleting a VPC peering connection | DELETE /v2.0/vpc/peerings/{peering_id} | vpc:peerings:delete | ++------------------------------------+--------------------------------------------+---------------------+ diff --git a/api-ref/source/permissions_policies_and_supported_actions/vpc_route.rst b/api-ref/source/permissions_policies_and_supported_actions/vpc_route.rst new file mode 100644 index 0000000..450e616 --- /dev/null +++ b/api-ref/source/permissions_policies_and_supported_actions/vpc_route.rst @@ -0,0 +1,18 @@ +:original_name: en-us_topic_0000001234666799.html + +.. _en-us_topic_0000001234666799: + +VPC Route +========= + ++----------------------+------------------------------------+-------------------+ +| Permission | API | Action | ++======================+====================================+===================+ +| Querying VPC Routes | GET /v2.0/vpc/routes | vpc:routes:list | ++----------------------+------------------------------------+-------------------+ +| Querying a VPC Route | GET /v2.0/vpc/routes/{route_id} | vpc:routes:get | ++----------------------+------------------------------------+-------------------+ +| Creating a VPC Route | POST /v2.0/vpc/routes | vpc:routes:create | ++----------------------+------------------------------------+-------------------+ +| Deleting a VPC Route | DELETE /v2.0/vpc/routes/{route_id} | vpc:routes:delete | ++----------------------+------------------------------------+-------------------+