All Products
Search
Document Center

Resource Management:ListResourceSharePermissions

Last Updated:Aug 28, 2026

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

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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: the current account

  • OtherAccounts: an account other than the current account

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:

  • false: The version is not the default version.

  • true: The version is the default version.

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:

  • false: The permission is not the default permission.

  • true: The permission is the default permission.

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.