OS_OBJECT(1)

NAME
os_object -

DESCRIPTION

AVAILABLE COMMANDS

•   bulk-delete

•   bulk-download

•   bulk-upload

•   copy

•   delete

•   get

•   head

•   list

•   put

•   rename

•   restore

•   restore-status

•   resume-put

  bulk-delete

  Description

Deletes all objects in a bucket which match the provided criteria.

  Usage

oci os object bulk-delete [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

  Optional Parameters

--delimiter [text]

    When this parameter is set, only objects whose names do not contain the delimiter character (after an optionally specified prefix) are deleted. Scanned objects whose names contain the delimiter have part of their name up to the last occurrence of the delimiter (after the optional prefix) returned as a set of prefixes. Note: Only '/' is a supported delimiter character at this time.

--dry-run

    Displays a list of objects which would be deleted by this command, if it were run without --dry-run. If --dry-run is passed, no objects will actually be deleted.

--exclude [text]

    Only download objects which do not match the provided pattern. Patterns are taken relative to the bucket root. This option can be provided mulitple times to match on mulitple patterns. Supported pattern symbols are:

    *: Matches everything

    ?: Matches any single character

    [sequence]: Matches any character in sequence

    [!sequence]: Matches any character not in sequence

--force

    Do not ask for confirmation prior to performing the bulk delete.

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--include [text]

    Only delete objects which match the provided pattern. Patterns are taken relative to the bucket root. This option can be provided mulitple times to match on mulitple patterns. Supported pattern symbols are:

    *: Matches everything

    ?: Matches any single character

    [sequence]: Matches any character in sequence

    [!sequence]: Matches any character not in sequence

-ns, --namespace, --namespace-name [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'

--parallel-operations-count [integer]

    The number of parallel operations to perform. Decreasing this value will make bulk deletes less resource intensive but they may take longer. Increasing this value may improve bulk delete times, but the upload process will consume more system resources and network bandwidth. [default: 10]

--prefix [text]

    Delete all objects with the given prefix. Omit this parameter to delete all objects in the bucket.

    Examples

    ----

  Deleting all objects in the bucket

 oci os object bulk-delete -ns mynamespace -bn mybucket

  Delete all objects that match a given prefix

 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/ --prefix myprefix

You can delete all objects that match a given prefix by specifying the --prefix flag. In the above example, "--prefix myprefix" would match object names such as myprefix_textfile1.txt, myprefix_myImage.png etc.

If you have named your objects so that they exist in Object Storage as a hierarchy, e.g. level1/level2/level3/myobject.txt, then you can delete objects at a given level (and all sub levels) by specifying a prefix:

 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/

This will delete all objects of the form level1/level2/<object name>, level1/level2/leve3/<object name>, level1/level2/leve3/level4/<object name> etc.

  Limiting deleted objects using a prefix and delimiter

 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/ --delimiter /

If you have named your objects so that they exist in Object Storage as a hierarchy, e.g. level1/level2/level3/myobject.txt, and you only want to delete objects at a given level of the hierarchy, e.g. example everything of the form level1/level2/<object name> but not level1/level2/leve3/<object name> or any other sub-levels, you can specify a prefix and delimiter. Currently the only supported delimiter is /

  Previewing what would be deleted

 oci os object bulk-delete -ns mynamespace -bn mybucket --dry-run
 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/ --dry-run
 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/ --delimiter / --dry-run

For any bulk-delete command you can get a list of all objects which would be deleted, but without actually deleting them, by using the --dry-run flag

  Do not prompt for delete

 oci os object bulk-delete -ns mynamespace -bn mybucket --force
 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/ --force
 oci os object bulk-delete -ns mynamespace -bn mybucket --prefix level1/level2/ --delimiter / --force

By default, the bulk-delete command will prompt you prior to deleting objects. To suppress this prompt, pass the --force option.

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  bulk-download

  Description

Downloads all objects which match the given prefix to a given directory.

  Usage

oci os object bulk-download [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--download-dir [text]

    The directory where retrieved objects will be placed as files. This directory will be created if it does not exist.

  Optional Parameters

--delimiter [text]

    When this parameter is set, only objects whose names do not contain the delimiter character (after an optionally specified prefix) are returned. Scanned objects whose names contain the delimiter have part of their name up to the last occurrence of the delimiter (after the optional prefix) returned as a set of prefixes. Note: Only '/' is a supported delimiter character at this time.

--exclude [text]

    Only download objects which do not match the provided pattern. Patterns are taken relative to the DOWNLOAD directory. This option can be provided mulitple times to match on mulitple patterns. Supported pattern symbols are:

    *: Matches everything

    ?: Matches any single character

    [sequence]: Matches any character in sequence

    [!sequence]: Matches any character not in sequence

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--include [text]

    Only download objects which match the provided pattern. Patterns are taken relative to the DOWNLOAD directory. This option can be provided mulitple times to match on mulitple patterns. Supported pattern symbols are:

    *: Matches everything

    ?: Matches any single character

    [sequence]: Matches any character in sequence

    [!sequence]: Matches any character not in sequence

--multipart-download-threshold [integer range]

    Objects larger than this size (in MiB) will be downloaded in multiple parts. The minimum allowable threshold is 128 MiB.

-ns, --namespace, --namespace-name [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'

--no-overwrite

    If a file with the same name as an object already exists in the download directory, do not overwite it. If neither this flag nor --overwrite is specified, you will be prompted each time a file would be overwritten

--overwrite

    If a file with the same name as an object already exists in the download directory, overwrite it. If neither this flag nor --no-overwrite is specified, you will be prompted each time a file would be overwritten.

--parallel-operations-count [integer]

    The number of parallel operations to perform. Decreasing this value will make bulk downloads less resource intensive but they may take longer. Increasing this value may improve bulk download times, but the upload process will consume more system resources and network bandwidth. [default: 10]

--part-size [integer range]

    Part size (in MiB) to use when downloading an object in multiple parts. The minimum allowable size is 128 MiB.

--prefix [text]

    Retrieve all objects with the given prefix. Omit this parameter to get all objects in the bucket

    Examples

    ----

  Download all objects in the bucket

 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory

  Download all objects that match a given prefix

 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --prefix myprefix

You can download all objects that match a given prefix by specifying the --prefix flag. In the above example, "--prefix myprefix" would match object names such as myPrefix_textfile1.txt, myPrefix_myImage.png etc.

If you have named your objects so that they exist in Object Storage as a hierarchy, e.g. level1/level2/level3/myobject.txt, then you can download objects at a given level (and all sub levels) by specifying a prefix:

 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --prefix level1/level2/

This will download all objects of the form level1/level2/<object name>, level1/level2/leve3/<object name>, level1/level2/leve3/level4/<object name> etc.

  Limiting downloaded objects using a prefix and delimiter

 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --prefix level1/level2/ --delimiter /

If you have named your objects so that they exist in Object Storage as a hierarchy, e.g. level1/level2/level3/myobject.txt, and you only want to download objects at a given level of the hierarchy, e.g. example everything of the form level1/level2/<object name> but not level1/level2/leve3/<object name> or any other sub-levels, you can specify a prefix and delimiter. Currently the only supported delimiter is /

  Overwriting or skipping files

 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --overwrite
 oci os object bulk-download -ns mynamespace -bn mybucket --download-dir path/to/download/directory --no-overwrite

If files with the same name as the objects being downloaded already exist in the download directory, you can opt to overwrite them with the --overwrite option, or preserve them with the --no-overwrite option.

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  bulk-upload

  Description

Uploads all files in a given directory and all subdirectories.

  Usage

oci os object bulk-upload [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--src-dir [text]

    The directory which contains files to upload. Files in the directory and all subdirectories will be uploaded.

  Optional Parameters

--content-encoding [text]

    The content encoding to apply to all files being uploaded.

--content-language [text]

    The content language to apply to all files being uploaded.

--content-type [text]

    The content type to apply to all files being uploaded. If content type is set to auto, then the CLI will guess the content type of the file.

--disable-parallel-uploads

    [DEPRECATED] This option is no longer used. If a file in the directory will be uploaded in multiple parts, this option disables those parts from being uploaded in parallel. This applies to all files being uploaded in multiple parts

--exclude [text]

    Only upload files which do not match the provided pattern. Patterns are taken relative to the CURRENT directory. This option can be provided mulitple times to match on mulitple patterns. Supported pattern symbols are:

    *: Matches everything

    ?: Matches any single character

    [sequence]: Matches any character in sequence

    [!sequence]: Matches any character not in sequence

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--include [text]

    Only upload files which match the provided pattern. Patterns are taken relative to the CURRENT directory. This option can be provided mulitple times to match on mulitple patterns. Supported pattern symbols are:

    *: Matches everything

    ?: Matches any single character

    [sequence]: Matches any character in sequence

    [!sequence]: Matches any character not in sequence

--metadata [text]

    Arbitrary string keys and values for user-defined metadata. This will be applied to all files being uploaded. Must be in JSON format. Example: '{"key1":"value1","key2":"value2"}'

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

    Object Storage namespace. If not provided, this parameter will be obtained internally using a call to 'oci os ns get'

--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. This applies to all files being uploaded

--no-overwrite

    If a file being uploaded already exists in Object Storage with the same name, do not overwite the object. If neither this flag nor --overwrite is specified, you will be prompted each time an object with the same name would be overwritten.

--object-prefix [text]

    A prefix to apply to the names of all files being uploaded

--overwrite

    If a file being uploaded already exists in Object Storage with the same name, overwrite the existing object in Object Storage without a confirmation prompt. If neither this flag nor --no-overwrite is specified, you will be prompted each time an object with the same name would be overwritten.

    Specifying this flag will also allow for faster uploads as the CLI will not initially check whether or not the files with the same name already exist in Object Storage.

--parallel-upload-count [integer range]

    The number of parallel operations to perform. Decreasing this value will make bulk uploads less resource intensive but they may take longer. Increasing this value may improve bulk upload times, but the upload process will consume more system resources and network bandwidth. The maximum is 1000. [default: 10]

--part-size [integer]

    Part size (in MiB) to use if uploading via multipart upload operations. This applies to all files which will be uploaded in multiple parts. Part size must be greater than 10 MiB

--verify-checksum

    Verify the checksum of the uploaded object with the local file.

    Examples

    ----

  Upload all files from a given directory

oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory

  Forcing object overwrite to resolve object name collision

If a file being uploaded already exists in Object Storage, it can be overwritten without a prompt by using the --overwrite flag.

oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --overwrite

  Prevent object overwrite to resolve object name collision

If a file being uploaded already exists in Object Storage, it can be preserved (not overwritten) without a prompt by using the --no-overwrite flag.

oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --no-overwrite

  Applying metadata

Metadata can be applied when the files are put into Object Storage by specifying the --metadata flag and passing metadata either via a file or as a string on the command line.

NOTE: The same metadata will be applied to all uploaded files.

oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --metadata '{"key1":"value1","key2":"value2"}'
oci os object bulk-upload -ns mynamespace -bn mybucket --src-dir path/to/upload/directory --metadata file://path/to/my/metadata.json

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  copy

  Description

Creates a request to copy an object within a region or to another region.

  Usage

oci os object copy [OPTIONS]

  Required Parameters

--bucket-name, -bn [text]

    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1

--destination-bucket [text]

    The destination bucket the object will be copied to.

--source-object-name [text]

    The name of the object to be copied.

  Optional Parameters

--destination-namespace [text]

    The destination namespace object will be copied to.

--destination-object-if-match-e-tag [text]

    The entity tag (ETag) to match against that of the destination object (an object intended to be overwritten). Used to confirm that the destination object stored under a given name is the version of that object storing a specified entity tag.

--destination-object-if-none-match-e-tag [text]

    The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object already exists in the destination bucket.

--destination-object-metadata [complex type]

    Arbitrary string keys and values for the user-defined metadata for the object. Keys must be in "opc-meta-
    *
    " format. Avoid entering confidential information. Metadata key-value pairs entered in this field are assigned to the destination object. If you enter no metadata values, the destination object will inherit any existing metadata values associated with the source object. This is a complex type whose value must be valid JSON. The value can be provided as a string on the command line or passed in as a file using the file://path/to/file syntax.

    The --generate-param-json-input option can be used to generate an example of the JSON which must be provided. We recommend storing this example in a file, modifying it as needed and then passing it back in via the file:// syntax.

--destination-object-name [text]

    The destination name for the copy object.

--destination-region [text]

    The destination region object will be copied to.

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--max-wait-seconds [integer]

    The maximum time to wait for the work request to reach the state defined by --wait-for-state. Defaults to 1200 seconds.

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

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

--source-object-if-match-e-tag [text]

    The entity tag (ETag) to match against that of the source object. Used to confirm that the source object with a given name is the version of that object storing a specified ETag.

--wait-for-state [text]

    This operation asynchronously creates, modifies or deletes a resource and uses a work request to track the progress of the operation. Specify this option to perform the action and then wait until the work request reaches a certain state. Multiple states can be specified, returning on the first state. For example, --wait-for-state SUCCEEDED --wait-for-state FAILED would return on whichever lifecycle state is reached first. If timeout is reached, a return code of 2 is returned. For any other error, a return code of 1 is returned.

    Accepted values are:

    ACCEPTED, CANCELED, CANCELING, COMPLETED, FAILED, IN_PROGRESS

--wait-interval-seconds [integer]

    Check every --wait-interval-seconds to see whether the work request to see if it has reached the state defined by --wait-for-state. Defaults to 30 seconds.

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  delete

  Description

Deletes an object.

  Usage

oci os object delete [OPTIONS]

  Required Parameters

--bucket-name, -bn [text]

    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1

--object-name, --name [text]

    The name of the object. Avoid entering confidential information. Example: test/object1.log

  Optional Parameters

--force

    Perform deletion without prompting for confirmation.

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

    The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.

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

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

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  get

  Description

Gets the metadata and body of an object.

Example:
    oci os object get -ns mynamespace -bn mybucket --name myfile.txt --file /Users/me/myfile.txt

  Usage

oci os object get [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--file [filename]

    The name of the file that will receive the object content, or '-' to write to STDOUT.

--name [text]

    The name of the object.

  Optional Parameters

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

    The entity tag to match.

--if-none-match [text]

    The entity tag to avoid matching.

--multipart-download-threshold [integer range]

    Objects larger than this size (in MiB) will be downloaded in multiple parts. The minimum allowable threshold is 128 MiB.

-ns, --namespace, --namespace-name [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'

--parallel-download-count [integer]

    The number of parallel operations to perform when downloading an object in multiple parts. Decreasing this value will make multipart downloads less resource intensive but they may take longer. Increasing this value may improve download times, but the download process will consume more system resources and network bandwidth. [default: 10]

--part-size [integer range]

    Part size (in MiB) to use when downloading an object in multiple parts. The minimum allowable size is 128 MiB.

--range [text]

    Byte range to fetch. Follows https://tools.ietf.org/html/rfc7233#section-2.1. Example: bytes=2-10

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  head

  Description

Gets the user-defined metadata and entity tag for an object.

Example:
    oci os object head -ns mynamespace -bn mybucket --name myfile.txt

  Usage

oci os object head [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--name [text]

    The name of the object.

  Optional Parameters

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

    The entity tag to match.

--if-none-match [text]

    The entity tag to avoid matching.

-ns, --namespace, --namespace-name [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'

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  list

  Description

Lists the objects in a bucket.

Example:
    oci os object list -ns mynamespace -bn mybucket --fields name,size,timeCreated

  Usage

oci os object list [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

  Optional Parameters

--all

    Fetches all pages of results. If you provide this option, then you cannot provide the --limit option.

--delimiter [text]

    When this parameter is set, only objects whose names do not contain the delimiter character (after an optionally specified prefix) are returned. Scanned objects whose names contain the delimiter have part of their name up to the last occurrence of the delimiter (after the optional prefix) returned as a set of prefixes. Note: Only '/' is a supported delimiter character at this time.

--end [text]

    Only object names less than this parameter will be returned.

--fields [text]

    Object summary in list of objects includes the 'name' field. This parameter may also include 'size' (object size in bytes), 'md5', and 'timeCreated' (object creation date and time) fields. Value of this parameter should be a comma separated, case-insensitive list of those field names. [default: name,size,timeCreated,md5]

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--limit [integer]

    The maximum number of items to return. [default: 100]

-ns, --namespace, --namespace-name [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'

--page-size [integer]

    When fetching results, the number of results to fetch per call. Only valid when used with --all or --limit, and ignored otherwise.

--prefix [text]

    Only object names that begin with this prefix will be returned.

--start [text]

    Only object names greater or equal to this parameter will be returned.

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  Examples

  Description

List objects in a bucket

  Command

 oci os object list --bucket-name CLITest

  Output

{
 "data": [
      {
           "md5": "55sYrq31fJ1VgHfEGIh2hg==",
           "name": "test/FileOne.json",
           "size": 1785862,
           "time-created": "2019-08-13T23:31:02.981000+00:00"
      },
      {
           "md5": "uzobT/eOYWpieAdIu1lc2w==",
           "name": "test/FileTwo.json",
           "size": 466,
           "time-created": "2019-08-13T20:09:54.148000+00:00"
      },
      {
           "md5": "uzobT/eOYWpieAdIu1lc2w==",
           "name": "FileThree.json",
           "size": 468,
           "time-created": "2019-08-13T22:09:54.148000+00:00"
      }
 ],
 "prefixes": []
}

  Description

List objects in a bucket with common prefix

  Command

 oci os object list --bucket-name CLITest --prefix test

  Output

{
 "data": [
      {
           "md5": "55sYrq31fJ1VgHfEGIh2hg==",
           "name": "test/FileOne.json",
           "size": 1785862,
           "time-created": "2019-08-13T23:31:02.981000+00:00"
      },
      {
           "md5": "uzobT/eOYWpieAdIu1lc2w==",
           "name": "test/FileTwo.json",
           "size": 466,
           "time-created": "2019-08-13T20:09:54.148000+00:00"
      }
 ],
 "prefixes": []
}

  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

•   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]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--file [filename]

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

  Optional Parameters

--cache-control [text]

    The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to identify objects that require caching restrictions.

--content-disposition [text]

    The optional Content-Disposition header that defines presentational information for the object to be returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to let users download objects with custom filenames in a browser.

--content-encoding [text]

    The optional Content-Encoding header that defines the content encodings that were applied to the object to upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to determine what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of the object.

--content-language [text]

    The optional Content-Language header that defines the content language of the object to upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to identify and differentiate objects based on a particular language.

--content-md5 [text]

    The optional base-64 header that defines the encoded MD5 hash of the body. If the optional Content-MD5 header is present, Object Storage performs an integrity check on the body of the HTTP request by computing the MD5 hash for the body and comparing it to the MD5 hash supplied in the header. If the two hashes do not match, the object is rejected and an HTTP-400 Unmatched Content MD5 error is returned with the message: "The computed MD5 of the request body (ACTUAL_MD5) does not match the Content-MD5 header (HEADER_MD5)"

--content-type [text]

    The optional Content-Type header that defines the standard MIME type format of the object. Content type defaults to 'application/octet-stream' if not specified in the PutObject call. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to identify and perform special operations on text only objects.

--disable-parallel-uploads

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

--force

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

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--if-match [text]

    The entity tag to match.

--metadata [text]

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

--name [text]

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

-ns, --namespace, --namespace-name [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'

--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.

--no-overwrite

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

--parallel-upload-count [integer range]

    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 and the maximum is 1000.

--part-size [integer]

    Part size (in MiB) to use when uploading objects using multipart upload operations. The default part size is 128 MiB.

--verify-checksum

    Verify the checksum of the uploaded object with the local file.

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  rename

  Description

Rename an object in the given Object Storage namespace.

  Usage

oci os object rename [OPTIONS]

  Required Parameters

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

    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1

--new-name [text]

    The new name of the source object.

--source-name, --name [text]

    The name of the source object to be renamed.

  Optional Parameters

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

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

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

--new-obj-if-match-e-tag, --new-if-match [text]

    The if-match entity tag (ETag) of the new object.

--new-obj-if-none-match-e-tag, --new-if-none-match [text]

    The if-none-match entity tag (ETag) of the new object.

--src-obj-if-match-e-tag, --src-if-match [text]

    The if-match entity tag (ETag) of the source object.

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  restore

  Description

Restores one or more objects specified by the objectName parameter. By default objects will be restored for 24 hours. Duration can be configured using the hours parameter.

  Usage

oci os object restore [OPTIONS]

  Required Parameters

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

    The name of the bucket. Avoid entering confidential information. Example: my-new-bucket1

--name [text]

    A object which was in an archived state and need to be restored.

  Optional Parameters

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--hours [integer]

    The number of hours for which this object will be restored. By default objects will be restored for 24 hours. You can instead configure the duration using the hours parameter.

-ns, --namespace, --namespace-name [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'

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  restore-status

  Description

Gets the restore status for an object.

Example:
    oci os object restore-status -ns mynamespace -bn mybucket --name myfile.txt

  Usage

oci os object restore-status [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--name [text]

    The name of the object.

  Optional Parameters

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

-ns, --namespace, --namespace-name [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'

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

  resume-put

  Description

Resume a previous multipart put.

Example:
    oci os object resume-put -ns mynamespace -bn mybucket --name myfile.txt --file /Users/me/myfile.txt --upload-id my-upload-id

  Usage

oci os object resume-put [OPTIONS]

  Required Parameters

-bn, --bucket-name [text]

    The name of the bucket.

--file [filename]

    The file to load as the content of the object.

--upload-id [text]

    Upload ID to resume.

  Optional Parameters

--disable-parallel-uploads

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

--from-json [text]

    Provide input to this command as a JSON document from a file using the file://path-to/file syntax.

    The --generate-full-command-json-input option can be used to generate a sample json file to be used with this command option. The key names are pre-populated and match the command option names (converted to camelCase format, e.g. compartment-id --> compartmentId), while the values of the keys need to be populated by the user before using the sample file as an input to this command. For any command option that accepts multiple values, the value of the key can be a JSON array.

    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.

    For examples on usage of this option, please see our "using CLI with advanced JSON options" link: https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliusing.htm#AdvancedJSONOptions

--name [text]

    The name of the object. Default value is the filename excluding the path.

-ns, --namespace, --namespace-name [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'

--parallel-upload-count [integer range]

    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. Defaults to 3 and the maximum is 1000.

--part-size [integer]

    Part size in MiB

  Global Parameters

Use oci --help for help on global parameters.

--auth, --cert-bundle, --cli-rc-file, --config-file, --debug, --defaults-file, --endpoint, --generate-full-command-json-input, --generate-param-json-input, --help, --no-retry, --opc-client-request-id, --opc-request-id, --output, --profile, --query, --raw-output, --region, --request-id, --version, -?, -d, -h, -v

AUTHOR
Oracle

COPYRIGHT
2016, 2020, Oracle