forked from docs/cloud-firewall
8.5 KiB
8.5 KiB
- original_name
CancelCaptureTask.html
cancel capture task
Function
cancel capture task
URI
POST /v1/{project_id}/capture-task/stop
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID |
Parameter | Mandatory | Type | Description |
---|---|---|---|
fw_instance_id | Yes | String | Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. For details, see the API Explorer and Help Center FAQ.By default, if fw_instance_Id is not specified, information about the first firewall under the account is returned. If fw_instance_Id is specified, information about the firewall with this fw_instance_Id is returned.If object_Id is specified, information about the firewall with this object_Id is returned by default. If both fw_instance_Id and object_Id are specified, the specified object_Id must belong to the specified firewall. |
enterprise_project_id | No | String | Enterprise project id, the id generated by the enterprise project after the user supports the enterprise project. |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | No | String | User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
task_id | No | String | cancel capture task dto |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
data | IdObject <cancelcapturetask__response_idobject> object |
cancel capture task response |
Parameter | Type | Description |
---|---|---|
id | String | ID |
name | String | name |
Example Requests
Stop the packet capture task with project ID 09bb24e6fe80d23d2fa2c010b53b418c and firewall ID ebf891cd-2163-48a0-9963-6309f99dd3c4 and task ID 1dcddab3-7d79-4a56-9e67-4aa0962b98ad.
https://{Endpoint}/v1/09bb24e6fe80d23d2fa2c010b53b418c/capture-task/stop?fw_instance_id=ebf891cd-2163-48a0-9963-6309f99dd3c4&enterprise_project_id=default
{
"task_id" : "1dcddab3-7d79-4a56-9e67-4aa0962b98ad"
}
Example Responses
Status code: 200
cancle capture task response
{
"data" : {
"id" : "ebf891cd-2163-48a0-9963-6309f99dd3c4",
"name" : "test"
}
}
Status Codes
Status Code | Description |
---|---|
200 | cancle capture task response |
Error Codes
See Error Codes <errorcode>
.