Available in Classic and VPC
Create an object by combining parts that have already been uploaded using multipart upload, and complete the multipart upload.
Commands
The command statement is as follows:
aws s3api complete-multipart-upload --bucket <value> --key <value> --upload-id <value> [--options]
Parameter
The following describes the parameters.
Parameter | Type | Required | Description | Restrictions |
---|---|---|---|---|
--bucket <value> | string | Y | Target bucket to which objects were uploaded with multipart upload | - |
--key <value> | string | Y | Name (key value) of the uploaded object | - |
--upload-id <value> | string | Y | ID that identifies multipart uploads | - |
--endpoint-url <value> | string | Y | Specify the default URL for command calls. | It is only available for the KR Region. See Ncloud Storage overview for call domain information. |
--multipart-upload <value> | string | Y | Requested file or content | See Syntax. |
--mpu-object-size <value> | long | Y | Estimated total object size of the multipart upload request | If the specified object size value differs from the actual size value, an HTTP 400 InvalidRequest error occurs. |
--cli-input-json | --cli-input-yaml | string | N | Enter arguments from the provided json or yaml string. | You can't specify json and yaml together. |
--generate-cli-skeleton <value> | integer | N | Create a parameter template that can be used as input later without executing the API command. | - |
--debug | boolean | N | Use debug logging. | - |
--no-verify-ssl | boolean | N | Redefine the default behavior for validating SSL certificates. | - |
--no-paginate | boolean | N | Disable automatic pagination, call only the first page for results. | - |
--output <value> | string | N | Specify the format of response results. | Available options
|
--query <value> | string | N | JMESPath query to use for filtering response data | - |
--profile <value> | string | N | Use a specific profile in the credentials file. | - |
--region <value> | string | N | Specify the Region. | Only KR is supported. |
--color <value> | string | N | Set output color. | Available options
|
--no-sign-request | boolean | N | Disable credential loading. | - |
--ca-bundle <value> | string | N | Specify the CA certificate to use when verifying SSL certificates. | - |
--cli-read-timeout <value> | int | N | Maximum read time; entering 0 changes it to a blocked status instead of a timeout. | It is set to 60 seconds by default. |
--cli-connect-timeout <value> | int | N | Maximum connection time; entering 0 changes it to a blocked status instead of a timeout. | It is set to 60 seconds by default. |
--no-cli-pager | boolean | N | Disable the CLI pager for response values. | - |
--cli-auto-prompt | boolean | N | Enable automatic prompting for CLI input parameters. | - |
--no-cli-auto-prompt | boolean | N | Disable automatic prompting for CLI input parameters. | - |
--sse-customer-algorithm | string | N | User encryption algorithm (AES256) | - |
--sse-customer-key | string | N | User-provided encryption key | - |
--sse-customer-key-md5 | string | N | User-provided encryption key's MD5 value | - |
--multipart-upload Syntax
- Shorthand Syntax
Parts=[{ETag=string, PartNumber=integer},{ETag=string, PartNumber=integer}]
- Json Syntax
{
"Parts": [
{
"ETag": "string",
"PartNumber": integer
}
...
]
}
Permission
If a sub account user wants to use this command, they need the Change/AbortMultipartUpload action permission.
Examples
This section describes an example of calling and responding to the complete-multipart-upload command.
Complete multipart upload
Call examples
After uploading all parts, call the command specifying the object and parts to complete the multipart upload. The following is a call example.
aws s3api complete-multipart-upload --bucket bucket-a --key 'multipart/01' --multipart-upload file://mpustruct \
--upload-id a1b23c4d-e56f-78gh-9101-1ij2k345l789 --endpoint-url=http://kr.ncloudstorage.com
Response example
The response example is as follows:
{
"ETag": "\"a2b370952633c9d9ef503abcd8b460bb\"",
"Bucket": "bucket-a",
"Key": "multipart/01"
}
Related commands
Related commands are as follows: