diff --git a/api-ref/source/_static/images/en-us_image_0000001487964866.png b/api-ref/source/_static/images/en-us_image_0000001487964866.png new file mode 100644 index 0000000..9030b9e Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001487964866.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001538444809.png b/api-ref/source/_static/images/en-us_image_0000001538444809.png new file mode 100644 index 0000000..9030b9e Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001538444809.png differ diff --git a/api-ref/source/_static/images/en-us_image_0000001538445357.png b/api-ref/source/_static/images/en-us_image_0000001538445357.png new file mode 100644 index 0000000..ebe7b6b Binary files /dev/null and b/api-ref/source/_static/images/en-us_image_0000001538445357.png differ diff --git a/api-ref/source/api_v3/index.rst b/api-ref/source/api_v3/index.rst new file mode 100644 index 0000000..8969add --- /dev/null +++ b/api-ref/source/api_v3/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_apiv3_0000.html + +.. _vpc_apiv3_0000: + +API V3 +====== + +- :ref:`VPC ` +- :ref:`Security Group ` +- :ref:`Security Group Rule ` +- :ref:`IP Address Group ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + vpc/index + security_group/index + security_group_rule/index + ip_address_group/index diff --git a/api-ref/source/api_v3/ip_address_group/creating_an_ip_address_group.rst b/api-ref/source/api_v3/ip_address_group/creating_an_ip_address_group.rst new file mode 100644 index 0000000..1753b6d --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/creating_an_ip_address_group.rst @@ -0,0 +1,201 @@ +:original_name: vpc_apiv3_0022.html + +.. _vpc_apiv3_0022: + +Creating an IP Address Group +============================ + +Function +-------- + +This API is used to create an IP address group. + +Constraints +----------- + +The default IP address group quota for each account is 50. + +URI +--- + +POST /v3/{project_id}/vpc/address-groups + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameter + + +-----------------+-----------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================================================================================================================+=========================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **true**: A check request will be sent and no IP address group will be created. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and an IP address group will be created. | + +-----------------+-----------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | address_group | Yes | :ref:`CreateAddressGroupOption ` object | Request body for creating an IP address group | + +-----------------+-----------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0022__en-us_topic_0267488945_request_createaddressgroupoption: + +.. table:: **Table 3** CreateAddressGroupOption + + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+==========================================================================================================================================+ + | name | Yes | String | IP address group name | + | | | | | + | | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the IP address group. | + | | | | | + | | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Yes | Integer | Whether it is an IPv4 or IPv6 address group | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **4**: IPv4 address group | + | | | | - **6**: IPv6 address group | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_set | No | Array of strings | IP address sets in an IP address group | + | | | | | + | | | | Value range: a single IP address, IP address range, or CIDR block | + | | | | | + | | | | The default maximum number of IP address sets, including IP addresses, IP address ranges, and CIDR blocks, in an IP address group is 20. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +- Creating an IP address group + + .. code-block:: text + + POST https://{{endpoint}}/v3/b2782e6708b8475c993e6064bc456bf8/vpc/address-groups + + { + "address_group": { + "ip_version": 4, + "name": "AutoTester746010.580123789", + "ip_set": [ + "192.168.3.2", + "192.168.3.40", + "192.168.3.20-192.168.3.100", + "192.168.5.0/24" + ], + "description": "test" + } + } + +Response Parameter +------------------ + +When the status code is **201**, the response parameters are as follows: + +.. table:: **Table 4** Response body parameters + + +---------------+-------------------------------------------------------------------------------------------+------------------------------------------------+ + | Parameter | Type | Description | + +===============+===========================================================================================+================================================+ + | request_id | String | Request ID | + +---------------+-------------------------------------------------------------------------------------------+------------------------------------------------+ + | address_group | :ref:`AddressGroup ` object | Response body for creating an IP address group | + +---------------+-------------------------------------------------------------------------------------------+------------------------------------------------+ + +.. _vpc_apiv3_0022__en-us_topic_0267488945_response_addressgroup: + +.. table:: **Table 5** AddressGroup + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==========================================================================================================================================+ + | id | String | IP address group ID, which uniquely identifies the IP address group | + | | | | + | | | The value is a string in UUID format. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | IP address group name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the IP address group. | + | | | | + | | | The value can contain no more than 255 characters. | + | | | | + | | | The value cannot contain angle brackets (< or >). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_set | Array of strings | IP address sets in an IP address group | + | | | | + | | | Value range: a single IP address, IP address range, or CIDR block | + | | | | + | | | The default maximum number of IP address sets, including IP addresses, IP address ranges, and CIDR blocks, in an IP address group is 20. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Whether it is an IPv4 or IPv6 address group | + | | | | + | | | The value can be: | + | | | | + | | | - **4**: IPv4 address group | + | | | - **6**: IPv6 address group | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the IP address group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the IP address group was last updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | ID of the project to which the IP address group belongs | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **201**, the response parameters are as follows: + +Normal response for the POST operation of the API for creating an IP address group + +.. code-block:: + + { + "address_group": { + "id": "dd18a501-fcd5-4adc-acfe-b0e2384baf08", + "name": "AutoTester746010.580123789", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "ip_version": 4, + "ip_set": [ + "192.168.5.0/24", + "192.168.3.20-192.168.3.100", + "192.168.3.40", + "192.168.3.2" + ], + "created_at": "2019-06-28T02:06:38", + "updated_at": "2019-06-28T02:06:38", + "description": "test" + }, + "request_id": "f568db7a-2675-4271-8747-3e3f1c6381ba" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/ip_address_group/deleting_an_ip_address_group.rst b/api-ref/source/api_v3/ip_address_group/deleting_an_ip_address_group.rst new file mode 100644 index 0000000..f6764e9 --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/deleting_an_ip_address_group.rst @@ -0,0 +1,55 @@ +:original_name: vpc_apiv3_0026.html + +.. _vpc_apiv3_0026: + +Deleting an IP Address Group +============================ + +Function +-------- + +This API is used to delete an IP address group. Before deleting an IP address group, ensure that no resource is using this group. + +URI +--- + +DELETE /v3/{project_id}/vpc/address-groups/{address_group_id} + +.. table:: **Table 1** Parameter description + + +------------------+-----------+--------+----------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==================+===========+========+======================================================================+ + | address_group_id | Yes | String | IP address group ID, which uniquely identifies the IP address group. | + +------------------+-----------+--------+----------------------------------------------------------------------+ + | project_id | Yes | String | Project ID. | + +------------------+-----------+--------+----------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Deleting an IP address group + + .. code-block:: + + "DELETE https://{{endpoint}}/v3/{{tenant_id}}/vpc/address-groups/dd18a501-fcd5-4adc-acfe-b0e2384baf08" + +Example Response +---------------- + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/ip_address_group/forcibly_deleting_an_ip_address_group.rst b/api-ref/source/api_v3/ip_address_group/forcibly_deleting_an_ip_address_group.rst new file mode 100644 index 0000000..0728cc0 --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/forcibly_deleting_an_ip_address_group.rst @@ -0,0 +1,55 @@ +:original_name: vpc_apiv3_0027.html + +.. _vpc_apiv3_0027: + +Forcibly Deleting an IP Address Group +===================================== + +Function +-------- + +This API is used to forcibly delete an IP address group. If the IP address group to be deleted has associated security group rules, the IP address group and its associated rules will be deleted together. + +URI +--- + +DELETE /v3/{project_id}/vpc/address-groups/{address_group_id}/force + +.. table:: **Table 1** Parameter description + + +------------------+-----------+--------+---------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==================+===========+========+=======================================================================================+ + | address_group_id | Yes | String | ID of the IP address group to be deleted. It uniquely identifies an IP address group. | + +------------------+-----------+--------+---------------------------------------------------------------------------------------+ + | project_id | Yes | String | Project ID. | + +------------------+-----------+--------+---------------------------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Forcibly deleting an IP address group + + .. code-block:: + + "DELETE https://{{endpoint}}/v3/{{tenant_id}}/vpc/address-groups/dd18a501-fcd5-4adc-acfe-b0e2384baf08/force" + +Example Response +---------------- + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/ip_address_group/index.rst b/api-ref/source/api_v3/ip_address_group/index.rst new file mode 100644 index 0000000..d1604c4 --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/index.rst @@ -0,0 +1,24 @@ +:original_name: vpc_apiv3_0021.html + +.. _vpc_apiv3_0021: + +IP Address Group +================ + +- :ref:`Creating an IP Address Group ` +- :ref:`Querying IP Address Groups ` +- :ref:`Querying Details of an IP Address Group ` +- :ref:`Updating an IP Address Group ` +- :ref:`Deleting an IP Address Group ` +- :ref:`Forcibly Deleting an IP Address Group ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_an_ip_address_group + querying_ip_address_groups + querying_details_of_an_ip_address_group + updating_an_ip_address_group + deleting_an_ip_address_group + forcibly_deleting_an_ip_address_group diff --git a/api-ref/source/api_v3/ip_address_group/querying_details_of_an_ip_address_group.rst b/api-ref/source/api_v3/ip_address_group/querying_details_of_an_ip_address_group.rst new file mode 100644 index 0000000..36e40d8 --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/querying_details_of_an_ip_address_group.rst @@ -0,0 +1,142 @@ +:original_name: vpc_apiv3_0024.html + +.. _vpc_apiv3_0024: + +Querying Details of an IP Address Group +======================================= + +Function +-------- + +This API is used to query details of an IP address group. + +URI +--- + +GET /v3/{project_id}/vpc/address-groups/{address_group_id} + +.. table:: **Table 1** Parameter description + + +------------------+-----------+--------+----------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==================+===========+========+======================================================================+ + | address_group_id | Yes | String | IP address group ID, which uniquely identifies the IP address group. | + +------------------+-----------+--------+----------------------------------------------------------------------+ + | project_id | Yes | String | Project ID. | + +------------------+-----------+--------+----------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Querying details of an IP address group + + .. code-block:: + + "GET https://{Endpoint}/v3/2bc7a67b35a64a79ad1d3bb8b5f61fc9/vpc/address-groups/dd18a501-fcd5-4adc-acfe-b0e2384baf08" + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 2** Response body parameters + + +---------------+-------------------------------------------------------------------------------------------+-----------------------------------------------+ + | Parameter | Type | Description | + +===============+===========================================================================================+===============================================+ + | request_id | String | Request ID | + +---------------+-------------------------------------------------------------------------------------------+-----------------------------------------------+ + | address_group | :ref:`AddressGroup ` object | Response body of querying an IP address group | + +---------------+-------------------------------------------------------------------------------------------+-----------------------------------------------+ + +.. _vpc_apiv3_0024__en-us_topic_0267488952_response_addressgroup: + +.. table:: **Table 3** AddressGroup + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==========================================================================================================================================+ + | id | String | IP address group ID, which uniquely identifies the IP address group | + | | | | + | | | The value is a string in UUID format. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | IP address group name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the IP address group. | + | | | | + | | | The value can contain no more than 255 characters. | + | | | | + | | | The value cannot contain angle brackets (< or >). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_set | Array of strings | IP address sets in an IP address group | + | | | | + | | | Value range: a single IP address, IP address range, or CIDR block | + | | | | + | | | The default maximum number of IP address sets, including IP addresses, IP address ranges, and CIDR blocks, in an IP address group is 20. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Whether it is an IPv4 or IPv6 address group | + | | | | + | | | The value can be: | + | | | | + | | | - **4**: IPv4 address group | + | | | - **6**: IPv6 address group | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the IP address group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the IP address group was last updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | ID of the project to which the IP address group belongs | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +Normal response for the GET operation of the API for querying an IP address group + +.. code-block:: + + { + "address_group": { + "id": "dd18a501-fcd5-4adc-acfe-b0e2384baf08", + "name": "AutoTester746010.580123789", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "ip_version": 4, + "ip_set": [ + "192.168.5.0/24", + "192.168.3.20-192.168.3.100", + "192.168.3.40", + "192.168.3.2" + ], + "created_at": "2019-06-28T02:06:38", + "updated_at": "2019-06-28T02:06:38", + "description": "10.10.4.0/23" + }, + "request_id": "ce6c359b-9002-41e5-a0b1-232759bd6637" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/ip_address_group/querying_ip_address_groups.rst b/api-ref/source/api_v3/ip_address_group/querying_ip_address_groups.rst new file mode 100644 index 0000000..60871c9 --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/querying_ip_address_groups.rst @@ -0,0 +1,185 @@ +:original_name: vpc_apiv3_0023.html + +.. _vpc_apiv3_0023: + +Querying IP Address Groups +========================== + +Function +-------- + +This API is used to query IP address groups based on filter criteria. + +URI +--- + +GET /v3/{project_id}/vpc/address-groups + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +.. table:: **Table 2** Query parameters + + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+======================================================================================================================+ + | limit | No | Integer | Number of records displayed on each page. | + | | | | | + | | | | Value range: 0 to 2000 | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | No | Array of strings | Unique ID of an IP address group, which can be used to filter the IP address group. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | name | No | Array of strings | Name of an IP address group, which can be used to filter the IP address group. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | ip_version | No | Integer | Version of IP addresses in an IP address group. The value can be **4** or **6**. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | description | No | Array of strings | Provides supplementary information about an IP address group, which can be used to filter the IP address group. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Query IP address groups based on combined filtering criteria + + .. code-block:: + + "GET https://{{endpoint}}/v3/b2782e6708b8475c993e6064bc456bf8/vpc/address-groups?name=vkvgykvsvhjaaaa1&description=xxxxxxxxxx&ip_version=4" + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 3** Response body parameters + + +----------------+-----------------------------------------------------------------------------------------------------+------------------------------------+ + | Parameter | Type | Description | + +================+=====================================================================================================+====================================+ + | request_id | String | Request ID | + +----------------+-----------------------------------------------------------------------------------------------------+------------------------------------+ + | address_groups | Array of :ref:`AddressGroup ` objects | Response body of IP address groups | + +----------------+-----------------------------------------------------------------------------------------------------+------------------------------------+ + | page_info | :ref:`PageInfo ` object | Pagination information | + +----------------+-----------------------------------------------------------------------------------------------------+------------------------------------+ + +.. _vpc_apiv3_0023__en-us_topic_0267488968_response_addressgroup: + +.. table:: **Table 4** AddressGroup + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==========================================================================================================================================+ + | id | String | IP address group ID, which uniquely identifies the IP address group | + | | | | + | | | The value is a string in UUID format. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | IP address group name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the IP address group. | + | | | | + | | | The value can contain no more than 255 characters. | + | | | | + | | | The value cannot contain angle brackets (< or >). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_set | Array of strings | IP address sets in an IP address group | + | | | | + | | | Value range: a single IP address, IP address range, or CIDR block | + | | | | + | | | The default maximum number of IP address sets, including IP addresses, IP address ranges, and CIDR blocks, in an IP address group is 20. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Whether it is an IPv4 or IPv6 address group | + | | | | + | | | The value can be: | + | | | | + | | | - **4**: IPv4 address group | + | | | - **6**: IPv6 address group | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the IP address group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the IP address group was last updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | ID of the project to which the IP address group belongs | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0023__en-us_topic_0267488968_response_pageinfo: + +.. table:: **Table 5** PageInfo + + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+=========+=============================================================================================+ + | previous_marker | String | First record on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | current_count | Integer | Total number of records on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | next_marker | String | Last record on the current page. This parameter does not exist if the page is the last one. | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +Normal response for the GET operation of the API for querying an IP address group + +.. code-block:: + + { + "address_groups": [ + { + "id": "dd18a501-fcd5-4adc-acfe-b0e2384baf08", + "name": "vkvgykvsvhjaaaa1", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "ip_version": 4, + "ip_set": [ + "192.168.5.0/24", + "192.168.3.20-192.168.3.100", + "192.168.3.43", + "192.168.3.42", + "192.168.3.41", + "192.168.3.40", + "192.168.3.2" + ], + "created_at": "2019-06-28T02:06:38", + "updated_at": "2019-06-28T02:14:01", + "description": "xxxxxxxxxx" + } + ], + "page_info": { + "previous_marker": "dd18a501-fcd5-4adc-acfe-b0e2384baf08", + "current_count": 1 + }, + "request_id": "e51fa17c-3259-4122-afb1-9c03d4ef5408" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/ip_address_group/updating_an_ip_address_group.rst b/api-ref/source/api_v3/ip_address_group/updating_an_ip_address_group.rst new file mode 100644 index 0000000..02f9563 --- /dev/null +++ b/api-ref/source/api_v3/ip_address_group/updating_an_ip_address_group.rst @@ -0,0 +1,198 @@ +:original_name: vpc_apiv3_0025.html + +.. _vpc_apiv3_0025: + +Updating an IP Address Group +============================ + +Function +-------- + +This API is used to update an IP address group. + +URI +--- + +PUT /v3/{project_id}/vpc/address-groups/{address_group_id} + +.. table:: **Table 1** Parameter description + + +------------------+-----------+--------+----------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +==================+===========+========+======================================================================+ + | address_group_id | Yes | String | IP address group ID, which uniquely identifies the IP address group. | + +------------------+-----------+--------+----------------------------------------------------------------------+ + | project_id | Yes | String | Project ID. | + +------------------+-----------+--------+----------------------------------------------------------------------+ + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameter + + +-----------------+-----------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================================================================================================================+=========================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **true**: A check request will be sent and no IP address group will be updated. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and an IP address group will be updated. | + +-----------------+-----------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | address_group | Yes | :ref:`UpdateAddressGroupOption ` object | Request body for updating an IP address group | + +-----------------+-----------------+------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0025__en-us_topic_0267488965_request_updateaddressgroupoption: + +.. table:: **Table 3** UpdateAddressGroupOption + + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+==========================================================================================================================================+ + | name | No | String | IP address group 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 IP address group. | + | | | | | + | | | | The value can contain no more than 255 characters. | + | | | | | + | | | | The value cannot contain angle brackets (< or >). | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_set | No | Array of strings | IP address sets in an IP address group | + | | | | | + | | | | Value range: a single IP address, IP address range, or CIDR block | + | | | | | + | | | | The default maximum number of IP address sets, including IP addresses, IP address ranges, and CIDR blocks, in an IP address group is 20. | + +-----------------+-----------------+------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +- Updating an IP address group + + .. code-block:: + + "PUT https://{endpoint}/v3/b2782e6708b8475c993e6064bc456bf8/vpc/address-groups/dd18a501-fcd5-4adc-acfe-b0e2384baf08" + + { + "address_group": { + "name": "vkvgykvsvhjaaaa1", + "ip_set": [ + "192.168.3.2", + "192.168.3.40", + "192.168.3.41", + "192.168.3.42", + "192.168.3.43", + "192.168.3.20-192.168.3.100", + "192.168.5.0/24" + ], + "description": "xxxxxxxxxx" + } + } + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 4** Response body parameters + + +---------------+-------------------------------------------------------------------------------------------+------------------------------------------------+ + | Parameter | Type | Description | + +===============+===========================================================================================+================================================+ + | request_id | String | Request ID | + +---------------+-------------------------------------------------------------------------------------------+------------------------------------------------+ + | address_group | :ref:`AddressGroup ` object | Response body for updating an IP address group | + +---------------+-------------------------------------------------------------------------------------------+------------------------------------------------+ + +.. _vpc_apiv3_0025__en-us_topic_0267488965_response_addressgroup: + +.. table:: **Table 5** AddressGroup + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==========================================================================================================================================+ + | id | String | IP address group ID, which uniquely identifies the IP address group | + | | | | + | | | The value is a string in UUID format. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | IP address group name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the IP address group. | + | | | | + | | | The value can contain no more than 255 characters. | + | | | | + | | | The value cannot contain angle brackets (< or >). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_set | Array of strings | IP address sets in an IP address group | + | | | | + | | | Value range: a single IP address, IP address range, or CIDR block | + | | | | + | | | The default maximum number of IP address sets, including IP addresses, IP address ranges, and CIDR blocks, in an IP address group is 20. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_version | Integer | Whether it is an IPv4 or IPv6 address group | + | | | | + | | | The value can be: | + | | | | + | | | - **4**: IPv4 address group | + | | | - **6**: IPv6 address group | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the IP address group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the IP address group was last updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + | | | | + | | | The time is automatically generated. | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | tenant_id | String | ID of the project to which the IP address group belongs | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +Normal response for the PUT operation of the API for updating an IP address group + +.. code-block:: + + { + "address_group": { + "id": "dd18a501-fcd5-4adc-acfe-b0e2384baf08", + "name": "vkvgykvsvhjaaaa1", + "tenant_id": "b2782e6708b8475c993e6064bc456bf8", + "ip_version": 4, + "ip_set": [ + "192.168.5.0/24", + "192.168.3.20-192.168.3.100", + "192.168.3.43", + "192.168.3.42", + "192.168.3.41", + "192.168.3.40", + "192.168.3.2" + ], + "created_at": "2019-06-28T02:06:38", + "updated_at": "2019-06-28T02:14:01", + "description": "xxxxxxxxxx" + }, + "request_id": "5bbd1640-fa68-4362-9a5c-30c4809958e0" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group/creating_a_security_group.rst b/api-ref/source/api_v3/security_group/creating_a_security_group.rst new file mode 100644 index 0000000..0cfeb47 --- /dev/null +++ b/api-ref/source/api_v3/security_group/creating_a_security_group.rst @@ -0,0 +1,397 @@ +:original_name: vpc_apiv3_0010.html + +.. _vpc_apiv3_0010: + +Creating a Security Group +========================= + +Function +-------- + +This API is used to create a security group. + +Constraints +----------- + +By default, a security group only allows instances in it to communicate with each other. + +URI +--- + +POST /v3/{project_id}/vpc/security-groups + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameters + + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+====================================================================================================================+=======================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **true**: A check request will be sent and no security group will be created. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and a security group will be created. | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group | Yes | :ref:`CreateSecurityGroupOption ` object | Request body for creating a security group | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0010__en-us_topic_0267488916_request_createsecuritygroupoption: + +.. table:: **Table 3** CreateSecurityGroupOption + + +-----------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+=================+=================+=====================================================================================================================+ + | name | Yes | String | Security group name | + | | | | | + | | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the security group. | + | | | | | + | | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | 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. | + +-----------------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +- Create a security group by specifying its name and description. + + .. code-block:: + + "POST https://{Endpoint}/v3/{project_id}/vpc/security-groups" + + { + "security_group": { + "name": "security_group_1", + "description": "security group description" + } + } + +- Create a security group by specifying the value of **dry_run**. + + .. code-block:: + + "POST https://{Endpoint}/v3/{project_id}/vpc/security-groups" + + { + "security_group": { + "name": "security_group_1", + "description": "security group description" + }, + "dry_run": true + } + +Response Parameter +------------------ + +When the status code is **201**, the response parameters are as follows: + +.. table:: **Table 4** Response body parameters + + +----------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------+ + | Parameter | Type | Description | + +================+=====================================================================================================+=============================================+ + | request_id | String | Request ID | + +----------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------+ + | security_group | :ref:`SecurityGroupInfo ` object | Response body for creating a security group | + +----------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------+ + +.. _vpc_apiv3_0010__en-us_topic_0267488916_response_securitygroupinfo: + +.. table:: **Table 5** SecurityGroupInfo + + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+==============================================================================================================+================================================================================================================================================================+ + | id | String | Security group ID, which uniquely identifies the security group | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Security group name | + | | | | + | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group belongs | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the security group belongs | + | | | | + | | | 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. | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`SecurityGroupRule ` object | Security group rules | + +-----------------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0010__en-us_topic_0267488916_response_securitygrouprule: + +.. table:: **Table 6** SecurityGroupRule + + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+============================================================================================================================================================================================+ + | id | String | Security group rule ID, which uniquely identifies the security group rule | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Inbound or outbound direction of a security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **ingress**: inbound direction | + | | | - **egress**: outbound direction | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Protocol type | + | | | | + | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number. | + | | | | + | | | If the parameter is left blank, all protocols are supported. When the protocol is **icmpv6**, IP version should be **IPv6**. When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | IP version | + | | | | + | | | The value can be **IPv4** or **IPv6**. | + | | | | + | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | multiport | String | Port or port range | + | | | | + | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Action of the security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **allow** | + | | | - **deny** | + | | | | + | | | The default value is **deny**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | priority | Integer | Rule priority. | + | | | | + | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | + | | | Value range: ID of an existing security group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Remote IP address. | + | | | | + | | | - If **direction** is set to **egress**, the parameter specifies the source IP address. | + | | | - If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | + | | | The value is an IP address or a CIDR block. | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | ID of the remote IP address group. | + | | | | + | | | Value range: ID of an existing IP address group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group rule is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group rule is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +When the status code is **400**, the response parameters are as follows: + +.. table:: **Table 7** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **401**, the response parameters are as follows: + +.. table:: **Table 8** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **403**, the response parameters are as follows: + +.. table:: **Table 9** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **409**, the response parameters are as follows: + +.. table:: **Table 10** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **500**, the response parameters are as follows: + +.. table:: **Table 11** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +Example Response +---------------- + +When the status code is **201**, the response parameters are as follows: + +Created + +.. code-block:: + + { + "security_group": { + "id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "name": "security_group_1", + "project_id": "060576782980d5762f9ec014dd2f1148", + "description": "security group description", + "enterprise_project_id": "0", + "security_group_rules": [ + { + "id": "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "direction": "ingress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv6", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + }, + { + "id": "3d6480e8-9ea4-46dc-bb1b-8db190cd5677", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": null, + "direction": "egress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv6", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + }, + { + "id": "9581f18c-1fdd-43da-ace9-7758a56ef28a", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": null, + "direction": "egress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv4", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + }, + { + "id": "a3ba270e-e58b-432d-a912-aeb7eace9fb8", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "direction": "ingress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv4", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + } + ], + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z" + }, + "request_id": "a8cf4f79ca3c22ca685e7e8872e8c20b" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group/deleting_a_security_group.rst b/api-ref/source/api_v3/security_group/deleting_a_security_group.rst new file mode 100644 index 0000000..17f8d00 --- /dev/null +++ b/api-ref/source/api_v3/security_group/deleting_a_security_group.rst @@ -0,0 +1,134 @@ +:original_name: vpc_apiv3_0014.html + +.. _vpc_apiv3_0014: + +Deleting a Security Group +========================= + +Function +-------- + +This API is used to delete a security group. + +Constraints +----------- + +Before deleting a security group, ensure that the security group is not associated with any instance. + +URI +--- + +DELETE /v3/{project_id}/vpc/security-groups/{security_group_id} + +.. table:: **Table 1** Parameter description + + ================= ========= ====== ================== + Parameter Mandatory Type Description + ================= ========= ====== ================== + project_id Yes String Project ID. + security_group_id Yes String Security group ID. + ================= ========= ====== ================== + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Delete a single security group. + + .. code-block:: + + "DELETE https://{Endpoint}/v3/{project_id}/vpc/security-groups/1d8b19c7-7c56-48f7-a99b-4b40eb390967" + +Response Parameter +------------------ + +When the status code is **400**, the response parameters are as follows: + +.. table:: **Table 2** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **401**, the response parameters are as follows: + +.. table:: **Table 3** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **403**, the response parameters are as follows: + +.. table:: **Table 4** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **404**, the response parameters are as follows: + +.. table:: **Table 5** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **409**, the response parameters are as follows: + +.. table:: **Table 6** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **500**, the response parameters are as follows: + +.. table:: **Table 7** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +Example Response +---------------- + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group/index.rst b/api-ref/source/api_v3/security_group/index.rst new file mode 100644 index 0000000..0965274 --- /dev/null +++ b/api-ref/source/api_v3/security_group/index.rst @@ -0,0 +1,22 @@ +:original_name: vpc_apiv3_0009.html + +.. _vpc_apiv3_0009: + +Security Group +============== + +- :ref:`Creating a Security Group ` +- :ref:`Querying Security Groups ` +- :ref:`Querying a Security Group ` +- :ref:`Updating a Security Group ` +- :ref:`Deleting a Security Group ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_security_group + querying_security_groups + querying_a_security_group + updating_a_security_group + deleting_a_security_group diff --git a/api-ref/source/api_v3/security_group/querying_a_security_group.rst b/api-ref/source/api_v3/security_group/querying_a_security_group.rst new file mode 100644 index 0000000..182f12a --- /dev/null +++ b/api-ref/source/api_v3/security_group/querying_a_security_group.rst @@ -0,0 +1,325 @@ +:original_name: vpc_apiv3_0012.html + +.. _vpc_apiv3_0012: + +Querying a Security Group +========================= + +Function +-------- + +This API is used to query details about a security group. + +URI +--- + +GET /v3/{project_id}/vpc/security-groups/{security_group_id} + +.. table:: **Table 1** Parameter description + + ================= ========= ====== ================== + Parameter Mandatory Type Description + ================= ========= ====== ================== + project_id Yes String Project ID. + security_group_id Yes String Security group ID. + ================= ========= ====== ================== + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Query details about a security group. + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/security-groups/1d8b19c7-7c56-48f7-a99b-4b40eb390967" + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 2** Response body parameters + + +----------------+-----------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ + | Parameter | Type | Description | + +================+=====================================================================================================+===========================================================+ + | request_id | String | Request ID | + +----------------+-----------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ + | security_group | :ref:`SecurityGroupInfo ` object | Response body for querying details about a security group | + +----------------+-----------------------------------------------------------------------------------------------------+-----------------------------------------------------------+ + +.. _vpc_apiv3_0012__en-us_topic_0267488969_response_securitygroupinfo: + +.. table:: **Table 3** SecurityGroupInfo + + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+===============================================================================================================+================================================================================================================================================================+ + | id | String | Security group ID, which uniquely identifies the security group | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Security group name | + | | | | + | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group belongs | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the security group belongs | + | | | | + | | | 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. | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`SecurityGroupRule ` objects | Security group rules | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0012__en-us_topic_0267488969_response_securitygrouprule: + +.. table:: **Table 4** SecurityGroupRule + + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+============================================================================================================================================================================================+ + | id | String | Security group rule ID, which uniquely identifies the security group rule | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Inbound or outbound direction of a security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **ingress**: inbound direction | + | | | - **egress**: outbound direction | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Protocol type | + | | | | + | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number. | + | | | | + | | | If the parameter is left blank, all protocols are supported. When the protocol is **icmpv6**, IP version should be **IPv6**. When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | IP version | + | | | | + | | | The value can be **IPv4** or **IPv6**. | + | | | | + | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | multiport | String | Port or port range | + | | | | + | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Action of the security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **allow** | + | | | - **deny** | + | | | | + | | | The default value is **deny**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | priority | Integer | Rule priority. | + | | | | + | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | + | | | Value range: ID of an existing security group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Remote IP address. | + | | | | + | | | - If **direction** is set to **egress**, the parameter specifies the source IP address. | + | | | - If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | + | | | The value is an IP address or a CIDR block. | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | ID of the remote IP address group. | + | | | | + | | | Value range: ID of an existing IP address group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group rule is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group rule is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +When the status code is **401**, the response parameters are as follows: + +.. table:: **Table 5** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **403**, the response parameters are as follows: + +.. table:: **Table 6** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **404**, the response parameters are as follows: + +.. table:: **Table 7** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **500**, the response parameters are as follows: + +.. table:: **Table 8** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +OK + +.. code-block:: + + { + "security_group": { + "id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "name": "security_group_1", + "project_id": "060576782980d5762f9ec014dd2f1148", + "description": "security group description", + "enterprise_project_id": "0", + "security_group_rules": [ + { + "id": "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "direction": "ingress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv6", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + }, + { + "id": "3d6480e8-9ea4-46dc-bb1b-8db190cd5677", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": null, + "direction": "egress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv6", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + }, + { + "id": "9581f18c-1fdd-43da-ace9-7758a56ef28a", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": null, + "direction": "egress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv4", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + }, + { + "id": "a3ba270e-e58b-432d-a912-aeb7eace9fb8", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "direction": "ingress", + "protocol": null, + "description": "", + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z", + "ethertype": "IPv4", + "remote_ip_prefix": null, + "multiport": null, + "remote_address_group_id": null, + "action": "allow", + "priority": 100 + } + ], + "created_at": "2020-07-09T05:56:27Z", + "updated_at": "2020-07-09T05:56:27Z" + }, + "request_id": "a8cf4f79ca3c22ca685e7e8872e8c20b" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group/querying_security_groups.rst b/api-ref/source/api_v3/security_group/querying_security_groups.rst new file mode 100644 index 0000000..4c8bccc --- /dev/null +++ b/api-ref/source/api_v3/security_group/querying_security_groups.rst @@ -0,0 +1,227 @@ +:original_name: vpc_apiv3_0011.html + +.. _vpc_apiv3_0011: + +Querying Security Groups +======================== + +Function +-------- + +This API is used to query all security groups of a tenant. + +Constraints +----------- + +This API is used to query all security groups accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query. If the number of records exceeds 2000, the pagination marker will be returned. + +URI +--- + +GET /v3/{project_id}/vpc/security-groups + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +.. table:: **Table 2** Query parameters + + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+=================+==================+================================================================================================================================================================================+ + | limit | No | Integer | Number of records displayed on each page. | + | | | | | + | | | | Value range: 0 to 2000 | + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried. | + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | No | String | Security group ID. This field can be used to precisely filter security groups. Multiple IDs can be specified for filtering. | + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | No | Array of strings | Security group name. This field can be used to precisely filter security groups. Multiple names can be specified for filtering. | + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | Array of strings | Provides supplementary information about the security group. This field can be used to precisely filter security groups. Multiple descriptions can be specified for filtering. | + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | No | String | 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, set **all_granted_eps**. | + +-----------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Query security groups. + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/security-groups" + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 3** Response body parameters + + +-----------------+-------------------------------------------------------------------------------------------------------+----------------------------------+ + | Parameter | Type | Description | + +=================+=======================================================================================================+==================================+ + | security_groups | Array of :ref:`SecurityGroup ` objects | Response body of security groups | + +-----------------+-------------------------------------------------------------------------------------------------------+----------------------------------+ + | request_id | String | Request ID | + +-----------------+-------------------------------------------------------------------------------------------------------+----------------------------------+ + | page_info | :ref:`PageInfo ` object | Pagination information | + +-----------------+-------------------------------------------------------------------------------------------------------+----------------------------------+ + +.. _vpc_apiv3_0011__en-us_topic_0267488948_response_securitygroup: + +.. table:: **Table 4** SecurityGroup + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================================================================================================================================+ + | id | String | Security group ID, which uniquely identifies the security group | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Security group name | + | | | | + | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group belongs | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the security group belongs | + | | | | + | | | 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. | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0011__table297961720337: + +.. table:: **Table 5** page_info + + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+=========+=============================================================================================+ + | previous_marker | String | First record on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | current_count | Integer | Total number of records on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | next_marker | String | Last record on the current page. This parameter does not exist if the page is the last one. | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + +When the status code is **400**, the response parameters are as follows: + +.. table:: **Table 6** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **401**, the response parameters are as follows: + +.. table:: **Table 7** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **403**, the response parameters are as follows: + +.. table:: **Table 8** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +When the status code is **500**, the response parameters are as follows: + +.. table:: **Table 9** Response body parameters + + ========== ====== ============= + Parameter Type Description + ========== ====== ============= + request_id String Request ID + error_msg String Error message + error_code String Error code + ========== ====== ============= + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +OK + +.. code-block:: + + { + "request_id": "d31cb32ca06f3c1a294fa24e6cbc5a56", + "security_groups": [ + { + "id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "name": "Sys-FullAccess--", + "project_id": "060576782980d5762f9ec014dd2f1148", + "description": "~!@#Â¥", + "enterprise_project_id": "0", + "created_at": "2019-10-16T11:11:14Z", + "updated_at": "2020-03-25T10:53:46Z" + }, + { + "id": "0b8cb773-197c-4c91-94f1-e051f0563e5a", + "name": "test-sg", + "project_id": "060576782980d5762f9ec014dd2f1148", + ""description": "The security group is for general-purpose web servers and includes default rules that allow all inbound ICMP traffic and allow inbound traffic on ports 22, 3389, 80, and 443. This security group is suitable for ECSs that require remote login, public network ping, and website services.", + "enterprise_project_id": "0", + "created_at": "2019-12-03T09:02:11Z", + "updated_at": "2019-12-03T09:02:11Z" + } + ], + "page_info": { + "previous_marker": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "current_count": 2 + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group/updating_a_security_group.rst b/api-ref/source/api_v3/security_group/updating_a_security_group.rst new file mode 100644 index 0000000..99790e9 --- /dev/null +++ b/api-ref/source/api_v3/security_group/updating_a_security_group.rst @@ -0,0 +1,316 @@ +:original_name: vpc_apiv3_0013.html + +.. _vpc_apiv3_0013: + +Updating a Security Group +========================= + +Function +-------- + +This API is used to update a security group. + +URI +--- + +PUT /v3/{project_id}/vpc/security-groups/{security_group_id} + +.. table:: **Table 1** Parameter description + + ================= ========= ====== ================== + Parameter Mandatory Type Description + ================= ========= ====== ================== + project_id Yes String Project ID. + security_group_id Yes String Security group ID. + ================= ========= ====== ================== + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameters + + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+====================================================================================================================+=======================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **true**: A check request will be sent and no security group will be updated. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and a security group will be updated. | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group | Yes | :ref:`UpdateSecurityGroupOption ` object | Request body for updating a security group | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0013__en-us_topic_0267488970_request_updatesecuritygroupoption: + +.. table:: **Table 3** UpdateSecurityGroupOption + + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=====================================================================================================================+ + | name | No | String | Security group name | + | | | | | + | | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the security group. | + | | | | | + | | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +- Update the security group name and description. + + .. code-block:: + + "PUT https://{Endpoint}/v3/{project_id}/vpc/security-groups/1d8b19c7-7c56-48f7-a99b-4b40eb390967" + + { + "security_group" : { + "name" : "security_group_2", + "description" : "modified description" + } + } + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 4** Response body parameters + + +----------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------+ + | Parameter | Type | Description | + +================+=====================================================================================================+=============================================+ + | request_id | String | Request ID | + +----------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------+ + | security_group | :ref:`SecurityGroupInfo ` object | Response body for updating a security group | + +----------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------+ + +.. _vpc_apiv3_0013__en-us_topic_0267488970_response_securitygroupinfo: + +.. table:: **Table 5** SecurityGroupInfo + + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+===============================================================================================================+================================================================================================================================================================+ + | id | String | Security group ID, which uniquely identifies the security group | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | Security group name | + | | | | + | | | The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group belongs | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the security group belongs | + | | | | + | | | 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. | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rules | Array of :ref:`SecurityGroupRule ` objects | Security group rules | + +-----------------------+---------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0013__en-us_topic_0267488970_response_securitygrouprule: + +.. table:: **Table 6** SecurityGroupRule + + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+============================================================================================================================================================================================+ + | id | String | Security group rule ID, which uniquely identifies the security group rule | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group rule. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Inbound or outbound direction of a security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **ingress**: inbound direction | + | | | - **egress**: outbound direction | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Protocol type | + | | | | + | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number. | + | | | | + | | | If the parameter is left blank, all protocols are supported. When the protocol is **icmpv6**, IP version should be **IPv6**. When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | IP version | + | | | | + | | | The value can be **IPv4** or **IPv6**. | + | | | | + | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | multiport | String | Port or port range | + | | | | + | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Action of the security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **allow** | + | | | - **deny** | + | | | | + | | | The default value is **deny**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | priority | Integer | Rule priority. | + | | | | + | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | + | | | Value range: ID of an existing security group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Remote IP address. | + | | | | + | | | - If **direction** is set to **egress**, the parameter specifies the source IP address. | + | | | - If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | + | | | The value is an IP address or a CIDR block. | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | ID of the remote IP address group. | + | | | | + | | | Value range: ID of an existing IP address group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group rule is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group rule is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +OK + +.. code-block:: + + { + "security_group" : { + "id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "name" : "security_group_2", + "project_id" : "060576782980d5762f9ec014dd2f1148", + "description" : "modified description", + "enterprise_project_id" : "0", + "security_group_rules" : [ { + "id" : "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80", + "project_id" : "060576782980d5762f9ec014dd2f1148", + "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "direction" : "ingress", + "protocol" : null, + "description" : "", + "created_at" : "2020-07-09T05:56:27Z", + "updated_at" : "2020-07-09T05:56:27Z", + "ethertype" : "IPv6", + "remote_ip_prefix" : null, + "port_range_max" : null, + "port_range_min" : null, + "multiport" : null, + "remote_address_group_id" : null, + "action" : "allow", + "priority" : 100 + }, { + "id" : "3d6480e8-9ea4-46dc-bb1b-8db190cd5677", + "project_id" : "060576782980d5762f9ec014dd2f1148", + "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id" : null, + "direction" : "egress", + "protocol" : null, + "description" : "", + "created_at" : "2020-07-09T05:56:27Z", + "updated_at" : "2020-07-09T05:56:27Z", + "ethertype" : "IPv6", + "remote_ip_prefix" : null, + "port_range_max" : null, + "port_range_min" : null, + "multiport" : null, + "remote_address_group_id" : null, + "action" : "allow", + "priority" : 100 + }, { + "id" : "9581f18c-1fdd-43da-ace9-7758a56ef28a", + "project_id" : "060576782980d5762f9ec014dd2f1148", + "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id" : null, + "direction" : "egress", + "protocol" : null, + "description" : "", + "created_at" : "2020-07-09T05:56:27Z", + "updated_at" : "2020-07-09T05:56:27Z", + "ethertype" : "IPv4", + "remote_ip_prefix" : null, + "port_range_max" : null, + "port_range_min" : null, + "multiport" : null, + "remote_address_group_id" : null, + "action" : "allow", + "priority" : 100 + }, { + "id" : "a3ba270e-e58b-432d-a912-aeb7eace9fb8", + "project_id" : "060576782980d5762f9ec014dd2f1148", + "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", + "direction" : "ingress", + "protocol" : null, + "description" : "", + "created_at" : "2020-07-09T05:56:27Z", + "updated_at" : "2020-07-09T05:56:27Z", + "ethertype" : "IPv4", + "remote_ip_prefix" : null, + "port_range_max" : null, + "port_range_min" : null, + "multiport" : null, + "remote_address_group_id" : null, + "action" : "allow", + "priority" : 100 + } ], + "created_at" : "2020-07-09T05:56:27Z", + "updated_at" : "2020-07-09T05:56:27Z" + }, + "request_id" : "a8cf4f79ca3c22ca685e7e8872e8c20b" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group_rule/creating_a_security_group_rule.rst b/api-ref/source/api_v3/security_group_rule/creating_a_security_group_rule.rst new file mode 100644 index 0000000..339abd5 --- /dev/null +++ b/api-ref/source/api_v3/security_group_rule/creating_a_security_group_rule.rst @@ -0,0 +1,277 @@ +:original_name: vpc_apiv3_0016.html + +.. _vpc_apiv3_0016: + +Creating a Security Group Rule +============================== + +Function +-------- + +This API is used to create a security group rule. + +URI +--- + +POST /v3/{project_id}/vpc/security-group-rules + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameters + + +---------------------+-----------------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=====================+=================+============================================================================================================================+============================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **true**: A check request will be sent and no security group rule will be created. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and a security group rule will be created. | + +---------------------+-----------------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_rule | Yes | :ref:`CreateSecurityGroupRuleOption ` object | Request body for creating a security group rule. | + +---------------------+-----------------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0016__en-us_topic_0267488958_request_createsecuritygroupruleoption: + +.. table:: **Table 3** CreateSecurityGroupRuleOption + + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=========================+=================+=================+======================================================================================================================================================================================================+ + | security_group_id | Yes | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | Provides supplementary information about the security group. | + | | | | | + | | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | Yes | String | Inbound or outbound direction of a security group rule. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **ingress**: inbound direction | + | | | | - **egress**: outbound direction | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | No | String | IP version | + | | | | | + | | | | The value can be **IPv4** or **IPv6**. | + | | | | | + | | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | No | String | Protocol type | + | | | | | + | | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number (0 to 255). | + | | | | | + | | | | Constraints: | + | | | | | + | | | | - If the parameter is left blank, all protocols are supported. | + | | | | - When the protocol is **icmpv6**, IP version should be **IPv6**. | + | | | | - When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | multiport | No | String | Port or port range | + | | | | | + | | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + | | | | | + | | | | The port is from 1 to 65535. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | No | String | Remote IP address. If **direction** is set to **egress**, the parameter specifies the source IP address. If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | | + | | | | The value is an IP address or a CIDR block. | + | | | | | + | | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | No | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | | + | | | | Value range: ID of an existing security group | + | | | | | + | | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | No | String | ID of the remote IP address group. | + | | | | | + | | | | Value range: ID of an existing IP address group | + | | | | | + | | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | No | String | Action of the security group rule. | + | | | | | + | | | | The value can be: | + | | | | | + | | | | - **allow** | + | | | | - **deny** | + | | | | | + | | | | The default value is **allow**. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | priority | No | String | Rule priority in a security group. | + | | | | | + | | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + | | | | | + | | | | The default value is **1**. | + +-------------------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +.. code-block:: text + + POST https://{Endpoint}/v3/{project_id}/vpc/security-group-rules + + { + "security_group_rule": { + "security_group_id": "1c8d9f94-6022-4518-bb98-e0145fcc7b33", + "direction": "ingress", + "protocol": "tcp", + "description": "security group rule description", + "action": "allow", + "priority": 1, + "multiport": "33", + "remote_ip_prefix": "10.10.0.0/16" + } + } + +Response Parameter +------------------ + +When the status code is **201**, the response parameters are as follows: + +.. table:: **Table 4** Response body parameters + + +---------------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------+ + | Parameter | Type | Description | + +=====================+=====================================================================================================+===================================================+ + | request_id | String | Request ID | + +---------------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------+ + | security_group_rule | :ref:`SecurityGroupRule ` object | Response body for creating a security group rule. | + +---------------------+-----------------------------------------------------------------------------------------------------+---------------------------------------------------+ + +.. _vpc_apiv3_0016__en-us_topic_0267488958_response_securitygrouprule: + +.. table:: **Table 5** SecurityGroupRule + + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+======================================================================================================================================================================================================+ + | id | String | Security group rule ID, which uniquely identifies the security group rule | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | String | Inbound or outbound direction of a security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **ingress**: inbound direction | + | | | - **egress**: outbound direction | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Protocol type | + | | | | + | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number. | + | | | | + | | | Constraints: | + | | | | + | | | - If the parameter is left blank, all protocols are supported. | + | | | - When the protocol is **icmpv6**, IP version should be **IPv6**. | + | | | - When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | IP version | + | | | | + | | | The value can be **IPv4** or **IPv6**. | + | | | | + | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | multiport | String | Port or port range | + | | | | + | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | String | Action of the security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **allow** | + | | | - **deny** | + | | | | + | | | The default value is **deny**. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | priority | Integer | Rule priority. | + | | | | + | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | + | | | Value range: ID of an existing security group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Remote IP address. If **direction** is set to **egress**, the parameter specifies the source IP address. If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | + | | | The value is an IP address or a CIDR block. | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | ID of the remote IP address group. | + | | | | + | | | Value range: ID of an existing IP address group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group rule is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group rule is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **201**, the response parameters are as follows: + +.. code-block:: + + { + "request_id": "1666b2708aaf849337572d6846dce781", + "security_group_rule": { + "id": "f626eb24-d8bd-4d26-ae0b-c16bb65730cb", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "remote_group_id": null, + "direction": "ingress", + "protocol": "tcp", + "description": "security group rule description", + "created_at": "2020-08-13T07:12:36Z", + "updated_at": "2020-08-13T07:12:36Z", + "ethertype": "IPv4", + "remote_ip_prefix": "10.10.0.0/16", + "multiport": "33", + "remote_address_group_id": null, + "action": "allow", + "priority": 1 + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group_rule/deleting_a_security_group_rule.rst b/api-ref/source/api_v3/security_group_rule/deleting_a_security_group_rule.rst new file mode 100644 index 0000000..8623b12 --- /dev/null +++ b/api-ref/source/api_v3/security_group_rule/deleting_a_security_group_rule.rst @@ -0,0 +1,59 @@ +:original_name: vpc_apiv3_0019.html + +.. _vpc_apiv3_0019: + +Deleting a Security Group Rule +============================== + +Function +-------- + +This API is used to delete a security group rule. + +URI +--- + +DELETE /v3/{project_id}/vpc/security-group-rules/{security_group_rule_id} + +.. table:: **Table 1** Parameter description + + ====================== ========= ====== ======================= + Parameter Mandatory Type Description + ====================== ========= ====== ======================= + project_id Yes String Project ID. + security_group_rule_id Yes String Security group rule ID. + ====================== ========= ====== ======================= + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Delete a single security group rule. + + .. code-block:: + + "DELETE https://{Endpoint}/v3/{project_id}/vpc/security-group-rules/01a772b2-463e-47e3-a95d-bac85ee8adc6" + +Response Parameter +------------------ + +None + +Example Response +---------------- + +None + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group_rule/index.rst b/api-ref/source/api_v3/security_group_rule/index.rst new file mode 100644 index 0000000..89c381a --- /dev/null +++ b/api-ref/source/api_v3/security_group_rule/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_apiv3_0015.html + +.. _vpc_apiv3_0015: + +Security Group Rule +=================== + +- :ref:`Creating a Security Group Rule ` +- :ref:`Querying Security Group Rules ` +- :ref:`Querying a Security Group Rule ` +- :ref:`Deleting a Security Group Rule ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + creating_a_security_group_rule + querying_security_group_rules + querying_a_security_group_rule + deleting_a_security_group_rule diff --git a/api-ref/source/api_v3/security_group_rule/querying_a_security_group_rule.rst b/api-ref/source/api_v3/security_group_rule/querying_a_security_group_rule.rst new file mode 100644 index 0000000..b094e58 --- /dev/null +++ b/api-ref/source/api_v3/security_group_rule/querying_a_security_group_rule.rst @@ -0,0 +1,183 @@ +:original_name: vpc_apiv3_0018.html + +.. _vpc_apiv3_0018: + +Querying a Security Group Rule +============================== + +Function +-------- + +This API is used to query details about a security group rule. + +URI +--- + +GET /v3/{project_id}/vpc/security-group-rules/{security_group_rule_id} + +.. table:: **Table 1** Parameter description + + ====================== ========= ====== ======================= + Parameter Mandatory Type Description + ====================== ========= ====== ======================= + project_id Yes String Project ID. + security_group_rule_id Yes String Security group rule ID. + ====================== ========= ====== ======================= + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Query details about a security group rule. + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/security-group-rules/01a772b2-463e-47e3-a95d-bac85ee8adc6" + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 2** Response body parameters + + +---------------------+-----------------------------------------------------------------------------------------------------+----------------------------------------------------------------+ + | Parameter | Type | Description | + +=====================+=====================================================================================================+================================================================+ + | request_id | String | Request ID | + +---------------------+-----------------------------------------------------------------------------------------------------+----------------------------------------------------------------+ + | security_group_rule | :ref:`SecurityGroupRule ` object | Response body for querying details about a security group rule | + +---------------------+-----------------------------------------------------------------------------------------------------+----------------------------------------------------------------+ + +.. _vpc_apiv3_0018__en-us_topic_0267488962_response_securitygrouprule: + +.. table:: **Table 3** SecurityGroupRule + + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+====================================================================================================================+ + | id | String | Security group rule ID, which uniquely identifies the security group rule | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | direction | String | Inbound or outbound direction of a security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **ingress**: inbound direction | + | | | - **egress**: outbound direction | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Protocol type | + | | | | + | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number. | + | | | | + | | | Constraints: | + | | | | + | | | - If the parameter is left blank, all protocols are supported. | + | | | - When the protocol is **icmpv6**, IP version should be **IPv6**. | + | | | - When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | IP version | + | | | | + | | | The value can be **IPv4** or **IPv6**. | + | | | | + | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | multiport | String | Port or port range | + | | | | + | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | action | String | Action of the security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **allow** | + | | | - **deny** | + | | | | + | | | The default value is **deny**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | priority | Integer | Rule priority. | + | | | | + | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | + | | | Value range: ID of an existing security group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Remote IP address. | + | | | | + | | | - If **direction** is set to **egress**, the parameter specifies the source IP address. | + | | | - If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | + | | | The value is an IP address or a CIDR block. | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | ID of the remote IP address group. | + | | | | + | | | Value range: ID of an existing IP address group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group rule is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group rule is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +OK + +.. code-block:: + + { + "security_group_rule": { + "id": "f626eb24-d8bd-4d26-ae0b-c16bb65730cb", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "remote_group_id": null, + "direction": "ingress", + "protocol": "tcp", + "description": "security group rule description", + "created_at": "2020-08-13T07:12:36Z", + "updated_at": "2020-08-13T07:12:36Z", + "ethertype": "IPv4", + "remote_ip_prefix": "10.10.0.0/16", + "multiport": "333", + "remote_address_group_id": null, + "action": "allow", + "priority": 1 + }, + "request_id": "034c4840bde0b1263a4b2e66fbd74d5f" + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/security_group_rule/querying_security_group_rules.rst b/api-ref/source/api_v3/security_group_rule/querying_security_group_rules.rst new file mode 100644 index 0000000..15df452 --- /dev/null +++ b/api-ref/source/api_v3/security_group_rule/querying_security_group_rules.rst @@ -0,0 +1,226 @@ +:original_name: vpc_apiv3_0017.html + +.. _vpc_apiv3_0017: + +Querying Security Group Rules +============================= + +Function +-------- + +This API is used to query security group rules. + +URI +--- + +GET /v3/{project_id}/vpc/security-group-rules + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +.. table:: **Table 2** Query parameters + + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===================+=================+==================+================================================================================================================================================================================+ + | limit | No | Integer | Number of records displayed on each page. | + | | | | | + | | | | Value range: 0 to 2000 | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | No | Array of strings | ID of the security group rule. Multiple IDs can be specified for filtering. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | No | Array of strings | ID of the security group to which the security group rule belongs. Multiple IDs can be specified for filtering. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | protocol | No | Array of strings | Protocol specified in the security group rule. Multiple protocols can be specified for filtering. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | Array of strings | Provides supplementary information about the security group. This field can be used to precisely filter security groups. Multiple descriptions can be specified for filtering. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | No | Array of strings | ID of the remote security group. Multiple IDs can be specified for filtering. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | direction | No | String | Access control direction specified in the security group rule. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | action | No | String | Action of the security group rule. | + +-------------------+-----------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Query security group rules. + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/security-group-rules" + +Response Parameter +------------------ + +When the status code is **200**, the response parameters are as follows: + +.. table:: **Table 3** Response body parameters + + +----------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------------+ + | Parameter | Type | Description | + +======================+===============================================================================================================+=======================================+ + | request_id | String | Request ID | + +----------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------------+ + | security_group_rules | Array of :ref:`SecurityGroupRule ` objects | Response body of security group rules | + +----------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------------+ + | page_info | :ref:`PageInfo ` object | Pagination information | + +----------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------------+ + +.. _vpc_apiv3_0017__en-us_topic_0267488959_response_securitygrouprule: + +.. table:: **Table 4** SecurityGroupRule + + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=========================+=======================+====================================================================================================================+ + | id | String | Security group rule ID, which uniquely identifies the security group rule | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | description | String | Provides supplementary information about the security group. | + | | | | + | | | The value can contain no more than 255 characters and cannot contain angle brackets (< or >). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | ID of the security group to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | direction | String | Inbound or outbound direction of a security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **ingress**: inbound direction | + | | | - **egress**: outbound direction | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | protocol | String | Protocol type | + | | | | + | | | The value can be **icmp**, **tcp**, **udp**, **icmpv6** or an IP number. | + | | | | + | | | Constraints: | + | | | | + | | | - If the parameter is left blank, all protocols are supported. | + | | | - When the protocol is **icmpv6**, IP version should be **IPv6**. | + | | | - When the protocol is **icmp**, IP version should be **IPv4**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | ethertype | String | IP version | + | | | | + | | | The value can be **IPv4** or **IPv6**. | + | | | | + | | | If you do not set this parameter, **IPv4** is used by default. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | multiport | String | Port or port range | + | | | | + | | | The value can be a single port (80), a port range (1-30), or inconsecutive ports separated by commas (22,3389,80). | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | action | String | Action of the security group rule. | + | | | | + | | | The value can be: | + | | | | + | | | - **allow** | + | | | - **deny** | + | | | | + | | | The default value is **deny**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | priority | Integer | Rule priority. | + | | | | + | | | The value is from **1** to **100**. The value **1** indicates the highest priority. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | remote_group_id | String | ID of the remote security group, which allows or denies traffic to and from the security group. | + | | | | + | | | Value range: ID of an existing security group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | remote_ip_prefix | String | Remote IP address. | + | | | | + | | | - If **direction** is set to **egress**, the parameter specifies the source IP address. | + | | | - If **direction** is set to **ingress**, the parameter specifies the destination IP address. | + | | | | + | | | The value is an IP address or a CIDR block. | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_group_id** and **remote_address_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | remote_address_group_id | String | ID of the remote IP address group. | + | | | | + | | | Value range: ID of an existing IP address group | + | | | | + | | | The parameter is mutually exclusive with parameters **remote_ip_prefix** and **remote_group_id**. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the security group rule is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the security group rule is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the security group rule belongs. | + +-------------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0017__table42613673314: + +.. table:: **Table 5** PageInfo + + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+=========+=============================================================================================+ + | previous_marker | String | First record on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | current_count | Integer | Total number of records on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | next_marker | String | Last record on the current page. This parameter does not exist if the page is the last one. | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +When the status code is **200**, the response parameters are as follows: + +OK + +.. code-block:: + + { + "request_id": "80747d36e3376c0894ba8f9a9156355d", + "security_group_rules": [ + { + "id": "f626eb24-d8bd-4d26-ae0b-c16bb65730cb", + "project_id": "060576782980d5762f9ec014dd2f1148", + "security_group_id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "remote_group_id": null, + "direction": "ingress", + "protocol": "tcp", + "description": "security group rule description", + "created_at": "2020-08-13T07:12:36Z", + "updated_at": "2020-08-13T07:12:36Z", + "ethertype": "IPv4", + "remote_ip_prefix": "10.10.0.0/16", + "multiport": "333", + "remote_address_group_id": null, + "action": "allow", + "priority": 1 + } + ] + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/vpc/adding_a_secondary_cidr_block_to_a_vpc.rst b/api-ref/source/api_v3/vpc/adding_a_secondary_cidr_block_to_a_vpc.rst new file mode 100644 index 0000000..072267a --- /dev/null +++ b/api-ref/source/api_v3/vpc/adding_a_secondary_cidr_block_to_a_vpc.rst @@ -0,0 +1,240 @@ +:original_name: vpc_apiv3_0007.html + +.. _vpc_apiv3_0007: + +Adding a Secondary CIDR Block to a VPC +====================================== + +Function +-------- + +This API is used to add a secondary CIDR block to a VPC. + +URI +--- + +PUT /v3/{project_id}/vpc/vpcs/{vpc_id}/add-extend-cidr + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Parameter Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + vpc_id Yes String VPC ID + ========== ========= ====== =========== + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameter + + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+========================================================================================================+==================================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | Value range: | + | | | | | + | | | | - **true**: Only the check request will be sent and no secondary CIDR block will be added. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and a secondary CIDR block will be added. | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc | Yes | :ref:`AddExtendCidrOption ` object | Request body for adding a secondary CIDR block. | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0007__en-us_topic_0267488960_request_addextendcidroption: + +.. table:: **Table 3** AddExtendCidrOption + + +-----------------+-----------------+------------------+--------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+====================================================================+ + | extend_cidrs | Yes | Array of strings | Secondary CIDR blocks that can be added to VPCs | + | | | | | + | | | | The value cannot contain the following: | + | | | | | + | | | | - 100.64.0.0/10 | + | | | | - 214.0.0.0/7 | + | | | | - 198.18.0.0/15 | + | | | | - 169.254.0.0/16 | + | | | | - 0.0.0.0/8 | + | | | | - 127.0.0.0/8 | + | | | | - 240.0.0.0/4 | + | | | | - 172.31.0.0/16 | + | | | | - 192.168.0.0/16 | + | | | | | + | | | | Currently, only one secondary CIDR block can be added to each VPC. | + +-----------------+-----------------+------------------+--------------------------------------------------------------------+ + +Example Request +--------------- + +- Adding a secondary CIDR block to a VPC + + .. code-block:: text + + PUT https://{Endpoint}/v3/{project_id}/vpc/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3/add-extend-cidr + + { + "vpc": { + "extend_cidrs": [ + "23.8.0.0/16" + ] + } + } + +Response Parameter +------------------ + +.. table:: **Table 4** Response body parameters + + +------------+-------------------------------------------------------------------------+------------------------------------------------+ + | Parameter | Type | Description | + +============+=========================================================================+================================================+ + | request_id | String | Request ID | + +------------+-------------------------------------------------------------------------+------------------------------------------------+ + | vpc | :ref:`Vpc ` object | Response body of adding a secondary CIDR block | + +------------+-------------------------------------------------------------------------+------------------------------------------------+ + +.. _vpc_apiv3_0007__en-us_topic_0267488960_response_vpc: + +.. table:: **Table 5** Vpc + + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================================================================================================+================================================================================================================================================================+ + | id | String | VPC ID, which uniquely identifies the VPC | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | VPC name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 | Available VPC CIDR blocks | + | | | | + | | | Value range: | + | | | | + | | | - 10.0.0.0/8~10.255.255.240/28 | + | | | - 172.16.0.0/12-172.31.255.240/28 | + | | | - 192.168.0.0/16-192.168.255.240/28 | + | | | | + | | | If **cidr** is not specified, the default value is **""**. | + | | | | + | | | The value must be in IPv4 CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extend_cidrs | Array of strings | Secondary CIDR blocks of VPCs | + | | | | + | | | Currently, only IPv4 CIDR blocks are supported. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | VPC status | + | | | | + | | | Value range: | + | | | | + | | | - **PENDING**: The VPC is being created. | + | | | - **ACTIVE**: The VPC is created successfully. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the VPC belongs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the VPC belongs | + | | | | + | | | 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. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the VPC is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the VPC is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cloud_resources | Array of :ref:`CloudResource ` objects | Type and number of resources associated with the VPC | + | | | | + | | | Currently, only route tables and subnets of the VPC are returned. The number of **virsubnets** is the total number of IPv4 and IPv6 subnets. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`Tag ` objects | VPC tags. For details, see the tag objects. | + | | | | + | | | Value range: 0 to 10 tag key-value pairs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0007__en-us_topic_0267488960_response_cloudresource: + +.. table:: **Table 6** CloudResource + + ============== ======= =================== + Parameter Type Description + ============== ======= =================== + resource_type String Resource type + resource_count Integer Number of resources + ============== ======= =================== + +.. _vpc_apiv3_0007__en-us_topic_0267488960_response_tag: + +.. table:: **Table 7** Tag + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==============================================================================================================================================+ + | key | String | Tag key | + | | | | + | | | Value range: | + | | | | + | | | - A tag key contains a maximum of 36 Unicode characters. | + | | | - A tag key cannot be left blank. It cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | value | String | Tag value | + | | | | + | | | Value range: | + | | | | + | | | - A tag value contains a maximum of 43 Unicode characters and can be left blank. | + | | | - A tag value cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +.. code-block:: + + { + "request_id": "84eb4f775d66dd916db121768ec55626", + "vpc": { + "id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "name": "vpc1", + "description": "test1", + "cidr": "192.168.0.0/16", + "extend_cidrs": [ + "23.8.0.0/16" + ], + "enterprise_project_id": "0", + "tags": [ + { + "key": "key", + "value": "value" + } + ], + "cloud_resources": [ + { + "resrource_type": "routetable", + "resrource_count": 1 + } + ], + "status": "ACTIVE", + "project_id": "060576782980d5762f9ec014dd2f1148", + "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/api_v3/vpc/index.rst b/api-ref/source/api_v3/vpc/index.rst new file mode 100644 index 0000000..cf93247 --- /dev/null +++ b/api-ref/source/api_v3/vpc/index.rst @@ -0,0 +1,20 @@ +:original_name: vpc_apiv3_0001.html + +.. _vpc_apiv3_0001: + +VPC +=== + +- :ref:`Querying VPCs ` +- :ref:`Querying Details About a VPC ` +- :ref:`Adding a Secondary CIDR Block to a VPC ` +- :ref:`Removing a Secondary CIDR Block from a VPC ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_vpcs + querying_details_about_a_vpc + adding_a_secondary_cidr_block_to_a_vpc + removing_a_secondary_cidr_block_from_a_vpc diff --git a/api-ref/source/api_v3/vpc/querying_details_about_a_vpc.rst b/api-ref/source/api_v3/vpc/querying_details_about_a_vpc.rst new file mode 100644 index 0000000..e7e5385 --- /dev/null +++ b/api-ref/source/api_v3/vpc/querying_details_about_a_vpc.rst @@ -0,0 +1,195 @@ +:original_name: vpc_apiv3_0004.html + +.. _vpc_apiv3_0004: + +Querying Details About a VPC +============================ + +Function +-------- + +This API is used to query details about a VPC. + +URI +--- + +GET /v3/{project_id}/vpc/vpcs/{vpc_id} + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Parameter Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + vpc_id Yes String VPC ID + ========== ========= ====== =========== + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Querying details about a VPC + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3" + +Response Parameter +------------------ + +.. table:: **Table 2** Response body parameters + + +------------+-------------------------------------------------------------------------+-------------------+ + | Parameter | Type | Description | + +============+=========================================================================+===================+ + | request_id | String | Request ID | + +------------+-------------------------------------------------------------------------+-------------------+ + | vpc | :ref:`Vpc ` object | VPC response body | + +------------+-------------------------------------------------------------------------+-------------------+ + +.. _vpc_apiv3_0004__en-us_topic_0267488955_response_vpc: + +.. table:: **Table 3** Vpc + + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================================================================================================+================================================================================================================================================================+ + | id | String | VPC ID, which uniquely identifies the VPC | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | VPC name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 | Available VPC CIDR blocks | + | | | | + | | | Value range: | + | | | | + | | | - 10.0.0.0/8-10.255.255.240/28 | + | | | - 172.16.0.0/12-172.31.255.240/28 | + | | | - 192.168.0.0/16-192.168.255.240/28 | + | | | | + | | | If **cidr** is not specified, the default value is **""**. | + | | | | + | | | The value must be in IPv4 CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extend_cidrs | Array of strings | Secondary CIDR blocks of VPCs | + | | | | + | | | Currently, only IPv4 CIDR blocks are supported. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | VPC status | + | | | | + | | | Value range: | + | | | | + | | | - **PENDING**: The VPC is being created. | + | | | - **ACTIVE**: The VPC is created successfully. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the VPC belongs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the VPC belongs | + | | | | + | | | 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. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the VPC is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the VPC is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cloud_resources | Array of :ref:`CloudResource ` objects | Type and number of resources associated with the VPC | + | | | | + | | | Currently, only route tables and subnets of the VPC are returned. The number of **virsubnets** is the total number of IPv4 and IPv6 subnets. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`Tag ` objects | VPC tags. For details, see the tag objects. | + | | | | + | | | Value range: 0 to 10 tag key-value pairs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0004__en-us_topic_0267488955_response_cloudresource: + +.. table:: **Table 4** CloudResource + + ============== ======= =================== + Parameter Type Description + ============== ======= =================== + resource_type String Resource type + resource_count Integer Number of resources + ============== ======= =================== + +.. _vpc_apiv3_0004__en-us_topic_0267488955_response_tag: + +.. table:: **Table 5** Tag + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==============================================================================================================================================+ + | key | String | Tag key | + | | | | + | | | Value range: | + | | | | + | | | - A tag key contains a maximum of 36 Unicode characters. | + | | | - A tag key cannot be left blank. It cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | value | String | Tag value | + | | | | + | | | Value range: | + | | | | + | | | - A tag value contains a maximum of 43 Unicode characters and can be left blank. | + | | | - A tag value cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +.. code-block:: + + { + "request_id": "84eb4f775d66dd916db121768ec55626", + "vpc": { + "id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "name": "name-test", + "description": "description-test", + "cidr": "192.168.0.0/16", + "extend_cidrs": [ + "21.8.0.0/16" + ], + "enterprise_project_id": "0", + "tags": [ + { + "key": "key", + "value": "value" + } + ], + "cloud_resources": [ + { + "resource_type": "routetable", + "resource_count": 1 + } + ], + "status": "ACTIVE", + "project_id": "060576782980d5762f9ec014dd2f1148", + "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/api_v3/vpc/querying_vpcs.rst b/api-ref/source/api_v3/vpc/querying_vpcs.rst new file mode 100644 index 0000000..260a146 --- /dev/null +++ b/api-ref/source/api_v3/vpc/querying_vpcs.rst @@ -0,0 +1,304 @@ +:original_name: vpc_apiv3_0003.html + +.. _vpc_apiv3_0003: + +Querying VPCs +============= + +Function +-------- + +This API is used to query VPCs. + +Constraints +----------- + +This API is used to query all VPCs accessible to the tenant submitting the request. A maximum of 2000 records can be returned for each query. If the number of records exceeds 2000, the pagination marker will be returned. + +URI +--- + +GET /v3/{project_id}/vpc/vpcs + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Name Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + ========== ========= ====== =========== + +.. table:: **Table 2** Query parameters + + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+======================================================================================================================+ + | limit | No | Integer | Number of records displayed on each page. | + | | | | | + | | | | Value range: 0 to 2000 | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | marker | No | String | Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | id | No | Array of strings | VPC ID, which can be used to filter VPCs. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | name | No | Array of strings | VPC name, which can be used to filter VPCs. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | description | No | Array of strings | Supplementary information about the VPC, which can be used to filter VPCs. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + | cidr | No | Array of strings | VPC CIDR block, which can be used to filter VPCs. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------------------------------------+ + +Request Parameter +----------------- + +None + +Example Request +--------------- + +- Querying VPCs + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/vpcs" + +- Querying VPCs by VPC ID + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/vpcs?id=01ab4be1-4447-45fb-94be-3ee787ed4ebe&id=02cd5ef2-4447-36fb-75be-3ee787ed6adf" + +- Querying VPCs by VPC name + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/vpcs?name=vpc-test" + +- Querying VPCs by page + + .. code-block:: + + "GET https://{Endpoint}/v3/{project_id}/vpc/vpcs?limit=2&marker=01ab4be1-4447-45fb-94be-3ee787ed4ebe" + +Response Parameter +------------------ + +.. table:: **Table 3** Response body parameters + + +------------+-----------------------------------------------------------------------------------+------------------------+ + | Parameter | Type | Description | + +============+===================================================================================+========================+ + | request_id | String | Request ID | + +------------+-----------------------------------------------------------------------------------+------------------------+ + | vpcs | Array of :ref:`Vpc ` objects | Response body of VPCs | + +------------+-----------------------------------------------------------------------------------+------------------------+ + | page_info | :ref:`PageInfo ` object | Pagination information | + +------------+-----------------------------------------------------------------------------------+------------------------+ + +.. _vpc_apiv3_0003__en-us_topic_0267488966_response_vpc: + +.. table:: **Table 4** Vpc + + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================================================================================================+================================================================================================================================================================+ + | id | String | VPC ID, which uniquely identifies the VPC | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | VPC name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 | Available VPC CIDR blocks | + | | | | + | | | Value range: | + | | | | + | | | - 10.0.0.0/8-10.255.255.240/28 | + | | | - 172.16.0.0/12-172.31.255.240/28 | + | | | - 192.168.0.0/16-192.168.255.240/28 | + | | | | + | | | If **cidr** is not specified, the default value is **""**. | + | | | | + | | | - The value must be in IPv4 CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extend_cidrs | Array of strings | Secondary CIDR blocks of VPCs | + | | | | + | | | Value range: | + | | | | + | | | Currently, only IPv4 CIDR blocks are supported. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | VPC status | + | | | | + | | | Value range: | + | | | | + | | | - **PENDING**: The VPC is being created. | + | | | - **ACTIVE**: The VPC is created successfully. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the VPC belongs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project that the VPC belongs to | + | | | | + | | | 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. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the VPC is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the VPC is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mm:ss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cloud_resources | Array of :ref:`CloudResource ` objects | Type and number of resources associated with the VPC | + | | | | + | | | Currently, only route tables and subnets of the VPC are returned. The number of **virsubnets** is the total number of IPv4 and IPv6 subnets. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`Tag ` objects | VPC tags. For details, see the tag objects. | + | | | | + | | | Value range: 0 to 10 tag key-value pairs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0003__en-us_topic_0267488966_response_cloudresource: + +.. table:: **Table 5** CloudResource + + ============== ======= =================== + Parameter Type Description + ============== ======= =================== + resource_type String Resource type + resource_count Integer Number of resources + ============== ======= =================== + +.. _vpc_apiv3_0003__en-us_topic_0267488966_response_tag: + +.. table:: **Table 6** Tag + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==============================================================================================================================================+ + | key | String | Tag key | + | | | | + | | | Value range: | + | | | | + | | | - A tag key contains a maximum of 36 Unicode characters. | + | | | - A tag key cannot be left blank. It cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | value | String | Tag value | + | | | | + | | | Value range: | + | | | | + | | | - A tag value contains a maximum of 43 Unicode characters and can be left blank. | + | | | - A tag value cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0003__en-us_topic_0267488966_response_pageinfo: + +.. table:: **Table 7** PageInfo + + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=================+=========+=============================================================================================+ + | previous_marker | String | First record on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | current_count | Integer | Total number of records on the current page | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + | next_marker | String | Last record on the current page. This parameter does not exist if the page is the last one. | + +-----------------+---------+---------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +.. code-block:: + + { + "request_id": "9c1838ba498249547be43dd618b58d27", + "vpcs": [ + { + "id": "01da5a65-0bb9-4638-8ab7-74c64e24a9a7", + "name": "API-PERF-TEST-14bd44c121", + "description": "", + "cidr": "192.168.0.0/16", + "extend_cidrs": [ ], + "status": "ACTIVE", + "project_id": "087679f0aa80d32a2f4ec0172f5e902b", + "enterprise_project_id": "0", + "tags": [ ], + "created_at": "2020-06-16T02:32:18Z", + "updated_at": "2020-06-16T02:32:18Z", + "cloud_resources": [ + { + "resource_type": "routetable", + "resource_count": 1 + }, + { + "resource_type": "virsubnet", + "resource_count": 0 + } + ] + }, + { + "id": "43fd79b0-f7d7-4e9b-828b-2d4d7bfae428", + "name": "API-PERF-TEST_m2n33", + "description": "", + "cidr": "192.168.0.0/16", + "extend_cidrs": [ ], + "status": "ACTIVE", + "project_id": "087679f0aa80d32a2f4ec0172f5e902b", + "enterprise_project_id": "0", + "tags": [ ], + "created_at": "2020-06-15T06:29:40Z", + "updated_at": "2020-06-15T06:29:41Z", + "cloud_resources": [ + { + "resource_type": "routetable", + "resource_count": 1 + }, + { + "resource_type": "virsubnet", + "resource_count": 1 + } + ] + }, + { + "id": "5ed053ba-b46c-4dce-a1ae-e9d8a7015f21", + "name": "API-PERF-TEST-c34b1c4b12", + "description": "", + "cidr": "192.168.0.0/16", + "extend_cidrs": [ ], + "status": "ACTIVE", + "project_id": "087679f0aa80d32a2f4ec0172f5e902b", + "enterprise_project_id": "0", + "tags": [ ], + "created_at": "2020-06-16T02:32:33Z", + "updated_at": "2020-06-16T02:32:33Z", + "cloud_resources": [ + { + "resource_type": "routetable", + "resource_count": 1 + }, + { + "resource_type": "virsubnet", + "resource_count": 0 + } + ] + } + ], + "page_info": { + "previous_marker": "01da5a65-0bb9-4638-8ab7-74c64e24a9a7", + "current_count": 3 + } + } + +Status Code +----------- + +See :ref:`Status Codes `. + +Error Code +---------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/api_v3/vpc/removing_a_secondary_cidr_block_from_a_vpc.rst b/api-ref/source/api_v3/vpc/removing_a_secondary_cidr_block_from_a_vpc.rst new file mode 100644 index 0000000..ccbcabe --- /dev/null +++ b/api-ref/source/api_v3/vpc/removing_a_secondary_cidr_block_from_a_vpc.rst @@ -0,0 +1,231 @@ +:original_name: vpc_apiv3_0008.html + +.. _vpc_apiv3_0008: + +Removing a Secondary CIDR Block from a VPC +========================================== + +Function +-------- + +This API is used to remove a secondary CIDR block from a VPC. + +URI +--- + +PUT /v3/{project_id}/vpc/vpcs/{vpc_id}/remove-extend-cidr + +.. table:: **Table 1** Parameter description + + ========== ========= ====== =========== + Parameter Mandatory Type Description + ========== ========= ====== =========== + project_id Yes String Project ID. + vpc_id Yes String VPC ID + ========== ========= ====== =========== + +Request Parameter +----------------- + +.. table:: **Table 2** Request body parameter + + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==============================================================================================================+==================================================================================================================================================================================================================================================================================+ + | dry_run | No | Boolean | Whether to only check the request. | + | | | | | + | | | | Value range: | + | | | | | + | | | | - **true**: Only the check request will be sent and no secondary CIDR block will be added. Check items include mandatory parameters, request format, and constraints. If the check fails, an error will be returned. If the check succeeds, response code 202 will be returned. | + | | | | - **false** (default value): A request will be sent and a secondary CIDR block will be added. | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc | Yes | :ref:`RemoveExtendCidrOption ` object | Request body for removing a secondary CIDR block | + +-----------------+-----------------+--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0008__en-us_topic_0267488922_request_removeextendcidroption: + +.. table:: **Table 3** RemoveExtendCidrOption + + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+========================================================================================+ + | extend_cidrs | Yes | Array of strings | Secondary CIDR blocks that can be removed from VPCs | + | | | | | + | | | | VPCs already have secondary CIDR blocks. | + | | | | | + | | | | Constraints: | + | | | | | + | | | | - Before removing a secondary CIDR block, delete the subnets in the CIDR block first. | + | | | | - Currently, secondary CIDR blocks can only be removed one by one. | + +-----------------+-----------------+------------------+----------------------------------------------------------------------------------------+ + +Example Request +--------------- + +Removing a secondary CIDR block from a VPC + +.. code-block:: text + + PUT https://{Endpoint}/v3/{project_id}/vpc/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3/remove-extend-cidr + + { + "vpc": { + "extend_cidrs": [ + "23.8.0.0/16" + ] + } + } + +Response Parameter +------------------ + +.. table:: **Table 4** Response body parameters + + +------------+-------------------------------------------------------------------------+--------------------------------------------------+ + | Parameter | Type | Description | + +============+=========================================================================+==================================================+ + | request_id | String | Request ID | + +------------+-------------------------------------------------------------------------+--------------------------------------------------+ + | vpc | :ref:`Vpc ` object | Response body of removing a secondary CIDR block | + +------------+-------------------------------------------------------------------------+--------------------------------------------------+ + +.. _vpc_apiv3_0008__en-us_topic_0267488960_response_vpc: + +.. table:: **Table 5** Vpc + + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================================================================================================+================================================================================================================================================================+ + | id | String | VPC ID, which uniquely identifies the VPC | + | | | | + | | | The value is in UUID format with hyphens (-). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | VPC name | + | | | | + | | | The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.). | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 | Available VPC CIDR blocks | + | | | | + | | | Value range: | + | | | | + | | | - 10.0.0.0/8-10.255.255.240/28 | + | | | - 172.16.0.0/12-172.31.255.240/28 | + | | | - 192.168.0.0/16-192.168.255.240/28 | + | | | | + | | | If **cidr** is not specified, the default value is **""**. | + | | | | + | | | - The value must be in IPv4 CIDR format, for example, **192.168.0.0/16**. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | extend_cidrs | Array of strings | Secondary CIDR blocks of VPCs | + | | | | + | | | Currently, only IPv4 CIDR blocks are supported. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | VPC status | + | | | | + | | | Value range: | + | | | | + | | | - **PENDING**: The VPC is being created. | + | | | - **ACTIVE**: The VPC is created successfully. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | project_id | String | ID of the project to which the VPC belongs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | ID of the enterprise project to which the VPC belongs | + | | | | + | | | 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. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | Time when the VPC is created | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | updated_at | String | Time when the VPC is updated | + | | | | + | | | UTC time in the format of yyyy-MM-ddTHH:mmss | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | cloud_resources | Array of :ref:`CloudResource ` objects | Type and number of resources associated with the VPC | + | | | | + | | | Currently, only route tables and subnets of the VPC are returned. The number of **virsubnets** is the total number of IPv4 and IPv6 subnets. | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`Tag ` objects | VPC tags. For details, see the tag objects. | + | | | | + | | | Value range: 0 to 10 tag key-value pairs | + +-----------------------+-------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _vpc_apiv3_0008__en-us_topic_0267488960_response_cloudresource: + +.. table:: **Table 6** CloudResource + + ============== ======= =================== + Parameter Type Description + ============== ======= =================== + resource_type String Resource type + resource_count Integer Number of resources + ============== ======= =================== + +.. _vpc_apiv3_0008__en-us_topic_0267488960_response_tag: + +.. table:: **Table 7** Tag + + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==============================================================================================================================================+ + | key | String | Tag key | + | | | | + | | | Value range: | + | | | | + | | | - A tag key contains a maximum of 36 Unicode characters. | + | | | - A tag key cannot be left blank. It cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | value | String | Tag value | + | | | | + | | | Value range: | + | | | | + | | | - A tag value contains a maximum of 43 Unicode characters and can be left blank. | + | | | - A tag value cannot contain non-printable ASCII characters (0-31) or the following special characters: ``*,<,>,,=`` | + +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +Example Response +---------------- + +.. code-block:: + + { + "request_id": "84eb4f775d66dd916db121768ec55626", + "vpc": { + "id": "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", + "name": "vpc1", + "description": "test1", + "cidr": "192.168.0.0/16", + "extend_cidrs": [ ], + "enterprise_project_id": "0", + "tags": [ + { + "key": "key", + "value": "value" + } + ], + "cloud_resources": [ + { + "resrource_type": "routetable", + "resrource_count": 1 + } + ], + "status": "ACTIVE", + "project_id": "060576782980d5762f9ec014dd2f1148", + "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/apis/virtual_private_cloud/querying_vpc_details.rst b/api-ref/source/apis/virtual_private_cloud/querying_vpc_details.rst index e346994..ffb3c49 100644 --- a/api-ref/source/apis/virtual_private_cloud/querying_vpc_details.rst +++ b/api-ref/source/apis/virtual_private_cloud/querying_vpc_details.rst @@ -92,7 +92,7 @@ Response Message +-----------------------+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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. | + | enterprise_project_id | String | - 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:: | 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 index 0fc38c6..6b6059f 100644 --- 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 @@ -182,7 +182,6 @@ Response Message "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, 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 index 6bef954..4e797c0 100644 --- 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 @@ -122,7 +122,6 @@ Response Message "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", 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 index 598eb44..54fa4f8 100644 --- 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 @@ -177,7 +177,6 @@ Response Message "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", 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 index 759d537..1b47257 100644 --- 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 @@ -152,7 +152,6 @@ Response Message "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", 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 index 2be391d..65b9e93 100644 --- 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 @@ -54,13 +54,17 @@ Request parameter .. 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 values. 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. | - +--------+-----------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 values. 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. | + | | | | | + | | | | Resources that match any value can be found. For example, if resource A has a tag value of **val1** and resource B has a tag value of **val2**, resources A and B can be found by using **values={val1,val2}**. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _vpc_tag_0005__table104959232192: @@ -168,13 +172,17 @@ Response parameter .. 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. | - +--------+-----------+------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | | + | | | | Resources that match any value can be found. For example, if resource A has a tag value of **val1** and resource B has a tag value of **val2**, resources A and B can be found by using **values={val1,val2}**. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Example response 1: Setting **action** to **filter** diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst index 7bd3b78..5d80272 100644 --- a/api-ref/source/change_history.rst +++ b/api-ref/source/change_history.rst @@ -8,7 +8,21 @@ Change History +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Released On | Description | +===================================+============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ -| 2022-02-28 | This release incorporates the following changes: | +| 2023-4-7 | This release incorporates the following changes: | +| | | +| | Added the following sections: | +| | | +| | - :ref:`VPC ` | +| | - :ref:`Security Group ` | +| | - :ref:`Security Group Rule ` | +| | - :ref:`IP Address Group ` | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2023-03-10 | This release incorporates the following changes: | +| | | +| | - Added description that a firewall policy needs to be associated with a firewall group in :ref:`Creating a Firewall Policy `. | +| | - Added :ref:`What Are the Relationships Among Firewall Groups, Policies, and Rules? ` to describe the relationships among firewall resources and provide examples. | ++-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2023-02-28 | This release incorporates the following changes: | | | | | | - Modified description about the **limit** parameter in :ref:`Querying Firewall Groups `. | | | - Modified description about the **router:external** parameter in :ref:`Creating a Network `. | diff --git a/api-ref/source/faqs/index.rst b/api-ref/source/faqs/index.rst new file mode 100644 index 0000000..a6057b6 --- /dev/null +++ b/api-ref/source/faqs/index.rst @@ -0,0 +1,14 @@ +:original_name: vpc_api_0004.html + +.. _vpc_api_0004: + +FAQs +==== + +- :ref:`What Are the Relationships Among Firewall Groups, Policies, and Rules? ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + what_are_the_relationships_among_firewall_groups_policies_and_rules diff --git a/api-ref/source/faqs/what_are_the_relationships_among_firewall_groups_policies_and_rules.rst b/api-ref/source/faqs/what_are_the_relationships_among_firewall_groups_policies_and_rules.rst new file mode 100644 index 0000000..f0e4194 --- /dev/null +++ b/api-ref/source/faqs/what_are_the_relationships_among_firewall_groups_policies_and_rules.rst @@ -0,0 +1,164 @@ +:original_name: en-us_topic_0000001487936070.html + +.. _en-us_topic_0000001487936070: + +What Are the Relationships Among Firewall Groups, Policies, and Rules? +====================================================================== + +Relationships +------------- + +Firewall resources are classified into groups, policies, and rules. + +The relationships among them are as follows: + +- A firewall policy can be associated with multiple firewall rules. +- A firewall group can be associated with two firewall policies. One policy controls inbound traffic and the other controls outbound traffic. +- A firewall policy must be associated with a firewall group. + +Log in to the network console and view basic information about the firewall. You can view the name and ID of the firewall. + +|image1| + +On the **Inbound Rules** or **Outbound Rules** tab, you can add, modify, or delete firewall rules. These rules are associated with the same inbound or outbound policy. + +|image2| + +Example +------- + +The following describes how to create firewall resources. + +- Creating a firewall rule + +.. code-block:: text + + POST /v2.0/fwaas/firewall_rules + +Request body + +.. code-block:: + + { + "firewall_rule": { + "name": "fw-rule-ingress-1", + "description": "create a ingress firewall rule ", + "protocol": "TCP", + "action": "ALLOW", + "ip_version": 4, + "destination_ip_address": "192.168.22.0/24", + "source_ip_address": "0.0.0.0/0", + "enabled": true + } + } + +Response body of obtaining **firewall_rule_id**: 84d10f4a-9f8b-41b8-bdfa-5a0f18736f12 + +.. code-block:: + + { + "firewall_rule": { + "protocol": "tcp", + "description": "create a ingress firewall rule ", + "source_ip_address": "0.0.0.0/0", + "destination_ip_address": "192.168.22.0/24", + "source_port": null, + "destination_port": null, + "id": "84d10f4a-9f8b-41b8-bdfa-5a0f18736f12", + "name": "fw-rule-ingress-1", + "tenant_id": "5f6387106c2048b589b369d96c2f23a2", + "project_id": "5f6387106c2048b589b369d96c2f23a2", + "enabled": true, + "action": "allow", + "ip_version": 4, + "public": false + } + } + +- Creating a firewall policy + +.. code-block:: text + + POST /v2.0/fwaas/firewall_policies + +Request body of associating with a firewall rule + +.. code-block:: + + { + "firewall_policy": { + "description": "create a ingress firewall policy", + "firewall_rules": [ + "84d10f4a-9f8b-41b8-bdfa-5a0f18736f12" + ], + "name": "fw-policy-ingress" + } + } + +Response body of obtaining **firewall_policy_id**: da037721-b895-4e07-bbcc-f5f6ac2759fb + +.. code-block:: + + { + "firewall_policy": { + "id": "da037721-b895-4e07-bbcc-f5f6ac2759fb", + "name": "fw-policy-ingress", + "project_id": "5f6387106c2048b589b369d96c2f23a2", + "tenant_id": "5f6387106c2048b589b369d96c2f23a2", + "description": "create a ingress firewall policy", + "firewall_rules": [ + "84d10f4a-9f8b-41b8-bdfa-5a0f18736f12" + ], + "audited": false, + "public": false + } + } + +- Creating a firewall group + +.. code-block:: text + + POST /v2.0/fwaas/firewall_groups + +Request body of associating with an inbound firewall policy + +.. code-block:: + + { + "firewall_group": { + "name": "fw-group-example", + "description": "create a firewall group", + "ingress_firewall_policy_id": "da037721-b895-4e07-bbcc-f5f6ac2759fb", + "admin_state_up": true + } + } + +Response body of obtaining **firewall_group_id**: 102493e8-fc6d-4f0d-b57f-55c5be86f5c0. + +.. code-block:: + + { + "firewall_group": { + "id": "102493e8-fc6d-4f0d-b57f-55c5be86f5c0", + "name": "fw-group-example", + "project_id": "5f6387106c2048b589b369d96c2f23a2", + "tenant_id": "5f6387106c2048b589b369d96c2f23a2", + "admin_state_up": true, + "egress_firewall_policy_id": null, + "ingress_firewall_policy_id": "da037721-b895-4e07-bbcc-f5f6ac2759fb", + "description": "create a firewall group", + "created_at": "2023-03-09T08:54:40", + "updated_at": "2023-03-09T08:54:40", + "status": "INACTIVE", + "ports": [], + "public": false + } + } + +Log in to the network console and view the created firewall resources. + +|image3| + +.. |image1| image:: /_static/images/en-us_image_0000001487964866.png +.. |image2| image:: /_static/images/en-us_image_0000001538445357.png +.. |image3| image:: /_static/images/en-us_image_0000001538444809.png diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 231e537..ecb607b 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -7,7 +7,9 @@ Virtual Private Cloud - API Reference api_usage_guidelines apis/index + api_v3/index native_openstack_neutron_apis_v2.0/index permissions_policies_and_supported_actions/index + faqs/index appendix/index change_history 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 index f016747..c1b7f75 100644 --- 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 @@ -30,33 +30,41 @@ Request Message .. 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. | - | | | | | - | | | | .. note:: | - | | | | | - | | | | The port is the one whose **device_owner** is **network:router_interface_distributed**. | - +----------------------------+-----------------+------------------+--------------------------------------------------------------------------------------------+ - | admin_state_up | No | Boolean | Specifies the administrative status of the firewall. | - | | | | | - | | | | The value can be **true** or **false**. | - +----------------------------+-----------------+------------------+--------------------------------------------------------------------------------------------+ + +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The port is the one whose **device_owner** is **network:router_interface_distributed**. | + | | | | | + | | | | - Call the VPC API for querying the port ID. The filtering criteria are the specified **network_id** and **device_owner**. The **network_id** is the network ID of the subnet associated with the firewall. | + | | | | | + | | | | Example: | + | | | | | + | | | | .. code:: text | + | | | | | + | | | | GET https://{Endpoint}/v1/{project_id}/ports?network_id={network_id}&device_owner=network%3Arouter_interface_distributed | + +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status of the firewall. | + | | | | | + | | | | The value can be **true** or **false**. | + +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Example Request --------------- 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 index 2848140..0a31ae4 100644 --- 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 @@ -8,7 +8,7 @@ Creating a Firewall Policy Function -------- -This API is used to create a firewall policy. +This API is used to create a firewall policy. A firewall policy must be associated with a firewall group. You can learn more about the :ref:`relationships among network ACL groups, policies, and rules `. URI --- 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 index 1ec250c..c393f49 100644 --- 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 @@ -30,41 +30,41 @@ Request Message .. 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. | - | | | | | - | | | | .. note:: | - | | | | | - | | | | The port is the one whose **device_owner** is **network:router_interface_distributed**. | - | | | | | - | | | | - Call the VPC API for querying the port ID. The filtering criteria are the specified **network_id** and **device_owner**. | - | | | | | - | | | | Example: | - | | | | | - | | | | .. code:: text | - | | | | | - | | | | GET https://{Endpoint}/v1/{project_id}/ports?network_id={network_id}&device_owner=network%3Arouter_interface_distributed | - +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | admin_state_up | No | Boolean | Specifies the administrative status of the firewall. | - | | | | | - | | | | The value can be **true** or **false**. | - +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | | + | | | | .. note:: | + | | | | | + | | | | The port is the one whose **device_owner** is **network:router_interface_distributed**. | + | | | | | + | | | | - Call the VPC API for querying the port ID. The filtering criteria are the specified **network_id** and **device_owner**. The **network_id** is the network ID of the subnet associated with the firewall. | + | | | | | + | | | | Example: | + | | | | | + | | | | .. code:: text | + | | | | | + | | | | GET https://{Endpoint}/v1/{project_id}/ports?network_id={network_id}&device_owner=network%3Arouter_interface_distributed | + +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | admin_state_up | No | Boolean | Specifies the administrative status of the firewall. | + | | | | | + | | | | The value can be **true** or **false**. | + +----------------------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Example Request --------------- 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 index b779d3d..368b6b2 100644 --- 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 @@ -80,55 +80,57 @@ Response Message .. 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 (preset network name and cannot be used). | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zones | Array of strings | Specifies the availability zone of this network. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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* | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 (preset network name and cannot be used). | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zones | Array of strings | Specifies the availability zone of this network. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | + | | | This parameter is not displayed when an external network is called and the value of **router:external** is **true**. This parameter is visible when the value of **router:external** is **false**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 Response ---------------- 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 index 47a9b8a..481b465 100644 --- 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 @@ -54,55 +54,57 @@ Response Message .. 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 (preset network name and cannot be used). | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zones | Array of strings | Specifies the availability zone of this network. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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* | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 (preset network name and cannot be used). | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zones | Array of strings | Specifies the availability zone of this network. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | + | | | This parameter is not displayed when an external network is called and the value of **router:external** is **true**. This parameter is visible when the value of **router:external** is **false**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 Response ---------------- 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 index 7059b90..7a80a9d 100644 --- 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 @@ -105,55 +105,57 @@ Response Message .. 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 (preset network name and cannot be used). | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zones | Array of strings | Specifies the availability zone of this network. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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* | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Attribute | Type | Description | + +=========================+=======================+====================================================================================================================================================================================================+ + | status | String | Specifies the network status. The value can be **ACTIVE**, **BUILD**, **DOWN**, or **ERROR**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnets | Array of strings | Specifies ID of the subnet associated with this network. | + | | | | + | | | 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 (preset network name and cannot be used). | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zones | Array of strings | Specifies the availability zone of this network. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | + | | | This parameter is not displayed when an external network is called and the value of **router:external** is **true**. This parameter is visible when the value of **router:external** is **false**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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: 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 index 528b488..19fcdf5 100644 --- 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 @@ -86,55 +86,57 @@ Response Message .. 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 (preset network name and cannot be used). | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zones | Array of strings | Specifies the availability zone of this network. | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | 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* | - +-------------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 (preset network name and cannot be used). | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | router:external | Boolean | Specifies whether the network is an external network. The default value is **false**. 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**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone_hints | Array of strings | Specifies the availability zones available to this network. The current version does not support cross-availability-zone network scheduling. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zones | Array of strings | Specifies the availability zone of this network. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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. | + | | | | + | | | This parameter is not displayed when an external network is called and the value of **router:external** is **true**. This parameter is visible when the value of **router:external** is **false**. | + +-------------------------+-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | 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 Response ---------------- 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 index d863173..f7ff87d 100644 --- 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 @@ -40,7 +40,7 @@ Request Message +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | No | Boolean | Specifies the administrative status. | | | | | | - | | | | The value can only be **true**. | + | | | | The default value is **true**. | +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 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"}]**. | +-----------------------+-----------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -175,7 +175,7 @@ Response Message +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | Boolean | Specifies the administrative status. | | | | | - | | | The value can only be **true**. | + | | | The default value is **true**. | +-----------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | | | | | 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 index 69c01ec..b89ec94 100644 --- 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 @@ -67,7 +67,7 @@ Response Message +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | Boolean | Specifies the administrative status. | | | | | - | | | The value can only be **true**. | + | | | The default value is **true**. | +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | | | | | 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 index d38162c..a18221b 100644 --- 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 @@ -152,7 +152,7 @@ Response Parameter +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | Boolean | Specifies the administrative status. | | | | | - | | | The value can only be **true**. | + | | | The default value is **true**. | +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | | | | | 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 index 0137b4a..1af479b 100644 --- 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 @@ -160,7 +160,7 @@ Response Message +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | Boolean | Specifies the administrative status. | | | | | - | | | The value can only be **true**. | + | | | The default value is **true**. | +-----------------------+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | mac_address | String | Specifies the port MAC address. For example, **"mac_address": "fa:16:3e:9e:ff:55"**. | | | | |