Creating a Tag
Function
This API is used to create a tag.
URI
POST /v2/{project_id}/cfw-cfw/{fw_instance_id}/tags/create
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. |
fw_instance_id | Yes | String | Firewall ID, which can be obtained by referring to Obtaining a Firewall ID. |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | User token. You can obtain the token by referring to Obtaining a User Token. |
Content-Type | Yes | String | Content type. It can only be set to application/json. |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
tags | No | Array of CreateTag objects | Create a firewall tag list. |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
- | String |
Example Requests
Add a tag whose key is keytest and value is valuetest to firewall 5e7eba7f-5de4-4ce9-8f60-11330dfc6565 in project 0b2179bbe180d3762fb0c01a2d5725c7.
https://{Endpoint}/v2/0b2179bbe180d3762fb0c01a2d5725c7/cfw-cfw/5e7eba7f-5de4-4ce9-8f60-11330dfc6565/tags/create
{
"tags" : [ {
"key" : "keytest",
"value" : "valuetest"
} ]
} Example Responses
None
Status Codes
Status Code | Description |
|---|---|
200 | OK |
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
