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
@@ -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)
@@ -93,6 +103,8 @@ module OCI
93
103
  #
94
104
  # @param [OCI::Core::Models::AttachBootVolumeDetails] attach_boot_volume_details Attach boot volume request
95
105
  # @param [Hash] opts the optional parameters
106
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
107
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
96
108
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
97
109
  # server error without risk of executing that same action again. Retry tokens expire after 24
98
110
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -116,19 +128,24 @@ module OCI
116
128
  header_params['accept'] = 'application/json'
117
129
  header_params['content-type'] = 'application/json'
118
130
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
131
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
119
132
 
120
133
  post_body = @api_client.object_to_http_body(attach_boot_volume_details)
121
134
 
122
- @api_client.call_api(
123
- :POST,
124
- path,
125
- endpoint,
126
- header_params: header_params,
127
- query_params: query_params,
128
- operation_signing_strategy: operation_signing_strategy,
129
- body: post_body,
130
- return_type: 'OCI::Core::Models::BootVolumeAttachment'
131
- )
135
+ # rubocop:disable Metrics/BlockLength
136
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#attach_boot_volume') do
137
+ @api_client.call_api(
138
+ :POST,
139
+ path,
140
+ endpoint,
141
+ header_params: header_params,
142
+ query_params: query_params,
143
+ operation_signing_strategy: operation_signing_strategy,
144
+ body: post_body,
145
+ return_type: 'OCI::Core::Models::BootVolumeAttachment'
146
+ )
147
+ end
148
+ # rubocop:enable Metrics/BlockLength
132
149
  end
133
150
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
134
151
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -145,6 +162,8 @@ module OCI
145
162
  #
146
163
  # @param [OCI::Core::Models::AttachVnicDetails] attach_vnic_details Attach VNIC details.
147
164
  # @param [Hash] opts the optional parameters
165
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
166
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
148
167
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
149
168
  # server error without risk of executing that same action again. Retry tokens expire after 24
150
169
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -168,19 +187,24 @@ module OCI
168
187
  header_params['accept'] = 'application/json'
169
188
  header_params['content-type'] = 'application/json'
170
189
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
190
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
171
191
 
172
192
  post_body = @api_client.object_to_http_body(attach_vnic_details)
173
193
 
174
- @api_client.call_api(
175
- :POST,
176
- path,
177
- endpoint,
178
- header_params: header_params,
179
- query_params: query_params,
180
- operation_signing_strategy: operation_signing_strategy,
181
- body: post_body,
182
- return_type: 'OCI::Core::Models::VnicAttachment'
183
- )
194
+ # rubocop:disable Metrics/BlockLength
195
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#attach_vnic') do
196
+ @api_client.call_api(
197
+ :POST,
198
+ path,
199
+ endpoint,
200
+ header_params: header_params,
201
+ query_params: query_params,
202
+ operation_signing_strategy: operation_signing_strategy,
203
+ body: post_body,
204
+ return_type: 'OCI::Core::Models::VnicAttachment'
205
+ )
206
+ end
207
+ # rubocop:enable Metrics/BlockLength
184
208
  end
185
209
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
186
210
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -195,6 +219,8 @@ module OCI
195
219
  #
196
220
  # @param [OCI::Core::Models::AttachVolumeDetails] attach_volume_details Attach volume request
197
221
  # @param [Hash] opts the optional parameters
222
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
223
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
198
224
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
199
225
  # server error without risk of executing that same action again. Retry tokens expire after 24
200
226
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -218,19 +244,24 @@ module OCI
218
244
  header_params['accept'] = 'application/json'
219
245
  header_params['content-type'] = 'application/json'
220
246
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
247
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
221
248
 
222
249
  post_body = @api_client.object_to_http_body(attach_volume_details)
223
250
 
224
- @api_client.call_api(
225
- :POST,
226
- path,
227
- endpoint,
228
- header_params: header_params,
229
- query_params: query_params,
230
- operation_signing_strategy: operation_signing_strategy,
231
- body: post_body,
232
- return_type: 'OCI::Core::Models::VolumeAttachment'
233
- )
251
+ # rubocop:disable Metrics/BlockLength
252
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#attach_volume') do
253
+ @api_client.call_api(
254
+ :POST,
255
+ path,
256
+ endpoint,
257
+ header_params: header_params,
258
+ query_params: query_params,
259
+ operation_signing_strategy: operation_signing_strategy,
260
+ body: post_body,
261
+ return_type: 'OCI::Core::Models::VolumeAttachment'
262
+ )
263
+ end
264
+ # rubocop:enable Metrics/BlockLength
234
265
  end
235
266
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
236
267
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -261,6 +292,8 @@ module OCI
261
292
  #
262
293
  # @param [OCI::Core::Models::CaptureConsoleHistoryDetails] capture_console_history_details Console history details
263
294
  # @param [Hash] opts the optional parameters
295
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
296
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
264
297
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
265
298
  # server error without risk of executing that same action again. Retry tokens expire after 24
266
299
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -284,19 +317,24 @@ module OCI
284
317
  header_params['accept'] = 'application/json'
285
318
  header_params['content-type'] = 'application/json'
286
319
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
320
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
287
321
 
288
322
  post_body = @api_client.object_to_http_body(capture_console_history_details)
289
323
 
290
- @api_client.call_api(
291
- :POST,
292
- path,
293
- endpoint,
294
- header_params: header_params,
295
- query_params: query_params,
296
- operation_signing_strategy: operation_signing_strategy,
297
- body: post_body,
298
- return_type: 'OCI::Core::Models::ConsoleHistory'
299
- )
324
+ # rubocop:disable Metrics/BlockLength
325
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#capture_console_history') do
326
+ @api_client.call_api(
327
+ :POST,
328
+ path,
329
+ endpoint,
330
+ header_params: header_params,
331
+ query_params: query_params,
332
+ operation_signing_strategy: operation_signing_strategy,
333
+ body: post_body,
334
+ return_type: 'OCI::Core::Models::ConsoleHistory'
335
+ )
336
+ end
337
+ # rubocop:enable Metrics/BlockLength
300
338
  end
301
339
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
302
340
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -333,6 +371,8 @@ module OCI
333
371
  #
334
372
  # @param [OCI::Core::Models::CreateImageDetails] create_image_details Image creation details
335
373
  # @param [Hash] opts the optional parameters
374
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
375
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
336
376
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
337
377
  # server error without risk of executing that same action again. Retry tokens expire after 24
338
378
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -356,19 +396,24 @@ module OCI
356
396
  header_params['accept'] = 'application/json'
357
397
  header_params['content-type'] = 'application/json'
358
398
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
399
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
359
400
 
360
401
  post_body = @api_client.object_to_http_body(create_image_details)
361
402
 
362
- @api_client.call_api(
363
- :POST,
364
- path,
365
- endpoint,
366
- header_params: header_params,
367
- query_params: query_params,
368
- operation_signing_strategy: operation_signing_strategy,
369
- body: post_body,
370
- return_type: 'OCI::Core::Models::Image'
371
- )
403
+ # rubocop:disable Metrics/BlockLength
404
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_image') do
405
+ @api_client.call_api(
406
+ :POST,
407
+ path,
408
+ endpoint,
409
+ header_params: header_params,
410
+ query_params: query_params,
411
+ operation_signing_strategy: operation_signing_strategy,
412
+ body: post_body,
413
+ return_type: 'OCI::Core::Models::Image'
414
+ )
415
+ end
416
+ # rubocop:enable Metrics/BlockLength
372
417
  end
373
418
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
374
419
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -387,6 +432,8 @@ module OCI
387
432
  #
388
433
  # @param [OCI::Core::Models::CreateInstanceConsoleConnectionDetails] create_instance_console_connection_details Request object for creating an InstanceConsoleConnection
389
434
  # @param [Hash] opts the optional parameters
435
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
436
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
390
437
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
391
438
  # server error without risk of executing that same action again. Retry tokens expire after 24
392
439
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -410,19 +457,24 @@ module OCI
410
457
  header_params['accept'] = 'application/json'
411
458
  header_params['content-type'] = 'application/json'
412
459
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
460
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
413
461
 
414
462
  post_body = @api_client.object_to_http_body(create_instance_console_connection_details)
415
463
 
416
- @api_client.call_api(
417
- :POST,
418
- path,
419
- endpoint,
420
- header_params: header_params,
421
- query_params: query_params,
422
- operation_signing_strategy: operation_signing_strategy,
423
- body: post_body,
424
- return_type: 'OCI::Core::Models::InstanceConsoleConnection'
425
- )
464
+ # rubocop:disable Metrics/BlockLength
465
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#create_instance_console_connection') do
466
+ @api_client.call_api(
467
+ :POST,
468
+ path,
469
+ endpoint,
470
+ header_params: header_params,
471
+ query_params: query_params,
472
+ operation_signing_strategy: operation_signing_strategy,
473
+ body: post_body,
474
+ return_type: 'OCI::Core::Models::InstanceConsoleConnection'
475
+ )
476
+ end
477
+ # rubocop:enable Metrics/BlockLength
426
478
  end
427
479
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
428
480
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -436,6 +488,8 @@ module OCI
436
488
  # Deletes the specified console history metadata and the console history data.
437
489
  # @param [String] instance_console_history_id The OCID of the console history.
438
490
  # @param [Hash] opts the optional parameters
491
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
492
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
439
493
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
440
494
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
441
495
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -461,15 +515,19 @@ module OCI
461
515
 
462
516
  post_body = nil
463
517
 
464
- @api_client.call_api(
465
- :DELETE,
466
- path,
467
- endpoint,
468
- header_params: header_params,
469
- query_params: query_params,
470
- operation_signing_strategy: operation_signing_strategy,
471
- body: post_body
472
- )
518
+ # rubocop:disable Metrics/BlockLength
519
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#delete_console_history') do
520
+ @api_client.call_api(
521
+ :DELETE,
522
+ path,
523
+ endpoint,
524
+ header_params: header_params,
525
+ query_params: query_params,
526
+ operation_signing_strategy: operation_signing_strategy,
527
+ body: post_body
528
+ )
529
+ end
530
+ # rubocop:enable Metrics/BlockLength
473
531
  end
474
532
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
475
533
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -483,6 +541,8 @@ module OCI
483
541
  # Deletes an image.
484
542
  # @param [String] image_id The OCID of the image.
485
543
  # @param [Hash] opts the optional parameters
544
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
545
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
486
546
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
487
547
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
488
548
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -508,15 +568,19 @@ module OCI
508
568
 
509
569
  post_body = nil
510
570
 
511
- @api_client.call_api(
512
- :DELETE,
513
- path,
514
- endpoint,
515
- header_params: header_params,
516
- query_params: query_params,
517
- operation_signing_strategy: operation_signing_strategy,
518
- body: post_body
519
- )
571
+ # rubocop:disable Metrics/BlockLength
572
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#delete_image') do
573
+ @api_client.call_api(
574
+ :DELETE,
575
+ path,
576
+ endpoint,
577
+ header_params: header_params,
578
+ query_params: query_params,
579
+ operation_signing_strategy: operation_signing_strategy,
580
+ body: post_body
581
+ )
582
+ end
583
+ # rubocop:enable Metrics/BlockLength
520
584
  end
521
585
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
522
586
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -530,6 +594,8 @@ module OCI
530
594
  # Deletes the specified instance console connection.
531
595
  # @param [String] instance_console_connection_id The OCID of the intance console connection
532
596
  # @param [Hash] opts the optional parameters
597
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
598
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
533
599
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
534
600
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
535
601
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -555,15 +621,19 @@ module OCI
555
621
 
556
622
  post_body = nil
557
623
 
558
- @api_client.call_api(
559
- :DELETE,
560
- path,
561
- endpoint,
562
- header_params: header_params,
563
- query_params: query_params,
564
- operation_signing_strategy: operation_signing_strategy,
565
- body: post_body
566
- )
624
+ # rubocop:disable Metrics/BlockLength
625
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#delete_instance_console_connection') do
626
+ @api_client.call_api(
627
+ :DELETE,
628
+ path,
629
+ endpoint,
630
+ header_params: header_params,
631
+ query_params: query_params,
632
+ operation_signing_strategy: operation_signing_strategy,
633
+ body: post_body
634
+ )
635
+ end
636
+ # rubocop:enable Metrics/BlockLength
567
637
  end
568
638
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
569
639
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -581,6 +651,8 @@ module OCI
581
651
  #
582
652
  # @param [String] boot_volume_attachment_id The OCID of the boot volume attachment.
583
653
  # @param [Hash] opts the optional parameters
654
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
655
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
584
656
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
585
657
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
586
658
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -606,15 +678,19 @@ module OCI
606
678
 
607
679
  post_body = nil
608
680
 
