Available in Classic and VPC
Get the legal hold status set on an Ncloud Storage object.
For a Sub Account user to execute this command, they must have the View/GetObjectLegalHold action permission.
Syntax
The get-object-legal-hold syntax is as follows:
aws s3api get-object-legal-hold \
--bucket <bucket> \
--key <key> \
[--version-id <version-id>] \
--endpoint-url <endpoint-url>
Options
This section describes the options available when running get-object-legal-hold.
Required options
The following options are required for get-object-legal-hold.
| Options | Type | Required | Description |
|---|---|---|---|
--bucket |
String | Required | Bucket name |
--key |
String | Required | Object name |
Optional options
These are the optional options for get-object-legal-hold. 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.
Examples
If the request to retrieve legal retention information is successful, the object's legal retention status is returned.
Command
The command example is as follows:
aws s3api get-object-legal-hold --bucket my-locked-bucket \
--key locked.txt \
--endpoint-url=https://kr.ncloudstorage.com
Output
The output example is as follows:
{
"LegalHold": {
"Status": "ON"
}
}
Related commands
Related commands are as follows: