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.
The DefaultRetention settings require both a mode and a
period.
The DefaultRetention period can be either Days
or Years but you must select one. You cannot specify Days
and Years at the same time.
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.
Example
Use a bare-bones client and the command you need to make an API call.
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.
The
DefaultRetention
settings require both a mode and a period.The
DefaultRetention
period can be eitherDays
orYears
but you must select one. You cannot specifyDays
andYears
at the same time.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.
Example
Use a bare-bones client and the command you need to make an API call.
Param
PutObjectLockConfigurationCommandInput
Returns
PutObjectLockConfigurationCommandOutput
See
input
shape.response
shape.config
shape.