609
- @api_client.call_api(
610
- :DELETE,
611
- path,
612
- endpoint,
613
- header_params: header_params,
614
- query_params: query_params,
615
- operation_signing_strategy: operation_signing_strategy,
616
- body: post_body
617
- )
681
+ # rubocop:disable Metrics/BlockLength
682
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#detach_boot_volume') do
683
+ @api_client.call_api(
684
+ :DELETE,
685
+ path,
686
+ endpoint,
687
+ header_params: header_params,
688
+ query_params: query_params,
689
+ operation_signing_strategy: operation_signing_strategy,
690
+ body: post_body
691
+ )
692
+ end
693
+ # rubocop:enable Metrics/BlockLength
618
694
  end
619
695
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
620
696
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -638,6 +714,8 @@ module OCI
638
714
  #
639
715
  # @param [String] vnic_attachment_id The OCID of the VNIC attachment.
640
716
  # @param [Hash] opts the optional parameters
717
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
718
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
641
719
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
642
720
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
643
721
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -663,15 +741,19 @@ module OCI
663
741
 
664
742
  post_body = nil
665
743
 
666
- @api_client.call_api(
667
- :DELETE,
668
- path,
669
- endpoint,
670
- header_params: header_params,
671
- query_params: query_params,
672
- operation_signing_strategy: operation_signing_strategy,
673
- body: post_body
674
- )
744
+ # rubocop:disable Metrics/BlockLength
745
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#detach_vnic') do
746
+ @api_client.call_api(
747
+ :DELETE,
748
+ path,
749
+ endpoint,
750
+ header_params: header_params,
751
+ query_params: query_params,
752
+ operation_signing_strategy: operation_signing_strategy,
753
+ body: post_body
754
+ )
755
+ end
756
+ # rubocop:enable Metrics/BlockLength
675
757
  end
676
758
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
677
759
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -689,6 +771,8 @@ module OCI
689
771
  #
690
772
  # @param [String] volume_attachment_id The OCID of the volume attachment.
691
773
  # @param [Hash] opts the optional parameters
774
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
775
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
692
776
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
693
777
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
694
778
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -714,15 +798,19 @@ module OCI
714
798
 
715
799
  post_body = nil
716
800
 
717
- @api_client.call_api(
718
- :DELETE,
719
- path,
720
- endpoint,
721
- header_params: header_params,
722
- query_params: query_params,
723
- operation_signing_strategy: operation_signing_strategy,
724
- body: post_body
725
- )
801
+ # rubocop:disable Metrics/BlockLength
802
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#detach_volume') do
803
+ @api_client.call_api(
804
+ :DELETE,
805
+ path,
806
+ endpoint,
807
+ header_params: header_params,
808
+ query_params: query_params,
809
+ operation_signing_strategy: operation_signing_strategy,
810
+ body: post_body
811
+ )
812
+ end
813
+ # rubocop:enable Metrics/BlockLength
726
814
  end
727
815
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
728
816
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -747,6 +835,8 @@ module OCI
747
835
  # @param [String] image_id The OCID of the image.
748
836
  # @param [OCI::Core::Models::ExportImageDetails] export_image_details Details for the image export.
749
837
  # @param [Hash] opts the optional parameters
838
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
839
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
750
840
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
751
841
  # server error without risk of executing that same action again. Retry tokens expire after 24
752
842
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -777,19 +867,24 @@ module OCI
777
867
  header_params['content-type'] = 'application/json'
778
868
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
779
869
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
870
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
780
871
 
781
872
  post_body = @api_client.object_to_http_body(export_image_details)
782
873
 
783
- @api_client.call_api(
784
- :POST,
785
- path,
786
- endpoint,
787
- header_params: header_params,
788
- query_params: query_params,
789
- operation_signing_strategy: operation_signing_strategy,
790
- body: post_body,
791
- return_type: 'OCI::Core::Models::Image'
792
- )
874
+ # rubocop:disable Metrics/BlockLength
875
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#export_image') do
876
+ @api_client.call_api(
877
+ :POST,
878
+ path,
879
+ endpoint,
880
+ header_params: header_params,
881
+ query_params: query_params,
882
+ operation_signing_strategy: operation_signing_strategy,
883
+ body: post_body,
884
+ return_type: 'OCI::Core::Models::Image'
885
+ )
886
+ end
887
+ # rubocop:enable Metrics/BlockLength
793
888
  end
794
889
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
795
890
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -804,6 +899,8 @@ module OCI
804
899
  # Gets information about the specified boot volume attachment.
805
900
  # @param [String] boot_volume_attachment_id The OCID of the boot volume attachment.
806
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
807
904
  # @return [Response] A Response object with data of type {OCI::Core::Models::BootVolumeAttachment BootVolumeAttachment}
808
905
  def get_boot_volume_attachment(boot_volume_attachment_id, opts = {})
809
906
  logger.debug 'Calling operation ComputeClient#get_boot_volume_attachment.' if logger
@@ -824,16 +921,20 @@ module OCI
824
921
 
825
922
  post_body = nil
826
923
 
827
- @api_client.call_api(
828
- :GET,
829
- path,
830
- endpoint,
831
- header_params: header_params,
832
- query_params: query_params,
833
- operation_signing_strategy: operation_signing_strategy,
834
- body: post_body,
835
- return_type: 'OCI::Core::Models::BootVolumeAttachment'
836
- )
924
+ # rubocop:disable Metrics/BlockLength
925
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_boot_volume_attachment') do
926
+ @api_client.call_api(
927
+ :GET,
928
+ path,
929
+ endpoint,
930
+ header_params: header_params,
931
+ query_params: query_params,
932
+ operation_signing_strategy: operation_signing_strategy,
933
+ body: post_body,
934
+ return_type: 'OCI::Core::Models::BootVolumeAttachment'
935
+ )
936
+ end
937
+ # rubocop:enable Metrics/BlockLength
837
938
  end
838
939
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
839
940
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -852,6 +953,8 @@ module OCI
852
953
  #
853
954
  # @param [String] instance_console_history_id The OCID of the console history.
854
955
  # @param [Hash] opts the optional parameters
956
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
957
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
855
958
  # @return [Response] A Response object with data of type {OCI::Core::Models::ConsoleHistory ConsoleHistory}
856
959
  def get_console_history(instance_console_history_id, opts = {})
857
960
  logger.debug 'Calling operation ComputeClient#get_console_history.' if logger
@@ -872,16 +975,20 @@ module OCI
872
975
 
873
976
  post_body = nil
874
977
 
