--- title: "get-object-retention" slug: "get-object-retention" updated: 2026-10-08T05:00:36Z published: 2026-10-08T05:00:36Z canonical: "cli.ncloud-docs.com/get-object-retention" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # get-object-retention Available in Classic and VPC Get the retention information configured for an Ncloud Storage object. Note For a Sub Account user to execute this command, they must have the View/GetObjectRetention action permission. ## Syntax The `get-object-retention` syntax is as follows: ``` aws s3api get-object-retention \ --bucket \ --key \ [--version-id ] \ --endpoint-url ``` ## Options This section describes the options available when running `get-object-retention`. ### Required options The following options are required for `get-object-retention`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--bucket` | String | Required | Bucket name | | `--key` | String | Required | Object name | ### Optional options These are the optional options for `get-object-retention`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--version-id` | String | Optional | Object version ID | ### Common options For information about the options common to all `aws` subcommands, see [Ncloud Storage options](/docs/en/storage-ncloudstorage#%EC%98%B5%EC%85%98). ## Examples If the request to retrieve retention settings is successful, the object's retention mode and retention expiration date and time are returned. ### Command The command example is as follows: ``` aws s3api get-object-retention --bucket my-locked-bucket \ --key locked.txt \ --endpoint-url=https://kr.ncloudstorage.com ``` ### Output The output example is as follows: ``` { "Retention": { "Mode": "GOVERNANCE", "RetainUntilDate": "2026-08-25T00:00:00.000Z" } } ``` ## Related commands Related commands are as follows: - [put-object-lock-configuration](/docs/en/put-object-lock-configuration) - [get-object-lock-configuration](/docs/en/get-object-lock-configuration) - [put-object-retention](/docs/en/put-object-retention) - [put-object-legal-hold](/docs/en/put-object-legal-hold) - [get-object-legal-hold](/docs/en/get-object-legal-hold)