forked from docs/doc-exports
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com> Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
16 KiB
16 KiB
Batch Creating or Deleting VPN Tags
Function
This API is used to batch create or delete VPN tags.
This API is idempotent.
- If there are duplicate keys in the request body when you add tags, an error is reported.
- During tag creation, each key must be unique. If the key already exists, the previous value of the key is overwritten.
- If the tag to be deleted does not exist, the deletion is considered successful by default.
- During tag deletion, the value range of the tag character set is not verified.
- When you delete tags, tags is mandatory, and key cannot be left blank or be an empty string.
URI
POST /v2.0/{project_id}/ipsec-site-connections/{resource_id}/tags/action
Request
Table 1 describes the request parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
tags |
List<resource_tag> |
Yes |
Specifies the list of tags. Up to 10 keys are supported. |
action |
String |
Yes |
Specifies the operation identifier. The identifier can be create or delete. |
Name |
Type |
Mandatory |
Description |
---|---|---|---|
key |
String |
Yes |
Specifies the tag key. The key
|
value |
String |
|
Specifies the list of tag values. The value
|
Response
None
Example
- Example request
POST /v2.0/{project_id}/ipsec-site-connections/{resource_id}/tags/action
Request body{ "action": "create", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key", "value": "value3" } ] }
Or
{ "action": "delete", "tags": [ { "key": "key1", "value": "value1" }, { "key": "key2", "value": "value3" } ] }
Returned Values
For details, see Common Returned Values.
Parent topic: Tag Management