875
- @api_client.call_api(
876
- :GET,
877
- path,
878
- endpoint,
879
- header_params: header_params,
880
- query_params: query_params,
881
- operation_signing_strategy: operation_signing_strategy,
882
- body: post_body,
883
- return_type: 'OCI::Core::Models::ConsoleHistory'
884
- )
978
+ # rubocop:disable Metrics/BlockLength
979
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_console_history') do
980
+ @api_client.call_api(
981
+ :GET,
982
+ path,
983
+ endpoint,
984
+ header_params: header_params,
985
+ query_params: query_params,
986
+ operation_signing_strategy: operation_signing_strategy,
987
+ body: post_body,
988
+ return_type: 'OCI::Core::Models::ConsoleHistory'
989
+ )
990
+ end
991
+ # rubocop:enable Metrics/BlockLength
885
992
  end
886
993
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
887
994
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -899,6 +1006,8 @@ module OCI
899
1006
  #
900
1007
  # @param [String] instance_console_history_id The OCID of the console history.
901
1008
  # @param [Hash] opts the optional parameters
1009
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1010
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
902
1011
  # @option opts [Integer] :offset Offset of the snapshot data to retrieve.
903
1012
  # @option opts [Integer] :length Length of the snapshot data to retrieve.
904
1013
  # @return [Response] A Response object with data of type String
@@ -923,16 +1032,20 @@ module OCI
923
1032
 
924
1033
  post_body = nil
925
1034
 
926
- @api_client.call_api(
927
- :GET,
928
- path,
929
- endpoint,
930
- header_params: header_params,
931
- query_params: query_params,
932
- operation_signing_strategy: operation_signing_strategy,
933
- body: post_body,
934
- return_type: 'String'
935
- )
1035
+ # rubocop:disable Metrics/BlockLength
1036
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_console_history_content') do
1037
+ @api_client.call_api(
1038
+ :GET,
1039
+ path,
1040
+ endpoint,
1041
+ header_params: header_params,
1042
+ query_params: query_params,
1043
+ operation_signing_strategy: operation_signing_strategy,
1044
+ body: post_body,
1045
+ return_type: 'String'
1046
+ )
1047
+ end
1048
+ # rubocop:enable Metrics/BlockLength
936
1049
  end
937
1050
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
938
1051
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -947,6 +1060,8 @@ module OCI
947
1060
  # Gets the specified image.
948
1061
  # @param [String] image_id The OCID of the image.
949
1062
  # @param [Hash] opts the optional parameters
1063
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1064
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
950
1065
  # @return [Response] A Response object with data of type {OCI::Core::Models::Image Image}
951
1066
  def get_image(image_id, opts = {})
952
1067
  logger.debug 'Calling operation ComputeClient#get_image.' if logger
@@ -967,16 +1082,20 @@ module OCI
967
1082
 
968
1083
  post_body = nil
969
1084
 
970
- @api_client.call_api(
971
- :GET,
972
- path,
973
- endpoint,
974
- header_params: header_params,
975
- query_params: query_params,
976
- operation_signing_strategy: operation_signing_strategy,
977
- body: post_body,
978
- return_type: 'OCI::Core::Models::Image'
979
- )
1085
+ # rubocop:disable Metrics/BlockLength
1086
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_image') do
1087
+ @api_client.call_api(
1088
+ :GET,
1089
+ path,
1090
+ endpoint,
1091
+ header_params: header_params,
1092
+ query_params: query_params,
1093
+ operation_signing_strategy: operation_signing_strategy,
1094
+ body: post_body,
1095
+ return_type: 'OCI::Core::Models::Image'
1096
+ )
1097
+ end
1098
+ # rubocop:enable Metrics/BlockLength
980
1099
  end
981
1100
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
982
1101
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -992,6 +1111,8 @@ module OCI
992
1111
  # Gets information about the specified instance.
993
1112
  # @param [String] instance_id The OCID of the instance.
994
1113
  # @param [Hash] opts the optional parameters
1114
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1115
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
995
1116
  # @return [Response] A Response object with data of type {OCI::Core::Models::Instance Instance}
996
1117
  def get_instance(instance_id, opts = {})
997
1118
  logger.debug 'Calling operation ComputeClient#get_instance.' if logger
@@ -1012,16 +1133,20 @@ module OCI
1012
1133
 
1013
1134
  post_body = nil
1014
1135
 
1015
- @api_client.call_api(
1016
- :GET,
1017
- path,
1018
- endpoint,
1019
- header_params: header_params,
1020
- query_params: query_params,
1021
- operation_signing_strategy: operation_signing_strategy,
1022
- body: post_body,
1023
- return_type: 'OCI::Core::Models::Instance'
1024
- )
1136
+ # rubocop:disable Metrics/BlockLength
1137
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_instance') do
1138
+ @api_client.call_api(
1139
+ :GET,
1140
+ path,
1141
+ endpoint,
1142
+ header_params: header_params,
1143
+ query_params: query_params,
1144
+ operation_signing_strategy: operation_signing_strategy,
1145
+ body: post_body,
1146
+ return_type: 'OCI::Core::Models::Instance'
1147
+ )
1148
+ end
1149
+ # rubocop:enable Metrics/BlockLength
1025
1150
  end
1026
1151
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1027
1152
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1037,6 +1162,8 @@ module OCI
1037
1162
  # Gets the specified instance console connection's information.
1038
1163
  # @param [String] instance_console_connection_id The OCID of the intance console connection
1039
1164
  # @param [Hash] opts the optional parameters
1165
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1166
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1040
1167
  # @return [Response] A Response object with data of type {OCI::Core::Models::InstanceConsoleConnection InstanceConsoleConnection}
1041
1168
  def get_instance_console_connection(instance_console_connection_id, opts = {})
1042
1169
  logger.debug 'Calling operation ComputeClient#get_instance_console_connection.' if logger
@@ -1057,16 +1184,20 @@ module OCI
1057
1184
 
1058
1185
  post_body = nil
1059
1186
 
1060
- @api_client.call_api(
1061
- :GET,
1062
- path,
1063
- endpoint,
1064
- header_params: header_params,
1065
- query_params: query_params,
1066
- operation_signing_strategy: operation_signing_strategy,
1067
- body: post_body,
1068
- return_type: 'OCI::Core::Models::InstanceConsoleConnection'
1069
- )
1187
+ # rubocop:disable Metrics/BlockLength
1188
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_instance_console_connection') do
1189
+ @api_client.call_api(
1190
+ :GET,
1191
+ path,
1192
+ endpoint,
1193
+ header_params: header_params,
1194
+ query_params: query_params,
1195
+ operation_signing_strategy: operation_signing_strategy,
1196
+ body: post_body,
1197
+ return_type: 'OCI::Core::Models::InstanceConsoleConnection'
1198
+ )
1199
+ end
1200
+ # rubocop:enable Metrics/BlockLength
1070
1201
  end
