All Products
Search
Document Center

Virtual Private Cloud:DescribeEcGrantRelation

Last Updated:Mar 21, 2025

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

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.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceTypestringYes

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
InstanceIdstringYes

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****
PageNumberlongNo

The page number. Default value: 1.

1
PageSizelongNo

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

10
VbrRegionNostringNo

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 parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

E6E90F6B-2B41-5AAF-ABEB-236ADBAAD91D
EcGrantRelationsarray<object>

The query results.

EcGrantRelationModelobject
VbrOwnerUidlong

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

1210123456123456
VbrInstanceIdstring

The ID of the VBR.

vbr-m5ex0xf63xk8s5bob****
InstanceIdstring

The ID of the VPC.

vpc-bp1brjuegjc88v3u9****
AliUidlong

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

1250123456123456
RegionNostring

The ID of the region where the VPC is deployed.

cn-hangzhou
Statusstring

The query result. Valid values:

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

The name of the VPC.

VPCname
InstanceRouterIdstring

The ID of the vRouter.

vrt-bp1i0yzgjd8ra05ec****
VbrRegionNostring

The ID of the region where the VBR is deployed.

cn-hangzhou
GmtCreatestring

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

2022-09-02T11:46Z
GrantTypestring

The VBRs that have permissions on the VPC. 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
TotalCountinteger

The total number of entries returned.

10
Countinteger

The total number of entries returned.

1
Pageinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParam.NotNullThe parameter must not be null.A required parameter is not specified.
400Parameter.IllegalThe parameter is illegal.The parameter is invalid.
400Instance.StatusErrorThe status of instance error. -
404VRouterId.NotFoundThe VRouter not found.The specified vRouter cannot be found.
404Instance.NotExistThe instance not exist.-

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

Change history

Change timeSummary of changesOperation
2024-11-12The Error code has changedView Change Details
2024-08-16The Error code has changedView Change Details
2023-09-25API Description Update. The Error code has changedView Change Details