Modifies the information of a resource share.
Operation description
You can call this API operation to change the name or resource sharing scope of a resource share.
This topic provides an example on how to call the API operation to change the name of the resource share rs-qSkW1HBY****
in the cn-hangzhou
region from test
to new
.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- 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 Key: the condition key that is defined by the cloud service.
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
*All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ResourceShareId | string | Yes | The ID of the resource share. | rs-qSkW1HBY**** |
ResourceShareName | string | Yes | The new name of the resource share. The name must be 1 to 50 characters in length. The name can contain letters, digits, periods (.), underscores (_), and hyphens (-). | new |
AllowExternalTargets | boolean | No | Specifies whether resources in the resource share can be shared with accounts outside the resource directory. Valid values:
| false |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "2860A3A4-D8C1-4EF4-954E-84A3945E26E5",
"ResourceShare": {
"UpdateTime": "2020-12-04T08:55:25.382Z",
"ResourceShareName": "new",
"ResourceShareOwner": "151266687691****",
"CreateTime": "2020-12-03T08:02:22.413Z",
"ResourceShareId": "rs-qSkW1HBY****",
"ResourceShareStatus": "Active",
"AllowExternalTargets": false
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
You must specify ResourceShareId. | |||
The ResourceShareId parameter is invalid. | |||
The ResourceShareName parameter is missing. | |||
The ResourceShareName parameter is invalid. | |||
The length of ResourceShareName cannot exceed 50 characters. | |||
The specified parameter is invalid. | |||
The resource share does not exist in the current account. | |||
You are not authorized to perform this operation. | |||
The status of the resource share does not allow the specified operation. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
View Change Details | ||
View Change Details |