1071
1202
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1072
1203
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1083,6 +1214,8 @@ module OCI
1083
1214
  #
1084
1215
  # @param [String] vnic_attachment_id The OCID of the VNIC attachment.
1085
1216
  # @param [Hash] opts the optional parameters
1217
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1218
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1086
1219
  # @return [Response] A Response object with data of type {OCI::Core::Models::VnicAttachment VnicAttachment}
1087
1220
  def get_vnic_attachment(vnic_attachment_id, opts = {})
1088
1221
  logger.debug 'Calling operation ComputeClient#get_vnic_attachment.' if logger
@@ -1103,16 +1236,20 @@ module OCI
1103
1236
 
1104
1237
  post_body = nil
1105
1238
 
1106
- @api_client.call_api(
1107
- :GET,
1108
- path,
1109
- endpoint,
1110
- header_params: header_params,
1111
- query_params: query_params,
1112
- operation_signing_strategy: operation_signing_strategy,
1113
- body: post_body,
1114
- return_type: 'OCI::Core::Models::VnicAttachment'
1115
- )
1239
+ # rubocop:disable Metrics/BlockLength
1240
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_vnic_attachment') do
1241
+ @api_client.call_api(
1242
+ :GET,
1243
+ path,
1244
+ endpoint,
1245
+ header_params: header_params,
1246
+ query_params: query_params,
1247
+ operation_signing_strategy: operation_signing_strategy,
1248
+ body: post_body,
1249
+ return_type: 'OCI::Core::Models::VnicAttachment'
1250
+ )
1251
+ end
1252
+ # rubocop:enable Metrics/BlockLength
1116
1253
  end
1117
1254
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1118
1255
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1128,6 +1265,8 @@ module OCI
1128
1265
  # Gets information about the specified volume attachment.
1129
1266
  # @param [String] volume_attachment_id The OCID of the volume attachment.
1130
1267
  # @param [Hash] opts the optional parameters
1268
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1269
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1131
1270
  # @return [Response] A Response object with data of type {OCI::Core::Models::VolumeAttachment VolumeAttachment}
1132
1271
  def get_volume_attachment(volume_attachment_id, opts = {})
1133
1272
  logger.debug 'Calling operation ComputeClient#get_volume_attachment.' if logger
@@ -1148,16 +1287,20 @@ module OCI
1148
1287
 
1149
1288
  post_body = nil
1150
1289
 
1151
- @api_client.call_api(
1152
- :GET,
1153
- path,
1154
- endpoint,
1155
- header_params: header_params,
1156
- query_params: query_params,
1157
- operation_signing_strategy: operation_signing_strategy,
1158
- body: post_body,
1159
- return_type: 'OCI::Core::Models::VolumeAttachment'
1160
- )
1290
+ # rubocop:disable Metrics/BlockLength
1291
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_volume_attachment') do
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: 'OCI::Core::Models::VolumeAttachment'
1301
+ )
1302
+ end
1303
+ # rubocop:enable Metrics/BlockLength
1161
1304
  end
1162
1305
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1163
1306
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1170,11 +1313,13 @@ module OCI
1170
1313
  # rubocop:disable Lint/UnusedMethodArgument
1171
1314
 
1172
1315
 
1173
- # Gets the generated credentials for the instance. Only works for Windows instances. The returned credentials
1174
- # are only valid for the initial login.
1316
+ # Gets the generated credentials for the instance. Only works for instances that require password to log in (E.g. Windows).
1317
+ # For certain OS'es, users will be forced to change the initial credentials.
1175
1318
  #
1176
1319
  # @param [String] instance_id The OCID of the instance.
1177
1320
  # @param [Hash] opts the optional parameters
1321
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1322
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1178
1323
  # @return [Response] A Response object with data of type {OCI::Core::Models::InstanceCredentials InstanceCredentials}
1179
1324
  def get_windows_instance_initial_credentials(instance_id, opts = {})
1180
1325
  logger.debug 'Calling operation ComputeClient#get_windows_instance_initial_credentials.' if logger
@@ -1195,16 +1340,20 @@ module OCI
1195
1340
 
1196
1341
  post_body = nil
1197
1342
 
1198
- @api_client.call_api(
1199
- :GET,
1200
- path,
1201
- endpoint,
1202
- header_params: header_params,
1203
- query_params: query_params,
1204
- operation_signing_strategy: operation_signing_strategy,
1205
- body: post_body,
1206
- return_type: 'OCI::Core::Models::InstanceCredentials'
1207
- )
1343
+ # rubocop:disable Metrics/BlockLength
1344
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#get_windows_instance_initial_credentials') do
1345
+ @api_client.call_api(
1346
+ :GET,
1347
+ path,
1348
+ endpoint,
1349
+ header_params: header_params,
1350
+ query_params: query_params,
1351
+ operation_signing_strategy: operation_signing_strategy,
1352
+ body: post_body,
1353
+ return_type: 'OCI::Core::Models::InstanceCredentials'
1354
+ )
1355
+ end
1356
+ # rubocop:enable Metrics/BlockLength
1208
1357
  end
1209
1358
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1210
1359
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1237,6 +1386,8 @@ module OCI
1237
1386
  # @param [String] action The action to perform on the instance.
1238
1387
  # Allowed values are: STOP, START, SOFTRESET, RESET
1239
1388
  # @param [Hash] opts the optional parameters
1389
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1390
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1240
1391
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
1241
1392
  # server error without risk of executing that same action again. Retry tokens expire after 24
1242
1393
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -1271,19 +1422,24 @@ module OCI
1271
1422
  header_params['content-type'] = 'application/json'
1272
1423
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
1273
1424
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
1425
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
1274
1426
 
1275
1427
  post_body = nil
1276
1428
 
1277
- @api_client.call_api(
1278
- :POST,
1279
- path,
1280
- endpoint,
1281
- header_params: header_params,
1282
- query_params: query_params,
1283
- operation_signing_strategy: operation_signing_strategy,
1284
- body: post_body,
1285
- return_type: 'OCI::Core::Models::Instance'
1286
- )
1429
+ # rubocop:disable Metrics/BlockLength
1430
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#instance_action') do
1431
+ @api_client.call_api(
1432
+ :POST,
1433
+ path,
1434
+ endpoint,
1435
+ header_params: header_params,
1436
+ query_params: query_params,
1437
+ operation_signing_strategy: operation_signing_strategy,
1438
+ body: post_body,
1439
+ return_type: 'OCI::Core::Models::Instance'
1440
+ )
1441
+ end
1442
+ # rubocop:enable Metrics/BlockLength
1287
1443
  end
1288
1444
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1289
1445
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1328,6 +1484,8 @@ module OCI
1328
1484
  #
1329
1485
  # @param [OCI::Core::Models::LaunchInstanceDetails] launch_instance_details Instance details
1330
1486
  # @param [Hash] opts the optional parameters
1487
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1488
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1331
1489
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
1332
1490
  # server error without risk of executing that same action again. Retry tokens expire after 24
1333
1491
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -1351,19 +1509,24 @@ module OCI
1351
1509
  header_params['accept'] = 'application/json'
1352
1510
  header_params['content-type'] = 'application/json'
1353
1511
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
1512
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
1354
1513
 
1355
1514
  post_body = @api_client.object_to_http_body(launch_instance_details)
1356
1515
 
1357
- @api_client.call_api(
1358
- :POST,
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::Core::Models::Instance'
1366
- )
1516
+ # rubocop:disable Metrics/BlockLength
1517
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#launch_instance') do
1518
+ @api_client.call_api(
1519
+ :POST,
1520
+ path,
1521
+ endpoint,
1522
+ header_params: header_params,
1523
+ query_params: query_params,
1524
+ operation_signing_strategy: operation_signing_strategy,
1525
+ body: post_body,
1526
+ return_type: 'OCI::Core::Models::Instance'
1527
+ )
1528
+ end
1529
+ # rubocop:enable Metrics/BlockLength
1367
1530
  end
1368
1531
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1369
1532
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1383,6 +1546,8 @@ module OCI
1383
1546
  #
1384
1547
  # @param [String] compartment_id The OCID of the compartment.
1385
1548
  # @param [Hash] opts the optional parameters
1549
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1550
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1386
1551
  # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1387
1552
  #
1388
1553
  # Example: `500`
@@ -1417,16 +1582,20 @@ module OCI
1417
1582
 
1418
1583
  post_body = nil
1419
1584
 
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::Core::Models::BootVolumeAttachment>'
1429
- )
1585
+ # rubocop:disable Metrics/BlockLength
1586
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_boot_volume_attachments') do
1587
+ @api_client.call_api(
1588
+ :GET,
1589
+ path,
1590
+ endpoint,
1591
+ header_params: header_params,
1592
+ query_params: query_params,
1593
+ operation_signing_strategy: operation_signing_strategy,
1594
+ body: post_body,
1595
+ return_type: 'Array<OCI::Core::Models::BootVolumeAttachment>'
1596
+ )
1597
+ end
1598
+ # rubocop:enable Metrics/BlockLength
1430
1599
  end
1431
1600
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1432
1601
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1441,6 +1610,8 @@ module OCI
1441
1610
  #
1442
1611
  # @param [String] compartment_id The OCID of the compartment.
1443
1612
  # @param [Hash] opts the optional parameters
1613
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1614
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1444
1615
  # @option opts [String] :availability_domain The name of the Availability Domain.
1445
1616
  #
1446
1617
  # Example: `Uocm:PHX-AD-1`
@@ -1507,16 +1678,20 @@ module OCI
1507
1678
 
1508
1679
  post_body = nil
1509
1680
 
1510
- @api_client.call_api(
1511
- :GET,
1512
- path,
1513
- endpoint,
1514
- header_params: header_params,
1515
- query_params: query_params,
1516
- operation_signing_strategy: operation_signing_strategy,
1517
- body: post_body,
1518
- return_type: 'Array<OCI::Core::Models::ConsoleHistory>'
1519
- )
1681
+ # rubocop:disable Metrics/BlockLength
1682
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_console_histories') do
1683
+ @api_client.call_api(
1684
+ :GET,
1685
+ path,
1686
+ endpoint,
1687
+ header_params: header_params,
1688
+ query_params: query_params,
1689
+ operation_signing_strategy: operation_signing_strategy,
1690
+ body: post_body,
1691
+ return_type: 'Array<OCI::Core::Models::ConsoleHistory>'
1692
+ )
1693
+ end
1694
+ # rubocop:enable Metrics/BlockLength
1520
1695
  end
1521
1696
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1522
1697
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1535,6 +1710,8 @@ module OCI
1535
1710
  #
1536
1711
  # @param [String] compartment_id The OCID of the compartment.
1537
1712
  # @param [Hash] opts the optional parameters
1713
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1714
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1538
1715
  # @option opts [String] :display_name A filter to return only resources that match the given display name exactly.
1539
1716
  #
1540
1717
  # @option opts [String] :operating_system The image's operating system.
@@ -1609,16 +1786,20 @@ module OCI
1609
1786
 
1610
1787
  post_body = nil
1611
1788
 
1612
- @api_client.call_api(
1613
- :GET,
1614
- path,
1615
- endpoint,
1616
- header_params: header_params,
1617
- query_params: query_params,
1618
- operation_signing_strategy: operation_signing_strategy,
1619
- body: post_body,
1620
- return_type: 'Array<OCI::Core::Models::Image>'
1621
- )
1789
+ # rubocop:disable Metrics/BlockLength
1790
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_images') do
1791
+ @api_client.call_api(
1792
+ :GET,
1793
+ path,
1794
+ endpoint,
1795
+ header_params: header_params,
1796
+ query_params: query_params,
1797
+ operation_signing_strategy: operation_signing_strategy,
1798
+ body: post_body,
1799
+ return_type: 'Array<OCI::Core::Models::Image>'
1800
+ )
1801
+ end
1802
+ # rubocop:enable Metrics/BlockLength
1622
1803
  end
1623
1804
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1624
1805
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1631,10 +1812,12 @@ module OCI
1631
1812
 
1632
1813
  # Lists the console connections for the specified compartment or instance.
1633
1814
  #
1634
- # For more information about console access, see [Accessing the Instance Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
1815
+ # For more information about console access, see [Accessing the Console](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/serialconsole.htm).
1635
1816
  #
1636
1817
  # @param [String] compartment_id The OCID of the compartment.
1637
1818
  # @param [Hash] opts the optional parameters
1819
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1820
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1638
1821
  # @option opts [String] :instance_id The OCID of the instance.
1639
1822
  # @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
1640
1823
  #
@@ -1665,16 +1848,20 @@ module OCI
1665
1848
 
1666
1849
  post_body = nil
1667
1850
 
