Deletes a resource share.

After you delete a resource share, all the shared targets associated with it cannot access the related shared resources. However, the shared resources are not deleted with the resource share.

The resource share that is deleted is in the Deleted state. The system deletes the record of the resource share within 48 hours to 96 hours.

In this example, the resource share rs-qSkW1HBY**** in the cn-hangzhou region is deleted.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteResourceShare

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

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.

For more information about common parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String A627EE2A-223D-4E1F-A954-394686AEA916

The ID of the request.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

  "RequestId": "A627EE2A-223D-4E1F-A954-394686AEA916"

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.
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.
409 DeleteResourceShareConflict You cannot delete a resource share while there are unfinished tasks. The error message returned because the operation is not supported while unfinished tasks exist.
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.