All Products
Search
Document Center

Virtual Private Cloud:DescribeEcGrantRelation

Last Updated:Aug 28, 2026

Queries whether permissions on a virtual private cloud (VPC) are granted to a virtual border router (VBR).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

InstanceType

string

Yes

The type of instance. Valid values:

  • VBR: queries the permissions that are granted to a VBR.

  • VPC: queries the permissions that are granted from a VPC.

VBR

InstanceId

string

Yes

The ID of the instance.

  • If you set InstanceType to VBR, specify a VBR ID.

  • If you set InstanceType to VPC, specify a VPC ID.

vbr-bp12mw1f8k3jgygk9****

PageNumber

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Maximum value: 50. Default value: 10.

10

VbrRegionNo

string

No

The ID of the region where the instance is deployed.

  • If InstanceType is set to VBR, this parameter is required.

  • If InstanceType is set to VPC, you can ignore this parameter.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

The request ID.

RequestId

string

The request ID.

E6E90F6B-2B41-5AAF-ABEB-236ADBAAD91D

EcGrantRelations

array<object>

The query results.

object

VbrOwnerUid

integer

The ID of the Alibaba Cloud account to which the VBR belongs.

1210123456123456

VbrInstanceId

string

The ID of the VBR.

vbr-m5ex0xf63xk8s5bob****

InstanceId

string

The ID of the VPC.

vpc-bp1brjuegjc88v3u9****

AliUid

integer

The ID of the Alibaba Cloud account to which the VPC belongs.

1250123456123456

RegionNo

string

The ID of the region where the VPC is deployed.

cn-hangzhou

Status

string

The grant status. Valid values:

  • Created: The VBR has permissions on the VPC.

  • Deleted: The VBR does not have permissions on the VPC.

Created

InstanceName

string

The name of the VPC.

VPCname

InstanceRouterId

string

The ID of the vRouter.

vrt-bp1i0yzgjd8ra05ec****

VbrRegionNo

string

The ID of the region where the VBR is deployed.

cn-hangzhou

GmtCreate

string

The time when permissions on the VPC were granted to the VBR.

2022-09-02T11:46Z

GrantType

string

The grant scope. Valid values:

  • All: VBRs that reside in the specified region and belong to the specified Alibaba Cloud account all have permissions on the VPC.

  • Specify: Only the specified VBR has permissions on the VPC.

All

TotalCount

integer

The total number of entries returned.

10

Count

integer

The total number of entries returned.

1

Page

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

Examples

Success response

JSON format

{
  "RequestId": "E6E90F6B-2B41-5AAF-ABEB-236ADBAAD91D",
  "EcGrantRelations": [
    {
      "VbrOwnerUid": 1210123456123456,
      "VbrInstanceId": "vbr-m5ex0xf63xk8s5bob****",
      "InstanceId": "vpc-bp1brjuegjc88v3u9****",
      "AliUid": 1250123456123456,
      "RegionNo": "cn-hangzhou",
      "Status": "Created",
      "InstanceName": "VPCname",
      "InstanceRouterId": "vrt-bp1i0yzgjd8ra05ec****",
      "VbrRegionNo": "cn-hangzhou",
      "GmtCreate": "2022-09-02T11:46Z",
      "GrantType": "All"
    }
  ],
  "TotalCount": 10,
  "Count": 1,
  "Page": 1,
  "PageSize": 10
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParam.NotNull The parameter must not be null.
400 Parameter.Illegal The parameter is illegal. The parameter is invalid.
400 Instance.StatusError The status of instance error.
400 InvalidRegionId.NotFound The regionId provided does not exist in ec region list.
404 VRouterId.NotFound The VRouter not found. The specified vRouter cannot be found.
404 Instance.NotExist The instance not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.