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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeEcGrantRelation

The operation that you want to perform. Set the value to DescribeEcGrantRelation.

InstanceType String Yes VBR

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.
InstanceId String Yes vbr-bp12mw1f8k3jgygk9****

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.
PageNumber Long No 1

The number of the page to return. Default value: 1.

PageSize Long No 10

The number of entries to return on each page. Maximum value: 50. Default value: 10.

VbrRegionNo String No cn-hangzhou

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.

Response parameters

Parameter Type Example Description
RequestId String E6E90F6B-2B41-5AAF-ABEB-236ADBAAD91D

The ID of the request.

EcGrantRelations Array of EcGrantRelationModel

The query results.

VbrOwnerUid Long 1210123456123456

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

VbrInstanceId String vbr-m5ex0xf63xk8s5bob****

The ID of the VBR.

InstanceId String vpc-bp1brjuegjc88v3u9****

The ID of the VPC.

AliUid Long 1250123456123456

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

RegionNo String cn-hangzhou

The ID of the region where the VPC is deployed.

Status String Created

The query result. Valid values:

  • Created: The VBR has permissions on the VPC.
  • Deleted: The VBR does not have permissions on the VPC.
InstanceName String VPCname

The name of the VPC.

InstanceRouterId String vrt-bp1i0yzgjd8ra05ec****

The ID of the vRouter.

VbrRegionNo String cn-hangzhou

The ID of the region where the VBR is deployed.

GmtCreate String 2022-09-02T11:46Z

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

GrantType String All

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.
TotalCount Integer 10

The total number of entries returned.

Count Integer 1

The total number of entries returned.

Page Integer 1

The number of the returned page.

PageSize Integer 10

The number of entries returned on each page.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeEcGrantRelation
&InstanceType=VBR
&InstanceId=vbr-bp12mw1f8k3jgygk9****
&PageNumber=1
&PageSize=10
&VbrRegionNo=cn-hangzhou
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

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

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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

HttpCode Error code Error message Description
400 InvalidParam.NotNull The parameter must not be null. The error message returned because one or more parameters are not set.
400 Parameter.Illegal The parameter is illegal. The error message returned because a parameter is set to an invalid value.
404 VRouterId.NotFound The VRouter not found. The error message returned because the specified vRouter cannot be found.
404 Instance.NotExist The instance not exist. The error message returned because the specified instance does not exist.

For a list of error codes, see Service error codes.