1668
- @api_client.call_api(
1669
- :GET,
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
- return_type: 'Array<OCI::Core::Models::InstanceConsoleConnection>'
1677
- )
1851
+ # rubocop:disable Metrics/BlockLength
1852
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_instance_console_connections') do
1853
+ @api_client.call_api(
1854
+ :GET,
1855
+ path,
1856
+ endpoint,
1857
+ header_params: header_params,
1858
+ query_params: query_params,
1859
+ operation_signing_strategy: operation_signing_strategy,
1860
+ body: post_body,
1861
+ return_type: 'Array<OCI::Core::Models::InstanceConsoleConnection>'
1862
+ )
1863
+ end
1864
+ # rubocop:enable Metrics/BlockLength
1678
1865
  end
1679
1866
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1680
1867
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1691,6 +1878,8 @@ module OCI
1691
1878
  #
1692
1879
  # @param [String] compartment_id The OCID of the compartment.
1693
1880
  # @param [Hash] opts the optional parameters
1881
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1882
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1694
1883
  # @option opts [String] :availability_domain The name of the Availability Domain.
1695
1884
  #
1696
1885
  # Example: `Uocm:PHX-AD-1`
@@ -1758,16 +1947,20 @@ module OCI
1758
1947
 
1759
1948
  post_body = nil
1760
1949
 
1761
- @api_client.call_api(
1762
- :GET,
1763
- path,
1764
- endpoint,
1765
- header_params: header_params,
1766
- query_params: query_params,
1767
- operation_signing_strategy: operation_signing_strategy,
1768
- body: post_body,
1769
- return_type: 'Array<OCI::Core::Models::Instance>'
1770
- )
1950
+ # rubocop:disable Metrics/BlockLength
1951
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_instances') do
1952
+ @api_client.call_api(
1953
+ :GET,
1954
+ path,
1955
+ endpoint,
1956
+ header_params: header_params,
1957
+ query_params: query_params,
1958
+ operation_signing_strategy: operation_signing_strategy,
1959
+ body: post_body,
1960
+ return_type: 'Array<OCI::Core::Models::Instance>'
1961
+ )
1962
+ end
1963
+ # rubocop:enable Metrics/BlockLength
1771
1964
  end
1772
1965
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1773
1966
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1783,6 +1976,8 @@ module OCI
1783
1976
  #
1784
1977
  # @param [String] compartment_id The OCID of the compartment.
1785
1978
  # @param [Hash] opts the optional parameters
1979
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1980
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1786
1981
  # @option opts [String] :availability_domain The name of the Availability Domain.
1787
1982
  #
1788
1983
  # Example: `Uocm:PHX-AD-1`
@@ -1818,16 +2013,20 @@ module OCI
1818
2013
 
1819
2014
  post_body = nil
1820
2015
 
1821
- @api_client.call_api(
1822
- :GET,
1823
- path,
1824
- endpoint,
1825
- header_params: header_params,
1826
- query_params: query_params,
1827
- operation_signing_strategy: operation_signing_strategy,
1828
- body: post_body,
1829
- return_type: 'Array<OCI::Core::Models::Shape>'
1830
- )
2016
+ # rubocop:disable Metrics/BlockLength
2017
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_shapes') do
2018
+ @api_client.call_api(
2019
+ :GET,
2020
+ path,
2021
+ endpoint,
2022
+ header_params: header_params,
2023
+ query_params: query_params,
2024
+ operation_signing_strategy: operation_signing_strategy,
2025
+ body: post_body,
2026
+ return_type: 'Array<OCI::Core::Models::Shape>'
2027
+ )
2028
+ end
2029
+ # rubocop:enable Metrics/BlockLength
1831
2030
  end
1832
2031
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1833
2032
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1844,6 +2043,8 @@ module OCI
1844
2043
  #
1845
2044
  # @param [String] compartment_id The OCID of the compartment.
1846
2045
  # @param [Hash] opts the optional parameters
2046
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2047
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1847
2048
  # @option opts [String] :availability_domain The name of the Availability Domain.
1848
2049
  #
1849
2050
  # Example: `Uocm:PHX-AD-1`
@@ -1881,16 +2082,20 @@ module OCI
1881
2082
 
1882
2083
  post_body = nil
1883
2084
 
1884
- @api_client.call_api(
1885
- :GET,
1886
- path,
1887
- endpoint,
1888
- header_params: header_params,
1889
- query_params: query_params,
1890
- operation_signing_strategy: operation_signing_strategy,
1891
- body: post_body,
1892
- return_type: 'Array<OCI::Core::Models::VnicAttachment>'
1893
- )
2085
+ # rubocop:disable Metrics/BlockLength
2086
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_vnic_attachments') do
2087
+ @api_client.call_api(
2088
+ :GET,
2089
+ path,
2090
+ endpoint,
2091
+ header_params: header_params,
2092
+ query_params: query_params,
2093
+ operation_signing_strategy: operation_signing_strategy,
2094
+ body: post_body,
2095
+ return_type: 'Array<OCI::Core::Models::VnicAttachment>'
2096
+ )
2097
+ end
2098
+ # rubocop:enable Metrics/BlockLength
1894
2099
  end
1895
2100
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1896
2101
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1909,6 +2114,8 @@ module OCI
1909
2114
  #
1910
2115
  # @param [String] compartment_id The OCID of the compartment.
1911
2116
  # @param [Hash] opts the optional parameters
2117
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2118
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1912
2119
  # @option opts [String] :availability_domain The name of the Availability Domain.
1913
2120
  #
1914
2121
  # Example: `Uocm:PHX-AD-1`
@@ -1946,16 +2153,20 @@ module OCI
1946
2153
 
1947
2154
  post_body = nil
1948
2155
 
1949
- @api_client.call_api(
1950
- :GET,
1951
- path,
1952
- endpoint,
1953
- header_params: header_params,
1954
- query_params: query_params,
1955
- operation_signing_strategy: operation_signing_strategy,
1956
- body: post_body,
1957
- return_type: 'Array<OCI::Core::Models::VolumeAttachment>'
1958
- )
2156
+ # rubocop:disable Metrics/BlockLength
2157
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#list_volume_attachments') do
2158
+ @api_client.call_api(
2159
+ :GET,
2160
+ path,
2161
+ endpoint,
2162
+ header_params: header_params,
2163
+ query_params: query_params,
2164
+ operation_signing_strategy: operation_signing_strategy,
2165
+ body: post_body,
2166
+ return_type: 'Array<OCI::Core::Models::VolumeAttachment>'
2167
+ )
2168
+ end
2169
+ # rubocop:enable Metrics/BlockLength
1959
2170
  end
