Class PutObjectLockConfigurationRequest
Container for the parameters to the PutObjectLockConfiguration operation. 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. For more information, see Locking Objects.
note
The
settings require both a mode and a period.DefaultRetention
The
period can be eitherDefaultRetention
orDays
but you must select one. You cannot specifyYears
andDays
at the same time.Years
You can only enable Object Lock for new buckets. If you want to turn on Object Lock for an existing bucket, contact Amazon Web Services Support.
public class PutObjectLockConfigurationRequest : AmazonWebServiceRequest
- Inheritance
-
PutObjectLockConfigurationRequest
Constructors
PutObjectLockConfigurationRequest()
public PutObjectLockConfigurationRequest()
Properties
BucketName
Gets and sets the property BucketName.
The bucket whose Object Lock configuration you want to create or replace.
public string BucketName { get; set; }
Property Value
ChecksumAlgorithm
Gets and sets the property ChecksumAlgorithm.
Indicates the algorithm used to create the checksum for the object. Amazon S3 will fail the request with a 400 error if there is no checksum associated with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.
public ChecksumAlgorithm ChecksumAlgorithm { get; set; }
Property Value
ContentMD5
Gets and sets the property ContentMD5.
The MD5 hash for the request body.
For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.
public string ContentMD5 { get; set; }
Property Value
ExpectedBucketOwner
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.
public string ExpectedBucketOwner { get; set; }
Property Value
ObjectLockConfiguration
Gets and sets the property ObjectLockConfiguration.
The Object Lock configuration that you want to apply to the specified bucket.
public ObjectLockConfiguration ObjectLockConfiguration { get; set; }
Property Value
RequestPayer
Gets and sets the property RequestPayer.
public RequestPayer RequestPayer { get; set; }
Property Value
Token
Gets and sets the property Token.
public string Token { get; set; }