• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. APIs
  5. VPC Tag Management
  6. Creating a Tag for a VPC

Creating a Tag for a VPC

Function

This interface is used to create a tag for a VPC. In the URI, project_id indicates the project ID, and vpc_id indicates the target VPC ID.

URI

POST /v2.0/{project_id}/vpcs/{vpc_id}/tags

Request Message

  • Request parameter
    Table 1 Request parameter

    Parameter

    Type

    Mandatory

    Description

    tag

    resource_tag

    Yes

    Specifies the tag.

  • Example request
    {
        "tag": {
            "key": "key1",
            "value": "value1"
        }
    }

Response Message

  • Response parameter

    None

  • Example response

    None

Status Codes

Normal Response Code

Type

Description

204

No Content

Specifies the normal response code for the POST operation.

Error Codes

For details, see section VPC Tag Error Codes.