You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::S3::MultipartUpload
- Inherits:
-
Resources::Resource
- Object
- Resources::Resource
- Aws::S3::MultipartUpload
- Defined in:
- aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_upload.rb
Instance Attribute Summary collapse
-
#bucket_name ⇒ String
readonly
-
#id ⇒ String
readonly
-
#initiated ⇒ Time
readonly
Date and time at which the multipart upload was initiated.
-
#initiator ⇒ Types::Initiator
readonly
Identifies who initiated the multipart upload.
-
#key ⇒ String
readonly
Key of the object for which the multipart upload was initiated.
-
#object_key ⇒ String
readonly
-
#owner ⇒ Types::Owner
readonly
Specifies the owner of the object that is part of the multipart upload.
-
#storage_class ⇒ String
readonly
The class of storage used to store the object.
-
#upload_id ⇒ String
readonly
Upload ID that identifies the multipart upload.
Attributes inherited from Resources::Resource
Instance Method Summary collapse
-
#abort(options = {}) ⇒ Types::AbortMultipartUploadOutput
This operation aborts a multipart upload.
-
#basic_complete ⇒ Object
-
#complete(options = {}) ⇒ Object
Completes the upload, requires a list of completed parts.
-
#initialize ⇒ Object
constructor
-
#object ⇒ Object
-
#part(part_number) ⇒ MultipartUploadPart
-
#parts(options = {}) ⇒ Collection<MultipartUploadPart>
Returns a Collection of MultipartUploadPart resources.
Methods inherited from Resources::Resource
add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until
Methods included from Resources::OperationMethods
#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations
Constructor Details
Instance Attribute Details
#bucket_name ⇒ String (readonly)
#id ⇒ String (readonly)
#initiated ⇒ Time (readonly)
Date and time at which the multipart upload was initiated.
#initiator ⇒ Types::Initiator (readonly)
Identifies who initiated the multipart upload.
#key ⇒ String (readonly)
Key of the object for which the multipart upload was initiated.
#object_key ⇒ String (readonly)
#owner ⇒ Types::Owner (readonly)
Specifies the owner of the object that is part of the multipart upload.
#storage_class ⇒ String (readonly)
The class of storage used to store the object.
Possible values:
- STANDARD
- REDUCED_REDUNDANCY
- STANDARD_IA
- ONEZONE_IA
- INTELLIGENT_TIERING
- GLACIER
- DEEP_ARCHIVE
- OUTPOSTS
#upload_id ⇒ String (readonly)
Upload ID that identifies the multipart upload.
Instance Method Details
#abort(options = {}) ⇒ Types::AbortMultipartUploadOutput
This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.
To verify that all parts have been removed, so you don't get charged for the part storage, you should call the ListParts operation and ensure that the parts list is empty.
For information about permissions required to use the multipart upload API, see Multipart Upload API and Permissions.
The following operations are related to AbortMultipartUpload
:
#basic_complete ⇒ Object
5 |
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_upload.rb', line 5 alias_method :basic_complete, :complete |
#complete(options = {}) ⇒ Object
Completes the upload, requires a list of completed parts. You can
provide the list of parts with :part_number
and :etag
values.
upload.complete(multipart_upload: { parts: [
{ part_number: 1, etag:'etag1' },
{ part_number: 2, etag:'etag2' },
...
]})
Alternatively, you can pass compute_parts: true
and the part
list will be computed by calling Client#list_parts.
upload.complete(compute_parts: true)
25 26 27 28 29 30 |
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/multipart_upload.rb', line 25 def complete( = {}) if .delete(:compute_parts) [:multipart_upload] = { parts: compute_parts } end basic_complete() end |
#object ⇒ Object
#part(part_number) ⇒ MultipartUploadPart
#parts(options = {}) ⇒ Collection<MultipartUploadPart>
Returns a Collection of Aws::S3::MultipartUploadPart resources. No API requests are made until you call an enumerable method on the collection. Client#list_parts will be called multiple times until every Aws::S3::MultipartUploadPart has been yielded.