put
***


Description
===========

Creates a new object or overwrites an existing one.

The object can be uploaded as a single part or as multiple parts.
Below are the rules for whether an object will be uploaded via single
or multipart upload (listed in order of precedence):

   * If the object is being uploaded from STDIN, it will be uploaded
     as a multipart upload (if the object content is smaller than
     --part-size, default for STDIN is 10 MiB, the multipart upload
     may contain only one part, but it will still use the
     MultipartUpload API)

   * If the --no-multipart flag is specified, the object will be
     uploaded as a single part regardless of size (specifying --no-
     multipart when uploading from STDIN will result in an error)

   * If the object is larger than --part-size, it will be uploaded
     as multiple parts (the default part size is 128 MiB)

   * If the object is empty it will be uploaded as a single part

Example:
   oci os object put -ns mynamespace -bn mybucket --name myfile.txt
   --file /Users/me/myfile.txt --metadata
   '{"key1":"value1","key2":"value2"}'


Usage
=====

   oci os object put [OPTIONS]


Options
=======


-ns, --namespace [text]
-----------------------

The top-level namespace used for the request. If not provided, this
parameter will be obtained internally using a call to 'oci os ns get'


-bn, --bucket-name [text]
-------------------------

The name of the bucket. [required]


--file [filename]
-----------------

The file to load as the content of the object, or '-' to read from
STDIN. [required]


--name [text]
-------------

The name of the object. Default value is the filename excluding the
path. Required if reading object from STDIN.


--if-match [text]
-----------------

The entity tag to match.


--content-md5 [text]
--------------------

The base-64 encoded MD5 hash of the body.


--metadata [text]
-----------------

Arbitrary string keys and values for user-defined metadata. Must be in
JSON format. Example: '{"key1":"value1","key2":"value2"}'


--content-type [text]
---------------------

The content type of the object.


--content-language [text]
-------------------------

The content language of the object.


--content-encoding [text]
-------------------------

The content encoding of the object.


--force
-------

If the object already exists, overwrite the existing object without a
confirmation prompt.


--no-overwrite
--------------

If the object already exists, do not overwrite the existing object.


--no-multipart
--------------

Do not use multipart uploads to upload the file in parts. By default
files above 128 MiB will be uploaded in multiple parts, then combined
server-side.


--part-size [integer]
---------------------

Part size (in MiB) to use if uploading via multipart upload operations


--disable-parallel-uploads
--------------------------

If the object will be uploaded in multiple parts, this option disables
those parts from being uploaded in parallel.


--parallel-upload-count [integer]
---------------------------------

If the object will be uploaded in multiple parts, this option allows
you to specify the maximum number of parts that can be uploaded in
parallel. This option cannot be used with --disable-parallel-uploads
or --no-multipart. Defaults to 3.


--from-json [text]
------------------

Provide input to this command as a JSON document from a file.

Options can still be provided on the command line. If an option exists
in both the JSON document and the command line then the command line
specified value will be used


-?, -h, --help
--------------

Show this message and exit.
