Querying the Task List
Function
This API is used to query the task list.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
csms::listTasks
List
-
-
csms:task:list
-
URI
GET /v1/{project_id}/csms/tasks
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range The value returned by the IAM API is used, which contains 32 characters. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| secret_name | No | String | Definition Secret name. Constraints N/A Range The value must match the regular expression ^[a-zA-Z0-9_-]{1,64}$. Default Value N/A |
| status | No | String | Definition Task status Constraints Range N/A Default Value N/A |
| task_id | No | String | Definition Task ID Constraints If this parameter is specified, other search criteria cannot be specified. Range N/A Default Value N/A |
| limit | No | Integer | Definition Number of records returned on each page Constraints By default, 50 results are returned on each page. A maximum of 1,000 results can be returned. Range N/A Default Value N/A |
| marker | No | String | Definition Name of the last secret on each page is used as a pagination tag. If this parameter is left blank, the first page is queried. Constraints Parameters marker and limit must be used together. If the number of records returned on the last page is less than the value of limit, the query ends. Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. This parameter is optional if AK/SK authentication is used. Constraints N/A Range Obtain the value by calling the IAM API for obtaining the user token. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total | Integer | Definition Total number of tasks. Range N/A |
| tasks | Array of SecretTask objects | Definition Secret task list Range N/A |
| next_marker | String | Definition Address for querying the next page (ID of the last task on the current page) Range N/A |
| Parameter | Type | Description |
|---|---|---|
| task_id | String | Definition Task ID. Range N/A |
| secret_name | String | Definition Secret name Range N/A |
| rotation_func_urn | String | Definition URN of the FunctionGraph function Range N/A |
| task_status | String | Definition Task status Range N/A |
| operate_type | String | Definition Rotation type Range N/A |
| task_time | Long | Definition Task creation time Range N/A |
| attempt_nums | Integer | Definition Number of task attempts Range N/A |
| task_error_code | String | Definition Task error code Range N/A |
| task_error_msg | String | Definition Task error message Range N/A |
Example Requests
Example Responses
Status code: 200
Request succeeded.
{
"total" : 1,
"tasks" : [ {
"task_id" : "xxxx",
"secret_name" : "xxxx",
"rotation_func_urn" : "urn:fss:cn-north-4:xxxxxxxx:function:default:xxxx:xxxxx",
"task_status" : "SUCCESS",
"attempt_nums" : 3,
"operate_type" : "MULTI_USER",
"task_time" : 1715436899000
} ],
"next_marker" : "xxxxxx"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot