

# S3Retention
<a name="API_control_S3Retention"></a>

Contains the S3 Object Lock retention mode to be applied to all objects in the S3 Batch Operations job. If you don't provide `Mode` and `RetainUntilDate` data types in your operation, you will remove the retention from your objects. For more information, see [Using S3 Object Lock retention with S3 Batch Operations](https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-retention-date.html) in the *Amazon S3 User Guide*.

## Contents
<a name="API_control_S3Retention_Contents"></a>

 ** Mode **   <a name="AmazonS3-Type-control_S3Retention-Mode"></a>
The Object Lock retention mode to be applied to all objects in the Batch Operations job.  
Type: String  
Valid Values: `COMPLIANCE | GOVERNANCE`   
Required: No

 ** RetainUntilDate **   <a name="AmazonS3-Type-control_S3Retention-RetainUntilDate"></a>
The date when the applied Object Lock retention will expire on all objects set by the Batch Operations job.  
Type: Timestamp  
Required: No

## See Also
<a name="API_control_S3Retention_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/s3control-2018-08-20/S3Retention) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/s3control-2018-08-20/S3Retention) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/s3control-2018-08-20/S3Retention) 