1**To retrieve the object retention configuration for an object**
2
3The following ``get-object-retention`` example retrieves the object retention configuration for the specified object. ::
4
5    aws s3api get-object-retention \
6        --bucket my-bucket-with-object-lock \
7        --key doc1.rtf
8
9Output::
10
11    {
12        "Retention": {
13            "Mode": "GOVERNANCE",
14            "RetainUntilDate": "2025-01-01T00:00:00.000Z"
15        }
16    }
17