class Aws::S3::MultipartUploadPart
def bucket_name
-
(String)
-
def bucket_name @bucket_name end
def client
-
(Client)
-
def client @client end
def copy_from(options = {})
-
(Types::UploadPartCopyOutput)
-
Options Hash:
(**options)
-
:expected_source_bucket_owner
(String
) -- -
:expected_bucket_owner
(String
) -- -
:request_payer
(String
) -- -
:copy_source_sse_customer_key_md5
(String
) -- -
:copy_source_sse_customer_key
(String
) -- -
:copy_source_sse_customer_algorithm
(String
) -- -
:sse_customer_key_md5
(String
) -- -
:sse_customer_key
(String
) -- -
:sse_customer_algorithm
(String
) -- -
:copy_source_range
(String
) -- -
:copy_source_if_unmodified_since
(Time, DateTime, Date, Integer, String
) -- -
:copy_source_if_none_match
(String
) -- -
:copy_source_if_modified_since
(Time, DateTime, Date, Integer, String
) -- -
:copy_source_if_match
(String
) -- -
:copy_source
(required, String
) --
Parameters:
-
options
(Hash
) -- ({})
Other tags:
- Example: Request syntax with placeholder values -
def copy_from(options = {}) options = options.merge( bucket: @bucket_name, key: @object_key, upload_id: @multipart_upload_id, part_number: @part_number ) resp = @client.upload_part_copy(options) resp.data end
def data
-
(Types::Part)
-
Raises:
-
(NotImplementedError)
- Raises when {#data_loaded?} is `false`.
def data load unless @data @data end
def data_loaded?
-
(Boolean)
-
def data_loaded? !!@data end
def etag
-
(String)
-
def etag data[:etag] end
def extract_bucket_name(args, options)
def extract_bucket_name(args, options) value = args[0] || options.delete(:bucket_name) case value when String then value when nil then raise ArgumentError, "missing required option :bucket_name" else msg = "expected :bucket_name to be a String, got #{value.class}" raise ArgumentError, msg end end
def extract_multipart_upload_id(args, options)
def extract_multipart_upload_id(args, options) value = args[2] || options.delete(:multipart_upload_id) case value when String then value when nil then raise ArgumentError, "missing required option :multipart_upload_id" else msg = "expected :multipart_upload_id to be a String, got #{value.class}" raise ArgumentError, msg end end
def extract_object_key(args, options)
def extract_object_key(args, options) value = args[1] || options.delete(:object_key) case value when String then value when nil then raise ArgumentError, "missing required option :object_key" else msg = "expected :object_key to be a String, got #{value.class}" raise ArgumentError, msg end end
def extract_part_number(args, options)
def extract_part_number(args, options) value = args[3] || options.delete(:part_number) case value when Integer then value when nil then raise ArgumentError, "missing required option :part_number" else msg = "expected :part_number to be a Integer, got #{value.class}" raise ArgumentError, msg end end
def identifiers
- Api: - private
Deprecated:
def identifiers { bucket_name: @bucket_name, object_key: @object_key, multipart_upload_id: @multipart_upload_id, part_number: @part_number } end
def initialize(*args)
(**options)
-
:client
(Client
) -- -
:part_number
(required, Integer
) -- -
:multipart_upload_id
(required, String
) -- -
:object_key
(required, String
) -- -
:bucket_name
(required, String
) -- -
:client
(Client
) --
Overloads:
-
def initialize(options = {})
-
def initialize(bucket_name, object_key, multipart_upload_id, part_number, options = {})
Parameters:
-
part_number
(Integer
) -- -
multipart_upload_id
(String
) -- -
object_key
(String
) -- -
bucket_name
(String
) --
def initialize(*args) options = Hash === args.last ? args.pop.dup : {} @bucket_name = extract_bucket_name(args, options) @object_key = extract_object_key(args, options) @multipart_upload_id = extract_multipart_upload_id(args, options) @part_number = extract_part_number(args, options) @data = options.delete(:data) @client = options.delete(:client) || Client.new(options) @waiter_block_warned = false end
def last_modified
-
(Time)
-
def last_modified data[:last_modified] end
def load
- Api: - private
Raises:
-
(NotImplementedError)
-
def load msg = "#load is not implemented, data only available via enumeration" raise NotImplementedError, msg end
def multipart_upload
-
(MultipartUpload)
-
def multipart_upload MultipartUpload.new( bucket_name: @bucket_name, object_key: @object_key, id: @multipart_upload_id, client: @client ) end
def multipart_upload_id
-
(String)
-
def multipart_upload_id @multipart_upload_id end
def object_key
-
(String)
-
def object_key @object_key end
def part_number
-
(Integer)
-
def part_number @part_number end
def size
-
(Integer)
-
def size data[:size] end
def upload(options = {})
-
(Types::UploadPartOutput)
-
Options Hash:
(**options)
-
:expected_bucket_owner
(String
) -- -
:request_payer
(String
) -- -
:sse_customer_key_md5
(String
) -- -
:sse_customer_key
(String
) -- -
:sse_customer_algorithm
(String
) -- -
:content_md5
(String
) -- -
:content_length
(Integer
) -- -
:body
(String, StringIO, File
) --
Parameters:
-
options
(Hash
) -- ({})
Other tags:
- Example: Request syntax with placeholder values -
def upload(options = {}) options = options.merge( bucket: @bucket_name, key: @object_key, upload_id: @multipart_upload_id, part_number: @part_number ) resp = @client.upload_part(options) resp.data end
def wait_until(options = {}, &block)
-
(Resource)
- if the waiter was successful
Options Hash:
(**options)
-
:before_wait
(Proc
) -- Callback -
:before_attempt
(Proc
) -- Callback -
:delay
(Integer
) -- Delay between each -
:max_attempts
(Integer
) -- Maximum number of
Raises:
-
(NotImplementedError)
- Raised when the resource does not -
(Aws::Waiters::Errors::UnexpectedError)
- Raised when an error is -
(Aws::Waiters::Errors::FailureStateError)
- Raised when the waiter
Other tags:
- Yieldparam: resource - to be used in the waiting condition.
Other tags:
- Note: - The waiting operation is performed on a copy. The original resource
Deprecated:
- Use [Aws::S3::Client] #wait_until instead
def wait_until(options = {}, &block) self_copy = self.dup attempts = 0 options[:max_attempts] = 10 unless options.key?(:max_attempts) options[:delay] ||= 10 options[:poller] = Proc.new do attempts += 1 if block.call(self_copy) [:success, self_copy] else self_copy.reload unless attempts == options[:max_attempts] :retry end end Aws::Waiters::Waiter.new(options).wait({}) end