Method: OCI::ObjectStorage::ObjectStorageClient#commit_multipart_upload
- Defined in:
- lib/oci/object_storage/object_storage_client.rb
#commit_multipart_upload(namespace_name, bucket_name, object_name, upload_id, commit_multipart_upload_details, opts = {}) ⇒ Response
Note:
Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/objectstorage/commit_multipart_upload.rb.html) to see an example of how to use commit_multipart_upload API.
Commits a multipart upload, which involves checking part numbers and entity tags (ETags) of the parts, to create an aggregate object.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/object_storage/object_storage_client.rb', line 248 def commit_multipart_upload(namespace_name, bucket_name, object_name, upload_id, commit_multipart_upload_details, opts = {}) logger.debug 'Calling operation ObjectStorageClient#commit_multipart_upload.' if logger raise "Missing the required parameter 'namespace_name' when calling commit_multipart_upload." if namespace_name.nil? raise "Missing the required parameter 'bucket_name' when calling commit_multipart_upload." if bucket_name.nil? raise "Missing the required parameter 'object_name' when calling commit_multipart_upload." if object_name.nil? raise "Missing the required parameter 'upload_id' when calling commit_multipart_upload." if upload_id.nil? raise "Missing the required parameter 'commit_multipart_upload_details' when calling commit_multipart_upload." if commit_multipart_upload_details.nil? raise "Parameter value for 'namespace_name' must not be blank" if OCI::Internal::Util.blank_string?(namespace_name) raise "Parameter value for 'bucket_name' must not be blank" if OCI::Internal::Util.blank_string?(bucket_name) raise "Parameter value for 'object_name' must not be blank" if OCI::Internal::Util.blank_string?(object_name) path = '/n/{namespaceName}/b/{bucketName}/u/{objectName}'.sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s).sub('{objectName}', object_name.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:uploadId] = upload_id # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match] header_params[:'opc-client-request-id'] = opts[:opc_client_request_id] if opts[:opc_client_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(commit_multipart_upload_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'ObjectStorageClient#commit_multipart_upload') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |