Locking
GET/:Key?legal-hold
GetObjectLegalHold
Gets an object's current legal hold status.
Request Properties
- Name
BucketSupportedRequiredPath- Description
- Represents the bucket within which the object exsits.
- Name
KeySupportedRequiredPath- Description
- The key name for the object whose legal hold status you want to retrieve.
- Name
x-amz-expected-bucket-ownerNot SupportedHeader- Description
- The account ID of the expected bucket owner.
- Name
x-amz-request-payerNot SupportedHeader- Description
- Confirms that the requester knows that they will be charged for the request.
- Name
VersionIdNot SupportedQuery- Description
- The version ID of the object whose legal hold status you want to retrieve.
Response Properties
- Name
LegalHoldBody- Description
- Root level tag for the LegalHold parameters.
- Name
StatusBody- Description
- Indicates whether the specified object has a legal hold in place.
Request
GET
/:Key?legal-holdGET /{Key+}?legal-hold&versionId=VersionId HTTP/1.1
Host: Bucket.Endpoint
x-amz-request-payer: RequestPayer
x-amz-expected-bucket-owner: ExpectedBucketOwnerResponse
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<LegalHold>
<Status>string</Status>
</LegalHold>GET/?object-lock
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.
Request Properties
- Name
BucketSupportedRequiredPath- Description
- Represents the bucket within which the object exsits.
- Name
x-amz-expected-bucket-ownerNot SupportedHeader- Description
- The account ID of the expected bucket owner.
Response Properties
- Name
ObjectLockConfigurationBody- Description
- Root level tag for the ObjectLockConfiguration parameters.
- Name
ObjectLockEnabledBody- Description
- Indicates whether this bucket has an Object Lock configuration enabled. Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
- Name
RuleBody- Description
- Specifies the Object Lock rule for the specified object.
Request
GET
/?object-lockGET /?object-lock HTTP/1.1
Host: Bucket.Endpoint
x-amz-expected-bucket-owner: ExpectedBucketOwnerResponse
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>PUT/:key?legal-hold
PutObjectLegalHold
Applies a legal hold configuration to the specified object.
Request Properties
- Name
BucketSupportedRequiredPath- Description
- Represents the bucket within which the object exsits.
- Name
KeySupportedRequiredPath- Description
- The key name for the object that you want to place a legal hold on.
- Name
Content-MD5Not SupportedHeader- Description
- The MD5 hash for the request body.
- Name
x-amz-expected-bucket-ownerNot SupportedHeader- Description
- The account ID of the expected bucket owner.
- Name
x-amz-request-payerNot SupportedHeader- Description
- Confirms that the requester knows that they will be charged for the request.
- Name
x-amz-sdk-checksum-algorithmNot SupportedHeader- Description
- Indicates the algorithm used to create the checksum for the object when you use the SDK.
- Name
VersionIdNot SupportedQuery- Description
- The version ID of the object that you want to place a legal hold on.
- Name
LegalHoldSupportedRequiredBody- Description
- Root level tag for the LegalHold parameters.
- Name
StatusSupportedBody- Description
- Indicates whether the specified object has a legal hold in place.
Response Properties
- Name
x-amz-request-chargedNot SupportedHeader- Description
- If present, indicates that the requester was successfully charged for the request.
Request
PUT
/:key?legal-holdPUT /{Key+}?legal-hold&versionId=VersionId HTTP/1.1
Host: Bucket.Endpoint
x-amz-request-payer: RequestPayer
Content-MD5: ContentMD5
x-amz-sdk-checksum-algorithm: ChecksumAlgorithm
x-amz-expected-bucket-owner: ExpectedBucketOwner
<?xml version="1.0" encoding="UTF-8"?>
<LegalHold>
<Status>string</Status>
</LegalHold>Response
HTTP/1.1 200
x-amz-request-charged: RequestChargedPUT/?object-lock
PutObjectLockConfiguration
Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.
Request Properties
- Name
BucketSupportedRequiredPath- Description
- Represents the bucket within which the object exsits.
- Name
Content-MD5Not SupportedHeader- Description
- The MD5 hash for the request body.
- Name
x-amz-bucket-object-lock-tokenNot SupportedHeader- Description
- A token to allow Object Lock to be enabled for an existing bucket.
- Name
x-amz-expected-bucket-ownerNot SupportedHeader- Description
- The account ID of the expected bucket owner.
- Name
x-amz-request-payerNot SupportedHeader- Description
- Confirms that the requester knows that they will be charged for the request.
- Name
x-amz-sdk-checksum-algorithmNot SupportedHeader- Description
- Indicates the algorithm used to create the checksum for the object when you use the SDK.
- Name
ObjectLockConfigurationRequiredBody- Description
- Root level tag for the ObjectLockConfiguration parameters.
- Name
ObjectLockEnabledBody- Description
- Indicates whether this bucket has an Object Lock configuration enabled. Enable ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
- Name
RuleBody- Description
- Specifies the Object Lock rule for the specified object.
Response Properties
- Name
x-amz-request-chargedNot SupportedHeader- Description
- If present, indicates that the requester was successfully charged for the request.
Request
PUT
/?object-lockPUT /?object-lock HTTP/1.1
Host: Bucket.Endpoint
x-amz-request-payer: RequestPayer
x-amz-bucket-object-lock-token: Token
Content-MD5: ContentMD5
x-amz-sdk-checksum-algorithm: ChecksumAlgorithm
x-amz-expected-bucket-owner: ExpectedBucketOwner
<?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
HTTP/1.1 200
x-amz-request-charged: RequestCharged