All Products
Search
Document Center

Cloud Enterprise Network:DescribeGrantRulesToResource

Last Updated:Jan 11, 2023

Queries permissions granted to Cloud Enterprise Network (CEN) instances that belong to another Alibaba Cloud account.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operate access level Resource type conditional keyword Association operation
cen:DescribeGrantRulesToResource Read
  • VPC
    acs:vpc:*:{#accountId}:vpc/{#VpcId}
    without
without

Request parameters

Parameter Type Required Description Example
RegionId string Yes

The ID of the region where the network instance is deployed.

You can call the DescribeChildInstanceRegions operation to query the most recent region list.

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: virtual private cloud (VPC)
  • ExpressConnect: virtual border router (VBR)
  • VPN: IPsec-VPN connection
VPC
MaxResults integer No
  • If you do not set MaxResults, it indicates that you do not need to query results in batches. The value of MaxResults indicates the total number of entries.
  • If you specify a value for MaxResults, it indicates that you need to query results in batches. The value of MaxResults indicates the number of entries to return in each batch. Valid values: 1 to 100. The value of MaxResults in the response indicates the number of entries in the current batch. We recommend that you set MaxResults to 20.
20
NextToken string No

The token that determines the start point of the query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a subsequent query is to be sent, set the value to the value of NextToken that was returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****

Response parameters

Parameter Type Description Example
object
NextToken string

The token that determines the start point of the query. Valid values:

  • If NextToken was not returned in the previous query, it indicates that no additional results exist.
  • If NextToken was returned in the previous query, specify the value to obtain the next set of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestId string

The ID of the request.

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

The number of entries returned.

1
MaxResults integer
  • If no value is specified for MaxResults, query results are returned in one batch. The value of MaxResults indicates the total number of entries.
  • If a value is specified for MaxResults, it indicates that you need to query results in batches. The value of MaxResults in the response indicates the number of entries in the current batch.
1
GrantRules array

The permissions that are granted to the CEN instance.

object
CenOwnerId long

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

1250123456123456
OrderType string

The entity that pays the fees of the network instance. Valid values:

  • PayByCenOwner: The fees of the connections and data forwarding on the transit router are paid by the Alibaba Cloud account to which the CEN instance belongs.
  • PayByResourceOwner: The fees of the connections and data forwarding on the transit router are paid by the Alibaba Cloud account to which the network instance belongs.
PayByCenOwner
CenId string

The ID of the CEN instance.

cen-44m0p68spvlrqq****

Example

Normal return example

JSONFormat

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

Error codes

Http code Error code Error message
400 InvalidParameter Invalid parameter.
400 MissingParameter Missing parameter.
400 InvalidParameter.RegionId The specified Region Id is invalid.

For a list of error codes, visit the API error center.

Change history

Change time Summary of changes Operate
2022-09-22 Add Operation