All Products
Search
Document Center

ENS:GetBucketLifecycle

Last Updated:Apr 29, 2024

Queries lifecycle rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
BucketNamestringYes

The name of the bucket.

tese
RuleIdstringNo

The ID of the rule that you want to query. If this parameter is not specified, all rules are returned.

1

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

A2583E8B-B930-4F59-ADC0-0E209A90C46E
Ruleobject []

The detailed information about the rule.

IDstring

The unique ID of the rule.

1
Expirationobject

The expiration time.

Daysstring

The validity period, in days.

5
CreatedBeforeDatestring

The expiration date.

yyy-MM-DDThh:mm:ssZ
Prefixstring

The prefix that is applied to the rule.

image
Statusstring

The status of the rule. Valid values:

  • Enabled: The rule is periodically executed.
  • Disabled: The rule is ignored.
Enabled

Examples

Sample success responses

JSONformat

{
  "RequestId": "A2583E8B-B930-4F59-ADC0-0E209A90C46E",
  "Rule": [
    {
      "ID": "1",
      "Expiration": {
        "Days": "5",
        "CreatedBeforeDate": "yyy-MM-DDThh:mm:ssZ"
      },
      "Prefix": "image",
      "Status": "Enabled"
    }
  ]
}

Error codes

HTTP status codeError codeError message
400InvalidBucketNameSpecified parameter BucketName is not valid.
400AccessDeniedauth is not valid
400NoPermissionPermission denied.
400InvalidParameter.%sThe specified field %s invalid. Please check it again.
404NoSuchBucketThe specified bucket does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-17The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404