restore-object

Prev Next

Available in Classic and VPC

Restore an object and save a copy so that the object stored in the Archive Class can be accessed.

Note

For a Sub Account user to execute this command, they must have the Change/RestoreObject action permission.

Syntax

The restore-object syntax is as follows:

aws s3api restore-object \
    --bucket <bucket> \
    --key <key> \
    [--version-id <version-id>] \
    [--restore-request <restore-request>] \
    --endpoint-url <endpoint-url>

Options

This section describes the options available when running restore-object.

Required options

The following options are required for restore-object.

Options Type Required Description
--bucket String Required Bucket name
--key String Required Object name

Optional options

These are the optional options for restore-object. Options that are not specified will use their default values.

Options Type Required Description
--version-id String Optional Object version ID
  • When restoring a specific version of an object from a bucket with versioning enabled
--restore-request String Optional Restore request settings
  • Enter in JSON format.
    • Days: Number of days to store the restored copy in the Standard storage class.

Common options

For information about the options common to all aws subcommands, see Ncloud Storage options.

Examples

If the object restoration request is successful, restoration begins, and no results are displayed.

Command

The command example is as follows:

aws s3api restore-object --bucket my-test-bucket \
    --key img/image2.png \
    --restore-request '{"Days":1}' \
    --endpoint-url=https://kr.ncloudstorage.com

Related commands

Related commands are as follows: