oci 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -1
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/audit/audit_client.rb +65 -30
  5. data/lib/oci/audit/models/audit_event.rb +17 -1
  6. data/lib/oci/core/blockstorage_client.rb +336 -197
  7. data/lib/oci/core/compute_client.rb +601 -357
  8. data/lib/oci/core/models/attach_volume_details.rb +4 -0
  9. data/lib/oci/core/models/boot_volume.rb +1 -1
  10. data/lib/oci/core/models/dhcp_option.rb +4 -0
  11. data/lib/oci/core/models/export_image_details.rb +4 -0
  12. data/lib/oci/core/models/image_source_details.rb +4 -0
  13. data/lib/oci/core/models/instance_source_details.rb +4 -0
  14. data/lib/oci/core/models/volume_attachment.rb +4 -0
  15. data/lib/oci/core/models/volume_source_details.rb +4 -0
  16. data/lib/oci/core/util.rb +29 -0
  17. data/lib/oci/core/virtual_network_client.rb +1695 -1031
  18. data/lib/oci/database/database_client.rb +612 -368
  19. data/lib/oci/database/models/create_data_guard_association_details.rb +4 -0
  20. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +4 -0
  21. data/lib/oci/dns/dns_client.rb +271 -158
  22. data/lib/oci/email/email_client.rb +144 -79
  23. data/lib/oci/file_storage/file_storage_client.rb +354 -207
  24. data/lib/oci/identity/identity_client.rb +1111 -670
  25. data/lib/oci/identity/models/create_identity_provider_details.rb +4 -0
  26. data/lib/oci/identity/models/identity_provider.rb +4 -0
  27. data/lib/oci/identity/models/update_identity_provider_details.rb +4 -0
  28. data/lib/oci/load_balancer/load_balancer.rb +4 -0
  29. data/lib/oci/load_balancer/load_balancer_client.rb +943 -383
  30. data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +149 -17
  31. data/lib/oci/load_balancer/models/backend.rb +5 -5
  32. data/lib/oci/load_balancer/models/backend_details.rb +4 -4
  33. data/lib/oci/load_balancer/models/backend_set.rb +1 -1
  34. data/lib/oci/load_balancer/models/backend_set_health.rb +4 -4
  35. data/lib/oci/load_balancer/models/certificate.rb +2 -2
  36. data/lib/oci/load_balancer/models/certificate_details.rb +2 -4
  37. data/lib/oci/load_balancer/models/connection_configuration.rb +1 -28
  38. data/lib/oci/load_balancer/models/create_backend_details.rb +4 -4
  39. data/lib/oci/load_balancer/models/create_backend_set_details.rb +1 -1
  40. data/lib/oci/load_balancer/models/create_certificate_details.rb +5 -7
  41. data/lib/oci/load_balancer/models/create_hostname_details.rb +164 -0
  42. data/lib/oci/load_balancer/models/create_listener_details.rb +19 -5
  43. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +12 -3
  44. data/lib/oci/load_balancer/models/create_path_route_set_details.rb +1 -1
  45. data/lib/oci/load_balancer/models/health_check_result.rb +2 -2
  46. data/lib/oci/load_balancer/models/health_checker.rb +3 -3
  47. data/lib/oci/load_balancer/models/health_checker_details.rb +3 -3
  48. data/lib/oci/load_balancer/models/hostname.rb +164 -0
  49. data/lib/oci/load_balancer/models/hostname_details.rb +163 -0
  50. data/lib/oci/load_balancer/models/ip_address.rb +1 -1
  51. data/lib/oci/load_balancer/models/listener.rb +19 -5
  52. data/lib/oci/load_balancer/models/listener_details.rb +17 -3
  53. data/lib/oci/load_balancer/models/load_balancer.rb +13 -2
  54. data/lib/oci/load_balancer/models/load_balancer_health.rb +3 -3
  55. data/lib/oci/load_balancer/models/load_balancer_policy.rb +4 -1
  56. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +5 -2
  57. data/lib/oci/load_balancer/models/load_balancer_shape.rb +3 -0
  58. data/lib/oci/load_balancer/models/path_route.rb +1 -1
  59. data/lib/oci/load_balancer/models/path_route_set.rb +1 -1
  60. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +2 -2
  61. data/lib/oci/load_balancer/models/ssl_configuration.rb +1 -1
  62. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +1 -1
  63. data/lib/oci/load_balancer/models/update_backend_details.rb +3 -3
  64. data/lib/oci/load_balancer/models/update_health_checker_details.rb +3 -3
  65. data/lib/oci/load_balancer/models/update_hostname_details.rb +153 -0
  66. data/lib/oci/load_balancer/models/update_listener_details.rb +17 -3
  67. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +1 -1
  68. data/lib/oci/load_balancer/models/work_request.rb +2 -0
  69. data/lib/oci/object_storage/object_storage_client.rb +443 -270
  70. data/lib/oci/retry/functions/should_retry_on_error.rb +28 -0
  71. data/lib/oci/retry/functions/sleep.rb +85 -0
  72. data/lib/oci/retry/internal/retry_state.rb +48 -0
  73. data/lib/oci/retry/retry.rb +85 -0
  74. data/lib/oci/retry/retry_config.rb +121 -0
  75. data/lib/oci/version.rb +1 -1
  76. metadata +39 -4
@@ -11,15 +11,19 @@ module OCI
11
11
 
12
12
  # **[Required]** The name of the associated backend set.
13
13
  #
14
- # Example: `My_backend_set`
14
+ # Example: `example_backend_set`
15
15
  #
16
16
  # @return [String]
17
17
  attr_accessor :default_backend_set_name
18
18
 
19
+ # An array of hostname resource names.
20
+ # @return [Array<String>]
21
+ attr_accessor :hostname_names
22
+
19
23
  # The name of the set of path-based routing rules, {PathRouteSet},
20
24
  # applied to this listener's traffic.
21
25
  #
22
- # Example: `path-route-set-001`
26
+ # Example: `example_path_route_set`
23
27
  #
24
28
  # @return [String]
25
29
  attr_accessor :path_route_set_name
@@ -49,6 +53,7 @@ module OCI
49
53
  # rubocop:disable Style/SymbolLiteral
50
54
  'connection_configuration': :'connectionConfiguration',
51
55
  'default_backend_set_name': :'defaultBackendSetName',
56
+ 'hostname_names': :'hostnameNames',
52
57
  'path_route_set_name': :'pathRouteSetName',
53
58
  'port': :'port',
54
59
  'protocol': :'protocol',
@@ -63,6 +68,7 @@ module OCI
63
68
  # rubocop:disable Style/SymbolLiteral
64
69
  'connection_configuration': :'OCI::LoadBalancer::Models::ConnectionConfiguration',
65
70
  'default_backend_set_name': :'String',
71
+ 'hostname_names': :'Array<String>',
66
72
  'path_route_set_name': :'String',
67
73
  'port': :'Integer',
68
74
  'protocol': :'String',
@@ -79,6 +85,7 @@ module OCI
79
85
  # @param [Hash] attributes Model attributes in the form of hash
80
86
  # @option attributes [OCI::LoadBalancer::Models::ConnectionConfiguration] :connection_configuration The value to assign to the {#connection_configuration} property
81
87
  # @option attributes [String] :default_backend_set_name The value to assign to the {#default_backend_set_name} property
88
+ # @option attributes [Array<String>] :hostname_names The value to assign to the {#hostname_names} property
82
89
  # @option attributes [String] :path_route_set_name The value to assign to the {#path_route_set_name} property
83
90
  # @option attributes [Integer] :port The value to assign to the {#port} property
84
91
  # @option attributes [String] :protocol The value to assign to the {#protocol} property
@@ -101,6 +108,12 @@ module OCI
101
108
 
102
109
  self.default_backend_set_name = attributes[:'default_backend_set_name'] if attributes[:'default_backend_set_name']
103
110
 
111
+ self.hostname_names = attributes[:'hostnameNames'] if attributes[:'hostnameNames']
112
+
113
+ raise 'You cannot provide both :hostnameNames and :hostname_names' if attributes.key?(:'hostnameNames') && attributes.key?(:'hostname_names')
114
+
115
+ self.hostname_names = attributes[:'hostname_names'] if attributes[:'hostname_names']
116
+
104
117
  self.path_route_set_name = attributes[:'pathRouteSetName'] if attributes[:'pathRouteSetName']
105
118
 
106
119
  raise 'You cannot provide both :pathRouteSetName and :path_route_set_name' if attributes.key?(:'pathRouteSetName') && attributes.key?(:'path_route_set_name')
@@ -130,6 +143,7 @@ module OCI
130
143
  self.class == other.class &&
131
144
  connection_configuration == other.connection_configuration &&
132
145
  default_backend_set_name == other.default_backend_set_name &&
146
+ hostname_names == other.hostname_names &&
133
147
  path_route_set_name == other.path_route_set_name &&
134
148
  port == other.port &&
135
149
  protocol == other.protocol &&
@@ -149,7 +163,7 @@ module OCI
149
163
  # Calculates hash code according to all attributes.
150
164
  # @return [Fixnum] Hash code
151
165
  def hash
152
- [connection_configuration, default_backend_set_name, path_route_set_name, port, protocol, ssl_configuration].hash
166
+ [connection_configuration, default_backend_set_name, hostname_names, path_route_set_name, port, protocol, ssl_configuration].hash
153
167
  end
154
168
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
155
169
 
@@ -9,7 +9,7 @@ module OCI
9
9
  # **[Required]** The user-friendly display name for the load balancer. It does not have to be unique, and it is changeable.
10
10
  # Avoid entering confidential information.
11
11
  #
12
- # Example: `My load balancer`
12
+ # Example: `example_load_balancer`
13
13
  #
14
14
  # @return [String]
15
15
  attr_accessor :display_name
@@ -66,6 +66,8 @@ module OCI
66
66
 
67
67
  # **[Required]** The type of action the work request represents.
68
68
  #
69
+ # Example: `CreateListener`
70
+ #
69
71
  # @return [String]
70
72
  attr_accessor :type
71
73
 
@@ -15,6 +15,12 @@ module OCI
15
15
  # @return [String]
16
16
  attr_reader :endpoint
17
17
 
18
+ # The default retry configuration to apply to all operations in this service client. This can be overridden
19
+ # on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
20
+ # will not perform any retries
21
+ # @return [OCI::Retry::RetryConfig]
22
+ attr_reader :retry_config
23
+
18
24
  # The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
19
25
  # @return [String]
20
26
  attr_reader :region
@@ -36,7 +42,10 @@ module OCI
36
42
  # so that the instance principals signer can be provided to the client
37
43
  # @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
38
44
  # the details for the proxy can be provided in this parameter
39
- def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil)
45
+ # @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
46
+ # apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
47
+ # will not perform any retries
48
+ def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil)
40
49
  # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
41
50
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
42
51
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
@@ -60,6 +69,7 @@ module OCI
60
69
  end
61
70
 
62
71
  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
72
+ @retry_config = retry_config
63
73
 
64
74
  region ||= config.region
65
75
  region ||= signer.region if signer.respond_to?(:region)
@@ -100,6 +110,8 @@ module OCI
100
110
  #
101
111
  # @param [String] upload_id The upload ID for a multipart upload.
102
112
  # @param [Hash] opts the optional parameters
113
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
114
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
103
115
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
104
116
  # @return [Response] A Response object with data of type nil
105
117
  def abort_multipart_upload(namespace_name, bucket_name, object_name, upload_id, opts = {})
@@ -128,15 +140,19 @@ module OCI
128
140
 
129
141
  post_body = nil
130
142
 
131
- @api_client.call_api(
132
- :DELETE,
133
- path,
134
- endpoint,
135
- header_params: header_params,
136
- query_params: query_params,
137
- operation_signing_strategy: operation_signing_strategy,
138
- body: post_body
139
- )
143
+ # rubocop:disable Metrics/BlockLength
144
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#abort_multipart_upload') do
145
+ @api_client.call_api(
146
+ :DELETE,
147
+ path,
148
+ endpoint,
149
+ header_params: header_params,
150
+ query_params: query_params,
151
+ operation_signing_strategy: operation_signing_strategy,
152
+ body: post_body
153
+ )
154
+ end
155
+ # rubocop:enable Metrics/BlockLength
140
156
  end
141
157
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
142
158
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -159,6 +175,8 @@ module OCI
159
175
  # @param [String] upload_id The upload ID for a multipart upload.
160
176
  # @param [OCI::ObjectStorage::Models::CommitMultipartUploadDetails] commit_multipart_upload_details The part numbers and ETags for the parts you want to commit.
161
177
  # @param [Hash] opts the optional parameters
178
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
179
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
162
180
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
163
181
  # For uploading a part, this is the entity tag of the target part.
164
182
  #
@@ -196,15 +214,19 @@ module OCI
196
214
 
197
215
  post_body = @api_client.object_to_http_body(commit_multipart_upload_details)
198
216
 
199
- @api_client.call_api(
200
- :POST,
201
- path,
202
- endpoint,
203
- header_params: header_params,
204
- query_params: query_params,
205
- operation_signing_strategy: operation_signing_strategy,
206
- body: post_body
207
- )
217
+ # rubocop:disable Metrics/BlockLength
218
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#commit_multipart_upload') do
219
+ @api_client.call_api(
220
+ :POST,
221
+ path,
222
+ endpoint,
223
+ header_params: header_params,
224
+ query_params: query_params,
225
+ operation_signing_strategy: operation_signing_strategy,
226
+ body: post_body
227
+ )
228
+ end
229
+ # rubocop:enable Metrics/BlockLength
208
230
  end
209
231
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
210
232
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -220,6 +242,8 @@ module OCI
220
242
  # @param [String] namespace_name The top-level namespace used for the request.
221
243
  # @param [OCI::ObjectStorage::Models::CreateBucketDetails] create_bucket_details Request object for creating a bucket.
222
244
  # @param [Hash] opts the optional parameters
245
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
246
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
223
247
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
224
248
  # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::Bucket Bucket}
225
249
  def create_bucket(namespace_name, create_bucket_details, opts = {})
@@ -243,16 +267,20 @@ module OCI
243
267
 
244
268
  post_body = @api_client.object_to_http_body(create_bucket_details)
245
269
 
246
- @api_client.call_api(
247
- :POST,
248
- path,
249
- endpoint,
250
- header_params: header_params,
251
- query_params: query_params,
252
- operation_signing_strategy: operation_signing_strategy,
253
- body: post_body,
254
- return_type: 'OCI::ObjectStorage::Models::Bucket'
255
- )
270
+ # rubocop:disable Metrics/BlockLength
271
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#create_bucket') do
272
+ @api_client.call_api(
273
+ :POST,
274
+ path,
275
+ endpoint,
276
+ header_params: header_params,
277
+ query_params: query_params,
278
+ operation_signing_strategy: operation_signing_strategy,
279
+ body: post_body,
280
+ return_type: 'OCI::ObjectStorage::Models::Bucket'
281
+ )
282
+ end
283
+ # rubocop:enable Metrics/BlockLength
256
284
  end
257
285
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
258
286
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -271,6 +299,8 @@ module OCI
271
299
  #
272
300
  # @param [OCI::ObjectStorage::Models::CreateMultipartUploadDetails] create_multipart_upload_details Request object for creating a multi-part upload.
273
301
  # @param [Hash] opts the optional parameters
302
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
303
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
274
304
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
275
305
  # For uploading a part, this is the entity tag of the target part.
276
306
  #
@@ -304,16 +334,20 @@ module OCI
304
334
 
305
335
  post_body = @api_client.object_to_http_body(create_multipart_upload_details)
306
336
 
307
- @api_client.call_api(
308
- :POST,
309
- path,
310
- endpoint,
311
- header_params: header_params,
312
- query_params: query_params,
313
- operation_signing_strategy: operation_signing_strategy,
314
- body: post_body,
315
- return_type: 'OCI::ObjectStorage::Models::MultipartUpload'
316
- )
337
+ # rubocop:disable Metrics/BlockLength
338
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#create_multipart_upload') do
339
+ @api_client.call_api(
340
+ :POST,
341
+ path,
342
+ endpoint,
343
+ header_params: header_params,
344
+ query_params: query_params,
345
+ operation_signing_strategy: operation_signing_strategy,
346
+ body: post_body,
347
+ return_type: 'OCI::ObjectStorage::Models::MultipartUpload'
348
+ )
349
+ end
350
+ # rubocop:enable Metrics/BlockLength
317
351
  end
318
352
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
319
353
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -332,6 +366,8 @@ module OCI
332
366
  #
333
367
  # @param [OCI::ObjectStorage::Models::CreatePreauthenticatedRequestDetails] create_preauthenticated_request_details Information needed to create the pre-authenticated request.
334
368
  # @param [Hash] opts the optional parameters
369
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
370
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
335
371
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
336
372
  # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::PreauthenticatedRequest PreauthenticatedRequest}
337
373
  def create_preauthenticated_request(namespace_name, bucket_name, create_preauthenticated_request_details, opts = {})
@@ -357,16 +393,20 @@ module OCI
357
393
 
358
394
  post_body = @api_client.object_to_http_body(create_preauthenticated_request_details)
359
395
 
360
- @api_client.call_api(
361
- :POST,
362
- path,
363
- endpoint,
364
- header_params: header_params,
365
- query_params: query_params,
366
- operation_signing_strategy: operation_signing_strategy,
367
- body: post_body,
368
- return_type: 'OCI::ObjectStorage::Models::PreauthenticatedRequest'
369
- )
396
+ # rubocop:disable Metrics/BlockLength
397
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#create_preauthenticated_request') do
398
+ @api_client.call_api(
399
+ :POST,
400
+ path,
401
+ endpoint,
402
+ header_params: header_params,
403
+ query_params: query_params,
404
+ operation_signing_strategy: operation_signing_strategy,
405
+ body: post_body,
406
+ return_type: 'OCI::ObjectStorage::Models::PreauthenticatedRequest'
407
+ )
408
+ end
409
+ # rubocop:enable Metrics/BlockLength
370
410
  end
371
411
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
372
412
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -384,6 +424,8 @@ module OCI
384
424
  # Example: `my-new-bucket1`
385
425
  #
386
426
  # @param [Hash] opts the optional parameters
427
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
428
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
387
429
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
388
430
  # For uploading a part, this is the entity tag of the target part.
389
431
  #
@@ -412,15 +454,19 @@ module OCI
412
454
 
413
455
  post_body = nil
414
456
 
415
- @api_client.call_api(
416
- :DELETE,
417
- path,
418
- endpoint,
419
- header_params: header_params,
420
- query_params: query_params,
421
- operation_signing_strategy: operation_signing_strategy,
422
- body: post_body
423
- )
457
+ # rubocop:disable Metrics/BlockLength
458
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#delete_bucket') do
459
+ @api_client.call_api(
460
+ :DELETE,
461
+ path,
462
+ endpoint,
463
+ header_params: header_params,
464
+ query_params: query_params,
465
+ operation_signing_strategy: operation_signing_strategy,
466
+ body: post_body
467
+ )
468
+ end
469
+ # rubocop:enable Metrics/BlockLength
424
470
  end
425
471
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
426
472
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -441,6 +487,8 @@ module OCI
441
487
  # Example: `test/object1.log`
442
488
  #
443
489
  # @param [Hash] opts the optional parameters
490
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
491
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
444
492
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
445
493
  # For uploading a part, this is the entity tag of the target part.
446
494
  #
@@ -471,15 +519,19 @@ module OCI
471
519
 
472
520
  post_body = nil
473
521
 
474
- @api_client.call_api(
475
- :DELETE,
476
- path,
477
- endpoint,
478
- header_params: header_params,
479
- query_params: query_params,
480
- operation_signing_strategy: operation_signing_strategy,
481
- body: post_body
482
- )
522
+ # rubocop:disable Metrics/BlockLength
523
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#delete_object') do
524
+ @api_client.call_api(
525
+ :DELETE,
526
+ path,
527
+ endpoint,
528
+ header_params: header_params,
529
+ query_params: query_params,
530
+ operation_signing_strategy: operation_signing_strategy,
531
+ body: post_body
532
+ )
533
+ end
534
+ # rubocop:enable Metrics/BlockLength
483
535
  end
484
536
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
485
537
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -499,6 +551,8 @@ module OCI
499
551
  # the pre-authenticated request, such as GET or DELETE.
500
552
  #
501
553
  # @param [Hash] opts the optional parameters
554
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
555
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
502
556
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
503
557
  # @return [Response] A Response object with data of type nil
504
558
  def delete_preauthenticated_request(namespace_name, bucket_name, par_id, opts = {})
@@ -525,15 +579,19 @@ module OCI
525
579
 
526
580
  post_body = nil
527
581
 
528
- @api_client.call_api(
529
- :DELETE,
530
- path,
531
- endpoint,
532
- header_params: header_params,
533
- query_params: query_params,
534
- operation_signing_strategy: operation_signing_strategy,
535
- body: post_body
536
- )
582
+ # rubocop:disable Metrics/BlockLength
583
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#delete_preauthenticated_request') do
584
+ @api_client.call_api(
585
+ :DELETE,
586
+ path,
587
+ endpoint,
588
+ header_params: header_params,
589
+ query_params: query_params,
590
+ operation_signing_strategy: operation_signing_strategy,
591
+ body: post_body
592
+ )
593
+ end
594
+ # rubocop:enable Metrics/BlockLength
537
595
  end
538
596
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
539
597
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -551,6 +609,8 @@ module OCI
551
609
  # Example: `my-new-bucket1`
552
610
  #
553
611
  # @param [Hash] opts the optional parameters
612
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
613
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
554
614
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
555
615
  # For uploading a part, this is the entity tag of the target part.
556
616
  #
@@ -583,16 +643,20 @@ module OCI
583
643
 
584
644
  post_body = nil
585
645
 
586
- @api_client.call_api(
587
- :GET,
588
- path,
589
- endpoint,
590
- header_params: header_params,
591
- query_params: query_params,
592
- operation_signing_strategy: operation_signing_strategy,
593
- body: post_body,
594
- return_type: 'OCI::ObjectStorage::Models::Bucket'
595
- )
646
+ # rubocop:disable Metrics/BlockLength
647
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_bucket') do
648
+ @api_client.call_api(
649
+ :GET,
650
+ path,
651
+ endpoint,
652
+ header_params: header_params,
653
+ query_params: query_params,
654
+ operation_signing_strategy: operation_signing_strategy,
655
+ body: post_body,
656
+ return_type: 'OCI::ObjectStorage::Models::Bucket'
657
+ )
658
+ end
659
+ # rubocop:enable Metrics/BlockLength
596
660
  end
597
661
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
598
662
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -607,6 +671,8 @@ module OCI
607
671
  # account creation. You cannot edit a namespace.
608
672
  #
609
673
  # @param [Hash] opts the optional parameters
674
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
675
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
610
676
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
611
677
  # @return [Response] A Response object with data of type String
612
678
  def get_namespace(opts = {})
@@ -627,16 +693,20 @@ module OCI
627
693
 
628
694
  post_body = nil
629
695
 
630
- @api_client.call_api(
631
- :GET,
632
- path,
633
- endpoint,
634
- header_params: header_params,
635
- query_params: query_params,
636
- operation_signing_strategy: operation_signing_strategy,
637
- body: post_body,
638
- return_type: 'String'
639
- )
696
+ # rubocop:disable Metrics/BlockLength
697
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_namespace') do
698
+ @api_client.call_api(
699
+ :GET,
700
+ path,
701
+ endpoint,
702
+ header_params: header_params,
703
+ query_params: query_params,
704
+ operation_signing_strategy: operation_signing_strategy,
705
+ body: post_body,
706
+ return_type: 'String'
707
+ )
708
+ end
709
+ # rubocop:enable Metrics/BlockLength
640
710
  end
641
711
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
642
712
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -654,6 +724,8 @@ module OCI
654
724
  #
655
725
  # @param [String] namespace_name The top-level namespace used for the request.
656
726
  # @param [Hash] opts the optional parameters
727
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
728
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
657
729
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
658
730
  # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::NamespaceMetadata NamespaceMetadata}
659
731
  def get_namespace_metadata(namespace_name, opts = {})
@@ -676,16 +748,20 @@ module OCI
676
748
 
677
749
  post_body = nil
678
750
 
679
- @api_client.call_api(
680
- :GET,
681
- path,
682
- endpoint,
683
- header_params: header_params,
684
- query_params: query_params,
685
- operation_signing_strategy: operation_signing_strategy,
686
- body: post_body,
687
- return_type: 'OCI::ObjectStorage::Models::NamespaceMetadata'
688
- )
751
+ # rubocop:disable Metrics/BlockLength
752
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_namespace_metadata') do
753
+ @api_client.call_api(
754
+ :GET,
755
+ path,
756
+ endpoint,
757
+ header_params: header_params,
758
+ query_params: query_params,
759
+ operation_signing_strategy: operation_signing_strategy,
760
+ body: post_body,
761
+ return_type: 'OCI::ObjectStorage::Models::NamespaceMetadata'
762
+ )
763
+ end
764
+ # rubocop:enable Metrics/BlockLength
689
765
  end
690
766
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
691
767
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -706,6 +782,8 @@ module OCI
706
782
  # Example: `test/object1.log`
707
783
  #
708
784
  # @param [Hash] opts the optional parameters
785
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
786
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
709
787
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
710
788
  # For uploading a part, this is the entity tag of the target part.
711
789
  #
@@ -746,20 +824,9 @@ module OCI
746
824
 
747
825
  post_body = nil
748
826
 
749
- if !block.nil?
750
- @api_client.call_api(
751
- :GET,
752
- path,
753
- endpoint,
754
- header_params: header_params,
755
- query_params: query_params,
756
- operation_signing_strategy: operation_signing_strategy,
757
- body: post_body,
758
- return_type: 'Stream',
759
- &block
760
- )
761
- elsif opts[:response_target]
762
- if opts[:response_target].respond_to? :write
827
+ # rubocop:disable Metrics/BlockLength
828
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_object') do
829
+ if !block.nil?
763
830
  @api_client.call_api(
764
831
  :GET,
765
832
  path,
@@ -769,11 +836,11 @@ module OCI
769
836
  operation_signing_strategy: operation_signing_strategy,
770
837
  body: post_body,
771
838
  return_type: 'Stream',
772
- &proc { |chunk, _response| opts[:response_target].write(chunk) }
839
+ &block
773
840
  )
774
- elsif opts[:response_target].is_a?(String)
775
- File.open(opts[:response_target], 'wb') do |output|
776
- return @api_client.call_api(
841
+ elsif opts[:response_target]
842
+ if opts[:response_target].respond_to? :write
843
+ @api_client.call_api(
777
844
  :GET,
778
845
  path,
779
846
  endpoint,
@@ -782,22 +849,37 @@ module OCI
782
849
  operation_signing_strategy: operation_signing_strategy,
783
850
  body: post_body,
784
851
  return_type: 'Stream',
785
- &proc { |chunk, _response| output.write(chunk) }
852
+ &proc { |chunk, _response| opts[:response_target].write(chunk) }
786
853
  )
854
+ elsif opts[:response_target].is_a?(String)
855
+ File.open(opts[:response_target], 'wb') do |output|
856
+ return @api_client.call_api(
857
+ :GET,
858
+ path,
859
+ endpoint,
860
+ header_params: header_params,
861
+ query_params: query_params,
862
+ operation_signing_strategy: operation_signing_strategy,
863
+ body: post_body,
864
+ return_type: 'Stream',
865
+ &proc { |chunk, _response| output.write(chunk) }
866
+ )
867
+ end
787
868
  end
869
+ else
870
+ @api_client.call_api(
871
+ :GET,
872
+ path,
873
+ endpoint,
874
+ header_params: header_params,
875
+ query_params: query_params,
876
+ operation_signing_strategy: operation_signing_strategy,
877
+ body: post_body,
878
+ return_type: 'String'
879
+ )
788
880
  end
789
- else
790
- @api_client.call_api(
791
- :GET,
792
- path,
793
- endpoint,
794
- header_params: header_params,
795
- query_params: query_params,
796
- operation_signing_strategy: operation_signing_strategy,
797
- body: post_body,
798
- return_type: 'String'
799
- )
800
881
  end
882
+ # rubocop:enable Metrics/BlockLength
801
883
  end
802
884
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
803
885
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -817,6 +899,8 @@ module OCI
817
899
  # the pre-authenticated request, such as GET or DELETE.
818
900
  #
819
901
  # @param [Hash] opts the optional parameters
902
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
903
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
820
904
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
821
905
  # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::PreauthenticatedRequestSummary PreauthenticatedRequestSummary}
822
906
  def get_preauthenticated_request(namespace_name, bucket_name, par_id, opts = {})
@@ -843,16 +927,20 @@ module OCI
843
927
 
844
928
  post_body = nil
845
929
 
846
- @api_client.call_api(
847
- :GET,
848
- path,
849
- endpoint,
850
- header_params: header_params,
851
- query_params: query_params,
852
- operation_signing_strategy: operation_signing_strategy,
853
- body: post_body,
854
- return_type: 'OCI::ObjectStorage::Models::PreauthenticatedRequestSummary'
855
- )
930
+ # rubocop:disable Metrics/BlockLength
931
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#get_preauthenticated_request') do
932
+ @api_client.call_api(
933
+ :GET,
934
+ path,
935
+ endpoint,
936
+ header_params: header_params,
937
+ query_params: query_params,
938
+ operation_signing_strategy: operation_signing_strategy,
939
+ body: post_body,
940
+ return_type: 'OCI::ObjectStorage::Models::PreauthenticatedRequestSummary'
941
+ )
942
+ end
943
+ # rubocop:enable Metrics/BlockLength
856
944
  end
857
945
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
858
946
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -870,6 +958,8 @@ module OCI
870
958
  # Example: `my-new-bucket1`
871
959
  #
872
960
  # @param [Hash] opts the optional parameters
961
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
962
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
873
963
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
874
964
  # For uploading a part, this is the entity tag of the target part.
875
965
  #
@@ -902,15 +992,19 @@ module OCI
902
992
 
903
993
  post_body = nil
904
994
 
905
- @api_client.call_api(
906
- :HEAD,
907
- path,
908
- endpoint,
909
- header_params: header_params,
910
- query_params: query_params,
911
- operation_signing_strategy: operation_signing_strategy,
912
- body: post_body
913
- )
995
+ # rubocop:disable Metrics/BlockLength
996
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#head_bucket') do
997
+ @api_client.call_api(
998
+ :HEAD,
999
+ path,
1000
+ endpoint,
1001
+ header_params: header_params,
1002
+ query_params: query_params,
1003
+ operation_signing_strategy: operation_signing_strategy,
1004
+ body: post_body
1005
+ )
1006
+ end
1007
+ # rubocop:enable Metrics/BlockLength
914
1008
  end
915
1009
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
916
1010
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -931,6 +1025,8 @@ module OCI
931
1025
  # Example: `test/object1.log`
932
1026
  #
933
1027
  # @param [Hash] opts the optional parameters
1028
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1029
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
934
1030
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
935
1031
  # For uploading a part, this is the entity tag of the target part.
936
1032
  #
@@ -965,15 +1061,19 @@ module OCI
965
1061
 
966
1062
  post_body = nil
967
1063
 
968
- @api_client.call_api(
969
- :HEAD,
970
- path,
971
- endpoint,
972
- header_params: header_params,
973
- query_params: query_params,
974
- operation_signing_strategy: operation_signing_strategy,
975
- body: post_body
976
- )
1064
+ # rubocop:disable Metrics/BlockLength
1065
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#head_object') do
1066
+ @api_client.call_api(
1067
+ :HEAD,
1068
+ path,
1069
+ endpoint,
1070
+ header_params: header_params,
1071
+ query_params: query_params,
1072
+ operation_signing_strategy: operation_signing_strategy,
1073
+ body: post_body
1074
+ )
1075
+ end
1076
+ # rubocop:enable Metrics/BlockLength
977
1077
  end
978
1078
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
979
1079
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -994,6 +1094,8 @@ module OCI
994
1094
  # @param [String] namespace_name The top-level namespace used for the request.
995
1095
  # @param [String] compartment_id The ID of the compartment in which to list buckets.
996
1096
  # @param [Hash] opts the optional parameters
1097
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1098
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
997
1099
  # @option opts [Integer] :limit The maximum number of items to return.
998
1100
  # @option opts [String] :page The page at which to start retrieving results.
999
1101
  # @option opts [Array<String>] :fields Bucket summary in list of buckets includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated',
@@ -1038,16 +1140,20 @@ module OCI
1038
1140
 
1039
1141
  post_body = nil
1040
1142
 
1041
- @api_client.call_api(
1042
- :GET,
1043
- path,
1044
- endpoint,
1045
- header_params: header_params,
1046
- query_params: query_params,
1047
- operation_signing_strategy: operation_signing_strategy,
1048
- body: post_body,
1049
- return_type: 'Array<OCI::ObjectStorage::Models::BucketSummary>'
1050
- )
1143
+ # rubocop:disable Metrics/BlockLength
1144
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_buckets') do
1145
+ @api_client.call_api(
1146
+ :GET,
1147
+ path,
1148
+ endpoint,
1149
+ header_params: header_params,
1150
+ query_params: query_params,
1151
+ operation_signing_strategy: operation_signing_strategy,
1152
+ body: post_body,
1153
+ return_type: 'Array<OCI::ObjectStorage::Models::BucketSummary>'
1154
+ )
1155
+ end
1156
+ # rubocop:enable Metrics/BlockLength
1051
1157
  end
1052
1158
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1053
1159
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1069,6 +1175,8 @@ module OCI
1069
1175
  #
1070
1176
  # @param [String] upload_id The upload ID for a multipart upload.
1071
1177
  # @param [Hash] opts the optional parameters
1178
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1179
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1072
1180
  # @option opts [Integer] :limit The maximum number of items to return.
1073
1181
  # @option opts [String] :page The page at which to start retrieving results.
1074
1182
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -1101,16 +1209,20 @@ module OCI
1101
1209
 
1102
1210
  post_body = nil
1103
1211
 
1104
- @api_client.call_api(
1105
- :GET,
1106
- path,
1107
- endpoint,
1108
- header_params: header_params,
1109
- query_params: query_params,
1110
- operation_signing_strategy: operation_signing_strategy,
1111
- body: post_body,
1112
- return_type: 'Array<OCI::ObjectStorage::Models::MultipartUploadPartSummary>'
1113
- )
1212
+ # rubocop:disable Metrics/BlockLength
1213
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_multipart_upload_parts') do
1214
+ @api_client.call_api(
1215
+ :GET,
1216
+ path,
1217
+ endpoint,
1218
+ header_params: header_params,
1219
+ query_params: query_params,
1220
+ operation_signing_strategy: operation_signing_strategy,
1221
+ body: post_body,
1222
+ return_type: 'Array<OCI::ObjectStorage::Models::MultipartUploadPartSummary>'
1223
+ )
1224
+ end
1225
+ # rubocop:enable Metrics/BlockLength
1114
1226
  end
1115
1227
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1116
1228
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1128,6 +1240,8 @@ module OCI
1128
1240
  # Example: `my-new-bucket1`
1129
1241
  #
1130
1242
  # @param [Hash] opts the optional parameters
1243
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1244
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1131
1245
  # @option opts [Integer] :limit The maximum number of items to return.
1132
1246
  # @option opts [String] :page The page at which to start retrieving results.
1133
1247
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -1156,16 +1270,20 @@ module OCI
1156
1270
 
1157
1271
  post_body = nil
1158
1272
 
1159
- @api_client.call_api(
1160
- :GET,
1161
- path,
1162
- endpoint,
1163
- header_params: header_params,
1164
- query_params: query_params,
1165
- operation_signing_strategy: operation_signing_strategy,
1166
- body: post_body,
1167
- return_type: 'Array<OCI::ObjectStorage::Models::MultipartUpload>'
1168
- )
1273
+ # rubocop:disable Metrics/BlockLength
1274
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_multipart_uploads') do
1275
+ @api_client.call_api(
1276
+ :GET,
1277
+ path,
1278
+ endpoint,
1279
+ header_params: header_params,
1280
+ query_params: query_params,
1281
+ operation_signing_strategy: operation_signing_strategy,
1282
+ body: post_body,
1283
+ return_type: 'Array<OCI::ObjectStorage::Models::MultipartUpload>'
1284
+ )
1285
+ end
1286
+ # rubocop:enable Metrics/BlockLength
1169
1287
  end
1170
1288
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1171
1289
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1187,6 +1305,8 @@ module OCI
1187
1305
  # Example: `my-new-bucket1`
1188
1306
  #
1189
1307
  # @param [Hash] opts the optional parameters
1308
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1309
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1190
1310
  # @option opts [String] :prefix The string to use for matching against the start of object names in a list query.
1191
1311
  # @option opts [String] :start Object names returned by a list query must be greater or equal to this parameter.
1192
1312
  # @option opts [String] :_end Object names returned by a list query must be strictly less than this parameter.
@@ -1232,16 +1352,20 @@ module OCI
1232
1352
 
1233
1353
  post_body = nil
1234
1354
 
1235
- @api_client.call_api(
1236
- :GET,
1237
- path,
1238
- endpoint,
1239
- header_params: header_params,
1240
- query_params: query_params,
1241
- operation_signing_strategy: operation_signing_strategy,
1242
- body: post_body,
1243
- return_type: 'OCI::ObjectStorage::Models::ListObjects'
1244
- )
1355
+ # rubocop:disable Metrics/BlockLength
1356
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_objects') do
1357
+ @api_client.call_api(
1358
+ :GET,
1359
+ path,
1360
+ endpoint,
1361
+ header_params: header_params,
1362
+ query_params: query_params,
1363
+ operation_signing_strategy: operation_signing_strategy,
1364
+ body: post_body,
1365
+ return_type: 'OCI::ObjectStorage::Models::ListObjects'
1366
+ )
1367
+ end
1368
+ # rubocop:enable Metrics/BlockLength
1245
1369
  end
1246
1370
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1247
1371
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1259,6 +1383,8 @@ module OCI
1259
1383
  # Example: `my-new-bucket1`
1260
1384
  #
1261
1385
  # @param [Hash] opts the optional parameters
1386
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1387
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1262
1388
  # @option opts [String] :object_name_prefix User-specified object name prefixes can be used to query and return a list of pre-authenticated requests.
1263
1389
  # @option opts [Integer] :limit The maximum number of items to return.
1264
1390
  # @option opts [String] :page The page at which to start retrieving results.
@@ -1289,16 +1415,20 @@ module OCI
1289
1415
 
1290
1416
  post_body = nil
1291
1417
 
1292
- @api_client.call_api(
1293
- :GET,
1294
- path,
1295
- endpoint,
1296
- header_params: header_params,
1297
- query_params: query_params,
1298
- operation_signing_strategy: operation_signing_strategy,
1299
- body: post_body,
1300
- return_type: 'Array<OCI::ObjectStorage::Models::PreauthenticatedRequestSummary>'
1301
- )
1418
+ # rubocop:disable Metrics/BlockLength
1419
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#list_preauthenticated_requests') do
1420
+ @api_client.call_api(
1421
+ :GET,
1422
+ path,
1423
+ endpoint,
1424
+ header_params: header_params,
1425
+ query_params: query_params,
1426
+ operation_signing_strategy: operation_signing_strategy,
1427
+ body: post_body,
1428
+ return_type: 'Array<OCI::ObjectStorage::Models::PreauthenticatedRequestSummary>'
1429
+ )
1430
+ end
1431
+ # rubocop:enable Metrics/BlockLength
1302
1432
  end
1303
1433
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1304
1434
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1320,6 +1450,8 @@ module OCI
1320
1450
  #
1321
1451
  # @param [String, IO] put_object_body The object to upload to the object store.
1322
1452
  # @param [Hash] opts the optional parameters
1453
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1454
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1323
1455
  # @option opts [Integer] :content_length The content length of the body.
1324
1456
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
1325
1457
  # For uploading a part, this is the entity tag of the target part.
@@ -1375,15 +1507,19 @@ module OCI
1375
1507
 
1376
1508
  post_body = @api_client.object_to_http_body(put_object_body)
1377
1509
 
1378
- @api_client.call_api(
1379
- :PUT,
1380
- path,
1381
- endpoint,
1382
- header_params: header_params,
1383
- query_params: query_params,
1384
- operation_signing_strategy: operation_signing_strategy,
1385
- body: post_body
1386
- )
1510
+ # rubocop:disable Metrics/BlockLength
1511
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#put_object') do
1512
+ @api_client.call_api(
1513
+ :PUT,
1514
+ path,
1515
+ endpoint,
1516
+ header_params: header_params,
1517
+ query_params: query_params,
1518
+ operation_signing_strategy: operation_signing_strategy,
1519
+ body: post_body
1520
+ )
1521
+ end
1522
+ # rubocop:enable Metrics/BlockLength
1387
1523
  end
1388
1524
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1389
1525
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1402,6 +1538,8 @@ module OCI
1402
1538
  #
1403
1539
  # @param [OCI::ObjectStorage::Models::RenameObjectDetails] rename_object_details The sourceName and newName of rename operation.
1404
1540
  # @param [Hash] opts the optional parameters
1541
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1542
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1405
1543
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
1406
1544
  # @return [Response] A Response object with data of type nil
1407
1545
  def rename_object(namespace_name, bucket_name, rename_object_details, opts = {})
@@ -1427,15 +1565,19 @@ module OCI
1427
1565
 
1428
1566
  post_body = @api_client.object_to_http_body(rename_object_details)
1429
1567
 
1430
- @api_client.call_api(
1431
- :POST,
1432
- path,
1433
- endpoint,
1434
- header_params: header_params,
1435
- query_params: query_params,
1436
- operation_signing_strategy: operation_signing_strategy,
1437
- body: post_body
1438
- )
1568
+ # rubocop:disable Metrics/BlockLength
1569
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#rename_object') do
1570
+ @api_client.call_api(
1571
+ :POST,
1572
+ path,
1573
+ endpoint,
1574
+ header_params: header_params,
1575
+ query_params: query_params,
1576
+ operation_signing_strategy: operation_signing_strategy,
1577
+ body: post_body
1578
+ )
1579
+ end
1580
+ # rubocop:enable Metrics/BlockLength
1439
1581
  end
1440
1582
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1441
1583
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1455,6 +1597,8 @@ module OCI
1455
1597
  #
1456
1598
  # @param [OCI::ObjectStorage::Models::RestoreObjectsDetails] restore_objects_details Request to restore objects.
1457
1599
  # @param [Hash] opts the optional parameters
1600
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1601
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1458
1602
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
1459
1603
  # @return [Response] A Response object with data of type nil
1460
1604
  def restore_objects(namespace_name, bucket_name, restore_objects_details, opts = {})
@@ -1480,15 +1624,19 @@ module OCI
1480
1624
 
1481
1625
  post_body = @api_client.object_to_http_body(restore_objects_details)
1482
1626
 
1483
- @api_client.call_api(
1484
- :POST,
1485
- path,
1486
- endpoint,
1487
- header_params: header_params,
1488
- query_params: query_params,
1489
- operation_signing_strategy: operation_signing_strategy,
1490
- body: post_body
1491
- )
1627
+ # rubocop:disable Metrics/BlockLength
1628
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#restore_objects') do
1629
+ @api_client.call_api(
1630
+ :POST,
1631
+ path,
1632
+ endpoint,
1633
+ header_params: header_params,
1634
+ query_params: query_params,
1635
+ operation_signing_strategy: operation_signing_strategy,
1636
+ body: post_body
1637
+ )
1638
+ end
1639
+ # rubocop:enable Metrics/BlockLength
1492
1640
  end
1493
1641
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1494
1642
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1507,6 +1655,8 @@ module OCI
1507
1655
  #
1508
1656
  # @param [OCI::ObjectStorage::Models::UpdateBucketDetails] update_bucket_details Request object for updating a bucket.
1509
1657
  # @param [Hash] opts the optional parameters
1658
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1659
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1510
1660
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
1511
1661
  # For uploading a part, this is the entity tag of the target part.
1512
1662
  #
@@ -1536,16 +1686,20 @@ module OCI
1536
1686
 
1537
1687
  post_body = @api_client.object_to_http_body(update_bucket_details)
1538
1688
 
1539
- @api_client.call_api(
1540
- :POST,
1541
- path,
1542
- endpoint,
1543
- header_params: header_params,
1544
- query_params: query_params,
1545
- operation_signing_strategy: operation_signing_strategy,
1546
- body: post_body,
1547
- return_type: 'OCI::ObjectStorage::Models::Bucket'
1548
- )
1689
+ # rubocop:disable Metrics/BlockLength
1690
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#update_bucket') do
1691
+ @api_client.call_api(
1692
+ :POST,
1693
+ path,
1694
+ endpoint,
1695
+ header_params: header_params,
1696
+ query_params: query_params,
1697
+ operation_signing_strategy: operation_signing_strategy,
1698
+ body: post_body,
1699
+ return_type: 'OCI::ObjectStorage::Models::Bucket'
1700
+ )
1701
+ end
1702
+ # rubocop:enable Metrics/BlockLength
1549
1703
  end
1550
1704
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1551
1705
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1564,6 +1718,8 @@ module OCI
1564
1718
  # @param [String] namespace_name The top-level namespace used for the request.
1565
1719
  # @param [OCI::ObjectStorage::Models::UpdateNamespaceMetadataDetails] update_namespace_metadata_details Request object for update NamespaceMetadata.
1566
1720
  # @param [Hash] opts the optional parameters
1721
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1722
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1567
1723
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
1568
1724
  # @return [Response] A Response object with data of type {OCI::ObjectStorage::Models::NamespaceMetadata NamespaceMetadata}
1569
1725
  def update_namespace_metadata(namespace_name, update_namespace_metadata_details, opts = {})
@@ -1587,16 +1743,20 @@ module OCI
1587
1743
 
1588
1744
  post_body = @api_client.object_to_http_body(update_namespace_metadata_details)
1589
1745
 
1590
- @api_client.call_api(
1591
- :PUT,
1592
- path,
1593
- endpoint,
1594
- header_params: header_params,
1595
- query_params: query_params,
1596
- operation_signing_strategy: operation_signing_strategy,
1597
- body: post_body,
1598
- return_type: 'OCI::ObjectStorage::Models::NamespaceMetadata'
1599
- )
1746
+ # rubocop:disable Metrics/BlockLength
1747
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#update_namespace_metadata') do
1748
+ @api_client.call_api(
1749
+ :PUT,
1750
+ path,
1751
+ endpoint,
1752
+ header_params: header_params,
1753
+ query_params: query_params,
1754
+ operation_signing_strategy: operation_signing_strategy,
1755
+ body: post_body,
1756
+ return_type: 'OCI::ObjectStorage::Models::NamespaceMetadata'
1757
+ )
1758
+ end
1759
+ # rubocop:enable Metrics/BlockLength
1600
1760
  end
1601
1761
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1602
1762
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1620,6 +1780,8 @@ module OCI
1620
1780
  # @param [Integer] upload_part_num The part number that identifies the object part currently being uploaded.
1621
1781
  # @param [String, IO] upload_part_body The part being uploaded to the Object Storage Service.
1622
1782
  # @param [Hash] opts the optional parameters
1783
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1784
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1623
1785
  # @option opts [Integer] :content_length The content length of the body.
1624
1786
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
1625
1787
  # @option opts [String] :if_match The entity tag to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object.
@@ -1665,19 +1827,30 @@ module OCI
1665
1827
 
1666
1828
  post_body = @api_client.object_to_http_body(upload_part_body)
1667
1829
 
1668
- @api_client.call_api(
1669
- :PUT,
1670
- path,
1671
- endpoint,
1672
- header_params: header_params,
1673
- query_params: query_params,
1674
- operation_signing_strategy: operation_signing_strategy,
1675
- body: post_body
1676
- )
1830
+ # rubocop:disable Metrics/BlockLength
1831
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ObjectStorageClient#upload_part') do
1832
+ @api_client.call_api(
1833
+ :PUT,
1834
+ path,
1835
+ endpoint,
1836
+ header_params: header_params,
1837
+ query_params: query_params,
1838
+ operation_signing_strategy: operation_signing_strategy,
1839
+ body: post_body
1840
+ )
1841
+ end
1842
+ # rubocop:enable Metrics/BlockLength
1677
1843
  end
1678
1844
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1679
1845
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1680
1846
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1847
+
1848
+ private
1849
+
1850
+ def applicable_retry_config(opts = {})
1851
+ return @retry_config unless opts.key?(:retry_config)
1852
+ opts[:retry_config]
1853
+ end
1681
1854
  end
1682
1855
  end
1683
1856
  # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength