Associates a shared permission with a resource share.
Operation description
This topic provides an example of associating the shared permission AliyunRSDefaultPermissionVSwitch with the resource share rs-6GRmdD3X**** in the cn-hangzhou region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
resourcesharing:AssociateResourceSharePermission |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceShareId |
string |
Yes |
The ID of the resource share. |
rs-6GRmdD3X**** |
| PermissionName |
string |
Yes |
The name of the shared permission. |
AliyunRSDefaultPermissionVSwitch |
| Replace |
boolean |
No |
Specifies whether the specified permission replaces the existing permissions. Valid values:
|
false |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
111FB84A-60A9-403E-9067-E55D7EE95BD1 |
Examples
Success response
JSON format
{
"RequestId": "111FB84A-60A9-403E-9067-E55D7EE95BD1"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.ResourceShareId | The ResourceShareId is invalid. | The ResourceShareId parameter is invalid. |
| 400 | MissingParameter.ResourceShareId | You must specify ResourceShareId. | You must specify ResourceShareId. |
| 400 | MissingParameter.PermissionName | You must specify PermissionName. | PermissionName is not configured. |
| 404 | EntityNotExists.Permission | The resource share permission does not exist. | You do not have the required permissions. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.