Batch Creating or Deleting VPN Tags

Function

This API is used to batch create or delete VPN tags.

This API is idempotent.

URI

POST /v2.0/{project_id}/ipsec-site-connections/{resource_id}/tags/action

In the URI, project_id indicates the project ID, and resource_id indicates the ID of the target resource.

Request

Table 1 describes the request parameters.

Table 1 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.

Table 2 Description of field resource_tag

Name

Type

Mandatory

Description

key

String

Yes

Specifies the tag key.

The key

  • Must be unique for a resource.
  • Cannot be left blank.
  • Can contain a maximum of 36 characters.
  • Can contain only the following character types:
    • Uppercase letters
    • Lowercase letters
    • Digits
    • Hyphens (-) and underscores (_)

value

String

  • value is mandatory when action is set to create.
  • value is optional when action is set to delete.

Specifies the list of tag values.

The value

  • Can contain a maximum of 43 characters.
  • Can contain only the following character types:
    • Uppercase letters
    • Lowercase letters
    • Digits
    • Hyphens (-) and underscores (_)

Response

None

Example

Returned Values

For details, see Common Returned Values.