Associates permissions with a resource share.
Operation description
This example associates the AliyunRSDefaultPermissionVSwitch permission with the rs-6GRmdD3X**** resource share 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**** |
| PermissionName |
string |
Yes |
The name of the permission. |
AliyunRSDefaultPermissionVSwitch |
| Replace |
boolean |
No |
Whether to replace an existing permission with the specified one. Valid values:
|
false |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| 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. | |
| 400 | MissingParameter.ResourceShareId | You must specify ResourceShareId. | |
| 400 | MissingParameter.PermissionName | You must specify PermissionName. | |
| 404 | EntityNotExists.Permission | The resource share permission does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.