GetRule - Recycle Bin


Gets information about a Recycle Bin retention rule.

Request Syntax

GET /rules/identifier HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


The unique ID of the retention rule.

Pattern: [0-9a-zA-Z]{11}

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Description": "string", "Identifier": "string", "LockConfiguration": { "UnlockDelay": { "UnlockDelayUnit": "string", "UnlockDelayValue": number } }, "LockEndTime": number, "LockState": "string", "ResourceTags": [ { "ResourceTagKey": "string", "ResourceTagValue": "string" } ], "ResourceType": "string", "RetentionPeriod": { "RetentionPeriodUnit": "string", "RetentionPeriodValue": number }, "RuleArn": "string", "Status": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The retention rule description.

Type: String

Pattern: ^[\S ]{0,255}$


The unique ID of the retention rule.

Type: String

Pattern: [0-9a-zA-Z]{11}


Information about the retention rule lock configuration.

Type: LockConfiguration object


The date and time at which the unlock delay is set to expire. Only returned for retention rules that have been unlocked and that are still within the unlock delay period.

Type: Timestamp


The lock state for the retention rule.

  • locked - The retention rule is locked and can't be modified or deleted.

  • pending_unlock - The retention rule has been unlocked but it is still within the unlock delay period. The retention rule can be modified or deleted only after the unlock delay period has expired.

  • unlocked - The retention rule is unlocked and it can be modified or deleted by any user with the required permissions.

  • null - The retention rule has never been locked. Once a retention rule has been locked, it can transition between the locked and unlocked states only; it can never transition back to null.

Type: String

Valid Values: locked | pending_unlock | unlocked


Information about the resource tags used to identify resources that are retained by the retention rule.

Type: Array of ResourceTag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.


The resource type retained by the retention rule.

Type: String



Information about the retention period for which the retention rule is to retain resources.

Type: RetentionPeriod object


The Amazon Resource Name (ARN) of the retention rule.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1011.

Pattern: ^arn:aws(-[a-z]{1,3}){0,2}:rbin:[a-z\-0-9]{0,63}:[0-9]{12}:rule/[0-9a-zA-Z]{11}{0,1011}$


The state of the retention rule. Only retention rules that are in the available state retain resources.

Type: String

Valid Values: pending | available


For information about the errors that are common to all actions, see Common Errors.


The service could not respond to the request due to an internal problem.

HTTP Status Code: 500


The specified resource was not found.

HTTP Status Code: 404


One or more of the parameters in the request is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: