All Products
Search
Document Center

Cloud Enterprise Network:DescribeGrantRulesToResource

Last Updated:Mar 25, 2026

Queries the permissions that a network instance has on a Cloud Enterprise Network (CEN) instance owned by another Alibaba Cloud account. This operation returns details such as the main account that owns the CEN instance and the payer for the network instance.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:DescribeGrantRulesToResource

get

*VPC

acs:vpc:*:{#accountId}:vpc/{#VpcId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID of the network instance.

You can call the DescribeChildInstanceRegions operation to query region IDs.

cn-hangzhou

ResourceId

string

Yes

The ID of the network instance.

vpc-p0wfut1iqauelpdpb****

ProductType

string

Yes

The type of the network instance. Valid values:

  • VPC: a Virtual Private Cloud (VPC) instance.

  • ExpressConnect: a Virtual Border Router (VBR) instance.

  • VPN: an IPsec connection.

  • ECR: an ExpressConnect Router (ECR) instance.

VPC

MaxResults

integer

No

  • If you omit this parameter, all entries are returned in a single response. In this case, the MaxResults field in the response indicates the total number of entries.

  • If you specify the MaxResults parameter, the query is paginated. MaxResults sets the number of entries per page. The value must be an integer from 1 to 100. The MaxResults value in the response indicates the number of entries on the current page. The recommended value for this parameter is 20.

20

NextToken

string

No

The token used to retrieve the next page of results. Valid values:

  • Omit this parameter for the first request.

  • For subsequent requests, set this parameter to the NextToken value from the previous response.

FFmyTO70tTpLG6I3FmYAXGKPd****

Response elements

Element

Type

Description

Example

object

The response object.

NextToken

string

The token to use in your next request to retrieve a new page of results. Valid values:

  • If the NextToken parameter is empty, no more results are available.

  • If a value is returned for NextToken, use it for the next request to get the next page of results.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

C6E5992C-A57B-5A6C-9B26-568074DC68BA

TotalCount

integer

The total number of entries returned.

1

MaxResults

integer

  • If the MaxResults parameter was not included in the request, this field indicates the total number of entries.

  • If the MaxResults parameter was included in the request, this field indicates the number of entries on the current page.

1

GrantRules

array<object>

A list of permission records.

object

A permission record.

CenOwnerId

integer

The ID of the main account that owns the Cloud Enterprise Network (CEN) instance.

1250123456123456

OrderType

string

The payer for the network instance. Valid values:

  • PayByCenOwner: The CEN instance owner pays the Transit Router connection and data processing fees for the network instance.

  • PayByResourceOwner: The network instance owner pays the Transit Router connection and data processing fees for the network instance.

PayByCenOwner

EffectiveOrderType

string

PayByCenOwner

CenId

string

The ID of the Cloud Enterprise Network (CEN) instance.

cen-44m0p68spvlrqq****

CreateTime

string

The timestamp when the permission was granted. The value is in UTC and follows the ISO 8601 standard: YYYY-MM-DDThh:mmZ.

2024-01-24T16:46Z

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "C6E5992C-A57B-5A6C-9B26-568074DC68BA",
  "TotalCount": 1,
  "MaxResults": 1,
  "GrantRules": [
    {
      "CenOwnerId": 1250123456123456,
      "OrderType": "PayByCenOwner",
      "EffectiveOrderType": "PayByCenOwner",
      "CenId": "cen-44m0p68spvlrqq****",
      "CreateTime": "2024-01-24T16:46Z"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter Invalid parameter.
400 MissingParameter Missing parameter.
400 InvalidParameter.RegionId The specified Region Id is invalid. The error message returned because the specified region ID is invalid.
400 MissingParameter.RegionId Missing RegionId parameter. Missing RegionId parameter.
400 IllegalParam.NextToken NextToken is illegal The error message returned because the NextToken parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.