S3 / Client / put_bucket_protection_configuration
put_bucket_protection_configuration#
- S3.Client.put_bucket_protection_configuration(**kwargs)#
Sets the protection configuration of an existing bucket. EnablePermanentRetention is optional and if not included is considered to be false. Once set to true, must be included in any subsequent PUT Bucket?protection requests for that bucket.
See also: AWS API Documentation
Request Syntax
response = client.put_bucket_protection_configuration( Bucket='string', ProtectionConfiguration={ 'Status': 'Retention', 'MinimumRetention': { 'Days': 123 }, 'DefaultRetention': { 'Days': 123 }, 'MaximumRetention': { 'Days': 123 }, 'EnablePermanentRetention': True|False } )
- Parameters:
Bucket (string) –
[REQUIRED]
The name of the bucket.
ProtectionConfiguration (dict) –
[REQUIRED] Container for setting retention settings.
Status (string) – Retention status of a bucket.
MinimumRetention (dict) – Minimum retention period for an object, if a PUT of an object specifies a shorter retention period the PUT object will fail.
Days (integer) – [REQUIRED]
DefaultRetention (dict) – Default retention period for an object, if a PUT of an object does not specify a retention period this value will be converted to seconds and used.
Days (integer) – [REQUIRED]
MaximumRetention (dict) – Maximum retention period for an object, if a PUT of an object specifies a longer retention period the PUT object will fail.
Days (integer) – [REQUIRED]
EnablePermanentRetention (boolean) – Enable permanent retention for an object.
- Returns:
None