Changes the name of a resource share.

In this example, the name of the resource share rs-qSkW1HBY**** in the cn-hangzhou region is changed from test to new.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateResourceShare

The operation that you want to perform. Set the value to UpdateResourceShare.

RegionId String Yes cn-hangzhou

The region ID.

For more information about regions where the Resource Sharing service is available, see DescribeRegions.

ResourceShareId String Yes rs-qSkW1HBY****

The ID of the resource share.

ResourceShareName String Yes new

The new name of the resource share.

The name must be 1 to 50 characters in length.

It can contain letters, digits, periods (.), underscores (_), and hyphens (-).

For more information about common parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 2860A3A4-D8C1-4EF4-954E-84A3945E26E5

The ID of the request.

ResourceShare Struct

The information of the resource share.

CreateTime String 2020-12-03T08:02:22.413Z

The time when the resource share was created.

ResourceShareId String rs-qSkW1HBY****

The ID of the resource share.

ResourceShareName String new

The name of the resource share.

ResourceShareOwner String 151266687691****

The owner of the resource share.

ResourceShareStatus String Active

The status of the resource share. Valid values:

  • Active: The resource share is enabled.
  • Deleting: The resource share is being deleted.
  • Deleted: The resource share is deleted.
Note The system automatically deletes the records of resource shares in the Deleted state within 48 hours to 96 hours after you delete the resource shares.
UpdateTime String 2020-12-04T08:55:25.382Z

The time when the resource share was updated.

Examples

Sample requests

https://resourcesharing.aliyuncs.com/?Action=UpdateResourceShare
&RegionId=cn-hangzhou
&ResourceShareId=rs-qSkW1HBY****
&ResourceShareName=new
&<Common request parameters>

Sample success responses

XML format

<UpdateResourceShareResponse>
      <RequestId>2860A3A4-D8C1-4EF4-954E-84A3945E26E5</RequestId>
      <ResourceShare>
            <ResourceShareId>rs-qSkW1HBY****</ResourceShareId>
            <ResourceShareName>new</ResourceShareName>
            <ResourceShareStatus>Active</ResourceShareStatus>
            <CreateTime>2020-12-03T08:02:22.413Z</CreateTime>
            <UpdateTime>2020-12-04T08:55:25.382Z</UpdateTime>
            <ResourceShareOwner>151266687691****</ResourceShareOwner>
      </ResourceShare>
</UpdateResourceShareResponse>

JSON format

{
  "RequestId": "2860A3A4-D8C1-4EF4-954E-84A3945E26E5",
  "ResourceShare": {
    "ResourceShareId": "rs-qSkW1HBY****",
    "ResourceShareName": "new",
    "ResourceShareStatus": "Active",
    "CreateTime": "2020-12-03T08:02:22.413Z",
    "UpdateTime": "2020-12-04T08:55:25.382Z",
    "ResourceShareOwner": "151266687691****"
  }
}

Error codes

HTTP status code Error code Error message Description
400 MissingParameter.ResourceShareId You must specify ResourceShareId. The error message returned because the ResourceShareId parameter is not specified.
400 InvalidParameter.ResourceShareId The ResourceShareId is invalid. The error message returned because the value of the ResourceShareId parameter is invalid.
400 MissingParameter.ResourceShareName You must specify ResourceShareName. The error message returned because the ResourceShareName parameter is not specified.
400 InvalidParameter.ResourceShareName The ResourceShareName is invalid. The error message returned because the value of the ResourceShareName parameter is invalid.
400 InvalidParameter.ResourceShareName.Length The maximum length of ResourceShareName exceeds 50 characters. The error message returned because the length of the value specified for the ResourceShareName parameter has exceeded the upper limit. Specify a value that is up to 50 characters in length.
404 EntityNotExists.ResourceShare The resource share does not exist in the current account. The error message returned because the resource share does not belong to your Alibaba Cloud account.
409 ResourceShareStatusMismatchAction The status of the resource share does not allow the specified operation. The error message returned because the operation is not supported while the resource share is in the current state.
400 InvalidParameter The specified parameter is invalid. The error message returned because a specified parameter is invalid.

For a list of error codes, visit the API Error Center.