1960
2171
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1961
2172
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -1977,6 +2188,8 @@ module OCI
1977
2188
  #
1978
2189
  # @param [String] instance_id The OCID of the instance.
1979
2190
  # @param [Hash] opts the optional parameters
2191
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2192
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
1980
2193
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1981
2194
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1982
2195
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -2006,15 +2219,19 @@ module OCI
2006
2219
 
2007
2220
  post_body = nil
2008
2221
 
2009
- @api_client.call_api(
2010
- :DELETE,
2011
- path,
2012
- endpoint,
2013
- header_params: header_params,
2014
- query_params: query_params,
2015
- operation_signing_strategy: operation_signing_strategy,
2016
- body: post_body
2017
- )
2222
+ # rubocop:disable Metrics/BlockLength
2223
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#terminate_instance') do
2224
+ @api_client.call_api(
2225
+ :DELETE,
2226
+ path,
2227
+ endpoint,
2228
+ header_params: header_params,
2229
+ query_params: query_params,
2230
+ operation_signing_strategy: operation_signing_strategy,
2231
+ body: post_body
2232
+ )
2233
+ end
2234
+ # rubocop:enable Metrics/BlockLength
2018
2235
  end
2019
2236
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2020
2237
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -2029,6 +2246,8 @@ module OCI
2029
2246
  # @param [String] instance_console_history_id The OCID of the console history.
2030
2247
  # @param [OCI::Core::Models::UpdateConsoleHistoryDetails] update_console_history_details Update instance fields
2031
2248
  # @param [Hash] opts the optional parameters
2249
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2250
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
2032
2251
  # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2033
2252
  # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2034
2253
  # will be updated or deleted only if the etag you provide matches the resource's current etag value.
@@ -2055,16 +2274,20 @@ module OCI
2055
2274
 
2056
2275
  post_body = @api_client.object_to_http_body(update_console_history_details)
2057
2276
 
2058
- @api_client.call_api(
2059
- :PUT,
2060
- path,
2061
- endpoint,
2062
- header_params: header_params,
2063
- query_params: query_params,
2064
- operation_signing_strategy: operation_signing_strategy,
2065
- body: post_body,
2066
- return_type: 'OCI::Core::Models::ConsoleHistory'
2067
- )
2277
+ # rubocop:disable Metrics/BlockLength
2278
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_console_history') do
2279
+ @api_client.call_api(
2280
+ :PUT,
2281
+ path,
2282
+ endpoint,
2283
+ header_params: header_params,
2284
+ query_params: query_params,
2285
+ operation_signing_strategy: operation_signing_strategy,
2286
+ body: post_body,
2287
+ return_type: 'OCI::Core::Models::ConsoleHistory'
2288
+ )
2289
+ end
2290
+ # rubocop:enable Metrics/BlockLength
2068
2291
  end
2069
2292
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2070
2293
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -2079,6 +2302,8 @@ module OCI
2079
2302
  # @param [String] image_id The OCID of the image.
2080
2303
  # @param [OCI::Core::Models::UpdateImageDetails] update_image_details Updates the image display name field. Avoid entering confidential information.
2081
2304
  # @param [Hash] opts the optional parameters
2305
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2306
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
2082
2307
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
2083
2308
  # server error without risk of executing that same action again. Retry tokens expire after 24
2084
2309
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -2109,19 +2334,24 @@ module OCI
2109
2334
  header_params['content-type'] = 'application/json'
2110
2335
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
2111
2336
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2337
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
2112
2338
 
2113
2339
  post_body = @api_client.object_to_http_body(update_image_details)
2114
2340
 
2115
- @api_client.call_api(
2116
- :PUT,
2117
- path,
2118
- endpoint,
2119
- header_params: header_params,
2120
- query_params: query_params,
2121
- operation_signing_strategy: operation_signing_strategy,
2122
- body: post_body,
2123
- return_type: 'OCI::Core::Models::Image'
2124
- )
2341
+ # rubocop:disable Metrics/BlockLength
2342
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_image') do
2343
+ @api_client.call_api(
2344
+ :PUT,
2345
+ path,
2346
+ endpoint,
2347
+ header_params: header_params,
2348
+ query_params: query_params,
2349
+ operation_signing_strategy: operation_signing_strategy,
2350
+ body: post_body,
2351
+ return_type: 'OCI::Core::Models::Image'
2352
+ )
2353
+ end
2354
+ # rubocop:enable Metrics/BlockLength
2125
2355
  end
2126
2356
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2127
2357
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
@@ -2138,6 +2368,8 @@ module OCI
2138
2368
  # @param [String] instance_id The OCID of the instance.
2139
2369
  # @param [OCI::Core::Models::UpdateInstanceDetails] update_instance_details Update instance fields
2140
2370
  # @param [Hash] opts the optional parameters
2371
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2372
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then then operation will not retry
2141
2373
  # @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
2142
2374
  # server error without risk of executing that same action again. Retry tokens expire after 24
2143
2375
  # hours, but can be invalidated before then due to conflicting operations (for example, if a resource
@@ -2168,23 +2400,35 @@ module OCI
2168
2400
  header_params['content-type'] = 'application/json'
2169
2401
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
2170
2402
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2403
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
2171
2404
 
2172
2405
  post_body = @api_client.object_to_http_body(update_instance_details)
2173
2406
 
2174
- @api_client.call_api(
2175
- :PUT,
2176
- path,
2177
- endpoint,
2178
- header_params: header_params,
2179
- query_params: query_params,
2180
- operation_signing_strategy: operation_signing_strategy,
2181
- body: post_body,
2182
- return_type: 'OCI::Core::Models::Instance'
2183
- )
2407
+ # rubocop:disable Metrics/BlockLength
2408
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ComputeClient#update_instance') do
2409
+ @api_client.call_api(
2410
+ :PUT,
2411
+ path,
2412
+ endpoint,
2413
+ header_params: header_params,
2414
+ query_params: query_params,
2415
+ operation_signing_strategy: operation_signing_strategy,
2416
+ body: post_body,
2417
+ return_type: 'OCI::Core::Models::Instance'
2418
+ )
2419
+ end
2420
+ # rubocop:enable Metrics/BlockLength
2184
2421
  end
2185
2422
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2186
2423
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
2187
2424
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
2425
+
2426
+ private
2427
+
2428
+ def applicable_retry_config(opts = {})
2429
+ return @retry_config unless opts.key?(:retry_config)
2430
+ opts[:retry_config]
2431
+ end
2188
2432
  end
2189
2433
  end
2190
2434
  # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength