diff --git a/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/authentication.rst b/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/authentication.rst index de10e4f..0a7e612 100644 --- a/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/authentication.rst +++ b/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/authentication.rst @@ -15,14 +15,15 @@ AK/SK Authentication .. note:: - AK/SK authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended. + - AK/SK authentication supports API requests with a body not larger than 12 MB. For API requests with a larger body, token authentication is recommended. + - API Gateway checks the time format and compares the request time with the time when API Gateway received the request. If the time difference exceeds 15 minutes, API Gateway will reject the request. So, the local time on the client must be synchronized with the clock server to avoid a large offset in the value of **X-Sdk-Date** in the request header. -In AK/SK authentication, AK/SK is used to sign requests and the signature is then added to the requests for authentication. +In AK/SK authentication, an AK/SK pair is used to sign requests and the signature is then added to the requests for authentication. - AK: access key ID, which is a unique identifier used in conjunction with a secret access key to sign requests cryptographically. - SK: secret access key, which is used in conjunction with an AK to sign requests cryptographically. It identifies a request sender and prevents the request from being modified. -In AK/SK authentication, you can use an AK/SK to sign requests based on the signature algorithm or using the signing SDK. +In AK/SK authentication, you can use an AK/SK pair to sign requests based on the signature algorithm or using the signing SDK. .. note:: @@ -33,7 +34,8 @@ Token Authentication .. note:: - The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token. + - A token remains valid for 24 hours after it is generated. You can cache a token and reuse it for authentication instead of generating a new one each time. + - Before using a token, ensure that it has sufficient time remaining before expiration. Using a near-expiry token may cause API call failures. A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API. You can obtain a token by calling the `Obtaining a User Token `__ API. @@ -50,7 +52,7 @@ IMS is a project-level service. When you call the API, set **auth.scope** in the "password": { "user": { "name": "username", // IAM user name - "password": $ADMIN_PASS, //IAM user password. You are advised to store it in ciphertext in the configuration file or an environment variable and decrypt it when needed to ensure security. + "password": $ADMIN_PASS, // IAM user password. You are advised to store it in ciphertext in the configuration file or an environment variable and decrypt it when needed to ensure security. "domain": { "name": "domainname" // Name of the domain that the IAM user belongs to } diff --git a/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/response.rst b/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/response.rst index 911fcb8..24581fb 100644 --- a/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/response.rst +++ b/api-ref/source/calling_apis_sfs_capacity-oriented_and_sfs_turbo/response.rst @@ -19,7 +19,7 @@ Response Header Similar to a request, a response also has a header, for example, **Content-Type**. -:ref:`Figure 1 ` shows the response header fields for the API used to . The **X-Subject-Token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs. +:ref:`Figure 1 ` shows the response header for the API used to . The **X-Subject-Token** header field is the desired user token. This token can then be used to authenticate the calling of other APIs. .. note:: diff --git a/api-ref/source/change_history.rst b/api-ref/source/change_history.rst index 5e6b103..5857101 100644 --- a/api-ref/source/change_history.rst +++ b/api-ref/source/change_history.rst @@ -8,6 +8,10 @@ Change History +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Released On | Description | +===================================+===========================================================================================================================================================================================================================================================+ +| 2025-09-28 | Updated the following content: | +| | | +| | Added the description of tag-related APIs. | ++-----------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | 2025-04-07 | Updated the following content: | | | | | | - Added descriptions about General Purpose File System APIs. | diff --git a/api-ref/source/general_purpose_file_system_apis_beta/index.rst b/api-ref/source/general_purpose_file_system_apis_beta/index.rst index aa81291..d491ef0 100644 --- a/api-ref/source/general_purpose_file_system_apis_beta/index.rst +++ b/api-ref/source/general_purpose_file_system_apis_beta/index.rst @@ -7,6 +7,7 @@ General Purpose File System APIs (BETA) - :ref:`File Systems ` - :ref:`File System Access Rules ` +- :ref:`Tags ` .. toctree:: :maxdepth: 1 @@ -14,3 +15,4 @@ General Purpose File System APIs (BETA) file_systems/index file_system_access_rules/index + tags/index diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/batch_adding_tags_to_a_resource.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/batch_adding_tags_to_a_resource.rst new file mode 100644 index 0000000..fa610bb --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/batch_adding_tags_to_a_resource.rst @@ -0,0 +1,137 @@ +:original_name: sfs_03_0002.html + +.. _sfs_03_0002: + +Batch Adding Tags to a Resource +=============================== + +Function +-------- + +This API is used to batch add tags for a general purpose file system. You can add up to 20 tags to a resource. + +URI +--- + +- POST /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags/create +- Parameter description + + +-------------+-----------+--------+----------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+======================================================================+ + | project_id | Yes | String | The project ID. | + +-------------+-----------+--------+----------------------------------------------------------------------+ + | resource_id | Yes | String | The resource ID, which is the name of a general purpose file system. | + +-------------+-----------+--------+----------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 1** Request header parameters + + +-----------------+-----------------+-----------------+------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+====================================+ + | Content-type | Yes | String | The MIME type of the request body. | + | | | | | + | | | | Example: application/json | + +-----------------+-----------------+-----------------+------------------------------------+ + | X-Auth-Token | No | String | The user token. | + +-----------------+-----------------+-----------------+------------------------------------+ + +.. table:: **Table 2** Request body parameters + + +-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=========================================================================================+==============================================================================================================+ + | tags | No | List<:ref:`resource_tag `> | The tag list. For details, see :ref:`Table 3 `. | + | | | | | + | | | | This parameter is mandatory for common tenants. | + | | | | | + | | | | Use either **tags** or **sys_tags** if you have the op_service permissions. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | sys_tags | No | List<:ref:`resource_tag `> | The system tag list. This parameter is available only to the op_service permissions. | + | | | | | + | | | | Use either **tags** or **sys_tags** if you have the op_service permissions. | + | | | | | + | | | | Only one **resource_tag** structure is used in TMS calls currently. | + | | | | | + | | | | The key is fixed at **\_sys_enterprise_project_id**. | + | | | | | + | | | | The value can be **UUID** or **0**. **0** indicates the default enterprise project. | + | | | | | + | | | | System tags can only be added. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. _sfs_03_0002__en-us_topic_0000001886392461_table667613216170: + +.. table:: **Table 3** resource_tag + + +-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+============================================================================================================================================================================================================================================================================================================================================+ + | key | Yes | String | The tag key. A tag key can contain a maximum of 128 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@).`` It cannot start or end with a space and cannot be left empty. Tag keys starting with **\_sys\_** are system tags, and you cannot start a tag key with **\_sys\_**. | + +-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | No | String | The tag value. A tag value can contain a maximum of 255 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@)`` and can be left empty. It cannot start or end with a space. | + +-----------+-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +None + +Example Request +--------------- + +Batch adding tags to a general purpose file system whose name is **bucketName** with the project ID **c80a2157ba1d46c0825265947342077c**: + +.. code-block:: text + + POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags/create + +Request body example: + +.. code-block:: + + { + "tags":[ + { + "key":"key1", + "value":"value1" + }, + { + "key":"key2", + "value":"value2" + } + ] + } + +Example Response +---------------- + +None + +Status Codes +------------ + +- Normal + +=========== ======================== +Status Code Description +=========== ======================== +204 Resource tags are added. +=========== ======================== + +- Abnormal + +=========== ====================== +Status Code Description +=========== ====================== +400 Invalid tag parameter. +401 Certification failed. +403 Authentication failed. +404 Resource not found. +500 System error. +=========== ====================== diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/batch_deleting_tags_from_a_resource.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/batch_deleting_tags_from_a_resource.rst new file mode 100644 index 0000000..17d3a74 --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/batch_deleting_tags_from_a_resource.rst @@ -0,0 +1,107 @@ +:original_name: sfs_03_0003.html + +.. _sfs_03_0003: + +Batch Deleting Tags from a Resource +=================================== + +Function +-------- + +This API is used to batch delete tags from a specified resource. System tags cannot be deleted. If any tag to be deleted is not found, a successful result is returned. + +URI +--- + +- POST /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags/delete + +- Parameter description + + +-------------+-----------+--------+----------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+======================================================================+ + | project_id | Yes | String | The project ID. | + +-------------+-----------+--------+----------------------------------------------------------------------+ + | resource_id | Yes | String | The resource ID, which is the name of a general purpose file system. | + +-------------+-----------+--------+----------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 1** Request header parameters + + +-----------------+-----------------+-----------------+------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+====================================+ + | Content-type | Yes | String | The MIME type of the request body. | + | | | | | + | | | | Example: application/json | + +-----------------+-----------------+-----------------+------------------------------------+ + | X-Auth-Token | No | String | The user token. | + +-----------------+-----------------+-----------------+------------------------------------+ + +.. table:: **Table 2** Request body parameters + + +-----------+-----------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+=========================================================================================+==============================================================================================================+ + | tags | Yes | List<:ref:`resource_tag `> | The tag list. For details, see :ref:`Table 3 `. | + +-----------+-----------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +None + +Example Request +--------------- + +Batch deleting tags from a general purpose file system whose name is **bucketName** with the project ID **c80a2157ba1d46c0825265947342077c**: + +.. code-block:: text + + POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags/delete + +Request body example: + +.. code-block:: + + { + "tags":[ + { + "key":"key1" + }, + { + "key":"key2", + "value":"value2" + } + ] + } + +Example Response +---------------- + +None + +Status Codes +------------ + +- Normal + +=========== ========================== +Status Code Description +=========== ========================== +204 Resource tags are deleted. +=========== ========================== + +- Abnormal + +=========== ====================== +Status Code Description +=========== ====================== +400 Invalid tag parameter. +401 Certification failed. +403 Authentication failed. +404 Resource not found. +500 System error. +=========== ====================== diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/index.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/index.rst new file mode 100644 index 0000000..ccf537e --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/index.rst @@ -0,0 +1,24 @@ +:original_name: sfs_03_0001.html + +.. _sfs_03_0001: + +Tags +==== + +- :ref:`Batch Adding Tags to a Resource ` +- :ref:`Batch Deleting Tags from a Resource ` +- :ref:`Querying Tags of a Resource ` +- :ref:`Querying Resources by Tag ` +- :ref:`Querying the Number of Resources by Tag ` +- :ref:`Querying Tags in a Project ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + batch_adding_tags_to_a_resource + batch_deleting_tags_from_a_resource + querying_tags_of_a_resource + querying_resources_by_tag + querying_the_number_of_resources_by_tag + querying_tags_in_a_project diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_resources_by_tag.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_resources_by_tag.rst new file mode 100644 index 0000000..1128c3a --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_resources_by_tag.rst @@ -0,0 +1,225 @@ +:original_name: sfs_03_0005.html + +.. _sfs_03_0005: + +Querying Resources by Tag +========================= + +Function +-------- + +This API is used to list resources by tag. Resources are sorted by the time when they are created, in descending order. + +URI +--- + +- POST /v3/sfs/tms/{project_id}/file-systems/resource-instances/filter + +- Parameter description + + +------------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +============+===========+========+===========================================================================================================================================================================================================================+ + | project_id | Yes | String | The project ID. | + +------------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | Int | The number of records to be queried. The value ranges from **1** to **1000**, and the default value is **1000**. | + +------------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | Int | The index location. The query starts from the next data record indexed by this parameter. The default value is **0**, indicating that the query starts from the first data record. The value cannot be a negative number. | + +------------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 1** Request header parameters + + +-----------------+-----------------+-----------------+------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+====================================+ + | Content-type | Yes | String | The MIME type of the request body. | + | | | | | + | | | | Example: application/json | + +-----------------+-----------------+-----------------+------------------------------------+ + | X-Auth-Token | No | String | The user token. | + +-----------------+-----------------+-----------------+------------------------------------+ + +.. table:: **Table 2** Request body parameters + + +-----------------+-----------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+===================================================================================+===================================================================================================================================================================================================================================================================================================================================================+ + | without_any_tag | No | boolean | Excludes any of the specified tags. If this parameter is set to **true**, all resources without tags are queried. In this case, the **tags** field is ignored. If this parameter is set to **false** or not specified, it does not take effect, which means that all resources are returned or resources are filtered by **tags** or **matches**. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | List<:ref:`tag `> | Includes specified tags. A maximum of 20 tags can be specified. Tag keys must be unique. Each tag key can have a maximum of 20 tag values. A tag value can be empty but the structure cannot be missing. Tag values of the same key must be unique. | + | | | | | + | | | | The response returns resources containing all tags in this list. Keys in this list are in an AND relationship while values in each key-value structure is in an OR relationship. If this parameter is not specified, all resources will be returned. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | sys_tags | No | List<:ref:`tag `> | Contains system tags. This parameter is only available to users with the **op_service** permission. | + | | | | | + | | | | This parameter cannot be used with filtering criteria **without_any_tag** and **tags** at the same time. | + | | | | | + | | | | This field contains only one **tag** structure currently. | + | | | | | + | | | | The key is fixed at **\_sys_enterprise_project_id**. | + | | | | | + | | | | The value is the ID of an enterprise project. | + | | | | | + | | | | The key contains only one value. Value **0** indicates the default enterprise project. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | No | List<:ref:`match `> | The fields to be matched. The key in **match** is a dictionary value fixed at **resource_name**, meaning that the prefix search is performed based on the value of the key. It will be extended later. | + | | | | | + | | | | For details, see :ref:`Table 4 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _sfs_03_0005__en-us_topic_0000001840191462_table138157172456: + +.. table:: **Table 3** tag + + +-----------+-----------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+==============+============================================================================================================================================================================================================================================================================================================================================+ + | key | Yes | String | The tag key. A tag key can contain a maximum of 128 characters. It can contain letters, digits, and spaces representable in UTF-8 and special characters ``(_.:=+-@).`` It cannot start or end with a space and cannot be left empty. Tag keys starting with **\_sys\_** are system tags, and you cannot start a tag key with **\_sys\_**. | + +-----------+-----------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | List | The tag value list. A value can be an empty array but cannot be left blank. If the list specified by **values** is empty arrays, any tag value can be queried. The values are in the OR relationship. | + +-----------+-----------+--------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _sfs_03_0005__en-us_topic_0000001840191462_table1225513315466: + +.. table:: **Table 4** match + + +-----------+-----------+--------+---------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+===============================================================================================================+ + | key | Yes | String | The key. The key is fixed at **resource_name** currently. Other **key** values will be available later. | + +-----------+-----------+--------+---------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | The value. Each tag value can contain a maximum of 255 Unicode characters. The character set is not verified. | + +-----------+-----------+--------+---------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +.. table:: **Table 5** Response body parameters + + +-------------+-----------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+=====================================================================================+===================================================================================================================+ + | resources | Yes | List<:ref:`resource `> | The resource list. For details, see :ref:`Table 6 `. | + +-------------+-----------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | total_count | Yes | Integer | The total number of records. | + +-------------+-----------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +.. _sfs_03_0005__en-us_topic_0000001840191462_table464017234815: + +.. table:: **Table 6** resource + + +-----------------+-----------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=========================================================================================+===============================================================================================================+ + | resource_id | Yes | String | The resource ID. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + | resource_detail | Yes | Object | The resource details. This value is left empty by default. The value is a resource object used for extension. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + | tags | Yes | List<:ref:`resource_tag `> | The tag list. If there is no tag, an empty array is used by default. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + | sys_tags | No | List<:ref:`resource_tag `> | This parameter is only available to users with the **op_service** permission. | + | | | | | + | | | | This field contains only one **resource_tag** structure currently. | + | | | | | + | | | | The key is fixed at **\_sys_enterprise_project_id**. | + | | | | | + | | | | The value is the ID of the enterprise project. Value **0** indicates the default enterprise project. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + | resource_name | Yes | String | The resource name. This parameter is an empty string if there is no resource name. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +Listing resources (with the project ID set to \**c80a2157ba1d46c0825265947342077c**, offset to \**0**, and limit to \**10**): + +.. code-block:: text + + POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/resource-instances/filter?limit=10&offset=0 + +Request body example: + +.. code-block:: + + { + "tags":[ + { + "key":"key1", + "values":[ + "value1", + "value2" + ] + }, + { + "key":"key2", + "values":[ + "value1", + "value2" + ] + } + ], + "matches":[ + { + "key":"resource_name", + "value":"resource1" + } + ], + "without_any_tag":"false" + } + +Example Response +---------------- + +.. code-block:: + + { + "resources":[ + { + "resource_detail":"", + "resource_id":"resource1", + "resource_name":"resource1", + "tags":[ + { + "key":"key1", + "value":"value1" + } + ], + "sys_tags":[] + } + ], + "total_count":1 + } + +Status Codes +------------ + +- Normal + +=========== ================= +Status Code Description +=========== ================= +200 Resources listed. +=========== ================= + +- Abnormal + +=========== ====================== +Status Code Description +=========== ====================== +400 Invalid tag parameter. +401 Certification failed. +403 Authentication failed. +404 Resource not found. +500 System error. +=========== ====================== diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_tags_in_a_project.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_tags_in_a_project.rst new file mode 100644 index 0000000..372f61b --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_tags_in_a_project.rst @@ -0,0 +1,105 @@ +:original_name: sfs_03_0007.html + +.. _sfs_03_0007: + +Querying Tags in a Project +========================== + +Function +-------- + +This API is used to query tags of all resources owned by a tenant in a specified project. + +URI +--- + +- GET /v3/sfs/tms/{project_id}/file-systems/tags +- Parameter description + + ========== ========= ====== =============== + Parameter Mandatory Type Description + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== + +Request Parameters +------------------ + +.. table:: **Table 1** Request header parameters + + +-----------------+-----------------+-----------------+------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+====================================+ + | Content-type | Yes | String | The MIME type of the request body. | + | | | | | + | | | | Example: application/json | + +-----------------+-----------------+-----------------+------------------------------------+ + | X-Auth-Token | No | String | The user token. | + +-----------------+-----------------+-----------------+------------------------------------+ + +Response Parameters +------------------- + +.. table:: **Table 2** Response body parameter + + +-----------+-----------+--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+================================================================================+==============================================================================================================+ + | tags | Yes | List<:ref:`tag `> | The tag list. For details, see :ref:`Table 3 `. | + +-----------+-----------+--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +Querying tags using project ID \**c80a2157ba1d46c0825265947342077c**: + +.. code-block:: text + + GET https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/tags + +Example Response +---------------- + +.. code-block:: + + { + "tags":[ + { + "key":"key1", + "values":[ + "value1", + "value2" + ] + }, + { + "key":"key2", + "values":[ + "value1", + "value2" + ] + } + ] + } + +Status Codes +------------ + +- Normal + +=========== ================================= +Status Code Description +=========== ================================= +200 Resource tags queried by project. +=========== ================================= + +- Abnormal + +=========== ====================== +Status Code Description +=========== ====================== +400 Invalid tag parameter. +401 Certification failed. +403 Authentication failed. +404 Resource not found. +500 System error. +=========== ====================== diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_tags_of_a_resource.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_tags_of_a_resource.rst new file mode 100644 index 0000000..0a754c4 --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_tags_of_a_resource.rst @@ -0,0 +1,112 @@ +:original_name: sfs_03_0004.html + +.. _sfs_03_0004: + +Querying Tags of a Resource +=========================== + +Function +-------- + +This API is used to query tags of a specified resource. + +URI +--- + +- GET /v3/sfs/tms/{project_id}/file-systems/{resource_id}/tags + +- Parameter description + + +-------------+-----------+--------+----------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+========+======================================================================+ + | project_id | Yes | String | The project ID. | + +-------------+-----------+--------+----------------------------------------------------------------------+ + | resource_id | Yes | String | The resource ID, which is the name of a general purpose file system. | + +-------------+-----------+--------+----------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 1** Request header parameters + + +-----------------+-----------------+-----------------+------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+====================================+ + | Content-type | Yes | String | The MIME type of the request body. | + | | | | | + | | | | Example: application/json | + +-----------------+-----------------+-----------------+------------------------------------+ + | X-Auth-Token | No | String | The user token. | + +-----------------+-----------------+-----------------+------------------------------------+ + +Response Parameters +------------------- + +.. table:: **Table 2** Response body parameters + + +-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=========================================================================================+==============================================================================================================+ + | tags | No | List<:ref:`resource_tag `> | The tag list. For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | sys_tags | No | List<:ref:`resource_tag `> | The system tag list. This parameter is only available to users with the **op_service** permission. | + | | | | | + | | | | This field contains only one **resource_tag** structure currently. | + | | | | | + | | | | The key is fixed at **\_sys_enterprise_project_id**. | + | | | | | + | | | | The value is the ID of an enterprise project. Value **0** indicates the default enterprise project. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +Example Request +--------------- + +Querying tags of a general purpose file system whose name is **bucketName** with the project ID **c80a2157ba1d46c0825265947342077c**: + +.. code-block:: text + + GET https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/bucketName/tags + +Example Response +---------------- + +.. code-block:: + + { + "tags":[ + { + "key":"key1", + "value":"value1" + }, + { + "key":"key2", + "value":"value2" + } + ] + } + +Status Codes +------------ + +- Normal + +=========== ====================== +Status Code Description +=========== ====================== +200 Resource tags queried. +=========== ====================== + +- Abnormal + +=========== ====================== +Status Code Description +=========== ====================== +400 Invalid tag parameter. +401 Certification failed. +403 Authentication failed. +404 Resource not found. +500 System error. +=========== ====================== diff --git a/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_the_number_of_resources_by_tag.rst b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_the_number_of_resources_by_tag.rst new file mode 100644 index 0000000..a688c4d --- /dev/null +++ b/api-ref/source/general_purpose_file_system_apis_beta/tags/querying_the_number_of_resources_by_tag.rst @@ -0,0 +1,151 @@ +:original_name: sfs_03_0006.html + +.. _sfs_03_0006: + +Querying the Number of Resources by Tag +======================================= + +Function +-------- + +This API is used to query the number of resources. + +URI +--- + +- POST /v3/sfs/tms/{project_id}/file-systems/resource-instances/count + +- Parameter description + + ========== ========= ====== =============== + Parameter Mandatory Type Description + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== + +Request Parameters +------------------ + +.. table:: **Table 1** Request header parameters + + +-----------------+-----------------+-----------------+------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+====================================+ + | Content-type | Yes | String | The MIME type of the request body. | + | | | | | + | | | | Example: application/json | + +-----------------+-----------------+-----------------+------------------------------------+ + | X-Auth-Token | No | String | The user token. | + +-----------------+-----------------+-----------------+------------------------------------+ + +.. table:: **Table 2** Request body parameters + + +-----------------+-----------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+===================================================================================+=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | without_any_tag | No | boolean | Excludes resources with any of the specified tags. If this parameter is set to **true**, all resources without tags are queried. In this case, the **tags** field is ignored. If this parameter is set to **false** or not specified, it does not take effect, which means that all resources are returned or resources are filtered by **tags** or **matches**. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | List<:ref:`tag `> | The resources to be queried contain tags listed in **tags**. Each resource to be queried can contain a maximum of 20 tag keys, and each key can have a maximum of 20 values. The tag value of a tag key can be an empty array but the structure cannot be missing. Each tag key must be unique, and the tag values of a key must also be unique. The response returns resources containing all tags in this list. Keys in this list are in an AND relationship while values in each key-value structure is in an OR relationship. If this parameter is not specified, all resources will be returned. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | sys_tags | No | List<:ref:`tag `> | Contains system tags. This parameter is only available to users with the **op_service** permission. | + | | | | | + | | | | This parameter cannot be used with filtering criteria **without_any_tag** and **tags** at the same time. | + | | | | | + | | | | This field contains only one **tag** structure currently. | + | | | | | + | | | | The key is fixed at **\_sys_enterprise_project_id**. | + | | | | | + | | | | The value is the ID of an enterprise project. | + | | | | | + | | | | The key contains only one value. Value **0** indicates the default enterprise project. | + | | | | | + | | | | For details, see :ref:`Table 3 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | No | List<:ref:`match `> | The fields to be matched. The key in **match** is a dictionary value fixed at **resource_name**, meaning that the prefix search is performed based on the value of the key. It will be extended later. | + | | | | | + | | | | For details, see :ref:`Table 4 `. | + +-----------------+-----------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +.. table:: **Table 3** Response body parameter + + =========== ========= ======= ============================ + Parameter Mandatory Type Description + =========== ========= ======= ============================ + total_count Yes Integer The total number of records. + =========== ========= ======= ============================ + +Example Request +--------------- + +Querying the number of resources using project ID \**c80a2157ba1d46c0825265947342077c**: + +.. code-block:: text + + POST https://{endpoint}/v3/sfs/tms/c80a2157ba1d46c0825265947342077c/file-systems/resource-instances/count + +Request body example: + +.. code-block:: + + { + "tags":[ + { + "key":"key1", + "values":[ + "value1", + "value2" + ] + }, + { + "key":"key2", + "values":[ + "value1", + "value2" + ] + } + ], + "matches":[ + { + "key":"resource_name", + "value":"resource1" + } + ], + "without_any_tag":"true" + } + +Example Response +---------------- + +.. code-block:: + + { + "total_count":1 + } + +Status Codes +------------ + +- Normal + +=========== ============================ +Status Code Description +=========== ============================ +200 Number of resources queried. +=========== ============================ + +- Abnormal + +=========== ====================== +Status Code Description +=========== ====================== +400 Invalid tag parameter. +401 Certification failed. +403 Authentication failed. +404 Resource not found. +500 System error. +=========== ====================== diff --git a/api-ref/source/getting_started_sfs_turbo.rst b/api-ref/source/getting_started_sfs_turbo.rst index 4245c31..3d1c6b0 100644 --- a/api-ref/source/getting_started_sfs_turbo.rst +++ b/api-ref/source/getting_started_sfs_turbo.rst @@ -16,7 +16,7 @@ Involved APIs If you use a token for authentication, you must obtain the token and add **X-Auth-Token** to the request header of the API when making a call. The following APIs are involved in the request for creating an SFS Turbo file system: -- API for obtaining tokens from IAM +- IAM API used to obtain a token - API for creating SFS Turbo file systems. Procedure diff --git a/api-ref/source/permissions_policies_and_supported_actions/introduction.rst b/api-ref/source/permissions_policies_and_supported_actions/introduction.rst index 0d5fc30..20c9ed6 100644 --- a/api-ref/source/permissions_policies_and_supported_actions/introduction.rst +++ b/api-ref/source/permissions_policies_and_supported_actions/introduction.rst @@ -13,7 +13,7 @@ You can grant users permissions by using roles and policies. Roles are a type of .. note:: - - Policy-based authorization is useful if you want to allow or deny the access to an API. + Policy-based authorization is useful if you want to allow or deny the access to an API. Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. The permissions required for calling an API are determined by the actions supported by the API. Only users who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user wants to query ECSs using an API, the user must have been granted permissions that allow the **ecs:servers:list** action. diff --git a/api-ref/source/permissions_policies_and_supported_actions/supported_actions/sfs_turbo_actions.rst b/api-ref/source/permissions_policies_and_supported_actions/supported_actions/sfs_turbo_actions.rst index 17a0985..9e9db2c 100644 --- a/api-ref/source/permissions_policies_and_supported_actions/supported_actions/sfs_turbo_actions.rst +++ b/api-ref/source/permissions_policies_and_supported_actions/supported_actions/sfs_turbo_actions.rst @@ -79,21 +79,21 @@ Name Management Permissions Management ---------------------- -+---------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ -| Permission | API | Action | Dependent Permission | IAM Project | -| | | | | | -| | | | | (Project) | -+=============================================+=============================================================================+================================+======================+=============+ -| Creating a Permission Rule | POST /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules | sfsturbo:shares:createPermRule | ``-`` | Y | -+---------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ -| Querying Permissions Rules of a File System | GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules | sfsturbo:shares:listPermRules | ``-`` | Y | -+---------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ -| Querying a Permission Rule by ID | GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} | sfsturbo:shares:showPermRule | ``-`` | Y | -+---------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ -| Modifying a Permission Rule | PUT /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} | sfsturbo:shares:updatePermRule | ``-`` | Y | -+---------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ -| Deleting a Permission Rule | DELETE /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} | sfsturbo:shares:deletePermRule | ``-`` | Y | -+---------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ ++--------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ +| Permission | API | Action | Dependent Permission | IAM Project | +| | | | | | +| | | | | (Project) | ++============================================+=============================================================================+================================+======================+=============+ +| Creating a Permission Rule | POST /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules | sfsturbo:shares:createPermRule | ``-`` | Y | ++--------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ +| Querying Permission Rules of a File System | GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules | sfsturbo:shares:listPermRules | ``-`` | Y | ++--------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ +| Querying a Permission Rule by ID | GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} | sfsturbo:shares:showPermRule | ``-`` | Y | ++--------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ +| Modifying a Permission Rule | PUT /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} | sfsturbo:shares:updatePermRule | ``-`` | Y | ++--------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ +| Deleting a Permission Rule | DELETE /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} | sfsturbo:shares:deletePermRule | ``-`` | Y | ++--------------------------------------------+-----------------------------------------------------------------------------+--------------------------------+----------------------+-------------+ Task Management --------------- @@ -106,8 +106,8 @@ Task Management | Querying Details About a Task | GET /v1/{project_id}/sfs-turbo/jobs/{job_id} | sfsturbo:shares:getJob | ``-`` | Y | +-------------------------------+----------------------------------------------+------------------------+----------------------+-------------+ -APIs for Console Only ---------------------- +Console Reference +----------------- +------------------------------------+------------------+--------------------------------+----------------------+-------------+ | Permission | API | Action | Dependent Permission | IAM Project | @@ -122,3 +122,14 @@ APIs for Console Only +------------------------------------+------------------+--------------------------------+----------------------+-------------+ | Checking the Name of a File System | For Console only | sfsturbo:shares:checkShareName | ``-`` | Y | +------------------------------------+------------------+--------------------------------+----------------------+-------------+ + +Tenant Quota Management +----------------------- + ++------------------------+---------------------------------------+--------------------------+----------------------+-------------+ +| Permission | API | Action | Dependent Permission | IAM Project | +| | | | | | +| | | | | (Project) | ++========================+=======================================+==========================+======================+=============+ +| Querying Tenant Quotas | GET /v1/{project_id}/sfs-turbo/quotas | sfsturbo:shares:getQuota | ``-`` | Y | ++------------------------+---------------------------------------+--------------------------+----------------------+-------------+ diff --git a/api-ref/source/sfs_turbo_apis/connection_management/changing_the_security_group_associated_with_a_file_system.rst b/api-ref/source/sfs_turbo_apis/connection_management/changing_the_security_group_associated_with_a_file_system.rst index d45d995..0990c23 100644 --- a/api-ref/source/sfs_turbo_apis/connection_management/changing_the_security_group_associated_with_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/connection_management/changing_the_security_group_associated_with_a_file_system.rst @@ -8,7 +8,7 @@ Changing the Security Group Associated with a File System Function -------- -This API is used to change the security group associated with an SFS Turbo file system. Security group change is an asynchronous task. You can check whether the security group is changed based on the value of **sub_status** returned after calling the API to query details of a file system. If value **232** is returned, the security group has been changed. +This API is used to change the security group associated with an SFS Turbo file system. Changing the security group is an asynchronous task. You can call the API for querying details of a file system and view the value of **sub_status** returned to check whether the security group change is successful. If value **232** is returned, the security group has been changed. URI --- @@ -17,42 +17,42 @@ POST /v1/{project_id}/sfs-turbo/shares/{share_id}/action .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------------------+-----------+--------------------------------------------------------------------------------------+-------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=======================+===========+======================================================================================+=====================================+ - | change_security_group | Yes | :ref:`ChangeSecurityGroup ` object | Object of **change_security_group** | - +-----------------------+-----------+--------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------+-----------+--------------------------------------------------------------------------------------+---------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=======================+===========+======================================================================================+=======================================+ + | change_security_group | Yes | :ref:`ChangeSecurityGroup ` object | The **change_security_group** object. | + +-----------------------+-----------+--------------------------------------------------------------------------------------+---------------------------------------+ .. _changesecuritygroup__request_changesecuritygroup: .. table:: **Table 4** ChangeSecurityGroup - +-------------------+-----------+--------+----------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===================+===========+========+========================================+ - | security_group_id | Yes | String | ID of the security group to be changed | - +-------------------+-----------+--------+----------------------------------------+ + ================= ========= ====== ================================= + Parameter Mandatory Type Description + ================= ========= ====== ================================= + security_group_id Yes String The ID of the new security group. + ================= ========= ====== ================================= Response Parameters ------------------- @@ -61,16 +61,16 @@ Response Parameters .. table:: **Table 5** Response body parameters - ========= ====== =============================== + ========= ====== ============================= Parameter Type Description - ========= ====== =============================== - id String ID of the SFS Turbo file system - ========= ====== =============================== + ========= ====== ============================= + id String The SFS Turbo file system ID. + ========= ====== ============================= Example Requests ---------------- -Changing the security group of a file system (target security group ID **26f6b565-240e-43c3-8867-03f0bd975433**) +Changing the security group of a file system (new security group ID **26f6b565-240e-43c3-8867-03f0bd975433**) .. code-block:: @@ -85,7 +85,7 @@ Example Responses **Status code: 202** -ID of the SFS Turbo file system +The SFS Turbo file system ID. .. code-block:: @@ -96,11 +96,11 @@ ID of the SFS Turbo file system Status Codes ------------ -=========== =============================== +=========== ============================= Status Code Description -=========== =============================== -202 ID of the SFS Turbo file system -=========== =============================== +=========== ============================= +202 The SFS Turbo file system ID. +=========== ============================= Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/file_system_management/index.rst b/api-ref/source/sfs_turbo_apis/file_system_management/index.rst new file mode 100644 index 0000000..2392f55 --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/file_system_management/index.rst @@ -0,0 +1,14 @@ +:original_name: topic_300000004.html + +.. _topic_300000004: + +File System Management +====================== + +- :ref:`Obtaining IP Addresses of the Clients Who Have Mounted the File System ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + obtaining_ip_addresses_of_the_clients_who_have_mounted_the_file_system diff --git a/api-ref/source/sfs_turbo_apis/file_system_management/obtaining_ip_addresses_of_the_clients_who_have_mounted_the_file_system.rst b/api-ref/source/sfs_turbo_apis/file_system_management/obtaining_ip_addresses_of_the_clients_who_have_mounted_the_file_system.rst new file mode 100644 index 0000000..4712dfc --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/file_system_management/obtaining_ip_addresses_of_the_clients_who_have_mounted_the_file_system.rst @@ -0,0 +1,162 @@ +:original_name: ShowClientIpInfo.html + +.. _ShowClientIpInfo: + +Obtaining IP Addresses of the Clients Who Have Mounted the File System +====================================================================== + +Function +-------- + +This API is used to obtain the IP addresses of the clients who have mounted the file system. + +URI +--- + +POST /v1/{project_id}/sfs-turbo/shares/{share_id}/action + +.. table:: **Table 1** Path Parameters + + ========== ========= ====== =================== + Parameter Mandatory Type Description + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + ============ ========= ====== ================== + Parameter Mandatory Type Description + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== + +.. table:: **Table 3** Request body parameters + + +----------------+-----------+---------------------------------------------------------------------+------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +================+===========+=====================================================================+========================================================================+ + | get_client_ips | Yes | :ref:`ClientIpInfo ` object | Obtaining IP addresses of the clients who have mounted the file system | + +----------------+-----------+---------------------------------------------------------------------+------------------------------------------------------------------------+ + +.. _showclientipinfo__request_clientipinfo: + +.. table:: **Table 4** ClientIpInfo + + +-----------+-----------+--------+-------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+========+===================================================================+ + | ips | No | String | The IP addresses of the clients who have mounted the file system. | + +-----------+-----------+--------+-------------------------------------------------------------------+ + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 5** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 6** Response body parameters + + +-----------+------------------+-------------------------------------------------------------------+ + | Parameter | Type | Description | + +===========+==================+===================================================================+ + | id | String | The file system ID. | + +-----------+------------------+-------------------------------------------------------------------+ + | ips | Array of strings | The IP addresses of the clients who have mounted the file system. | + +-----------+------------------+-------------------------------------------------------------------+ + +**Status code: 400** + +.. table:: **Table 7** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 8** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +**Status code: 500** + +.. table:: **Table 9** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 10** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +Example Requests +---------------- + +None + +Example Responses +----------------- + +**Status code: 400** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0001", + "errMsg" : "parameter error" + } + +**Status code: 500** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0005", + "errMsg" : "Internal server error" + } + +Status Codes +------------ + +=========== ============== +Status Code Description +=========== ============== +200 Success +400 Error response +500 Error response +=========== ============== + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/index.rst b/api-ref/source/sfs_turbo_apis/index.rst index 85ebf9e..3a4a6a5 100644 --- a/api-ref/source/sfs_turbo_apis/index.rst +++ b/api-ref/source/sfs_turbo_apis/index.rst @@ -9,8 +9,10 @@ SFS Turbo APIs - :ref:`Connection Management ` - :ref:`Tag Management ` - :ref:`Name Management ` +- :ref:`File System Management ` - :ref:`Permissions Management ` - :ref:`Task Management ` +- :ref:`Tenant Quota Management ` .. toctree:: :maxdepth: 1 @@ -20,5 +22,7 @@ SFS Turbo APIs connection_management/index tag_management/index name_management/index + file_system_management/index permissions_management/index task_management/index + tenant_quota_management/index diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/creating_a_file_system.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/creating_a_file_system.rst index 31055da..cf8b4f1 100644 --- a/api-ref/source/sfs_turbo_apis/lifecycle_management/creating_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/lifecycle_management/creating_a_file_system.rst @@ -17,71 +17,77 @@ POST /v1/{project_id}/sfs-turbo/shares .. table:: **Table 1** Path Parameters - ========== ========= ====== =========== + ========== ========= ====== =============== Parameter Mandatory Type Description - ========== ========= ====== =========== - project_id Yes String Project ID - ========== ========= ====== =========== + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------+-----------+--------------------------------------------------+-----------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===========+===========+==================================================+=========================================+ - | share | Yes | :ref:`Share ` object | Request body for creating a file system | - +-----------+-----------+--------------------------------------------------+-----------------------------------------+ + +-----------+-----------+--------------------------------------------------+--------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+==================================================+============================================+ + | share | Yes | :ref:`Share ` object | The parameters for creating a file system. | + +-----------+-----------+--------------------------------------------------+--------------------------------------------+ .. _createshare__request_share: .. table:: **Table 4** Share - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===================+=================+========================================================================+==========================================================================================================================================================================================================================================================================================================================+ - | availability_zone | Yes | String | Code of the AZ where the file system is located. For details about the code, see section "Regions and Endpoints." | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | description | No | String | Description of the file system, which can contain 0 to 255 characters. This parameter is not supported by the current version. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | metadata | No | :ref:`Metadata ` object | Metadata of the file system. The value consists of key and value pairs as a directory of strings. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | Yes | String | Name of the SFS Turbo file system. The name contains 4 to 64 characters and must start with a letter. It can contain letters (case insensitive), digits, hyphens (-), and underscores (_), and cannot contain other special characters. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | security_group_id | Yes | String | Security group ID of a tenant in a region. You can obtain the security group ID from the console or by following the instructions provided in section "Querying Security Groups" in *Virtual Private Cloud API Reference*. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_proto | Yes | String | File sharing protocol. The valid value is **NFS**. Network File System (NFS) is a distributed file system protocol that allows different computers and operating systems to share data over a network. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_type | Yes | String | File system type. Valid values are **STANDARD** and **PERFORMANCE**. This field is not returned when the file system is being created. | - | | | | | - | | | | - For a previous-generation SFS Turbo file system, specify **STANDARD** for a Standard or Standard - Enhanced file system, and **PERFORMANCE** for a Performance or Performance - Enhanced file system. | - | | | | - For a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system, this field is not verified. Specify either **STANDARD** or **PERFORMANCE**. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | size | Yes | Integer | - SFS Turbo previous-generation file system specifications-file system capacity: The value ranges from 500 to 32768, in GiB. | - | | | | - For an SFS Turbo Enhanced file system, if expand_type is set to bandwidth in the metadata field, the capacity ranges from 10240 to 327680, in GiB. | - | | | | - 20MB/s/TiB: If expand_type is set to hpc and hpc_bw is set to 20M in the metadata field, the capacity ranges from 3686 to 1048576, in GiB. The capacity must be a multiple of 1.2 TiB. The value must be rounded down after being converted to GiB. For example, 3.6TiB->3686GiB, 4.8TiB->4915GiB, 8.4TiB->8601GiB. | - | | | | - 40MB/s/TiB: If expand_type is set to hpc and hpc_bw is set to 40M in the metadata field, the capacity ranges from 1228 to 1048576, in GiB. The capacity must be a multiple of 1.2 TiB. The value must be rounded down after being converted to GiB. For example, 3.6TiB->3686GiB, 4.8TiB->4915GiB, 8.4TiB->8601GiB. | - | | | | - 125MB/s/TiB: If expand_type is set to hpc and hpc_bw is set to 125M in the metadata field, the capacity ranges from 1228 to 1048576, in GiB. The capacity must be a multiple of 1.2 TiB. The value must be rounded down after being converted to GiB. For example, 3.6TiB->3686GiB, 4.8TiB->4915GiB, 8.4TiB->8601GiB. | - | | | | - 250MB/s/TiB: If expand_type is set to hpc and hpc_bw is set to 250M in the metadata field, the capacity ranges from 1228 to 1048576, in GiB. The capacity must be a multiple of 1.2 TiB. The value must be rounded down after being converted to GiB. For example, 3.6TiB->3686GiB, 4.8TiB->4915GiB, 8.4TiB->8601GiB. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | subnet_id | Yes | String | Subnet ID of a tenant in a VPC | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | vpc_id | Yes | String | VPC ID of a tenant in a region | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | backup_id | No | String | Backup ID. This parameter is mandatory if you create a file system from a backup. | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | tags | No | Array of :ref:`ResourceTag ` objects | Tag list | - +-------------------+-----------------+------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===================+=================+========================================================================+===============================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | availability_zone | Yes | String | The code of the AZ where the file system resides. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | description | No | String | The file system description. It can contain 0 to 255 characters. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | metadata | No | :ref:`Metadata ` object | The file system metadata. The value consists of one or multiple key-value pairs organized as a directory of strings. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | Yes | String | The file system name. The name can contain 4 to 64 characters and must start with a letter. It can contain letters (case insensitive), digits, hyphens (-), and underscores (_), and cannot contain other special characters. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | Yes | String | The security group ID of a tenant in a region. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_proto | Yes | String | - Network File System (NFS) is a distributed file system protocol that allows different computers and OSs to share data over a network. You are advised to use NFS file systems with Linux servers. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | Yes | String | The file system type. Valid values are **STANDARD** and **PERFORMANCE**. This field is not returned when the file system is being created. | + | | | | | + | | | | - For a previous-generation SFS Turbo file system, specify **STANDARD** for a Standard or Standard-Enhanced file system, and **PERFORMANCE** for a Performance or Performance-Enhanced file system. | + | | | | | + | | | | - For a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system, this field is not verified. Specify either **STANDARD** or **PERFORMANCE**. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | Yes | Integer | - For a previous-generation SFS Turbo file system, the capacity ranges from **500** to **32768**, in GiB. | + | | | | | + | | | | - For a previous-generation SFS Turbo file system with **expand_type="bandwidth"** configured under **metadata**, the capacity ranges from **10240** to **327680**, in GiB. | + | | | | | + | | | | - For a 20 MB/s/TiB file system with **expand_type="hpc"** and **hpc_bw="20M"** configured under **metadata**, the capacity ranges from \*\ *3686* to **1048576** (in GiB) and must be a multiple of 1.2 TiB. The desired capacity must be converted to GiB and rounded down to the nearest integer. For example, specify 3686 GiB for a 3.6 TiB file system, 4915 GiB for a 4.8 TiB file system, and 8601 GiB for an 8.4 TiB file system. | + | | | | | + | | | | - For a 40 MB/s/TiB file system with **expand_type="hpc"** and **hpc_bw="40M"** configured under **metadata**, the capacity ranges from \*\ *1228* to **1048576** (in GiB) and must be a multiple of 1.2 TiB. The desired capacity must be converted to GiB and rounded down to the nearest integer. For example, specify 3686 GiB for a 3.6 TiB file system, 4915 GiB for a 4.8 TiB file system, and 8601 GiB for an 8.4 TiB file system. | + | | | | | + | | | | - For a 125 MB/s/TiB file system with **expand_type="hpc"** and **hpc_bw="125M"** configured under **metadata**, the capacity ranges from \*\ *1228* to **1048576** (in GiB) and must be a multiple of 1.2 TiB. The desired capacity must be converted to GiB and rounded down to the nearest integer. For example, specify 3686 GiB for a 3.6 TiB file system, 4915 GiB for a 4.8 TiB file system, and 8601 GiB for an 8.4 TiB file system. | + | | | | | + | | | | - For a 250 MB/s/TiB file system with **expand_type="hpc"** and **hpc_bw="250M"** configured under **metadata**, the capacity ranges from \*\ *1228* to **1048576** (in GiB) and must be a multiple of 1.2 TiB. The desired capacity must be converted to GiB and rounded down to the nearest integer. For example, specify 3686 GiB for a 3.6 TiB file system, 4915 GiB for a 4.8 TiB file system, and 8601 GiB for an 8.4 TiB file system. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | Yes | String | The subnet ID of a tenant in a VPC. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | Yes | String | The VPC ID of a tenant in a region. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | backup_id | No | String | The backup ID. This parameter is mandatory if you create a file system from a backup. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | Array of :ref:`ResourceTag ` objects | The tag list. | + +-------------------+-----------------+------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _createshare__request_metadata: @@ -90,16 +96,17 @@ Request Parameters +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+=============================================================================================================================================================================+ - | crypt_key_id | No | String | ID of a KMS professional key. This parameter is used if you want to create an encrypted file system. | + | crypt_key_id | No | String | The ID of a KMS professional key, which is used to create an encrypted file system. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | expand_type | No | String | Extension type. This parameter is not returned when the file system is being created. | + | expand_type | No | String | The extension type. This parameter is not returned when the file system is being created. | | | | | | - | | | | This parameter is mandatory when you are creating an SFS Turbo 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, 20 MB/s/TiB, or Enhanced file system. | + | | | | Enumerated values: | | | | | | - | | | | - Specify **bandwidth** when you are creating a Standard - Enhanced or Performance - Enhanced file system. | - | | | | - Specify **hpc** when you are creating a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system. | + | | | | - **bandwidth**: Specify **bandwidth** when you are creating a Standard-Enhanced or Performance-Enhanced file system. | + | | | | | + | | | | - **hpc**: Specify **hpc** when you are creating a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | hpc_bw | No | String | File system bandwidth. | + | hpc_bw | No | String | The file system bandwidth. | | | | | | | | | | This parameter is mandatory when you are creating an SFS Turbo 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system. | | | | | | @@ -113,13 +120,13 @@ Request Parameters +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+==================================================================================================================================================================================================================================================================================================================+ - | key | Yes | String | Tag key. | + | key | Yes | String | The tag key. | | | | | | | | | | It can contain a maximum of 128 characters. | | | | | | | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | value | Yes | String | Tag value. | + | value | Yes | String | The tag value. | | | | | | | | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | | | | | | @@ -133,20 +140,32 @@ Response Parameters .. table:: **Table 7** Response body parameters - ========= ====== ========================================= - Parameter Type Description - ========= ====== ========================================= - id String ID of the created SFS Turbo file system - name String Name of the created SFS Turbo file system - status String Status of the SFS Turbo file system - ========= ====== ========================================= + +-----------------------+-----------------------+------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+================================================+ + | id | String | The ID of the created SFS Turbo file system. | + +-----------------------+-----------------------+------------------------------------------------+ + | name | String | The name of the created SFS Turbo file system. | + +-----------------------+-----------------------+------------------------------------------------+ + | status | String | The file system status. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **100**: creating | + | | | | + | | | - **200**: available | + | | | | + | | | - **303**: creation failed | + | | | | + | | | - **400**: deleted | + | | | | + | | | - **800**: frozen | + +-----------------------+-----------------------+------------------------------------------------+ Example Requests ---------------- -- Previous-generation SFS Turbo file system: - - This example creates an SFS Turbo Standard file system in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-test**, protocol type to NFS, capacity to 500 GB. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. +- Previous-generation SFS Turbo file system type: .. code-block:: text @@ -167,8 +186,6 @@ Example Requests - 125 MB/s/TiB: - This example creates an SFS Turbo 125 MB/s/TiB file system in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-test**, protocol type to NFS, capacity to 3686 GB. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. - .. code-block:: text POST HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares @@ -190,12 +207,24 @@ Example Requests } } +This example creates an SFS Turbo Standard file system in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-test**, protocol type to NFS, capacity to 500 GB. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. + +This example creates an SFS Turbo Standard file system in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-dedicated-test**, protocol type to NFS, capacity to 500 GB. The dedicated storage pool ID is **198f0704-xxx-4d85-xxx-c25caa4d3264**, the dedicated ECS flavor is **c6.xlarge.2**, the security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. + +This example creates a 125 MB/s/TiB file system in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-test**, protocol type to **NFS**, and capacity to **3686GB**. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. + +This example creates a 125 MB/s/TiB file system in the AZ whose AZ code is **example**, with secure transmission enabled, the file system name set to **sfs-turbo-test**, protocol type to **NFS**, and capacity to **3686GB**. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. + +This example creates a 125 MB/s/TiB for Intelligent Compute file system in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-test**, protocol type to **NFS**, and capacity to **61440GB**. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. + +This example creates an SFS Turbo file system with cross-AZ DR deployment in the AZ whose AZ code is **example**, with the file system name set to **sfs-turbo-test**, protocol type to **NFS**, and capacity to **61440GB**. The security group ID is **8c4ebbd0-6edf-4aae-8353-xxx**, the subnet ID is **b8884abe-f47b-4917-9f6c-xxx**, and the VPC ID is **d651ea2b-2b20-4c6d-8bbf-xxx**. + Example Responses ----------------- **Status code: 202** -Response body for creating a file system +Successful file system creation .. code-block:: @@ -208,11 +237,11 @@ Response body for creating a file system Status Codes ------------ -=========== ======================================== +=========== =============================== Status Code Description -=========== ======================================== -202 Response body for creating a file system -=========== ======================================== +=========== =============================== +202 Successful file system creation +=========== =============================== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/deleting_a_file_system.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/deleting_a_file_system.rst index 6c0fcf2..78d7860 100644 --- a/api-ref/source/sfs_turbo_apis/lifecycle_management/deleting_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/lifecycle_management/deleting_a_file_system.rst @@ -17,28 +17,32 @@ DELETE /v1/{project_id}/sfs-turbo/shares/{share_id} .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- +**Status code: 202** + +File system deletion request delivered + None Example Requests @@ -58,11 +62,11 @@ None Status Codes ------------ -=========== ======================================= +=========== ====================================== Status Code Description -=========== ======================================= -202 File system deletion request delivered. -=========== ======================================= +=========== ====================================== +202 File system deletion request delivered +=========== ====================================== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/expanding_the_capacity_of_a_file_system.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/expanding_the_capacity_of_a_file_system.rst index c5742f9..6e965d7 100644 --- a/api-ref/source/sfs_turbo_apis/lifecycle_management/expanding_the_capacity_of_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/lifecycle_management/expanding_the_capacity_of_a_file_system.rst @@ -17,52 +17,52 @@ POST /v1/{project_id}/sfs-turbo/shares/{share_id}/action .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------+-----------+----------------------------------------------------+----------------------+ - | Parameter | Mandatory | Type | Description | - +===========+===========+====================================================+======================+ - | extend | Yes | :ref:`Extend ` object | Object of **extend** | - +-----------+-----------+----------------------------------------------------+----------------------+ + +-----------+-----------+----------------------------------------------------+------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+====================================================+========================+ + | extend | Yes | :ref:`Extend ` object | The **extend** object. | + +-----------+-----------+----------------------------------------------------+------------------------+ .. _expandshare__request_extend: .. table:: **Table 4** Extend - +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=================+=================+=================+=============================================================================================================================================================================================================================================================================================================+ - | new_size | Yes | Integer | New capacity of the file system after expansion, in GiB. | - | | | | | - | | | | The value ranges from 500 GiB to 32768 GiB, and the capacity expansion step is greater than or equal to 100 GiB. | - | | | | | - | | | | Specifications of the previous-generation SFS Turbo file system: Standard Enhanced and Performance Enhanced. The capacity ranges from 10240 GiB to 327680 GiB. The capacity expansion step is greater than or equal to 100 GiB. | - | | | | | - | | | | 20 MB/s/TiB. The capacity ranges from 3686 GiB to 1048576 GiB. The capacity must be a multiple of 1.2 TiB, and the capacity expansion step must be greater than or equal to 1.2 TiB. The target capacity must be converted to GiB and then rounded down. For example, 4.8 TiB->4915 GiB, 8.4 TiB->8601 GiB. | - | | | | | - | | | | 40 MB/s/TiB. The capacity ranges from 1228 GiB to 1048576 GiB. The capacity must be a multiple of 1.2 TiB, and the capacity expansion step must be greater than or equal to 1.2 TiB. The target capacity must be converted to GiB and then rounded down. For example, 4.8 TiB->4915 GiB, 8.4 TiB->8601 GiB. | - | | | | | - | | | | 125 MB/s/TiB, 250 MB/s/TiB and 40 MB/s/TiB, the expansion steps are the same. | - +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=============================================================================================================================================================================================================================================================================================================================================================+ + | new_size | Yes | Integer | The new capacity of the file system, in GiB. | + | | | | | + | | | | For a previous-generation Standard or Performance file system, the capacity ranges from **500** to **32768** (in GiB), and the minimum expansion increment is 100 GiB. | + | | | | | + | | | | For a previous-generation Standard-Enhanced or Performance-Enhanced file system, the capacity ranges from **10240** to **327680** (in GiB), and the minimum expansion increment is 100 GiB. | + | | | | | + | | | | For a 20 MB/s/TiB file system, the capacity ranges from **3686** to **1048576** (in GiB) and must be a multiple of 1.2 TiB. The desired capacity must be converted to GiB and rounded down to the nearest integer. For example, use 4915 GiB for a 4.8 TiB file system and 8601 GiB for an 8.4 TiB file system. The minimum expansion increment is 1.2 TiB. | + | | | | | + | | | | For a 40 MB/s/TiB file system, the capacity ranges from **1228** to **1048576** (in GiB) and must be a multiple of 1.2 TiB. The desired capacity must be converted to GiB and rounded down to the nearest integer. For example, use 4915 GiB for a 4.8 TiB file system and 8601 GiB for an 8.4 TiB file system. The minimum expansion increment is 1.2 TiB. | + | | | | | + | | | | The capacity range and minimum expansion increment of 250 MB/s/TiB and 125 MB/s/TiB file systems are the same as those of 40 MB/s/TiB file systems. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Response Parameters ------------------- @@ -71,12 +71,12 @@ Response Parameters .. table:: **Table 5** Response body parameters - ========= ====== ================================= + ========= ====== =============================== Parameter Type Description - ========= ====== ================================= - id String ID of the SFS Turbo file system - name String Name of the SFS Turbo file system - ========= ====== ================================= + ========= ====== =============================== + id String The SFS Turbo file system ID. + name String The SFS Turbo file system name. + ========= ====== =============================== Example Requests ---------------- diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/index.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/index.rst index 5f95f56..af2574f 100644 --- a/api-ref/source/sfs_turbo_apis/lifecycle_management/index.rst +++ b/api-ref/source/sfs_turbo_apis/lifecycle_management/index.rst @@ -8,7 +8,7 @@ Lifecycle Management - :ref:`Creating a File System ` - :ref:`Querying Details About a File System ` - :ref:`Deleting a File System ` -- :ref:`Obtaining the File System List ` +- :ref:`Listing File Systems ` - :ref:`Expanding the Capacity of a File System ` .. toctree:: @@ -18,5 +18,5 @@ Lifecycle Management creating_a_file_system querying_details_about_a_file_system deleting_a_file_system - obtaining_the_file_system_list + listing_file_systems expanding_the_capacity_of_a_file_system diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/listing_file_systems.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/listing_file_systems.rst new file mode 100644 index 0000000..7e95bbf --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/lifecycle_management/listing_file_systems.rst @@ -0,0 +1,329 @@ +:original_name: ListShares.html + +.. _ListShares: + +Listing File Systems +==================== + +Function +-------- + +This API is used to list file systems. + +URI +--- + +GET /v1/{project_id}/sfs-turbo/shares/detail + +.. table:: **Table 1** Path Parameters + + ========== ========= ====== =============== + Parameter Mandatory Type Description + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== + +.. table:: **Table 2** Query Parameters + + +-----------+-----------+---------+---------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+=========+=============================================================================================+ + | limit | No | Integer | The maximum number of returned file systems. If not specified, **1000** is used by default. | + +-----------+-----------+---------+---------------------------------------------------------------------------------------------+ + | offset | No | Integer | The offset of the returned file systems. | + +-----------+-----------+---------+---------------------------------------------------------------------------------------------+ + +Request Parameters +------------------ + +.. table:: **Table 3** Request header parameters + + ============ ========= ====== ================== + Parameter Mandatory Type Description + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 4** Response body parameters + + +-----------+--------------------------------------------------------------------+---------------------------------------+ + | Parameter | Type | Description | + +===========+====================================================================+=======================================+ + | shares | Array of :ref:`ShareInfo ` objects | The list of SFS Turbo file systems. | + +-----------+--------------------------------------------------------------------+---------------------------------------+ + | count | Integer | The number of SFS Turbo file systems. | + +-----------+--------------------------------------------------------------------+---------------------------------------+ + +.. _listshares__response_shareinfo: + +.. table:: **Table 5** ShareInfo + + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+==========================================================================+==========================================================================================================================================================+ + | action_progress | :ref:`ActionProgress ` object | The file system creation progress. This field is only returned when the file system is being created. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | version | String | The file system version. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | avail_capacity | String | The available capacity of the file system, in GB. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | The code of the AZ where the file system resides. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | az_name | String | The name of the AZ where the file system resides. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | The time when the file system was created. UTC time, for example: 2018-11-19T04:02:03. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | crypt_key_id | String | The ID of the encryption key. This parameter is not returned for non-encrypted file systems. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | expand_type | String | The extension type. | + | | | | + | | | **bandwidth** is returned if the requested file system is an Enhanced file system. | + | | | | + | | | For a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system, **hpc** is returned. | + | | | | + | | | The value can be: | + | | | | + | | | - bandwidth | + | | | | + | | | - hpc | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | export_location | String | The file system location, for example, **192.168.0.90:/**. This field is not returned when the file system is being created. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | The file system ID. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | The file system name specified during creation. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | pay_model | String | The file system billing mode. Value **0** indicates pay-per-use. This field is not returned when the file system is being created. | + | | | | + | | | Enumeration values: | + | | | | + | | | - **0** | + | | | | + | | | - **1** | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | region | String | The region where the file system resides. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | The ID of the specified security group. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_proto | String | The protocol used by the SFS Turbo file system. The value can be **NFS**. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | The file system performance type. Valid values are **STANDARD** and **PERFORMANCE**. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | String | The file system total capacity, in GB. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | The file system status. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **100**: creating | + | | | | + | | | - **200**: available | + | | | | + | | | - **303**: creation failed | + | | | | + | | | - **400**: deleted | + | | | | + | | | - **800**: frozen | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | sub_status | String | The file system sub-status. This field is not returned if no modification is made to the file system. | + | | | | + | | | **121** (expanding capacity), **132** (changing security group), *150*\ \* (adding storage backend), **151** (removing storage backend) | + | | | | + | | | **221** (expansion succeeded), **232** (security group changed), **250** (storage backend added), *251*\ \* (storage backend removed) | + | | | | + | | | **321** (expansion failed), **332** (changing security group failed), **350** (adding storage backend failed), **351** (removing storage backend failed) | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | The ID of the specified subnet. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | The ID of the specified VPC. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | The ID of the enterprise project that file system is added to. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`ResourceTag ` objects | The tag list. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | optional_endpoint | String | The alternative IP addresses that can be used for mount. This field is not returned for previous-generation file systems. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | hpc_bw | String | The file system bandwidth. | + | | | | + | | | - "20M": 20 MB/s/TiB | + | | | | + | | | - "40M": 40 MB/s/TiB | + | | | | + | | | - "125M": 125 MB/s/TiB | + | | | | + | | | - "250M": 250 MB/s/TiB | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instanceId | String | The node ID of the file system type, which has no meaning. This is a reserved field. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instanceType | String | The node type of the file system type, which has no meaning. This is a reserved field. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | statusDetail | String | The file system request ID, which has no meaning. This is a reserved field. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | features | :ref:`ShareInfoFeatures ` object | The file system feature settings. | + +-----------------------+--------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _listshares__response_actionprogress: + +.. table:: **Table 6** ActionProgress + + ========= ====== ================================== + Parameter Type Description + ========= ====== ================================== + CREATING String The file system creation progress. + ========= ====== ================================== + +.. _listshares__response_resourcetag: + +.. table:: **Table 7** ResourceTag + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==================================================================================================================================================================================================================================================================================================================+ + | key | String | The tag key. | + | | | | + | | | It can contain a maximum of 128 characters. | + | | | | + | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | String | The tag value. | + | | | | + | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | + | | | | + | | | It cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _listshares__response_shareinfofeatures: + +.. table:: **Table 8** ShareInfoFeatures + + +-----------+------------------------------------------------------------------------+------------------------------------------+ + | Parameter | Type | Description | + +===========+========================================================================+==========================================+ + | backup | :ref:`ShareInfoFeature ` object | Whether the file system supports backup. | + +-----------+------------------------------------------------------------------------+------------------------------------------+ + +.. _listshares__response_shareinfofeature: + +.. table:: **Table 9** ShareInfoFeature + + ========== ======= ============================================== + Parameter Type Description + ========== ======= ============================================== + is_support Boolean Whether the file system supports this feature. + message String The message. + msg_code String The message code. + ========== ======= ============================================== + +Example Requests +---------------- + +Listing file systems in the project whose ID is **e1e45b08f3ea4480ab4655ef9c7160ba** + +.. code-block:: text + + GET HTTPS://{endpoint}/v1/e1e45b08f3ea4480ab4655ef9c7160ba/sfs-turbo/shares/detail + +Example Responses +----------------- + +**Status code: 200** + +Success response body + +- Listing file systems in the project whose ID is **e1e45b08f3ea4480ab4655ef9c7160ba** + + .. code-block:: + + { + "shares" : [ { + "id" : "8fba8253-c914-439d-ae8b-d5c89d0bf5e8", + "name" : "sfs-turbo-8468", + "status" : "100", + "version" : "1.0.0", + "region" : "example", + "created_at" : "2018-11-19T04:02:03", + "share_type" : "STANDARD", + "sub_status" : "", + "availability_zone" : "az1.dc1", + "az_name" : "az1", + "vpc_id" : "b24e39e1-bc0c-475b-ae0c-aef9cf240af3", + "subnet_id" : "86fc01ea-8ec8-409d-ba7a-e0ea16d4fd97", + "security_group_id" : "50586458-aec9-442c-bb13-e08ddc6f1b7a", + "size" : "500.00", + "pay_model" : "0", + "avail_capacity" : "500.00", + "share_proto" : "NFS", + "export_location" : "192.168.1.102:/", + "optional_endpoint" : "192.168.1.102 192.168.1.232", + "instanceId" : "34d65df8-342f-49fb-ac1a-60f686ca437c", + "statusDetail" : "d120c389861619e7580a12cab74f6a22", + "instanceType" : "efs-ha", + "enterprise_project_id" : "0", + "features" : { + "backup" : { + "is_support" : true + } + } + } ], + "count" : 1 + } + +- Listing file systems in the project whose ID is **5694xxx8f3e0000xxxx655exxxxx60b7** + + .. code-block:: + + { + "shares" : [ { + "id" : "65f2d30b-7b4e-4786-9608-4324faef6646", + "name" : "sfs-turbo-df12", + "status" : "200", + "version" : "1.0.0", + "region" : "example", + "created_at" : "2018-11-15T02:32:10", + "export_location" : "65f2d30b-7b4e-4786-9608-4324faef6646.sfsturbo.internal:/", + "optional_endpoint" : "192.168.1.195 192.168.1.45 192.168.1.201 192.168.1.119 192.168.1.115 192.168.1.150 192.168.1.107 192.168.1.35 192.168.1.123 192.168.1.153 192.168.1.252 192.168.1.7 192.168.1.40 192.168.1.62 192.168.1.23 192.168.1.76 192.168.1.204 192.168.1.178 192.168.1.28 192.168.1.145", + "share_type" : "HPC_PERFORMANCE_250M", + "expand_type" : "hpc", + "sub_status" : "", + "availability_zone" : "az1.dc1", + "az_name" : "az1", + "vpc_id" : "b24e39e1-bc0c-475b-ae0c-aef9cf240af3", + "subnet_id" : "86fc01ea-8ec8-409d-ba7a-e0ea16d4fd97", + "security_group_id" : "50586458-aec9-442c-bb13-e08ddc6f1b7a", + "size" : "3686.00", + "pay_model" : "0", + "avail_capacity" : "3686.00", + "share_proto" : "NFS", + "instanceId" : "897e198d-6ba0-44c6-9104-dc5f915c1fbd", + "statusDetail" : "c4935f83562f49129faf4455b83bfb34", + "instanceType" : "sfs-turbo-hpc", + "enterprise_project_id" : "0", + "hpc_bw" : "125M", + "features" : { + "backup" : { + "is_support" : true + } + } + } ], + "count" : 1 + } + +Status Codes +------------ + +=========== ===================== +Status Code Description +=========== ===================== +200 Success response body +=========== ===================== + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/obtaining_the_file_system_list.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/obtaining_the_file_system_list.rst deleted file mode 100644 index 34e0f1e..0000000 --- a/api-ref/source/sfs_turbo_apis/lifecycle_management/obtaining_the_file_system_list.rst +++ /dev/null @@ -1,244 +0,0 @@ -:original_name: ListShares.html - -.. _ListShares: - -Obtaining the File System List -============================== - -Function --------- - -This API is used to obtain the file system list. - -URI ---- - -GET /v1/{project_id}/sfs-turbo/shares/detail - -.. table:: **Table 1** Path Parameters - - ========== ========= ====== =========== - Parameter Mandatory Type Description - ========== ========= ====== =========== - project_id Yes String Project ID - ========== ========= ====== =========== - -.. table:: **Table 2** Query Parameters - - +-----------+-----------+------+----------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===========+===========+======+============================================================================================================================+ - | limit | No | Long | Specifies the maximum number of returned file systems. If this parameter is not specified, the default value 1000 is used. | - +-----------+-----------+------+----------------------------------------------------------------------------------------------------------------------------+ - | offset | No | Long | Sets the offset of the returned file system. | - +-----------+-----------+------+----------------------------------------------------------------------------------------------------------------------------+ - -Request Parameters ------------------- - -.. table:: **Table 3** Request header parameters - - ============ ========= ====== ============= - Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= - -Response Parameters -------------------- - -**Status code: 200** - -.. table:: **Table 4** Response body parameters - - +-----------+--------------------------------------------------------------------+----------------------------------+ - | Parameter | Type | Description | - +===========+====================================================================+==================================+ - | shares | Array of :ref:`ShareInfo ` objects | List of SFS Turbo file systems | - +-----------+--------------------------------------------------------------------+----------------------------------+ - | count | Integer | Number of SFS Turbo file systems | - +-----------+--------------------------------------------------------------------+----------------------------------+ - -.. _listshares__response_shareinfo: - -.. table:: **Table 5** ShareInfo - - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+==========================================================================+==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ - | action_progress | :ref:`ActionProgress ` object | Creation progress of the SFS Turbo file system. This field is only returned when the file system is being created. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | version | String | Version of the SFS Turbo file system | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | avail_capacity | String | Available capacity of the SFS Turbo file system, in GB | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone | String | Code of the AZ where the SFS Turbo file system resides | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | az_name | String | Name of the AZ where the SFS Turbo file system resides | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | created_at | String | Time when the file system was created. UTC time, for example: 2018-11-19T04:02:03 | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | crypt_key_id | String | ID of the encryption key specified by the user. This parameter is not returned for non-encrypted file systems. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | expand_type | String | For an Enhanced file system, **bandwidth** is returned. For a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system, **hpc** is returned. For other types of file systems, this field is not returned. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | export_location | String | Location where the SFS Turbo file system is mounted For example, 192.168.0.90:/. If the file system is being created, this parameter is not returned. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | id | String | ID of the SFS Turbo file system | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | String | Name of the SFS Turbo file system specified during creation | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | pay_model | String | Billing mode of the SFS Turbo file system. '0' indicates pay-per-use. If the file system is being created, this parameter is not returned. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | region | String | Region where the SFS Turbo file system resides | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | security_group_id | String | ID of the security group specified by the user | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_proto | String | Protocol used by the SFS Turbo file system. The valid value is **NFS**. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_type | String | Storage class of the SFS Turbo file system. Valid values are **STANDARD** and **PERFORMANCE**. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | size | String | Total capacity of the SFS Turbo file system, in GB | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | status | String | SFS Turbo file system status. The value can be as follows: **100** (creating), **200** (available), **303** (creation failed), and **800** (frozen) | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | sub_status | String | Sub-status of the SFS Turbo file system. The value can be as follows: This field is not returned if no modification is made to the file system. **121** (expanding capacity), **132** (changing security group), **137** (adding authorized VPC), **138** (removing authorized VPC) **221** (expansion succeeded), **232** (security group changed), **237** (authorized VPC added), **238** (authorized VPC removed) **321** (expansion failed), **332** (changing security group failed), **337** (adding authorized VPC failed), **338** (removing authorized VPC failed) | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | subnet_id | String | ID of the subnet specified by the user | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | vpc_id | String | ID of the VPC specified by the user | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | tags | Array of :ref:`ResourceTag ` objects | Tag list | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | optional_endpoint | String | Alternative IP addresses that can be used for mounting. This field is not returned for previous-generation file systems. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | hpc_bw | String | File system bandwidth. | - | | | | - | | | - "20M": 20 MB/s/TiB | - | | | | - | | | - "40M": 40 MB/s/TiB | - | | | | - | | | - "125M": 125 MB/s/TiB | - | | | | - | | | - "250M": 250 MB/s/TiB | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | instanceId | String | Node ID of the file system type. This is a reserved field. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | instanceType | String | Node type of the file system type. This is a reserved field. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | statusDetail | String | Request ID of the file system. This is a reserved field. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | features | :ref:`ShareInfoFeatures ` object | Whether backup is supported for SFS turbo file systems. | - +-----------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -.. _listshares__response_actionprogress: - -.. table:: **Table 6** ActionProgress - - ========= ====== ============================= - Parameter Type Description - ========= ====== ============================= - CREATING String File system creation progress - ========= ====== ============================= - -.. _listshares__response_resourcetag: - -.. table:: **Table 7** ResourceTag - - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=======================+==================================================================================================================================================================================================================================================================================================================+ - | key | String | Tag key. | - | | | | - | | | It can contain a maximum of 128 characters. | - | | | | - | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | value | String | Tag value. | - | | | | - | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | - | | | | - | | | It cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | - +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -.. _listshares__response_shareinfofeatures: - -.. table:: **Table 8** ShareInfoFeatures - - +-----------+------------------------------------------------------------------------+----------------------------------------------------+ - | Parameter | Type | Description | - +===========+========================================================================+====================================================+ - | backup | :ref:`ShareInfoFeature ` object | Whether the SFS Turbo file system supports backup. | - +-----------+------------------------------------------------------------------------+----------------------------------------------------+ - -.. _listshares__response_shareinfofeature: - -.. table:: **Table 9** ShareInfoFeature - - +------------+---------+--------------------------------------------------------------------------+ - | Parameter | Type | Description | - +============+=========+==========================================================================+ - | is_support | Boolean | Whether the file system supports this feature. | - +------------+---------+--------------------------------------------------------------------------+ - | message | String | Message about whether the file system supports this feature. | - +------------+---------+--------------------------------------------------------------------------+ - | msg_code | String | Code of the message about whether the file system supports this feature. | - +------------+---------+--------------------------------------------------------------------------+ - -Example Requests ----------------- - -Querying file systems in the project whose ID **e1e45b08f3ea4480ab4655ef9c7160ba** - -.. code-block:: text - - GET HTTPS://{endpoint}/v1/e1e45b08f3ea4480ab4655ef9c7160ba/sfs-turbo/shares/detail - -Example Responses ------------------ - -**Status code: 200** - -Response body for querying the file system list - -.. code-block:: - - { - "shares" : [ { - "id" : "8fba8253-c914-439d-ae8b-d5c89d0bf5e8", - "name" : "sfs-turbo-8468", - "status" : "100", - "version" : "1.0.0", - "region" : "example", - "created_at" : "2018-11-19T04:02:03", - "action_progress" : { - "CREATING" : "22%" - }, - "share_type" : "STANDARD", - "sub_status" : "", - "availability_zone" : "az1.dc1", - "az_name" : "az1", - "vpc_id" : "b24e39e1-bc0c-475b-ae0c-aef9cf240af3", - "subnet_id" : "86fc01ea-8ec8-409d-ba7a-e0ea16d4fd97", - "security_group_id" : "50586458-aec9-442c-bb13-e08ddc6f1b7a", - "size" : "500.00", - "pay_model" : "0", - "avail_capacity" : "500.00", - "share_proto" : "NFS" - } ] - } - -Status Codes ------------- - -=========== =============================================== -Status Code Description -=========== =============================================== -200 Response body for querying the file system list -=========== =============================================== - -Error Codes ------------ - -See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/lifecycle_management/querying_details_about_a_file_system.rst b/api-ref/source/sfs_turbo_apis/lifecycle_management/querying_details_about_a_file_system.rst index 6e28d17..38121f5 100644 --- a/api-ref/source/sfs_turbo_apis/lifecycle_management/querying_details_about_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/lifecycle_management/querying_details_about_a_file_system.rst @@ -17,24 +17,24 @@ GET /v1/{project_id}/sfs-turbo/shares/{share_id} .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- @@ -43,83 +43,119 @@ Response Parameters .. table:: **Table 3** Response body parameters - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=========================================================================+==============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ - | action_progress | :ref:`ActionProgress ` object | Creation progress of the SFS Turbo file system. This field is only returned when the file system is being created. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | version | String | Version of the SFS Turbo file system | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | avail_capacity | String | Available capacity of the SFS Turbo file system, in GB | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | availability_zone | String | Code of the AZ where the SFS Turbo file system resides | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | az_name | String | Name of the AZ where the SFS Turbo file system resides | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | created_at | String | Time when the file system was created. UTC time, for example: 2018-11-19T04:02:03 | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | crypt_key_id | String | ID of the encryption key specified by the user. This parameter is not returned for non-encrypted file systems. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | expand_type | String | For an Enhanced file system, **bandwidth** is returned. For a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system, **hpc** is returned. For other types of file systems, this field is not returned. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | export_location | String | Location where the SFS Turbo file system is mounted For example, 192.168.0.90:/. If the file system is being created, this parameter is not returned. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | id | String | ID of the SFS Turbo file system | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | name | String | Name of the SFS Turbo file system specified during creation | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | pay_model | String | Billing mode of the SFS Turbo file system. '0' indicates pay-per-use. If the file system is being created, this parameter is not returned. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | region | String | Region where the SFS Turbo file system resides | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | security_group_id | String | ID of the security group specified by the user | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_proto | String | Protocol used by the SFS Turbo file system. The valid value is **NFS**. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_type | String | Storage class of the SFS Turbo file system. Valid values are **STANDARD** and **PERFORMANCE**. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | size | String | Total capacity of the SFS Turbo file system, in GB | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | status | String | SFS Turbo file system status. The value can be as follows: **100** (creating), **200** (available), **303** (creation failed), and **800** (frozen) | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | sub_status | String | Sub-status of the SFS Turbo file system. The value can be as follows: This field is not returned if no modification is made to the file system. **121** (expanding capacity), **132** (changing security group), **137** (adding authorized VPC), **138** (removing authorized VPC) **221** (expansion succeeded), **232** (security group changed), **237** (authorized VPC added), **238** (authorized VPC removed) **321** (expansion failed), **332** (changing security group failed), **337** (adding authorized VPC failed), **338** (removing authorized VPC failed) | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | subnet_id | String | ID of the subnet specified by the user | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | vpc_id | String | ID of the VPC specified by the user | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | tags | Array of :ref:`ResourceTag ` objects | Tag list | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | optional_endpoint | String | Alternative IP addresses that can be used for mounting. This field is not returned for previous-generation file systems. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | hpc_bw | String | File system bandwidth. | - | | | | - | | | - "20M": 20 MB/s/TiB | - | | | | - | | | - "40M": 40 MB/s/TiB | - | | | | - | | | - "125M": 125 MB/s/TiB | - | | | | - | | | - "250M": 250 MB/s/TiB | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | instanceId | String | Node ID of the file system type. This is a reserved field. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | instanceType | String | Node type of the file system type. This is a reserved field. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | statusDetail | String | Request ID of the file system. This is a reserved field. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | features | :ref:`ShareInfoFeatures ` object | Whether backup is supported for SFS turbo file systems. | - +-----------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=========================================================================+==========================================================================================================================================================+ + | action_progress | :ref:`ActionProgress ` object | The file system creation progress. This field is only returned when the file system is being created. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | version | String | The file system version. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | avail_capacity | String | The available capacity of the file system, in GB. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | availability_zone | String | The code of the AZ where the file system resides. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | az_name | String | The name of the AZ where the file system resides. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | created_at | String | The time when the file system was created. UTC time, for example: 2018-11-19T04:02:03. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | crypt_key_id | String | The ID of the encryption key. This parameter is not returned for non-encrypted file systems. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | expand_type | String | The extension type. | + | | | | + | | | **bandwidth** is returned if the requested file system is an Enhanced file system. | + | | | | + | | | For a 250 MB/s/TiB, 125 MB/s/TiB, 40 MB/s/TiB, or 20 MB/s/TiB file system, **hpc** is returned. | + | | | | + | | | The value can be: | + | | | | + | | | - bandwidth | + | | | | + | | | - hpc | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | export_location | String | The file system location, for example, **192.168.0.90:/**. This field is not returned when the file system is being created. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | id | String | The file system ID. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | name | String | The file system name specified during creation. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | pay_model | String | The file system billing mode. Value **0** indicates pay-per-use. This field is not returned when the file system is being created. | + | | | | + | | | Enumeration values: | + | | | | + | | | - **0** | + | | | | + | | | - **1** | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | region | String | The region where the file system resides. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | security_group_id | String | The ID of the specified security group. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_proto | String | The protocol used by the SFS Turbo file system. The value can be **NFS**. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | share_type | String | The file system performance type. Valid values are **STANDARD** and **PERFORMANCE**. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | size | String | The file system total capacity, in GB. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | status | String | The file system status. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **100**: creating | + | | | | + | | | - **200**: available | + | | | | + | | | - **303**: creation failed | + | | | | + | | | - **400**: deleted | + | | | | + | | | - **800**: frozen | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | sub_status | String | The file system sub-status. This field is not returned if no modification is made to the file system. | + | | | | + | | | **121** (expanding capacity), **132** (changing security group), *150*\ \* (adding storage backend), **151** (removing storage backend) | + | | | | + | | | **221** (expansion succeeded), **232** (security group changed), **250** (storage backend added), *251*\ \* (storage backend removed) | + | | | | + | | | **321** (expansion failed), **332** (changing security group failed), **350** (adding storage backend failed), **351** (removing storage backend failed) | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | subnet_id | String | The ID of the specified subnet. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | vpc_id | String | The ID of the specified VPC. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | enterprise_project_id | String | The ID of the enterprise project that file system is added to. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | Array of :ref:`ResourceTag ` objects | The tag list. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | optional_endpoint | String | The alternative IP addresses that can be used for mount. This field is not returned for previous-generation file systems. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | hpc_bw | String | The file system bandwidth. | + | | | | + | | | - "20M": 20 MB/s/TiB | + | | | | + | | | - "40M": 40 MB/s/TiB | + | | | | + | | | - "125M": 125 MB/s/TiB | + | | | | + | | | - "250M": 250 MB/s/TiB | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instanceId | String | The node ID of the file system type, which has no meaning. This is a reserved field. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | instanceType | String | The node type of the file system type, which has no meaning. This is a reserved field. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | statusDetail | String | The file system request ID, which has no meaning. This is a reserved field. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | features | :ref:`ShareInfoFeatures ` object | The file system feature settings. | + +-----------------------+-------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _showshare__response_actionprogress: .. table:: **Table 4** ActionProgress - ========= ====== ============================= + ========= ====== ================================== Parameter Type Description - ========= ====== ============================= - CREATING String File system creation progress - ========= ====== ============================= + ========= ====== ================================== + CREATING String The file system creation progress. + ========= ====== ================================== .. _showshare__response_resourcetag: @@ -128,13 +164,13 @@ Response Parameters +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+==================================================================================================================================================================================================================================================================================================================+ - | key | String | Tag key. | + | key | String | The tag key. | | | | | | | | It can contain a maximum of 128 characters. | | | | | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | value | String | Tag value. | + | value | String | The tag value. | | | | | | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | | | | | @@ -145,25 +181,23 @@ Response Parameters .. table:: **Table 6** ShareInfoFeatures - +-----------+-----------------------------------------------------------------------+----------------------------------------------------+ - | Parameter | Type | Description | - +===========+=======================================================================+====================================================+ - | backup | :ref:`ShareInfoFeature ` object | Whether the SFS Turbo file system supports backup. | - +-----------+-----------------------------------------------------------------------+----------------------------------------------------+ + +-----------+-----------------------------------------------------------------------+------------------------------------------+ + | Parameter | Type | Description | + +===========+=======================================================================+==========================================+ + | backup | :ref:`ShareInfoFeature ` object | Whether the file system supports backup. | + +-----------+-----------------------------------------------------------------------+------------------------------------------+ .. _showshare__response_shareinfofeature: .. table:: **Table 7** ShareInfoFeature - +------------+---------+--------------------------------------------------------------------------+ - | Parameter | Type | Description | - +============+=========+==========================================================================+ - | is_support | Boolean | Whether the file system supports this feature. | - +------------+---------+--------------------------------------------------------------------------+ - | message | String | Message about whether the file system supports this feature. | - +------------+---------+--------------------------------------------------------------------------+ - | msg_code | String | Code of the message about whether the file system supports this feature. | - +------------+---------+--------------------------------------------------------------------------+ + ========== ======= ============================================== + Parameter Type Description + ========== ======= ============================================== + is_support Boolean Whether the file system supports this feature. + message String The message. + msg_code String The message code. + ========== ======= ============================================== Example Requests ---------------- @@ -179,40 +213,51 @@ Example Responses **Status code: 200** -Response body for querying a file system - -.. code-block:: - - { - "id" : "8fba8253-c914-439d-ae8b-d5c89d0bf5e8", - "name" : "sfs-turbo-8468", - "status" : "200", - "version" : "1.0.0", - "region" : "example", - "availability_zone" : "example", - "az_name" : "example", - "created_at" : "2018-11-19T04:02:03", - "export_location" : "192.168.xx.xx:/", - "action_progress" : { }, - "share_type" : "STANDARD", - "sub_status" : "221", - "vpc_id" : "b24e39e1-bc0c-475b-ae0c-aef9cf240af3", - "subnet_id" : "86fc01ea-8ec8-409d-ba7a-e0ea16d4fd97", - "security_group_id" : "50586458-aec9-442c-bb13-e08ddc6f1b7a", - "size" : "600.00", - "avail_capacity" : "600.00", - "pay_model" : "0", - "share_proto" : "NFS" - } +Query response body + +- Listing file systems in the project whose ID is **e1e45b08f3ea4480ab4655ef9c7160ba** + + .. code-block:: + + { + "id" : "8fba8253-c914-439d-ae8b-d5c89d0bf5e8", + "name" : "sfs-turbo-8468", + "status" : "100", + "version" : "1.0.0", + "region" : "example", + "created_at" : "2018-11-19T04:02:03", + "share_type" : "STANDARD", + "sub_status" : "", + "availability_zone" : "az1.dc1", + "az_name" : "az1", + "vpc_id" : "b24e39e1-bc0c-475b-ae0c-aef9cf240af3", + "subnet_id" : "86fc01ea-8ec8-409d-ba7a-e0ea16d4fd97", + "security_group_id" : "50586458-aec9-442c-bb13-e08ddc6f1b7a", + "size" : "500.00", + "pay_model" : "0", + "avail_capacity" : "500.00", + "share_proto" : "NFS", + "export_location" : "192.168.1.102:/", + "optional_endpoint" : "192.168.1.102 192.168.1.232", + "instanceId" : "34d65df8-342f-49fb-ac1a-60f686ca437c", + "statusDetail" : "d120c389861619e7580a12cab74f6a22", + "instanceType" : "efs-ha", + "enterprise_project_id" : "0", + "features" : { + "backup" : { + "is_support" : true + } + } + } Status Codes ------------ -=========== ======================================== +=========== =================== Status Code Description -=========== ======================================== -200 Response body for querying a file system -=========== ======================================== +=========== =================== +200 Query response body +=========== =================== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/name_management/changing_the_name_of_a_file_system.rst b/api-ref/source/sfs_turbo_apis/name_management/changing_the_name_of_a_file_system.rst index 4f44542..6b7af6d 100644 --- a/api-ref/source/sfs_turbo_apis/name_management/changing_the_name_of_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/name_management/changing_the_name_of_a_file_system.rst @@ -8,7 +8,7 @@ Changing the Name of a File System Function -------- -This API is used to change the name of an SFS Turbo file system. +This API is used to change the name of a file system. URI --- @@ -17,46 +17,50 @@ POST /v1/{project_id}/sfs-turbo/shares/{share_id}/action .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-------------+-----------+--------------------------------------------------------------+--------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=============+===========+==============================================================+======================================+ - | change_name | Yes | :ref:`ShareName ` object | SFS Turbo file system to be modified | - +-------------+-----------+--------------------------------------------------------------+--------------------------------------+ + +-------------+-----------+--------------------------------------------------------------+---------------------------------+ + | Parameter | Mandatory | Type | Description | + +=============+===========+==============================================================+=================================+ + | change_name | Yes | :ref:`ShareName ` object | The file system to be modified. | + +-------------+-----------+--------------------------------------------------------------+---------------------------------+ .. _changesharename__request_sharename: .. table:: **Table 4** ShareName - +-----------+-----------+--------+--------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===========+===========+========+==================================================+ - | name | Yes | String | Name of the SFS Turbo file system to be modified | - +-----------+-----------+--------+--------------------------------------------------+ + ========= ========= ====== =========================================== + Parameter Mandatory Type Description + ========= ========= ====== =========================================== + name Yes String The name of the file system to be modified. + ========= ========= ====== =========================================== Response Parameters ------------------- +**Status code: 204** + +Successful request + None Example Requests @@ -80,14 +84,14 @@ None Status Codes ------------ -=========== ==================================== +=========== =============================== Status Code Description -=========== ==================================== -204 Request successful -400 Invalid parameter -409 The file system name already exists. +=========== =============================== +204 Successful request +400 Incorrect parameter +409 File system name already exists 500 Internal error -=========== ==================================== +=========== =============================== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/creating_a_permission_rule.rst b/api-ref/source/sfs_turbo_apis/permissions_management/creating_a_permission_rule.rst index ef7ba48..2b676ce 100644 --- a/api-ref/source/sfs_turbo_apis/permissions_management/creating_a_permission_rule.rst +++ b/api-ref/source/sfs_turbo_apis/permissions_management/creating_a_permission_rule.rst @@ -13,7 +13,9 @@ This API is used to create a permission rule. Constraints ----------- -A maximum of 64 permissions rules can be configured for a file system. +A maximum of 64 permission rules can be added for a file system. + +This API is only supported for NFS file systems. URI --- @@ -22,58 +24,58 @@ POST /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------+-----------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===========+===========+=================================================================================================+============================================================================+ - | rules | Yes | Array of :ref:`OnePermRuleRequestInfo ` objects | Permission rule details. A maximum of five rules can be created at a time. | - +-----------+-----------+-------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------+ + +-----------+-----------+-------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+=================================================================================================+=============================================================================+ + | rules | Yes | Array of :ref:`OnePermRuleRequestInfo ` objects | The permission rule details. You can add a maximum of five rules at a time. | + +-----------+-----------+-------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------+ .. _createpermrule__request_onepermrulerequestinfo: .. table:: **Table 4** OnePermRuleRequestInfo - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=================+=================+=================+================================================================================================================================================================================================================================================+ - | ip_cidr | No | String | IP address or IP address range of the object to be authorized. Once configured, this parameter cannot be modified. | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | rw_type | No | String | Read/write permission of the object to be authorized. | - | | | | | - | | | | - **rw**: read and write permission, which is the default option | - | | | | | - | | | | - **ro**: read-only permission | - | | | | | - | | | | - **none**: no permission | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | user_type | No | String | System user's permission to access the file system. The value can be any of the following: | - | | | | | - | | | | - no_root_squash: default option. The client uses any user, including the root user. The NFS server retains the user used by the client and does not map the user. | - | | | | | - | | | | - root_squash: When the client uses the root user, the user mapped to the NFS server is the NFS anonymous user (nfsnobody). If the client uses a non-root user, the NFS server retains the user used by the client and does not map the user. | - | | | | | - | | | | - all_squash: All users of clients that access the NFS server are mapped as anonymous users. | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+==========================================================================================================================================================================================================+ + | ip_cidr | Yes | String | The IP address or IP address range of the object to be authorized. Once configured, this parameter cannot be modified. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rw_type | Yes | String | The read/write permission of the object to be authorized. | + | | | | | + | | | | - **rw**: read and write permission, which is the default option | + | | | | | + | | | | - **ro**: read-only permission | + | | | | | + | | | | - **none**: no permission | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | user_type | Yes | String | The file system access permission granted to the user of the object to be authorized. The value can be: | + | | | | | + | | | | - **no_root_squash**: allows any user including root on the client to access the file system as who they are, instead of mapping them to another user. | + | | | | | + | | | | - **root_squash**: allows root on the client to access the file system as **nfsnobody**. Client access using a non-root user will be retained as who they are, instead of being mapped to another user. | + | | | | | + | | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. | + +-----------------+-----------------+-----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Response Parameters ------------------- @@ -82,78 +84,80 @@ Response Parameters .. table:: **Table 5** Response body parameters - +-----------+----------------------------------------------------------------------------------------------------+-------------------------+ - | Parameter | Type | Description | - +===========+====================================================================================================+=========================+ - | rules | Array of :ref:`OnePermRuleResponseInfo ` objects | Permission rule details | - +-----------+----------------------------------------------------------------------------------------------------+-------------------------+ + +-----------+----------------------------------------------------------------------------------------------------+----------------------------------+ + | Parameter | Type | Description | + +===========+====================================================================================================+==================================+ + | rules | Array of :ref:`OnePermRuleResponseInfo ` objects | The permission rule information. | + +-----------+----------------------------------------------------------------------------------------------------+----------------------------------+ .. _createpermrule__response_onepermruleresponseinfo: .. table:: **Table 6** OnePermRuleResponseInfo - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=======================+=======================================================================================================================+ - | id | String | Permission rule ID | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | ip_cidr | String | IP address or IP address range of the authorized object | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | rw_type | String | Read/write permission of the authorized object. | - | | | | - | | | - **rw**: read and write permission, which is the default option | - | | | | - | | | - **ro**: read-only permission | - | | | | - | | | - **none**: no permission | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | user_type | String | File system access permission granted to the user of the authorized object. Supported values are: | - | | | | - | | | - **no_root_squash**: allows the root user on the client to access the file system as **root**. | - | | | | - | | | - **root_squash**: allows the root user on the client to access the file system as **nfsnobody**. | - | | | | - | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. It is the default value. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=======================================================================================================================================================================================================+ + | id | String | The permission rule ID. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_cidr | String | The IP address or IP address range of the authorized object. It cannot be modified after configuration. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rw_type | String | The read/write permission of the authorized object. | + | | | | + | | | - **rw**: read and write permission, which is the default option | + | | | | + | | | - **ro**: read-only permission | + | | | | + | | | - **none**: no permission | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | user_type | String | The file system access permission granted to the user of the authorized object. The value can be: | + | | | | + | | | - **no_root_squash** (default value): allows any user including root on the client to access the file system as who they are, instead of mapping them to another user. | + | | | | + | | | - **root_squash**: allows root on the client to access the file system as **nfsnobody** and allows a non-root user on the client to access as who they are, instead of being mapped to another user. | + | | | | + | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Status code: 400** .. table:: **Table 7** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== **Status code: 500** .. table:: **Table 8** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== Example Requests ---------------- -.. code-block:: +- Request example for creating permission rules - { - "rules" : [ { - "ip_cidr" : "192.168.xx.xx/16", - "rw_type" : "rw", - "user_type" : "no_root_squash" - }, { - "ip_cidr" : "192.32.xx.xx/16", - "rw_type" : "rw", - "user_type" : "no_root_squash" - } ] - } + .. code-block:: + + { + "rules" : [ { + "ip_cidr" : "192.168.xx.xx/16", + "rw_type" : "rw", + "user_type" : "no_root_squash" + }, { + "ip_cidr" : "192.32.xx.xx/16", + "rw_type" : "rw", + "user_type" : "no_root_squash" + } ] + } Example Responses ----------------- @@ -162,21 +166,23 @@ Example Responses Successful creation -.. code-block:: - - { - "rules" : [ { - "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", - "ip_cidr" : "192.32.0.0/16", - "rw_type" : "rw", - "user_type" : "no_root_squash" - }, { - "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", - "ip_cidr" : "192.32.0.1", - "rw_type" : "rw", - "user_type" : "no_root_squash" - } ] - } +- Response example for creating permission rules + + .. code-block:: + + { + "rules" : [ { + "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", + "ip_cidr" : "192.32.0.0/16", + "rw_type" : "rw", + "user_type" : "no_root_squash" + }, { + "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", + "ip_cidr" : "192.32.0.1", + "rw_type" : "rw", + "user_type" : "no_root_squash" + } ] + } **Status code: 400** diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/deleting_a_permissions_rule.rst b/api-ref/source/sfs_turbo_apis/permissions_management/deleting_a_permission_rule.rst similarity index 57% rename from api-ref/source/sfs_turbo_apis/permissions_management/deleting_a_permissions_rule.rst rename to api-ref/source/sfs_turbo_apis/permissions_management/deleting_a_permission_rule.rst index 8e861b6..98dced0 100644 --- a/api-ref/source/sfs_turbo_apis/permissions_management/deleting_a_permissions_rule.rst +++ b/api-ref/source/sfs_turbo_apis/permissions_management/deleting_a_permission_rule.rst @@ -2,14 +2,19 @@ .. _DeletePermRule: -Deleting a Permissions Rule -=========================== +Deleting a Permission Rule +========================== Function -------- This API is used to delete a permission rule. +Constraints +----------- + +This API is only supported for NFS file systems. + URI --- @@ -17,50 +22,54 @@ DELETE /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} .. table:: **Table 1** Path Parameters - ========== ========= ====== ================== + ========== ========= ====== ======================= Parameter Mandatory Type Description - ========== ========= ====== ================== - project_id Yes String Project ID - share_id Yes String File system ID - rule_id Yes String Permission rule ID - ========== ========= ====== ================== + ========== ========= ====== ======================= + project_id Yes String The project ID. + share_id Yes String The file system ID. + rule_id Yes String The permission rule ID. + ========== ========= ====== ======================= Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- +**Status code: 204** + +Successful deletion + **Status code: 400** .. table:: **Table 3** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== **Status code: 500** .. table:: **Table 4** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== Example Requests ---------------- diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/index.rst b/api-ref/source/sfs_turbo_apis/permissions_management/index.rst index 2fdd375..57430ec 100644 --- a/api-ref/source/sfs_turbo_apis/permissions_management/index.rst +++ b/api-ref/source/sfs_turbo_apis/permissions_management/index.rst @@ -7,9 +7,9 @@ Permissions Management - :ref:`Creating a Permission Rule ` - :ref:`Querying Permission Rules of a File System ` -- :ref:`Querying a Permission Rule by ID ` +- :ref:`Querying a Permission Rule of a File System ` - :ref:`Modifying a Permission Rule ` -- :ref:`Deleting a Permissions Rule ` +- :ref:`Deleting a Permission Rule ` .. toctree:: :maxdepth: 1 @@ -17,6 +17,6 @@ Permissions Management creating_a_permission_rule querying_permission_rules_of_a_file_system - querying_a_permission_rule_by_id + querying_a_permission_rule_of_a_file_system modifying_a_permission_rule - deleting_a_permissions_rule + deleting_a_permission_rule diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/modifying_a_permission_rule.rst b/api-ref/source/sfs_turbo_apis/permissions_management/modifying_a_permission_rule.rst index 047cc7d..859fd66 100644 --- a/api-ref/source/sfs_turbo_apis/permissions_management/modifying_a_permission_rule.rst +++ b/api-ref/source/sfs_turbo_apis/permissions_management/modifying_a_permission_rule.rst @@ -10,6 +10,11 @@ Function This API is used to modify a permission rule. +Constraints +----------- + +This API is only supported for NFS file systems. + URI --- @@ -17,49 +22,47 @@ PUT /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} .. table:: **Table 1** Path Parameters - ========== ========= ====== ================== + ========== ========= ====== ======================= Parameter Mandatory Type Description - ========== ========= ====== ================== - project_id Yes String Project ID - share_id Yes String File system ID - rule_id Yes String Permission rule ID - ========== ========= ====== ================== + ========== ========= ====== ======================= + project_id Yes String The project ID. + share_id Yes String The file system ID. + rule_id Yes String The permission rule ID. + ========== ========= ====== ======================= Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=================+=================+=================+================================================================================================================================================================================================================================================+ - | ip_cidr | No | String | IP address or IP address range of the object to be authorized. Once configured, this parameter cannot be modified. | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | rw_type | No | String | Read/write permission of the object to be authorized. | - | | | | | - | | | | - **rw**: read and write permission, which is the default option | - | | | | | - | | | | - **ro**: read-only permission | - | | | | | - | | | | - **none**: no permission | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | user_type | No | String | System user's permission to access the file system. The value can be any of the following: | - | | | | | - | | | | - no_root_squash: default option. The client uses any user, including the root user. The NFS server retains the user used by the client and does not map the user. | - | | | | | - | | | | - root_squash: When the client uses the root user, the user mapped to the NFS server is the NFS anonymous user (nfsnobody). If the client uses a non-root user, the NFS server retains the user used by the client and does not map the user. | - | | | | | - | | | | - all_squash: All users of clients that access the NFS server are mapped as anonymous users. | - +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+=======================================================================================================================================================================================================+ + | rw_type | No | String | The read/write permission of the object to be authorized. | + | | | | | + | | | | - **rw**: read and write permission, which is the default option | + | | | | | + | | | | - **ro**: read-only permission | + | | | | | + | | | | - **none**: no permission | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | user_type | No | String | The file system access permission granted to the user of the object to be authorized. The value can be: | + | | | | | + | | | | - **no_root_squash** (default value): allows any user including root on the client to access the file system as who they are, instead of mapping them to another user. | + | | | | | + | | | | - **root_squash**: allows root on the client to access the file system as **nfsnobody** and allows a non-root user on the client to access as who they are, instead of being mapped to another user. | + | | | | | + | | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. | + +-----------------+-----------------+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Response Parameters ------------------- @@ -68,51 +71,51 @@ Response Parameters .. table:: **Table 4** Response body parameters - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=======================+=======================================================================================================================+ - | id | String | Permission rule ID | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | ip_cidr | String | IP address or IP address range of the authorized object | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | rw_type | String | Read/write permission of the authorized object. | - | | | | - | | | - **rw**: read and write permission, which is the default option | - | | | | - | | | - **ro**: read-only permission | - | | | | - | | | - **none**: no permission | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | user_type | String | File system access permission granted to the user of the authorized object. Supported values are: | - | | | | - | | | - **no_root_squash**: allows the root user on the client to access the file system as **root**. | - | | | | - | | | - **root_squash**: allows the root user on the client to access the file system as **nfsnobody**. | - | | | | - | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. It is the default value. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=======================================================================================================================================================================================================+ + | id | String | The permission rule ID. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_cidr | String | The IP address or IP address range of the authorized object. It cannot be modified after configuration. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rw_type | String | The read/write permission of the authorized object. | + | | | | + | | | - **rw**: read and write permission, which is the default option | + | | | | + | | | - **ro**: read-only permission | + | | | | + | | | - **none**: no permission | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | user_type | String | The file system access permission granted to the user of the authorized object. The value can be: | + | | | | + | | | - **no_root_squash** (default value): allows any user including root on the client to access the file system as who they are, instead of mapping them to another user. | + | | | | + | | | - **root_squash**: allows root on the client to access the file system as **nfsnobody** and allows a non-root user on the client to access as who they are, instead of being mapped to another user. | + | | | | + | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Status code: 400** .. table:: **Table 5** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== **Status code: 500** .. table:: **Table 6** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== Example Requests ---------------- @@ -129,7 +132,7 @@ Example Responses **Status code: 200** -Successful creation +Success .. code-block:: @@ -165,13 +168,13 @@ Error response Status Codes ------------ -=========== =================== +=========== ============== Status Code Description -=========== =================== -200 Successful creation +=========== ============== +200 Success 400 Error response 500 Error response -=========== =================== +=========== ============== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/querying_a_permission_rule_by_id.rst b/api-ref/source/sfs_turbo_apis/permissions_management/querying_a_permission_rule_by_id.rst deleted file mode 100644 index da37d01..0000000 --- a/api-ref/source/sfs_turbo_apis/permissions_management/querying_a_permission_rule_by_id.rst +++ /dev/null @@ -1,150 +0,0 @@ -:original_name: ShowPermRule.html - -.. _ShowPermRule: - -Querying a Permission Rule by ID -================================ - -Function --------- - -This API is used to query a specific permission rule of a file system. - -URI ---- - -GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} - -.. table:: **Table 1** Path Parameters - - ========== ========= ====== ================== - Parameter Mandatory Type Description - ========== ========= ====== ================== - project_id Yes String Project ID - share_id Yes String File system ID - rule_id Yes String Permission rule ID - ========== ========= ====== ================== - -Request Parameters ------------------- - -.. table:: **Table 2** Request header parameters - - ============ ========= ====== ============= - Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= - -Response Parameters -------------------- - -**Status code: 200** - -.. table:: **Table 3** Response body parameters - - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=======================+=======================================================================================================================+ - | id | String | Permission rule ID | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | ip_cidr | String | IP address or IP address range of the authorized object | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | rw_type | String | Read/write permission of the authorized object. | - | | | | - | | | - **rw**: read and write permission, which is the default option | - | | | - **ro**: read-only permission | - | | | - **none**: no permission | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | user_type | String | File system access permission granted to the user of the authorized object. Supported values are: | - | | | | - | | | - **no_root_squash**: allows the root user on the client to access the file system as **root**. | - | | | - **root_squash**: allows the root user on the client to access the file system as **nfsnobody**. | - | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. It is the default value. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - -**Status code: 400** - -.. table:: **Table 4** Response body parameters - - ========= ====== ================= - Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= - -**Status code: 500** - -.. table:: **Table 5** Response body parameters - - ========= ====== ================= - Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= - -Example Requests ----------------- - -Querying details about the permission rule whose ID is **11abef677ac40f46644d1d5cfc2424a4** for the file system whose ID is **77ba6f4b-6365-4895-8dda-bc7142af4dde** - -.. code-block:: text - - GET HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares/77ba6f4b-6365-4895-8dda-bc7142af4dde/fs/perm-rules/11abef677ac40f46644d1d5cfc2424a4 - -Example Responses ------------------ - -**Status code: 200** - -Successful query - -.. code-block:: - - { - "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", - "ip_cidr" : "192.168.xx.xx/16", - "rw_type" : "rw", - "user_type" : "no_root_squash" - } - -**Status code: 400** - -Error response - -.. code-block:: - - { - "errCode" : "SFS.TURBO.0001", - "errMsg" : "Invalid rule id" - } - -**Status code: 500** - -Error response - -.. code-block:: - - { - "errCode" : "SFS.TURBO.0005", - "errMsg" : "Internal server error" - } - -Status Codes ------------- - -=========== ================ -Status Code Description -=========== ================ -200 Successful query -400 Error response -500 Error response -=========== ================ - -Error Codes ------------ - -See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/querying_a_permission_rule_of_a_file_system.rst b/api-ref/source/sfs_turbo_apis/permissions_management/querying_a_permission_rule_of_a_file_system.rst new file mode 100644 index 0000000..0ee5e14 --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/permissions_management/querying_a_permission_rule_of_a_file_system.rst @@ -0,0 +1,161 @@ +:original_name: ShowPermRule.html + +.. _ShowPermRule: + +Querying a Permission Rule of a File System +=========================================== + +Function +-------- + +This API is used to query a permission rule of a file system. + +Constraints +----------- + +This API is only supported for NFS file systems. + +URI +--- + +GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules/{rule_id} + +.. table:: **Table 1** Path Parameters + + ========== ========= ====== ======================= + Parameter Mandatory Type Description + ========== ========= ====== ======================= + project_id Yes String The project ID. + share_id Yes String The file system ID. + rule_id Yes String The permission rule ID. + ========== ========= ====== ======================= + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + ============ ========= ====== ================== + Parameter Mandatory Type Description + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 3** Response body parameters + + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=======================================================================================================================================================================================================+ + | id | String | The permission rule ID. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_cidr | String | The IP address or IP address range of the authorized object. It cannot be modified after configuration. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rw_type | String | The read/write permission of the authorized object. | + | | | | + | | | - **rw**: read and write permission, which is the default option | + | | | | + | | | - **ro**: read-only permission | + | | | | + | | | - **none**: no permission | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | user_type | String | The file system access permission granted to the user of the authorized object. The value can be: | + | | | | + | | | - **no_root_squash** (default value): allows any user including root on the client to access the file system as who they are, instead of mapping them to another user. | + | | | | + | | | - **root_squash**: allows root on the client to access the file system as **nfsnobody** and allows a non-root user on the client to access as who they are, instead of being mapped to another user. | + | | | | + | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +**Status code: 400** + +.. table:: **Table 4** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +**Status code: 500** + +.. table:: **Table 5** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +Example Requests +---------------- + +Querying details about the permission rule whose ID is **11abef677ac40f46644d1d5cfc2424a4** for the file system whose ID is **77ba6f4b-6365-4895-8dda-bc7142af4dde** + +.. code-block:: text + + GET HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares/77ba6f4b-6365-4895-8dda-bc7142af4dde/fs/perm-rules/11abef677ac40f46644d1d5cfc2424a4 + +Example Responses +----------------- + +**Status code: 200** + +Successful query + +- Response example of querying a specific permission rule of a file system + + .. code-block:: + + { + "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", + "ip_cidr" : "192.168.xx.xx/16", + "rw_type" : "rw", + "user_type" : "no_root_squash" + } + +**Status code: 400** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0001", + "errMsg" : "Invalid rule id" + } + +**Status code: 500** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0005", + "errMsg" : "Internal server error" + } + +Status Codes +------------ + +=========== ================ +Status Code Description +=========== ================ +200 Successful query +400 Error response +500 Error response +=========== ================ + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/permissions_management/querying_permission_rules_of_a_file_system.rst b/api-ref/source/sfs_turbo_apis/permissions_management/querying_permission_rules_of_a_file_system.rst index 656deb3..edff573 100644 --- a/api-ref/source/sfs_turbo_apis/permissions_management/querying_permission_rules_of_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/permissions_management/querying_permission_rules_of_a_file_system.rst @@ -8,7 +8,14 @@ Querying Permission Rules of a File System Function -------- -This API is used to query the permission rules of a file system. +This API is used to query permission rules of a file system. + +Constraints +----------- + +A maximum of 64 permission rules can be added for a file system. + +This API is only supported for NFS file systems. URI --- @@ -17,33 +24,34 @@ GET /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/perm-rules .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== .. table:: **Table 2** Query Parameters - ========= ========= ==== ======================================= - Parameter Mandatory Type Description - ========= ========= ==== ======================================= - limit No Long Number of returned permission rules. - offset No Long Offset of the returned permission rule. - ========= ========= ==== ======================================= + +-----------+-----------+------+--------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+======+==============================================================+ + | limit | No | Long | The maximum number of permission rules that can be returned. | + +-----------+-----------+------+--------------------------------------------------------------+ + | offset | No | Long | The offset of the returned permission rules. | + +-----------+-----------+------+--------------------------------------------------------------+ Request Parameters ------------------ .. table:: **Table 3** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- @@ -55,47 +63,47 @@ Response Parameters +-----------+---------------------------------------------------------------------------------------------------+-----------------------------+ | Parameter | Type | Description | +===========+===================================================================================================+=============================+ - | rules | Array of :ref:`OnePermRuleResponseInfo ` objects | Permission rule information | + | rules | Array of :ref:`OnePermRuleResponseInfo ` objects | The permission information. | +-----------+---------------------------------------------------------------------------------------------------+-----------------------------+ .. _listpermrules__response_onepermruleresponseinfo: .. table:: **Table 5** OnePermRuleResponseInfo - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+=======================+=======================================================================================================================+ - | id | String | Permission rule ID | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | ip_cidr | String | IP address or IP address range of the authorized object | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | rw_type | String | Read/write permission of the authorized object. | - | | | | - | | | - **rw**: read and write permission, which is the default option | - | | | | - | | | - **ro**: read-only permission | - | | | | - | | | - **none**: no permission | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ - | user_type | String | File system access permission granted to the user of the authorized object. Supported values are: | - | | | | - | | | - **no_root_squash**: allows the root user on the client to access the file system as **root**. | - | | | | - | | | - **root_squash**: allows the root user on the client to access the file system as **nfsnobody**. | - | | | | - | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. It is the default value. | - +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=======================================================================================================================================================================================================+ + | id | String | The permission rule ID. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ip_cidr | String | The IP address or IP address range of the authorized object. It cannot be modified after configuration. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | rw_type | String | The read/write permission of the authorized object. | + | | | | + | | | - **rw**: read and write permission, which is the default option | + | | | | + | | | - **ro**: read-only permission | + | | | | + | | | - **none**: no permission | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | user_type | String | The file system access permission granted to the user of the authorized object. The value can be: | + | | | | + | | | - **no_root_squash** (default value): allows any user including root on the client to access the file system as who they are, instead of mapping them to another user. | + | | | | + | | | - **root_squash**: allows root on the client to access the file system as **nfsnobody** and allows a non-root user on the client to access as who they are, instead of being mapped to another user. | + | | | | + | | | - **all_squash**: allows any user on the client to access the file system as **nfsnobody**. | + +-----------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Status code: 500** .. table:: **Table 6** Response body parameters - ========= ====== ================= + ========= ====== ================== Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== Example Requests ---------------- @@ -113,21 +121,23 @@ Example Responses Successful query -.. code-block:: - - { - "rules" : [ { - "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", - "ip_cidr" : "192.168.xx.xx/16", - "rw_type" : "rw", - "user_type" : "no_root_squash" - }, { - "id" : "1231ed520xxxxxxebedb6e57xxxxxxxx", - "ip_cidr" : "192.32.xx.xx/16", - "rw_type" : "rw", - "user_type" : "no_root_squash" - } ] - } +- Response example of querying the permission rules of a file system + + .. code-block:: + + { + "rules" : [ { + "id" : "1131ed520xxxxxxebedb6e57xxxxxxxx", + "ip_cidr" : "192.168.xx.xx/16", + "rw_type" : "rw", + "user_type" : "no_root_squash" + }, { + "id" : "1231ed520xxxxxxebedb6e57xxxxxxxx", + "ip_cidr" : "192.32.xx.xx/16", + "rw_type" : "rw", + "user_type" : "no_root_squash" + } ] + } **Status code: 500** diff --git a/api-ref/source/sfs_turbo_apis/tag_management/adding_a_tag_for_a_file_system.rst b/api-ref/source/sfs_turbo_apis/tag_management/adding_a_tag_to_a_file_system.rst similarity index 85% rename from api-ref/source/sfs_turbo_apis/tag_management/adding_a_tag_for_a_file_system.rst rename to api-ref/source/sfs_turbo_apis/tag_management/adding_a_tag_to_a_file_system.rst index affebde..9fdcd19 100644 --- a/api-ref/source/sfs_turbo_apis/tag_management/adding_a_tag_for_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/tag_management/adding_a_tag_to_a_file_system.rst @@ -2,13 +2,13 @@ .. _CreateSharedTag: -Adding a Tag for a File System -============================== +Adding a Tag to a File System +============================= Function -------- -This API is used to add a tag to a specified file system. +This API is used to add a tag to a file system. A maximum of 20 tags can be added to a file system. @@ -23,32 +23,32 @@ POST /v1/{project_id}/sfs-turbo/{share_id}/tags .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------+-----------+------------------------------------------------------------------+-------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +===========+===========+==================================================================+===========================================+ - | tag | Yes | :ref:`ResourceTag ` object | Description of the **resource_tag** field | - +-----------+-----------+------------------------------------------------------------------+-------------------------------------------+ + +-----------+-----------+------------------------------------------------------------------+-----------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+==================================================================+=========================================+ + | tag | Yes | :ref:`ResourceTag ` object | The **resource_tag** field description. | + +-----------+-----------+------------------------------------------------------------------+-----------------------------------------+ .. _createsharedtag__request_resourcetag: @@ -57,13 +57,13 @@ Request Parameters +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+==================================================================================================================================================================================================================================================================================================================+ - | key | Yes | String | Tag key. | + | key | Yes | String | The tag key. | | | | | | | | | | It can contain a maximum of 128 characters. | | | | | | | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | value | Yes | String | Tag value. | + | value | Yes | String | The tag value. | | | | | | | | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | | | | | | @@ -73,6 +73,10 @@ Request Parameters Response Parameters ------------------- +**Status code: 204** + +Tag adding request delivered + None Example Requests @@ -97,11 +101,11 @@ None Status Codes ------------ -=========== ============================= +=========== ============================ Status Code Description -=========== ============================= -204 Tag adding request delivered. -=========== ============================= +=========== ============================ +204 Tag adding request delivered +=========== ============================ Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/tag_management/batch_adding_tags_to_a_file_system.rst b/api-ref/source/sfs_turbo_apis/tag_management/batch_adding_tags_to_a_file_system.rst index b7eb351..b901379 100644 --- a/api-ref/source/sfs_turbo_apis/tag_management/batch_adding_tags_to_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/tag_management/batch_adding_tags_to_a_file_system.rst @@ -8,7 +8,7 @@ Batch Adding Tags to a File System Function -------- -This API is used to batch add tags for a specified file system. +This API is used to batch add tags to a file system. A maximum of 20 tags can be added to a file system. @@ -23,40 +23,38 @@ POST /v1/{project_id}/sfs-turbo/{share_id}/tags/action .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== .. table:: **Table 3** Request body parameters - +-----------------+-----------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Parameter | Mandatory | Type | Description | - +=================+=================+===============================================================================+=========================================================================================================================================================================================================+ - | action | Yes | String | Operation identifier. The value is **create**. Use **create** if you want to batch add tags to a file system. | - +-----------------+-----------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | tags | No | Array of :ref:`ResourceTag ` objects | Tag list. | - | | | | | - | | | | This field is mandatory for users. For users with the op_service permission, choose either this field or **sys_tags**. | - +-----------------+-----------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | sys_tags | No | Array of :ref:`ResourceTag ` objects | System tag list. | - | | | | | - | | | | This field is available only to users with the op_service permission. Choose either this field or **tags**. Only one resource_tag structure key, **\_sys_enterprise_project_id**, is used in TMS calls. | - +-----------------+-----------------+-------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------+-----------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+===============================================================================+===================================================================================================================+ + | action | Yes | String | The operation identifier. The value is **create**. Use **create** if you want to batch add tags to a file system. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - **create** | + +-----------------+-----------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | tags | Yes | Array of :ref:`ResourceTag ` objects | The list of tags. | + +-----------------+-----------------+-------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ .. _batchaddsharedtags__request_resourcetag: @@ -65,13 +63,13 @@ Request Parameters +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+==================================================================================================================================================================================================================================================================================================================+ - | key | Yes | String | Tag key. | + | key | Yes | String | The tag key. | | | | | | | | | | It can contain a maximum of 128 characters. | | | | | | | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | value | Yes | String | Tag value. | + | value | Yes | String | The tag value. | | | | | | | | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | | | | | | @@ -81,12 +79,16 @@ Request Parameters Response Parameters ------------------- +**Status code: 204** + +Batch adding tags succeeded + None Example Requests ---------------- -Batch adding tags for a file system, with tag key of the first tag set to **key1**, tag value of the first tag **value1**, tag key of the second tag **key2**, and tag value of the second tag **value1** +Batch adding tags to a file system, with tag key of the first tag set to **key1**, tag value of the first tag **value1**, tag key of the second tag **key2**, and tag value of the second tag **value1** .. code-block:: @@ -109,11 +111,11 @@ None Status Codes ------------ -=========== ======================= +=========== =========================== Status Code Description -=========== ======================= -204 File system tags added. -=========== ======================= +=========== =========================== +204 Batch adding tags succeeded +=========== =========================== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/tag_management/deleting_a_tag_of_a_file_system.rst b/api-ref/source/sfs_turbo_apis/tag_management/deleting_a_tag_from_a_file_system.rst similarity index 81% rename from api-ref/source/sfs_turbo_apis/tag_management/deleting_a_tag_of_a_file_system.rst rename to api-ref/source/sfs_turbo_apis/tag_management/deleting_a_tag_from_a_file_system.rst index 5585bce..ac90fb9 100644 --- a/api-ref/source/sfs_turbo_apis/tag_management/deleting_a_tag_of_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/tag_management/deleting_a_tag_from_a_file_system.rst @@ -2,13 +2,13 @@ .. _DeleteSharedTag: -Deleting a Tag of a File System -=============================== +Deleting a Tag from a File System +================================= Function -------- -This API is used to delete a tag of a specified file system. If the key to be deleted does not exist, error 404 will be returned. +This API is used to delete a tag from a file system. If the specified key is not found, error 404 will be returned. URI --- @@ -20,13 +20,13 @@ DELETE /v1/{project_id}/sfs-turbo/{share_id}/tags/{key} +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+==================================================================================================================================================================================================================================================================================================================+ - | project_id | Yes | String | Project ID | + | project_id | Yes | String | The project ID. | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | share_id | Yes | String | File system ID | + | share_id | Yes | String | The file system ID. | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | key | Yes | String | Tag key, which can contain a maximum of 128 characters. | + | key | Yes | String | The tag key, which can contain a maximum of 128 characters. | | | | | | - | | | | It cannot be left blank and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | | | | | | | | | | When this API is called to delete a tag, if the tag key contains special characters that cannot be directly resolved by the URL, the key needs to be escaped. | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -36,22 +36,26 @@ Request Parameters .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- +**Status code: 204** + +Tag deleted + None Example Requests ---------------- -Deleting tags whose key is **test** for the file system whose ID is **77ba6f4b-6365-4895-8dda-bc7142af4dde** +Deleting a tag (tag key is **test**) from the file system whose ID is **77ba6f4b-6365-4895-8dda-bc7142af4dde** .. code-block:: text @@ -65,11 +69,11 @@ None Status Codes ------------ -=========== ======================== +=========== =========== Status Code Description -=========== ======================== -204 File system tag deleted. -=========== ======================== +=========== =========== +204 Tag deleted +=========== =========== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/tag_management/index.rst b/api-ref/source/sfs_turbo_apis/tag_management/index.rst index bccca85..d15109a 100644 --- a/api-ref/source/sfs_turbo_apis/tag_management/index.rst +++ b/api-ref/source/sfs_turbo_apis/tag_management/index.rst @@ -5,18 +5,20 @@ Tag Management ============== -- :ref:`Adding a Tag for a File System ` -- :ref:`Querying Tags of a File System ` -- :ref:`Deleting a Tag of a File System ` +- :ref:`Adding a Tag to a File System ` +- :ref:`Querying All Tags of a File System ` +- :ref:`Deleting a Tag from a File System ` - :ref:`Batch Adding Tags to a File System ` - :ref:`Querying Tags of All File Systems of a Tenant ` +- :ref:`Querying File Systems by Tag ` .. toctree:: :maxdepth: 1 :hidden: - adding_a_tag_for_a_file_system - querying_tags_of_a_file_system - deleting_a_tag_of_a_file_system + adding_a_tag_to_a_file_system + querying_all_tags_of_a_file_system + deleting_a_tag_from_a_file_system batch_adding_tags_to_a_file_system querying_tags_of_all_file_systems_of_a_tenant + querying_file_systems_by_tag diff --git a/api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_a_file_system.rst b/api-ref/source/sfs_turbo_apis/tag_management/querying_all_tags_of_a_file_system.rst similarity index 64% rename from api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_a_file_system.rst rename to api-ref/source/sfs_turbo_apis/tag_management/querying_all_tags_of_a_file_system.rst index 6733eda..1773ef1 100644 --- a/api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_a_file_system.rst +++ b/api-ref/source/sfs_turbo_apis/tag_management/querying_all_tags_of_a_file_system.rst @@ -2,13 +2,13 @@ .. _ShowSharedTags: -Querying Tags of a File System -============================== +Querying All Tags of a File System +================================== Function -------- -This API is used to query all tags of a specified file system. +This API is used to query all tags of a file system. URI --- @@ -17,24 +17,24 @@ GET /v1/{project_id}/sfs-turbo/{share_id}/tags .. table:: **Table 1** Path Parameters - ========== ========= ====== ============== + ========== ========= ====== =================== Parameter Mandatory Type Description - ========== ========= ====== ============== - project_id Yes String Project ID - share_id Yes String File system ID - ========== ========= ====== ============== + ========== ========= ====== =================== + project_id Yes String The project ID. + share_id Yes String The file system ID. + ========== ========= ====== =================== Request Parameters ------------------ .. table:: **Table 2** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- @@ -43,19 +43,11 @@ Response Parameters .. table:: **Table 3** Response body parameters - +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=======================+============================================================================+========================================================================================================+ - | tags | Array of :ref:`ResourceTag ` objects | Tag list | - +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | sys_tags | Array of :ref:`ResourceTag ` objects | Only users with the op_service permission can obtain this field. | - | | | | - | | | #. This field currently contains only one resource_tag structure key, **\_sys_enterprise_project_id**. | - | | | | - | | | #. The key contains only value **0** currently, which indicates the default enterprise project. | - | | | | - | | | This field is not returned for users without the op_service permission. | - +-----------------------+----------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + +-----------+----------------------------------------------------------------------------+---------------+ + | Parameter | Type | Description | + +===========+============================================================================+===============+ + | tags | Array of :ref:`ResourceTag ` objects | The tag list. | + +-----------+----------------------------------------------------------------------------+---------------+ .. _showsharedtags__response_resourcetag: @@ -64,13 +56,13 @@ Response Parameters +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+==================================================================================================================================================================================================================================================================================================================+ - | key | String | Tag key. | + | key | String | The tag key. | | | | | | | | It can contain a maximum of 128 characters. | | | | | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | value | String | Tag value. | + | value | String | The tag value. | | | | | | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | | | | | diff --git a/api-ref/source/sfs_turbo_apis/tag_management/querying_file_systems_by_tag.rst b/api-ref/source/sfs_turbo_apis/tag_management/querying_file_systems_by_tag.rst new file mode 100644 index 0000000..90b997e --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/tag_management/querying_file_systems_by_tag.rst @@ -0,0 +1,264 @@ +:original_name: ListSharesByTag.html + +.. _ListSharesByTag: + +Querying File Systems by Tag +============================ + +Function +-------- + +This API is used to query file systems by tag. + +URI +--- + +POST /v1/{project_id}/sfs-turbo/resource_instances/action + +.. table:: **Table 1** Path Parameters + + ========== ========= ====== =============== + Parameter Mandatory Type Description + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + ============ ========= ====== ================== + Parameter Mandatory Type Description + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== + +.. table:: **Table 3** Request body parameters + + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+============================================================================+===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================+ + | action | Yes | String | The operation type of listing file systems by tag. The value can be **filter** or **count**. | + | | | | | + | | | | Enumeration values: | + | | | | | + | | | | - **filter** | + | | | | | + | | | | - **count** | + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | limit | No | String | The maximum number of file systems returned. | + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | offset | No | String | The offset of the returned file systems. | + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | without_any_tag | No | Boolean | The resources to be queried contain no tags. If this parameter is set to **true**, all resources without specified tags are queried. In this case, the **tags** field is ignored. If this parameter is set to **false** or not specified, it does not take effect, meaning that all resources are returned or resources are filtered by **tags** or **matches**. | + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | tags | No | Array of :ref:`Tag ` objects | The resources to be queried contain tags specified in this field. Each resource can contain a maximum of 20 keys. Each tag key can have a maximum of 20 tag values. The tag value corresponding to each tag key can be an empty array but the structure cannot be missing. Each tag key must be unique, and tag values of the same tag must be unique. The response returns resources containing all tags in this list. Keys in this list are in the AND relationship and values in each key-value structure are in the OR relationship. If no tag filtering criteria is specified, all data is returned. | + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | matches | No | Array of :ref:`ResourceTag ` objects | The search criteria. **key** is the field to match. Only **resource_name** is supported. **value** is the matched value. If the value ends with \*, prefix search will be performed. For example, if the value is sfsturbo*, all resources whose names start with **sfsturbo** will be returned. | + +-----------------+-----------------+----------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _listsharesbytag__request_tag: + +.. table:: **Table 4** Tag + + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+==================+=======================================================================================================================================================================+ + | key | Yes | String | The tag key. | + | | | | | + | | | | A key can contain a maximum of 128 characters and cannot be left blank. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | values | Yes | Array of strings | The list the tag values. Each value can contain a maximum of 255 characters. An empty list for **values** indicates any value. The values are in the OR relationship. | + +-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. _listsharesbytag__request_resourcetag: + +.. table:: **Table 5** ResourceTag + + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +=================+=================+=================+==================================================================================================================================================================================================================================================================================================================+ + | key | Yes | String | The tag key. | + | | | | | + | | | | It can contain a maximum of 128 characters. | + | | | | | + | | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | Yes | String | The tag value. | + | | | | | + | | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | + | | | | | + | | | | It cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 6** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 7** Response body parameters + + +-------------+-----------------------------------------------------------------------------------------------------+--------------------------------------------+ + | Parameter | Type | Description | + +=============+=====================================================================================================+============================================+ + | resources | Array of :ref:`ListSharesByTagResource ` objects | The list of file systems queried by tag. | + +-------------+-----------------------------------------------------------------------------------------------------+--------------------------------------------+ + | total_count | Integer | The total number of file systems returned. | + +-------------+-----------------------------------------------------------------------------------------------------+--------------------------------------------+ + +.. _listsharesbytag__response_listsharesbytagresource: + +.. table:: **Table 8** ListSharesByTagResource + + +-----------------+-----------------------------------------------------------------------------+------------------------+ + | Parameter | Type | Description | + +=================+=============================================================================+========================+ + | resource_id | String | The resource ID. | + +-----------------+-----------------------------------------------------------------------------+------------------------+ + | resource_name | String | The resource name. | + +-----------------+-----------------------------------------------------------------------------+------------------------+ + | resource_detail | String | The resource details. | + +-----------------+-----------------------------------------------------------------------------+------------------------+ + | tags | Array of :ref:`ResourceTag ` objects | The resource tag list. | + +-----------------+-----------------------------------------------------------------------------+------------------------+ + +.. _listsharesbytag__response_resourcetag: + +.. table:: **Table 9** ResourceTag + + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+==================================================================================================================================================================================================================================================================================================================+ + | key | String | The tag key. | + | | | | + | | | It can contain a maximum of 128 characters. | + | | | | + | | | It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | value | String | The tag value. | + | | | | + | | | Each tag value can contain a maximum of 255 characters and can be an empty string. | + | | | | + | | | It cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (``*``), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). | + +-----------------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +**Status code: 400** + +.. table:: **Table 10** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 11** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +**Status code: 500** + +.. table:: **Table 12** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 13** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +Example Requests +---------------- + +- Filtering file systems by file system tag + + .. code-block:: + + { + "action" : "filter", + "limit" : 10, + "offset" : 10, + "tags" : [ { + "key" : "key1", + "values" : [ "value1", "value2" ] + }, { + "key" : "key2", + "values" : [ "value1", "value2" ] + } ] + } + +- Filtering file systems by file system name + + .. code-block:: + + { + "action" : "filter", + "matches" : [ { + "key" : "resource_name", + "value" : "sfsturbo*" + } ] + } + +Example Responses +----------------- + +**Status code: 400** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0001", + "errMsg" : "parameter error" + } + +**Status code: 500** + +The error response. + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0005", + "errMsg" : "internal server error" + } + +Status Codes +------------ + +=========== =================== +Status Code Description +=========== =================== +200 Success +400 Error response +500 The error response. +=========== =================== + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_all_file_systems_of_a_tenant.rst b/api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_all_file_systems_of_a_tenant.rst index 6fbb99b..8ed8737 100644 --- a/api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_all_file_systems_of_a_tenant.rst +++ b/api-ref/source/sfs_turbo_apis/tag_management/querying_tags_of_all_file_systems_of_a_tenant.rst @@ -17,32 +17,33 @@ GET /v1/{project_id}/sfs-turbo/tags .. table:: **Table 1** Path Parameters - ========== ========= ====== =========== + ========== ========= ====== =============== Parameter Mandatory Type Description - ========== ========= ====== =========== - project_id Yes String Project ID - ========== ========= ====== =========== + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== .. table:: **Table 2** Query Parameters - ========= ========= ======= ======================= - Parameter Mandatory Type Description - ========= ========= ======= ======================= - limit No Integer Number of returned tags - offset No Integer Tag query offset - ========= ========= ======= ======================= + +-----------+-----------+---------+--------------------------------------------------+ + | Parameter | Mandatory | Type | Description | + +===========+===========+=========+==================================================+ + | limit | No | Integer | The maximum number of tags that can be returned. | + +-----------+-----------+---------+--------------------------------------------------+ + | offset | No | Integer | The tag query offset. | + +-----------+-----------+---------+--------------------------------------------------+ Request Parameters ------------------ .. table:: **Table 3** Request header parameters - ============ ========= ====== ============= + ============ ========= ====== ================== Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== Response Parameters ------------------- @@ -51,11 +52,11 @@ Response Parameters .. table:: **Table 4** Response body parameters - +-----------+------------------------------------------------------------+-------------+ - | Parameter | Type | Description | - +===========+============================================================+=============+ - | tags | Array of :ref:`Tag ` objects | Tag list | - +-----------+------------------------------------------------------------+-------------+ + +-----------+------------------------------------------------------------+---------------+ + | Parameter | Type | Description | + +===========+============================================================+===============+ + | tags | Array of :ref:`Tag ` objects | The tag list. | + +-----------+------------------------------------------------------------+---------------+ .. _listsharedtags__response_tag: @@ -64,17 +65,17 @@ Response Parameters +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+=======================================================================================================================================================================+ - | key | String | Tag key. | + | key | String | The tag key. | | | | | | | | A key can contain a maximum of 128 characters and cannot be left blank. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | values | Array of strings | Tag values. Each value can contain a maximum of 255 characters. An empty list of values can match with any value. All values of a tag key are in the OR relationship. | + | values | Array of strings | The list the tag values. Each value can contain a maximum of 255 characters. An empty list for **values** indicates any value. The values are in the OR relationship. | +-----------------------+-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Example Requests ---------------- -Query tags of all file systems in the project whose ID is **e1e45b08f3ea4480ab4655ef9c7160ba** +Querying tags of all file systems in the project whose ID is **e1e45b08f3ea4480ab4655ef9c7160ba** .. code-block:: text @@ -85,7 +86,7 @@ Example Responses **Status code: 200** -Response body for querying a file system +Query response body .. code-block:: @@ -102,11 +103,11 @@ Response body for querying a file system Status Codes ------------ -=========== ======================================== +=========== =================== Status Code Description -=========== ======================================== -200 Response body for querying a file system -=========== ======================================== +=========== =================== +200 Query response body +=========== =================== Error Codes ----------- diff --git a/api-ref/source/sfs_turbo_apis/task_management/index.rst b/api-ref/source/sfs_turbo_apis/task_management/index.rst index 0a68825..e3029b7 100644 --- a/api-ref/source/sfs_turbo_apis/task_management/index.rst +++ b/api-ref/source/sfs_turbo_apis/task_management/index.rst @@ -5,10 +5,10 @@ Task Management =============== -- :ref:`Querying Details About a Task ` +- :ref:`Querying the Status of a Task ` .. toctree:: :maxdepth: 1 :hidden: - querying_details_about_a_task + querying_the_status_of_a_task diff --git a/api-ref/source/sfs_turbo_apis/task_management/querying_details_about_a_task.rst b/api-ref/source/sfs_turbo_apis/task_management/querying_details_about_a_task.rst deleted file mode 100644 index b24d50c..0000000 --- a/api-ref/source/sfs_turbo_apis/task_management/querying_details_about_a_task.rst +++ /dev/null @@ -1,199 +0,0 @@ -:original_name: ShowJobDetail.html - -.. _ShowJobDetail: - -Querying Details About a Task -============================= - -Function --------- - -This API is used to query the execution status of an SFS Turbo asynchronous task. - -URI ---- - -GET /v1/{project_id}/sfs-turbo/jobs/{job_id} - -.. table:: **Table 1** Path Parameters - - ========== ========= ====== =========== - Parameter Mandatory Type Description - ========== ========= ====== =========== - project_id Yes String Project ID - job_id Yes String job ID - ========== ========= ====== =========== - -Request Parameters ------------------- - -.. table:: **Table 2** Request header parameters - - ============ ========= ====== ============= - Parameter Mandatory Type Description - ============ ========= ====== ============= - X-Auth-Token Yes String Account token - Content-Type Yes String MIME type - ============ ========= ====== ============= - -Response Parameters -------------------- - -**Status code: 200** - -.. table:: **Table 3** Response header parameters - - ============ ====== =========== - Parameter Type Description - ============ ====== =========== - X-request-id String Request ID - ============ ====== =========== - -.. table:: **Table 4** Response body parameters - - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=============+===================================================================================+================================================================================+ - | status | String | Task status, which can be **success**, **running**, **failed**, or **waiting** | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | job_id | String | Task ID | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | job_type | String | Task type | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | begin_time | String | Task start time in UTC format, for example, **'2016-01-02 15:04:05** | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | end_time | String | Task end time in UTC format, for example, **'2016-01-02 15:04:05** | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | error_code | String | Error code returned if the task execution fails | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | fail_reason | String | Cause of the task execution failure | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - | sub_jobs | Array of :ref:`GetSubJobDetail ` objects | List of subtasks | - +-------------+-----------------------------------------------------------------------------------+--------------------------------------------------------------------------------+ - -.. _showjobdetail__response_getsubjobdetail: - -.. table:: **Table 5** GetSubJobDetail - - +-------------+--------+-----------------------------------------------------------------------------------+ - | Parameter | Type | Description | - +=============+========+===================================================================================+ - | status | String | Subtask status, which can be **success**, **running**, **failed**, or **waiting** | - +-------------+--------+-----------------------------------------------------------------------------------+ - | job_id | String | Task ID | - +-------------+--------+-----------------------------------------------------------------------------------+ - | job_type | String | Subtask type | - +-------------+--------+-----------------------------------------------------------------------------------+ - | begin_time | String | Task start time in UTC format, for example, **'2016-01-02 15:04:05** | - +-------------+--------+-----------------------------------------------------------------------------------+ - | end_time | String | Task end time in UTC format, for example, **'2016-01-02 15:04:05** | - +-------------+--------+-----------------------------------------------------------------------------------+ - | error_code | String | Error code returned if the task execution fails | - +-------------+--------+-----------------------------------------------------------------------------------+ - | fail_reason | String | Cause of the task execution failure | - +-------------+--------+-----------------------------------------------------------------------------------+ - -**Status code: 400** - -.. table:: **Table 6** Response body parameters - - ========= ====== ================= - Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= - -**Status code: 404** - -.. table:: **Table 7** Response body parameters - - ========= ====== ================= - Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= - -**Status code: 500** - -.. table:: **Table 8** Response body parameters - - ========= ====== ================= - Parameter Type Description - ========= ====== ================= - errCode String Error code - errMsg String Error description - ========= ====== ================= - -Example Requests ----------------- - -None - -Example Responses ------------------ - -**Status code: 200** - -Response body parameters - -.. code-block:: - - { - "job_id" : "26f6b565-xxxx-XXXX-xxxx-03f0bd975433", - "status" : "success", - "job_type" : "bind_ldap", - "begin_time" : "2023-07-26 09:33:58", - "end_time" : "2023-07-26 09:33:58" - } - -**Status code: 400** - -Client error - -.. code-block:: - - { - "errCode" : "SFS.TURBO.0001", - "errMsg" : "parameter error" - } - -**Status code: 404** - -Resource not found - -.. code-block:: - - { - "errCode" : "SFS.TURBO.0001", - "errMsg" : "parameter error" - } - -**Status code: 500** - -Internal error - -.. code-block:: - - { - "errCode" : "SFS.TURBO.0005", - "errMsg" : "Internal server error" - } - -Status Codes ------------- - -=========== ======================== -Status Code Description -=========== ======================== -200 Response body parameters -400 Client error -404 Resource not found -500 Internal error -=========== ======================== - -Error Codes ------------ - -See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/task_management/querying_the_status_of_a_task.rst b/api-ref/source/sfs_turbo_apis/task_management/querying_the_status_of_a_task.rst new file mode 100644 index 0000000..64035ca --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/task_management/querying_the_status_of_a_task.rst @@ -0,0 +1,275 @@ +:original_name: ShowJobDetail.html + +.. _ShowJobDetail: + +Querying the Status of a Task +============================= + +Function +-------- + +This API is used to query the execution status of the SFS Turbo asynchronous API. + +URI +--- + +GET /v1/{project_id}/sfs-turbo/jobs/{job_id} + +.. table:: **Table 1** Path Parameters + + ========== ========= ====== =============== + Parameter Mandatory Type Description + ========== ========= ====== =============== + project_id Yes String The project ID. + job_id Yes String job ID + ========== ========= ====== =============== + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + ============ ========= ====== ================== + Parameter Mandatory Type Description + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 3** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 4** Response body parameters + + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+===================================================================================+=========================================================================================+ + | status | String | The task status. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **success**: successful | + | | | | + | | | - **failed**: failed | + | | | | + | | | - **waiting**: waiting for execution | + | | | | + | | | - **running**: running | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | job_id | String | The task ID. | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | job_type | String | The task type. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **create_share**: creating a file system | + | | | | + | | | - **hpc_create_share**: creating a file system | + | | | | + | | | - **delete_share**: deleting a file system | + | | | | + | | | - **extend_share**: expanding the capacity of a file system | + | | | | + | | | - **change_security_group**: changing the security group associated with a file system | + | | | | + | | | - **create_obs_target**: adding a storage backend | + | | | | + | | | - **delete_obs_target**: removing a storage backend | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | begin_time | String | The task start time in UTC format, for example, **2016-01-02 15:04:05**. | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | end_time | String | The task end time in UTC format, for example, **2016-01-02 15:04:05**. | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | error_code | String | The error code returned if the task execution fails. | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | fail_reason | String | The cause of the task execution failure. | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | sub_jobs | Array of :ref:`GetSubJobDetail ` objects | The subtask list. | + +-----------------------+-----------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + +.. _showjobdetail__response_getsubjobdetail: + +.. table:: **Table 5** GetSubJobDetail + + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=========================================================================================+ + | status | String | The task status. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **success**: successful | + | | | | + | | | - **failed**: failed | + | | | | + | | | - **waiting**: waiting for execution | + | | | | + | | | - **running**: running | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | job_id | String | The subtask ID. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | job_type | String | The subtask type. | + | | | | + | | | Enumerated values: | + | | | | + | | | - **create_share**: creating a file system | + | | | | + | | | - **hpc_create_share**: creating a file system | + | | | | + | | | - **delete_share**: deleting a file system | + | | | | + | | | - **extend_share**: expanding the capacity of a file system | + | | | | + | | | - **change_security_group**: changing the security group associated with a file system | + | | | | + | | | - **create_obs_target**: adding a storage backend | + | | | | + | | | - **delete_obs_target**: removing a storage backend | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | begin_time | String | The subtask start time in UTC format, for example, **2016-01-02 15:04:05**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | end_time | String | The subtask end time in UTC format, for example, **2016-01-02 15:04:05**. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | error_code | String | The error code returned if the subtask execution fails. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + | fail_reason | String | The cause of the subtask execution failure. | + +-----------------------+-----------------------+-----------------------------------------------------------------------------------------+ + +**Status code: 400** + +.. table:: **Table 6** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 7** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +**Status code: 404** + +.. table:: **Table 8** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 9** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +**Status code: 500** + +.. table:: **Table 10** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 11** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +Example Requests +---------------- + +None + +Example Responses +----------------- + +**Status code: 200** + +Response body parameter + +.. code-block:: + + { + "job_id" : "26f6b565-xxxx-XXXX-xxxx-03f0bd975433", + "status" : "success", + "job_type" : "bind_ldap", + "begin_time" : "2023-07-26 09:33:58", + "end_time" : "2023-07-26 09:33:58" + } + +**Status code: 400** + +Client error + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0001", + "errMsg" : "parameter error" + } + +**Status code: 404** + +Resource not found + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0001", + "errMsg" : "parameter error" + } + +**Status code: 500** + +Internal error + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0005", + "errMsg" : "Internal server error" + } + +Status Codes +------------ + +=========== ======================= +Status Code Description +=========== ======================= +200 Response body parameter +400 Client error +404 Resource not found +500 Internal error +=========== ======================= + +Error Codes +----------- + +See :ref:`Error Codes `. diff --git a/api-ref/source/sfs_turbo_apis/tenant_quota_management/index.rst b/api-ref/source/sfs_turbo_apis/tenant_quota_management/index.rst new file mode 100644 index 0000000..c6dc3a2 --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/tenant_quota_management/index.rst @@ -0,0 +1,14 @@ +:original_name: topic_300000011.html + +.. _topic_300000011: + +Tenant Quota Management +======================= + +- :ref:`Querying Tenant Quotas ` + +.. toctree:: + :maxdepth: 1 + :hidden: + + querying_tenant_quotas diff --git a/api-ref/source/sfs_turbo_apis/tenant_quota_management/querying_tenant_quotas.rst b/api-ref/source/sfs_turbo_apis/tenant_quota_management/querying_tenant_quotas.rst new file mode 100644 index 0000000..cd8fd29 --- /dev/null +++ b/api-ref/source/sfs_turbo_apis/tenant_quota_management/querying_tenant_quotas.rst @@ -0,0 +1,194 @@ +:original_name: ShowQuota.html + +.. _ShowQuota: + +Querying Tenant Quotas +====================== + +Function +-------- + +Querying tenant quotas + +URI +--- + +GET /v1/{project_id}/sfs-turbo/quotas + +.. table:: **Table 1** Path Parameters + + ========== ========= ====== =============== + Parameter Mandatory Type Description + ========== ========= ====== =============== + project_id Yes String The project ID. + ========== ========= ====== =============== + +Request Parameters +------------------ + +.. table:: **Table 2** Request header parameters + + ============ ========= ====== ================== + Parameter Mandatory Type Description + ============ ========= ====== ================== + X-Auth-Token Yes String The account token. + Content-Type Yes String The MIME type. + ============ ========= ====== ================== + +Response Parameters +------------------- + +**Status code: 200** + +.. table:: **Table 3** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 4** Response body parameters + + +-----------+-------------------------------------------------------------------------+------------------------+ + | Parameter | Type | Description | + +===========+=========================================================================+========================+ + | quotas | :ref:`ShowQuotaResource ` object | Querying tenant quotas | + +-----------+-------------------------------------------------------------------------+------------------------+ + +.. _showquota__response_showquotaresource: + +.. table:: **Table 5** ShowQuotaResource + + +-----------+---------------------------------------------------------------------------+----------------------------+ + | Parameter | Type | Description | + +===========+===========================================================================+============================+ + | resources | Array of :ref:`QuotaResource ` objects | The tenant resource quota. | + +-----------+---------------------------------------------------------------------------+----------------------------+ + +.. _showquota__response_quotaresource: + +.. table:: **Table 6** QuotaResource + + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | Parameter | Type | Description | + +=======================+=======================+=================================================================================================================================+ + | type | String | The tenant's resource type. **shares** indicates the file system quantity, and **capacity** indicates the file system capacity. | + | | | | + | | | Enumeration values: | + | | | | + | | | - **shares** | + | | | | + | | | - **capacity** | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | used | Integer | The used quota. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | quota | Integer | The total quota. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------+ + | unit | String | The quota unit. | + +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +**Status code: 400** + +.. table:: **Table 7** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 8** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +**Status code: 500** + +.. table:: **Table 9** Response header parameters + + ============ ====== =============== + Parameter Type Description + ============ ====== =============== + X-request-id String The request ID. + ============ ====== =============== + +.. table:: **Table 10** Response body parameters + + ========= ====== ================== + Parameter Type Description + ========= ====== ================== + errCode String The error code. + errMsg String The error message. + ========= ====== ================== + +Example Requests +---------------- + +None + +Example Responses +----------------- + +**Status code: 200** + +Success + +.. code-block:: + + { + "quotas" : { + "resources" : [ { + "type" : "shares", + "used" : 5, + "quota" : 400 + }, { + "type" : "capacity", + "used" : 0, + "quota" : 20, + "unit" : "GB" + } ] + } + } + +**Status code: 400** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0001", + "errMsg" : "parameter error" + } + +**Status code: 500** + +Error response + +.. code-block:: + + { + "errCode" : "SFS.TURBO.0005", + "errMsg" : "Internal server error" + } + +Status Codes +------------ + +=========== ============== +Status Code Description +=========== ============== +200 Success +400 Error response +500 Error response +=========== ============== + +Error Codes +----------- + +See :ref:`Error Codes `.