Enables the recycle bin feature for a General-purpose NAS file system.

Debugging

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 EnableRecycleBin

The operation that you want to perform.

Set the value to EnableRecycleBin.

FileSystemId String Yes 1ca404****

The ID of the file system for which you want to enable the recycle bin feature.

ReservedDays Long No 3

The period for which the files in the recycle bin are retained. Unit: days.

Valid values: 1 to 180.

Default value: 3.

Response parameters

Parameter Type Example Description
RequestId String 9E15E394-38A6-457A-A62A-D9797C9A****

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=EnableRecycleBin
&FileSystemId=1ca404****
&ReservedDays=3
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<EnableRecycleBinResponse>
    <RequestId>9E15E394-38A6-457A-A62A-D9797C9A****</RequestId>
</EnableRecycleBinResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9E15E394-38A6-457A-A62A-D9797C9A****"
}

Error codes

HttpCode Error code Error message Description
400 IllegalCharacters The parameter contains illegal characters. The error message returned because the specified value of a parameter is invalid.
400 MissingFileSystemId FileSystemId is mandatory for this action. The error message returned because the FileSystemId parameter is not specified.
403 OperationDenied.RecycleBinEnabled The recycle bin is already enabled. The error message returned because the specified recycle bin is already enabled.
404 InvalidFileSystem.NotFound The specified file system does not exist. The error message returned because the specified file system does not exist.

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