put-object

Puts an object to a bucket.

Usage

put-object --bucket <value> --key <value> --body <local_file_path>

Supported Options

--bucket: Bucket name
--acl <value>: The Access Control List (ACL) lets you manage access to buckets and objects.
  <value> specifies the following Hedvig-supported options:
    private: Object owner permission only
    public-read: Read permission by any user
    public-read-write: Read and write permission by any user
    authenticated-read: Read permission by authenticated users
    bucket-owner-read: Read permission by bucket owner
    bucket-owner-full-control: Full control by bucket owner
--body: File to put in object (local file path to upload )
--content-disposition: Object presentational information
--content-encoding: Object content encoding method
--content-length: Object size in bytes.
--content-md5: This is a required parameter when lock setting is on.
--content-type: Content type of object
--grant-full-control: Grants full control to user
--grant-read: Grants read permission to user
--grant-read-acp: Grants read ACP to user
--grant-write-acp: Grants write ACP to user
--key: Object name
--metadata: User-defined map of key value pairs
--object-lock-legal-hold-status: ON or OFF
--object-lock-mode: COMPLIANCE or GOVERNANCE
--object-lock-retain-until-date: date and time for lock settings to expire
--server-side-encryption: Object encryption, value: AES256

Examples

aws s3api put-object --endpoint http://<hostname>:<port_number> --profile testuser1 --bucket example_bucket --key example_object --body ~/example_object
aws s3api put-object --endpoint http://<hostname>:<port_number> --profile testuser1 --bucket example_bucket --key example_object --body ~/example_object --object-lock-mode GOVERNANCE --object-lock-retain-until-date 2020-12-11 --object-lock-legal-hold-status ON --content-md5 1B2M2Y8AsgTpgAmY7PhCfg==

Loading...