Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

GetObjectLockConfiguration

Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects.

Request Syntax

GET /?object-lock HTTP/1.1 Host: Bucket.s3.amazonaws.com

URI Request Parameters

The request requires the following URI parameters.

Bucket

The bucket whose Object Lock configuration you want to retrieve.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ObjectLockConfiguration> <ObjectLockEnabled>string</ObjectLockEnabled> <Rule> <DefaultRetention> <Days>integer</Days> <Mode>string</Mode> <Years>integer</Years> </DefaultRetention> </Rule> </ObjectLockConfiguration>

Response Elements

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

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

ObjectLockConfiguration

Root level tag for the ObjectLockConfiguration parameters.

Required: Yes

ObjectLockEnabled

Indicates whether this bucket has an Object Lock configuration enabled.

Type: String

Valid Values: Enabled

Rule

The Object Lock rule in place for the specified object.

Type: ObjectLockRule data type

See Also

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