doc-exports/docs/vpn/api-ref/vpn_api_1018.html
Hongwei, King Wang 32c06a10a2 vpn_api
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>
2024-08-15 14:18:28 +00:00

11 KiB

Creating Tags for a VPN

Function

This API is used to create tags for a VPN.

URI

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

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 parameter.

Table 1 Request parameter

Parameter

Type

Mandatory

Description

tag

List<resource_tag>

Yes

Specifies the tag.

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

Yes

Specifies the tag value.

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

  • Example request
    POST /v2.0/{project_id}/ipsec-site-connections/{resource_id}/tags
    {
        "tag": {
            "key": "key1",
            "value": "value1"
        }
    }
  • Example response

    None

Returned Values

For details, see Common Returned Values.