Lifecycle

Lifecycle Configuration of a Bucket

GetBucketLifecycle

get

Returns the lifecycle configuration for the specified object storage bucket.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:GetLifecycleConfiguration operation using Bucket Policy.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
lifecycleboolean · enumRequiredPossible values:
Responses
200
Successful operation
application/xml
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
<Rule>
    <ID>Delete logs after 30 days with size between 104857600 and 1073741824 bytes</ID>
    <Filter>
        <ObjectSizeGreaterThan>104857600</ObjectSizeGreaterThan>
        <ObjectSizeLessThan>1073741824</ObjectSizeLessThan>
        <Prefix>logs/</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <Expiration>
    <Days>30</Days>
    </Expiration>
</Rule>
<Rule>
    <ID>Delete objects 60 days after becoming non-current for bucket with Versioning enabled</ID>
    <Filter>
        <Prefix>temp/</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <NoncurrentVersionExpiration>
        <NoncurrentDays>60</NoncurrentDays>
    </NoncurrentVersionExpiration>
</Rule>
<Rule>
    <ID>Remove incomplete multipart uploads after 5 days</ID>
    <Filter>
        <Prefix />
    </Filter>
    <Status>Enabled</Status>
    <AbortIncompleteMultipartUpload>
        <DaysAfterInitiation>5</DaysAfterInitiation>
    </AbortIncompleteMultipartUpload>
</Rule>
</LifecycleConfiguration>

PutBucketLifecycle

put

Creates a new lifecycle configuration for a specified bucket, or replaces an existing configuration.

This lifecycle configuration allows automatic management of the objects within the bucket. Typical actions can include the deletion of objects after a certain period or deletion of non-current versions of objects.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:PutLifecycleConfiguration operation using Bucket Policy.

S3 API Compatibility

  • The NewerNoncurrentVersions setting is not supported for the NoncurrentVersionExpiration option.

  • The Transition and the NoncurrentVersionTransition options are omitted as only the STANDARD storage class is currenly supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
lifecycleboolean · enumRequiredPossible values:
Header parameters
Content-MD5stringRequired

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
Responses
200
Successful operation
application/xml
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-MD5: text
Content-Type: application/xml
Accept: */*
Content-Length: 1094

"<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
<Rule>
    <ID>Delete logs after 30 days with size between 104857600 and 1073741824 bytes</ID>
    <Filter>
        <ObjectSizeGreaterThan>104857600</ObjectSizeGreaterThan>
        <ObjectSizeLessThan>1073741824</ObjectSizeLessThan>
        <Prefix>logs/</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <Expiration>
    <Days>30</Days>
    </Expiration>
</Rule>
<Rule>
    <ID>Delete objects 60 days after becoming non-current for bucket with Versioning enabled</ID>
    <Filter>
        <Prefix>temp/</Prefix>
    </Filter>
    <Status>Enabled</Status>
    <NoncurrentVersionExpiration>
        <NoncurrentDays>60</NoncurrentDays>
    </NoncurrentVersionExpiration>
</Rule>
<Rule>
    <ID>Remove incomplete multipart uploads after 5 days</ID>
    <Filter>
        <Prefix />
    </Filter>
    <Status>Enabled</Status>
    <AbortIncompleteMultipartUpload>
        <DaysAfterInitiation>5</DaysAfterInitiation>
    </AbortIncompleteMultipartUpload>
</Rule>
</LifecycleConfiguration>
"

No content

DeleteBucketLifecycle

delete

Deletes the lifecycle configuration from the specified bucket. As a result, objects within the bucket will neither expire nor be automatically deleted based on any rules from the deleted configuration.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:PutLifecycleConfiguration operation using Bucket Policy.

Note: A brief delay may occur before the lifecycle configuration deletion is fully propagated across all IONOS Object Storage systems. During this time, lifecycle rules may remain temporarily active.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
lifecycleboolean · enumRequiredPossible values:
Responses
204
Successful operation
application/xml
delete
DELETE /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
204

Successful operation

No content

Was this helpful?