All Products
Search
Document Center

Express Connect:DescribeVpcGrantRulesToEcr

Last Updated:Oct 28, 2025

Queries the cross-account authorization information of an ECR for a specified network instance.

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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeVpcGrantRulesToEcrlist
*VPC
acs:vpc:{#regionId}:{#accountId}:vpc/{#InstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MaxResultsintegerNo

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

50
NextTokenstringNo

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

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

The ID of the network instance.

vpc-wz9ek66wd7tl5xqpy****
EcrInstanceIdstringNo

The ID of the ECR that you want to query.

ecr-ncxadcujadncsa****
EcrOwnerIdlongNo

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

Note If you want to connect to a network instance that belongs to a different account, this parameter is required.
192732132151****
RegionIdstringYes

The region ID of the network instance that you want to query.

cn-hangzhou
ResourceGroupIdstringNo

The ID of the resource group to which the network instance belongs.

rg-acfmxazb4ph6aiy****
Tagsarray<object>No

The tag.

objectNo

Details of the tag.

KeystringNo

The key of the tag. You must specify at least one tag key and at most 20 tag keys. The tag key cannot be an empty string.

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

FinanceDept
ValuestringNo

The value of the tag. You can enter a maximum of 20 tag values. The tag value can be an empty string.

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

FinanceJoshua
InstanceTypestringNo

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.
VPC

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

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

  • If NextToken is empty, there is no next page.

FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The unique ID that Alibaba Cloud generates for the request.

66342E8E-5E87-5FF9-80C7-C3E3571A****
TotalCountstring

The total number of instances queried. If you specify the MaxResults and NextToken request parameters to perform a paged query, the value of the TotalCount response parameter is invalid.

10
GrantRuleModelsarray<object>

The authorization information.

GrantRuleModelsobject

The authorization information.

InstanceIdstring

The ID of the network instance.

vpc-wz9ek66wd7tl5xqpy****
Typestring

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.
VPC
InstanceUidlong

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

192745367151****
RegionNostring

The ID of the region where the instance is deployed.

cn-hangzhou
EcrIdstring

The ECR ID.

ecr-tz7w3chlaptxr2****
EcrOwnerIdlong

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

192732132151****
CreationTimestring

The creation time in milliseconds.

2024-09-09T02:14:51Z

Examples

Sample success responses

JSONformat

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "66342E8E-5E87-5FF9-80C7-C3E3571A****",
  "TotalCount": 10,
  "GrantRuleModels": [
    {
      "InstanceId": "vpc-wz9ek66wd7tl5xqpy****",
      "Type": "VPC",
      "InstanceUid": 0,
      "RegionNo": "cn-hangzhou",
      "EcrId": "ecr-tz7w3chlaptxr2****",
      "EcrOwnerId": 0,
      "CreationTime": "2024-09-09T02:14:51Z"
    }
  ]
}

Error codes

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