Queries the permissions that are associated with a resource share.
Operation description
The following example shows how to query the permissions associated with a resource share created by the current Alibaba Cloud account in the cn-hangzhou region.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceShareId |
string |
Yes |
The ID of the resource share. |
rs-6GRmdD3X**** |
| MaxResults |
integer |
No |
The maximum number of entries to return per request. Valid values: 1 to 100. Default value: 20. |
20 |
| NextToken |
string |
No |
The token used to retrieve the next page of results. If the current response is truncated, use this token to obtain the remaining records. |
TGlzdFJlc291cm**** |
| ResourceOwner |
string |
Yes |
The owner of the resource share. Valid values:
|
Self |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The token used to retrieve the next page of results. If the current response is truncated, use this token to obtain the remaining records. |
TGlzdFJlc291cm**** |
| RequestId |
string |
The ID of the request. |
2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA |
| Permissions |
array<object> |
The information about the permissions. |
|
|
object |
The information about the permissions. |
||
| PermissionName |
string |
The name of the permission. |
AliyunRSDefaultPermissionVSwitch |
| PermissionVersion |
string |
The version of the permission. |
v1 |
| DefaultVersion |
boolean |
Indicates whether the version is the default version. Valid values:
|
true |
| CreateTime |
string |
The creation time. |
2020-12-07T07:39:01.818Z |
| UpdateTime |
string |
The update time. |
2020-12-07T07:39:01.818Z |
| ResourceType |
string |
The type of the shared resources. For more information about the types of resources that can be shared, see Services that work with Resource Sharing. |
vSwitch |
| DefaultPermission |
boolean |
Indicates whether the permission is the default permission. Valid values:
|
true |
Examples
Success response
JSON format
{
"NextToken": "TGlzdFJlc291cm****",
"RequestId": "2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA",
"Permissions": [
{
"PermissionName": "AliyunRSDefaultPermissionVSwitch",
"PermissionVersion": "v1",
"DefaultVersion": true,
"CreateTime": "2020-12-07T07:39:01.818Z",
"UpdateTime": "2020-12-07T07:39:01.818Z",
"ResourceType": "VSwitch",
"DefaultPermission": true
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.ResourceShareId | You must specify ResourceShareId. | |
| 400 | InvalidParameter.ResourceShareId | The ResourceShareId is invalid. | |
| 400 | InvalidParameter.MaxResults | The MaxResults is invalid. | |
| 400 | InvalidParameter.NextToken | The NextToken is invalid. | |
| 400 | InvalidParameter.NextToken.Length | The maximum length of NextToken exceeds 256 characters. | |
| 400 | InvalidParameter.ResourceOwner | The ResourceOwner is invalid. | |
| 400 | MissingParameter.ResourceOwner | You must specify ResourceOwner. | |
| 404 | EntityNotExists.ResourceShare | The resource share does not exist in the current account. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.