Object Lock
Object Lock Configuration
Retrieves the Object Lock configuration for a 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:GetBucketObjectLockConfiguration
operation using Bucket Policy.
The bucket name.
my-bucket
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<ObjectLockConfiguration>
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>GOVERNANCE</Mode>
<Days>10</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
Applies an Object Lock configuration on the specified bucket, which requires the Object Lock feature to have been enabled during its creation. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.
Note:
An Object Lock Configuration can only be applied to buckets with Object Lock enabled.
This feature can only be activated on a new bucket during its creation.
Object Lock cannot be enabled on a bucket that already exists.
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:PutBucketObjectLockConfiguration
operation using Bucket Policy.
The bucket name.
my-bucket
The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Content-MD5: text
Content-Type: application/xml
Accept: */*
Content-Length: 351
"<?xml version="1.0" encoding="UTF-8"?>
<ObjectLockConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
<Rule>
<DefaultRetention>
<Mode>GOVERNANCE</Mode>
<Days>15</Days>
</DefaultRetention>
</Rule>
</ObjectLockConfiguration>
"
No content
Retrieves an object's retention 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:GetObjectRetention
operation using Bucket Policy.
The bucket name.
my-bucket
The key name of the object whose retention settings you want to retrieve.
The version ID of the object whose retention settings you want to retrieve.
GET /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Mode>GOVERNANCE</Mode>
<RetainUntilDate>2023-08-09T09:01:01Z</RetainUntilDate>
</Retention>
Places an Object Retention configuration on an object.
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:PutObjectRetention
operation using Bucket Policy. Bypassing a Governance Retention configuration also requires the s3:BypassGovernanceRetention
permission.
The bucket name.
my-bucket
The key name of the object to which you want to apply the Object Retention configuration.
The version ID of the object to which you want to apply the Object Retention configuration.
Indicates whether this operation should bypass Governance mode's restrictions.
false
The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.
PUT /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 213
"<?xml version="1.0" encoding="UTF-8"?>
<Retention xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Mode>GOVERNANCE</Mode>
<RetainUntilDate>2023-08-10T09:01:01Z</RetainUntilDate>
</Retention>
"
No content
Gets an object's current Legal Hold status.
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:GetObjectLegalHold
operation using Bucket Policy.
The bucket name.
my-bucket
The key name of the object whose Legal Hold status you want to retrieve.
The version ID of the object whose Legal Hold status you want to retrieve.
GET /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<LegalHold xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Status>ON</Status>
</LegalHold>
Applies a Legal Hold configuration to the specified object.
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:PutObjectLegalHold
operation using Bucket Policy.
The bucket name.
my-bucket
The key name of the object on which you want to place a Legal Hold.
The version ID of the object on which you want to place a Legal Hold.
The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.
PUT /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 148
"<?xml version="1.0" encoding="UTF-8"?>
<LegalHold xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Status>ON</Status>
</LegalHold>
"
No content
Was this helpful?