All Products
Search
Document Center

Virtual Private Cloud:ListTagResourcesForExpressConnect

Last Updated:Dec 02, 2023

Queries the tags that are added to an Express Connect circuit.

Operation Description

  • If you want to query a specific object, you must specify ResourceId.N or Tag.N that consists of Tag.N.Key and Tag.N.Value in the request.
  • Tag.N is a resource tag that consists of a key-value pair. If you specify only Tag.N.Key, all tag values that are associated with the specified key are returned. If you specify only Tag.N.Value, an error message is returned.
  • If you specify Tag.N and ResourceId.N to filter tags, ResourceId.N must match all specified key-value pairs.
  • If you specify multiple key-value pairs, resources that contain these key-value pairs are returned.

debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceTypestringYes

The type of the resource. Valid values:

  • PHYSICALCONNECTION: Express Connect circuit.
  • VIRTUALBORDERROUTER: virtual border router (VBR).
  • ROUTERINTERFACE: router interface.
PHYSICALCONNECTION
RegionIdstringYes

The ID of the region to which the resource resides.

You can call the DescribeRegions operation to obtain the region ID.

cn-hangzhou
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results.

  • You do not need to specify this parameter for the first request.
  • You must specify the token that is obtained from the previous query as the value of NextToken.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultsintegerNo

The number of entries per page. Valid values: 1 to 100. Default value: 20.

20
ResourceIdarrayNo

The resource IDs.

stringNo

The resource ID. You can specify up to 20 resource IDs.

pc-bp16qjewdsunr41m1****
Tagobject []No

The tags.

KeystringNo

The key of the tag to add to the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

FinanceDept
ValuestringNo

The value of the tag to add to the resource. You can specify up to 20 tag values The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

A pagination token. It can be used in the next request to retrieve a new page of results.

  • If NextToken is empty, no next page exists.
  • If a value is returned for NextToken, the value can be used in the next request to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B45
TagResourcesobject []

The tags that are added to the resource.

ResourceTypestring

The type of the resource. Valid values:

  • PHYSICALCONNECTION: Express Connect circuit.
  • VIRTUALBORDERROUTER: VBR.
  • ROUTERINTERFACE: router interface.
PHYSICALCONNECTION
TagValuestring

The value of the tag that is added to the resource.

FinanceJoshua
ResourceIdstring

The resource ID.

pc-bp16qjewdsunr41m1****
TagKeystring

The key of the tag that is added to the resource.

FinanceDept

Examples

Sample success responses

JSONformat

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "TagResources": {
    "TagResource": [
      {
        "ResourceType": "PHYSICALCONNECTION",
        "TagValue": "FinanceJoshua",
        "ResourceId": "pc-bp16qjewdsunr41m1****",
        "TagKey": "FinanceDept"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidTagKeyThe tag keys are not valid.The tag index is invalid.
400InvalidTagValueThe tag values are not valid.The tag value is invalid.
400InvalidInstanceType.NotFoundThe instance type is not foundThe instance type is not found.
400InvalidInstanceIds.NotFoundThe instanceIds are not foundThe instance ID is not found.
400Forbidden.TagKeysThe request do not allow to operate the tag keysYou do not have the permissions to set the TagKeys parameter.
400QuotaExceeded.TagNumCustom Tags quota exceededThe upper limit is reached.
400Forbidden.TagKey.DuplicatedThe specified tag key already exists.The tag resources are duplicate.
400SizeLimitExceeded.TagNumThe maximum number of tags is exceeded.The number of tags has reached the upper limit.
400SizeLimitExceeded.ResourceIdThe maximum number of resource IDs is exceeded.The number of resource group IDs has reached the upper limit.
403ForbiddenUser not authorized to operate on the specified resource.You do not have the permissions to manage the specified resource. Apply for the permissions and try again.
403BothEmpty.TagsAndResourcesThe specified Tags and ResourcesIds are not allow to both empty.The tags and resource groups cannot be empty at the same time.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-11API Description Update,The error codes of the API operation change.see changesets
Change itemChange content
API DescriptionAPI Description Update
Error CodesThe error codes of the API operation change.
    delete Error Codes: 400
    delete Error Codes: 403