oci 2.3.6 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -10
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/api_client.rb +2 -2
  5. data/lib/oci/audit/audit_client.rb +11 -9
  6. data/lib/oci/base_signer.rb +13 -13
  7. data/lib/oci/container_engine/container_engine_client.rb +43 -39
  8. data/lib/oci/container_engine/models/node_error.rb +1 -1
  9. data/lib/oci/container_engine/models/work_request_error.rb +1 -1
  10. data/lib/oci/core/blockstorage_client.rb +421 -75
  11. data/lib/oci/core/compute_client.rb +77 -75
  12. data/lib/oci/core/compute_client_composite_operations.rb +40 -0
  13. data/lib/oci/core/core.rb +4 -0
  14. data/lib/oci/core/models/boot_volume.rb +18 -4
  15. data/lib/oci/core/models/boot_volume_kms_key.rb +152 -0
  16. data/lib/oci/core/models/create_boot_volume_details.rb +15 -1
  17. data/lib/oci/core/models/create_image_details.rb +2 -0
  18. data/lib/oci/core/models/create_volume_details.rb +15 -1
  19. data/lib/oci/core/models/fast_connect_provider_service.rb +1 -1
  20. data/lib/oci/core/models/image.rb +2 -0
  21. data/lib/oci/core/models/instance.rb +2 -0
  22. data/lib/oci/core/models/instance_source_via_image_details.rb +18 -4
  23. data/lib/oci/core/models/launch_options.rb +2 -0
  24. data/lib/oci/core/models/update_boot_volume_kms_key_details.rb +154 -0
  25. data/lib/oci/core/models/update_volume_kms_key_details.rb +154 -0
  26. data/lib/oci/core/models/volume.rb +15 -1
  27. data/lib/oci/core/models/volume_kms_key.rb +152 -0
  28. data/lib/oci/core/virtual_network_client.rb +233 -231
  29. data/lib/oci/core/virtual_network_client_composite_operations.rb +80 -0
  30. data/lib/oci/database/database_client.rb +123 -121
  31. data/lib/oci/database/database_client_composite_operations.rb +399 -0
  32. data/lib/oci/database/models/patch.rb +1 -1
  33. data/lib/oci/database/models/patch_summary.rb +1 -1
  34. data/lib/oci/dns/dns_client.rb +38 -36
  35. data/lib/oci/email/email_client.rb +21 -19
  36. data/lib/oci/email/models/sender.rb +1 -1
  37. data/lib/oci/email/models/suppression.rb +1 -1
  38. data/lib/oci/file_storage/file_storage_client.rb +49 -47
  39. data/lib/oci/identity/identity_client.rb +151 -149
  40. data/lib/oci/identity/identity_client_composite_operations.rb +40 -0
  41. data/lib/oci/key_management/key_management.rb +40 -0
  42. data/lib/oci/key_management/kms_crypto_client.rb +258 -0
  43. data/lib/oci/key_management/kms_crypto_client_composite_operations.rb +24 -0
  44. data/lib/oci/key_management/kms_management_client.rb +716 -0
  45. data/lib/oci/key_management/kms_management_client_composite_operations.rb +181 -0
  46. data/lib/oci/key_management/kms_vault_client.rb +533 -0
  47. data/lib/oci/key_management/kms_vault_client_composite_operations.rb +182 -0
  48. data/lib/oci/key_management/models/create_key_details.rb +180 -0
  49. data/lib/oci/key_management/models/create_vault_details.rb +194 -0
  50. data/lib/oci/key_management/models/decrypt_data_details.rb +177 -0
  51. data/lib/oci/key_management/models/decrypted_data.rb +160 -0
  52. data/lib/oci/key_management/models/encrypt_data_details.rb +177 -0
  53. data/lib/oci/key_management/models/encrypted_data.rb +146 -0
  54. data/lib/oci/key_management/models/generate_key_details.rb +195 -0
  55. data/lib/oci/key_management/models/generated_key.rb +177 -0
  56. data/lib/oci/key_management/models/key.rb +318 -0
  57. data/lib/oci/key_management/models/key_shape.rb +178 -0
  58. data/lib/oci/key_management/models/key_summary.rb +287 -0
  59. data/lib/oci/key_management/models/key_version.rb +205 -0
  60. data/lib/oci/key_management/models/key_version_summary.rb +205 -0
  61. data/lib/oci/key_management/models/schedule_vault_deletion_details.rb +153 -0
  62. data/lib/oci/key_management/models/update_key_details.rb +152 -0
  63. data/lib/oci/key_management/models/update_vault_details.rb +152 -0
  64. data/lib/oci/key_management/models/vault.rb +350 -0
  65. data/lib/oci/key_management/models/vault_summary.rb +334 -0
  66. data/lib/oci/key_management/util.rb +2 -0
  67. data/lib/oci/load_balancer/load_balancer_client.rb +89 -87
  68. data/lib/oci/object_storage/models/bucket.rb +18 -4
  69. data/lib/oci/object_storage/models/create_bucket_details.rb +18 -4
  70. data/lib/oci/object_storage/models/multipart_upload.rb +1 -1
  71. data/lib/oci/object_storage/models/preauthenticated_request.rb +1 -1
  72. data/lib/oci/object_storage/models/update_bucket_details.rb +22 -4
  73. data/lib/oci/object_storage/object_storage_client.rb +63 -58
  74. data/lib/oci/resource_search/resource_search_client.rb +11 -9
  75. data/lib/oci/version.rb +1 -1
  76. metadata +32 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fcdb9dbbfa46abca873eaddcb1ecdb94cda208360e0b7d32aba0729259511b4d
4
- data.tar.gz: 77833cdd86269cff1c561d32f0bd31cbba54e74f35a98770c95026ea72131191
3
+ metadata.gz: 3687b785fe77bfde5930b2562af437b6a89163f87d49874af4d74bfd1eb989db
4
+ data.tar.gz: dfcf0224d08f49d894bad1f8057c386c40266d9cc36dc6a8b0987bf04af6e35a
5
5
  SHA512:
6
- metadata.gz: '087ee2da2120beb40f70e4858ceef7add326c234531bcbcce141c78742d716366ecd55e7dffd0dbdbd38a7669d2ec0f442802b9d19a1b4ac1064b20e65c5ea77'
7
- data.tar.gz: 280fc7ecf03f0f7761a88a2d04812409a49a72b3aa45bd96c2775113a53c79160ac3c7ed42275b23833d8363cc2d35b77fcaa4524fc99a5684793ec3b05ec3ba
6
+ metadata.gz: 0d1a25d4a785cda4614c1d8ae63c8f48f172e5111915a1c86edfffc5d994743d3ee1dd76166f6c83b69620361354f5d180dd49313edae9c813f21f24e2f1a759
7
+ data.tar.gz: 3b54354e9a8498bb9d7afc474b265dfb5ac2b2cecae245548048d254b6365c11918700d9386a4cbfbc457287ed628e0d9642834bdb6067ce366d447b4132c886
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Oracle Cloud Infrastructure Ruby SDK
2
- **Version 2.3.6**
2
+ **Version 2.3.7**
3
3
 
4
4
  This topic describes how to install, configure, and use the Oracle Cloud Infrastructure Ruby SDK.
5
5
 
@@ -9,15 +9,16 @@ The Ruby SDK supports the following services:
9
9
 
10
10
  * Audit
11
11
  * Container Engine
12
- * Core Services (which includes Networking Service, Compute Service, and Block Volume Service)
13
- * Database Service
14
- * Domain Name System Service
15
- * Email Service
16
- * File Storage Service
17
- * Identity and Access Management Service
18
- * Load Balancing Service
19
- * Object Storage Service
20
- * OCI Search
12
+ * Core Services (which includes Networking, Compute, and Block Volume)
13
+ * Database
14
+ * Domain Name System
15
+ * Email
16
+ * File Storage
17
+ * Identity and Access Management
18
+ * Key Management
19
+ * Load Balancing
20
+ * Object Storage
21
+ * Search
21
22
 
22
23
  **Licensing:** This SDK and sample is dual licensed under the Universal Permissive License 1.0 and the Apache License.
23
24
 
data/lib/oci.rb CHANGED
@@ -29,6 +29,7 @@ require 'oci/load_balancer/load_balancer'
29
29
  require 'oci/object_storage/object_storage'
30
30
  require 'oci/object_storage/transfer/transfer'
31
31
  require 'oci/resource_search/resource_search'
32
+ require 'oci/key_management/key_management'
32
33
 
33
34
  # Top level module for the Oracle Cloud Infrastructure SDK
34
35
  module OCI
@@ -581,8 +581,8 @@ module OCI
581
581
  # @return [String] HTTP body data in the form of string
582
582
  def build_request_body(header_params, form_params, body)
583
583
  # http form
584
- if header_params['content-type'] == 'application/x-www-form-urlencoded' ||
585
- header_params['content-type'] == 'multipart/form-data'
584
+ if header_params[:'content-type'] == 'application/x-www-form-urlencoded' ||
585
+ header_params[:'content-type'] == 'multipart/form-data'
586
586
 
587
587
  data = {}
588
588
  form_params.each do |key, value|
@@ -29,10 +29,12 @@ module OCI
29
29
 
30
30
 
31
31
  # Creates a new AuditClient.
32
- # If a config is not specified, then the global OCI.config will be used.
32
+ # Notes:
33
+ # If a config is not specified, then the global OCI.config will be used.
34
+ # This client is not thread-safe
33
35
  #
34
- # A region must be specified in either the config or the region parameter. If specified
35
- # in both, then the region parameter will be used.
36
+ # A region must be specified in either the config or the region parameter. If specified in both,
37
+ # then the region parameter will be used.
36
38
  #
37
39
  # @param [Config] config A Config object.
38
40
  # @param [String] region A region used to determine the service endpoint. This will usually
@@ -121,8 +123,8 @@ module OCI
121
123
 
122
124
  # Header Params
123
125
  header_params = {}
124
- header_params['accept'] = 'application/json'
125
- header_params['content-type'] = 'application/json'
126
+ header_params[:accept] = 'application/json'
127
+ header_params[:'content-type'] = 'application/json'
126
128
  # rubocop:enable Style/NegatedIf
127
129
 
128
130
  post_body = nil
@@ -190,8 +192,8 @@ module OCI
190
192
 
191
193
  # Header Params
192
194
  header_params = {}
193
- header_params['accept'] = 'application/json'
194
- header_params['content-type'] = 'application/json'
195
+ header_params[:accept] = 'application/json'
196
+ header_params[:'content-type'] = 'application/json'
195
197
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
196
198
  # rubocop:enable Style/NegatedIf
197
199
 
@@ -245,8 +247,8 @@ module OCI
245
247
 
246
248
  # Header Params
247
249
  header_params = {}
248
- header_params['accept'] = 'application/json'
249
- header_params['content-type'] = 'application/json'
250
+ header_params[:accept] = 'application/json'
251
+ header_params[:'content-type'] = 'application/json'
250
252
  # rubocop:enable Style/NegatedIf
251
253
 
252
254
  post_body = @api_client.object_to_http_body(update_configuration_details)
@@ -77,9 +77,9 @@ module OCI
77
77
  private
78
78
 
79
79
  def inject_missing_headers(method, headers, body, uri, operation_signing_strategy)
80
- headers['date'] ||= Time.now.utc.httpdate
81
- headers['accept'] ||= '*/*'
82
- headers['host'] ||= uri.host if @headers_to_sign_all_requests.include?(:host)
80
+ headers[:date] ||= Time.now.utc.httpdate
81
+ headers[:accept] ||= '*/*'
82
+ headers[:host] ||= uri.host if @headers_to_sign_all_requests.include?(:host)
83
83
 
84
84
  return unless %i[put post patch].include?(method)
85
85
 
@@ -87,14 +87,14 @@ module OCI
87
87
 
88
88
  # For object storage service's put method, we don't need to set content length and x-content sha256
89
89
  if operation_signing_strategy == :exclude_body
90
- headers['content-length'] ||= if body.respond_to?(:read) && body.respond_to?(:write)
91
- body.respond_to?('size') ? body.size : body.stat.size
92
- else
93
- body.length.to_s
94
- end
90
+ headers[:'content-length'] ||= if body.respond_to?(:read) && body.respond_to?(:write)
91
+ body.respond_to?('size') ? body.size : body.stat.size
92
+ else
93
+ body.length.to_s
94
+ end
95
95
  else
96
- headers['content-length'] ||= body.length.to_s
97
- headers['x-content-sha256'] ||= OpenSSL::Digest::SHA256.new.update(body).base64digest
96
+ headers[:'content-length'] ||= body.length.to_s
97
+ headers[:'x-content-sha256'] ||= OpenSSL::Digest::SHA256.new.update(body).base64digest
98
98
  end
99
99
  end
100
100
 
@@ -107,7 +107,7 @@ module OCI
107
107
  header_mapping = fetch_header_mapping(method, operation_signing_strategy)
108
108
 
109
109
  signed_headers = header_mapping.map(&:to_s).join(' ')
110
- headers['authorization'] = [
110
+ headers[:authorization] = [
111
111
  %(Signature headers="#{signed_headers}"),
112
112
  %(keyId="#{@key_id}"),
113
113
  %(algorithm="rsa-sha256"),
@@ -121,10 +121,10 @@ module OCI
121
121
 
122
122
  return if header_mapping.empty?
123
123
  signing_string = header_mapping.map do |header|
124
- if header == :"(request-target)"
124
+ if header == :'(request-target)'
125
125
  "#{header}: #{method.downcase} #{path}"
126
126
  else
127
- "#{header}: #{headers[header.to_s]}"
127
+ "#{header}: #{headers[header]}"
128
128
  end
129
129
  end.join("\n")
130
130
 
@@ -29,10 +29,12 @@ module OCI
29
29
 
30
30
 
31
31
  # Creates a new ContainerEngineClient.
32
- # If a config is not specified, then the global OCI.config will be used.
32
+ # Notes:
33
+ # If a config is not specified, then the global OCI.config will be used.
34
+ # This client is not thread-safe
33
35
  #
34
- # A region must be specified in either the config or the region parameter. If specified
35
- # in both, then the region parameter will be used.
36
+ # A region must be specified in either the config or the region parameter. If specified in both,
37
+ # then the region parameter will be used.
36
38
  #
37
39
  # @param [Config] config A Config object.
38
40
  # @param [String] region A region used to determine the service endpoint. This will usually
@@ -125,8 +127,8 @@ module OCI
125
127
 
126
128
  # Header Params
127
129
  header_params = {}
128
- header_params['accept'] = 'application/json'
129
- header_params['content-type'] = 'application/json'
130
+ header_params[:accept] = 'application/json'
131
+ header_params[:'content-type'] = 'application/json'
130
132
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
131
133
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
132
134
  # rubocop:enable Style/NegatedIf
@@ -184,8 +186,10 @@ module OCI
184
186
 
185
187
  # Header Params
186
188
  header_params = {}
187
- header_params['accept'] = 'application/x-yaml'
188
- header_params['content-type'] = 'application/json'
189
+ header_params[:accept] = opts[:accept] if opts[:accept]
190
+ header_params[:accept] ||= 'application/x-yaml'
191
+ header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
192
+ header_params[:'content-type'] = 'application/json'
189
193
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
190
194
  # rubocop:enable Style/NegatedIf
191
195
 
@@ -283,8 +287,8 @@ module OCI
283
287
 
284
288
  # Header Params
285
289
  header_params = {}
286
- header_params['accept'] = 'application/json'
287
- header_params['content-type'] = 'application/json'
290
+ header_params[:accept] = 'application/json'
291
+ header_params[:'content-type'] = 'application/json'
288
292
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
289
293
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
290
294
  # rubocop:enable Style/NegatedIf
@@ -343,8 +347,8 @@ module OCI
343
347
 
344
348
  # Header Params
345
349
  header_params = {}
346
- header_params['accept'] = 'application/json'
347
- header_params['content-type'] = 'application/json'
350
+ header_params[:accept] = 'application/json'
351
+ header_params[:'content-type'] = 'application/json'
348
352
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
349
353
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
350
354
  # rubocop:enable Style/NegatedIf
@@ -402,8 +406,8 @@ module OCI
402
406
 
403
407
  # Header Params
404
408
  header_params = {}
405
- header_params['accept'] = 'application/json'
406
- header_params['content-type'] = 'application/json'
409
+ header_params[:accept] = 'application/json'
410
+ header_params[:'content-type'] = 'application/json'
407
411
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
408
412
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
409
413
  # rubocop:enable Style/NegatedIf
@@ -461,8 +465,8 @@ module OCI
461
465
 
462
466
  # Header Params
463
467
  header_params = {}
464
- header_params['accept'] = 'application/json'
465
- header_params['content-type'] = 'application/json'
468
+ header_params[:accept] = 'application/json'
469
+ header_params[:'content-type'] = 'application/json'
466
470
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
467
471
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
468
472
  # rubocop:enable Style/NegatedIf
@@ -516,8 +520,8 @@ module OCI
516
520
 
517
521
  # Header Params
518
522
  header_params = {}
519
- header_params['accept'] = 'application/json'
520
- header_params['content-type'] = 'application/json'
523
+ header_params[:accept] = 'application/json'
524
+ header_params[:'content-type'] = 'application/json'
521
525
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
522
526
  # rubocop:enable Style/NegatedIf
523
527
 
@@ -571,8 +575,8 @@ module OCI
571
575
 
572
576
  # Header Params
573
577
  header_params = {}
574
- header_params['accept'] = 'application/json'
575
- header_params['content-type'] = 'application/json'
578
+ header_params[:accept] = 'application/json'
579
+ header_params[:'content-type'] = 'application/json'
576
580
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
577
581
  # rubocop:enable Style/NegatedIf
578
582
 
@@ -626,8 +630,8 @@ module OCI
626
630
 
627
631
  # Header Params
628
632
  header_params = {}
629
- header_params['accept'] = 'application/json'
630
- header_params['content-type'] = 'application/json'
633
+ header_params[:accept] = 'application/json'
634
+ header_params[:'content-type'] = 'application/json'
631
635
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
632
636
  # rubocop:enable Style/NegatedIf
633
637
 
@@ -681,8 +685,8 @@ module OCI
681
685
 
682
686
  # Header Params
683
687
  header_params = {}
684
- header_params['accept'] = 'application/json'
685
- header_params['content-type'] = 'application/json'
688
+ header_params[:accept] = 'application/json'
689
+ header_params[:'content-type'] = 'application/json'
686
690
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
687
691
  # rubocop:enable Style/NegatedIf
688
692
 
@@ -736,8 +740,8 @@ module OCI
736
740
 
737
741
  # Header Params
738
742
  header_params = {}
739
- header_params['accept'] = 'application/json'
740
- header_params['content-type'] = 'application/json'
743
+ header_params[:accept] = 'application/json'
744
+ header_params[:'content-type'] = 'application/json'
741
745
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
742
746
  # rubocop:enable Style/NegatedIf
743
747
 
@@ -825,8 +829,8 @@ module OCI
825
829
 
826
830
  # Header Params
827
831
  header_params = {}
828
- header_params['accept'] = 'application/json'
829
- header_params['content-type'] = 'application/json'
832
+ header_params[:accept] = 'application/json'
833
+ header_params[:'content-type'] = 'application/json'
830
834
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
831
835
  # rubocop:enable Style/NegatedIf
832
836
 
@@ -903,8 +907,8 @@ module OCI
903
907
 
904
908
  # Header Params
905
909
  header_params = {}
906
- header_params['accept'] = 'application/json'
907
- header_params['content-type'] = 'application/json'
910
+ header_params[:accept] = 'application/json'
911
+ header_params[:'content-type'] = 'application/json'
908
912
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
909
913
  # rubocop:enable Style/NegatedIf
910
914
 
@@ -961,8 +965,8 @@ module OCI
961
965
 
962
966
  # Header Params
963
967
  header_params = {}
964
- header_params['accept'] = 'application/json'
965
- header_params['content-type'] = 'application/json'
968
+ header_params[:accept] = 'application/json'
969
+ header_params[:'content-type'] = 'application/json'
966
970
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
967
971
  # rubocop:enable Style/NegatedIf
968
972
 
@@ -1019,8 +1023,8 @@ module OCI
1019
1023
 
1020
1024
  # Header Params
1021
1025
  header_params = {}
1022
- header_params['accept'] = 'application/json'
1023
- header_params['content-type'] = 'application/json'
1026
+ header_params[:accept] = 'application/json'
1027
+ header_params[:'content-type'] = 'application/json'
1024
1028
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1025
1029
  # rubocop:enable Style/NegatedIf
1026
1030
 
@@ -1117,8 +1121,8 @@ module OCI
1117
1121
 
1118
1122
  # Header Params
1119
1123
  header_params = {}
1120
- header_params['accept'] = 'application/json'
1121
- header_params['content-type'] = 'application/json'
1124
+ header_params[:accept] = 'application/json'
1125
+ header_params[:'content-type'] = 'application/json'
1122
1126
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1123
1127
  # rubocop:enable Style/NegatedIf
1124
1128
 
@@ -1178,8 +1182,8 @@ module OCI
1178
1182
 
1179
1183
  # Header Params
1180
1184
  header_params = {}
1181
- header_params['accept'] = 'application/json'
1182
- header_params['content-type'] = 'application/json'
1185
+ header_params[:accept] = 'application/json'
1186
+ header_params[:'content-type'] = 'application/json'
1183
1187
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
1184
1188
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1185
1189
  # rubocop:enable Style/NegatedIf
@@ -1239,8 +1243,8 @@ module OCI
1239
1243
 
1240
1244
  # Header Params
1241
1245
  header_params = {}
1242
- header_params['accept'] = 'application/json'
1243
- header_params['content-type'] = 'application/json'
1246
+ header_params[:accept] = 'application/json'
1247
+ header_params[:'content-type'] = 'application/json'
1244
1248
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
1245
1249
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1246
1250
  # rubocop:enable Style/NegatedIf
@@ -6,7 +6,7 @@ require 'date'
6
6
  module OCI
7
7
  # The properties that define an upstream error while managing a node.
8
8
  class ContainerEngine::Models::NodeError # rubocop:disable Metrics/LineLength
9
- # **[Required]** A short error code that defines the upstream error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
9
+ # **[Required]** A short error code that defines the upstream error, meant for programmatic parsing. See [API Errors](https://docs.cloud.oracle.com/Content/API/References/apierrors.htm).
10
10
  # @return [String]
11
11
  attr_accessor :code
12
12
 
@@ -7,7 +7,7 @@ require 'logger'
7
7
  module OCI
8
8
  # Errors related to a specific work request.
9
9
  class ContainerEngine::Models::WorkRequestError # rubocop:disable Metrics/LineLength
10
- # **[Required]** A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
10
+ # **[Required]** A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.cloud.oracle.com/Content/API/References/apierrors.htm).
11
11
  # @return [String]
12
12
  attr_accessor :code
13
13
 
@@ -29,10 +29,12 @@ module OCI
29
29
 
30
30
 
31
31
  # Creates a new BlockstorageClient.
32
- # If a config is not specified, then the global OCI.config will be used.
32
+ # Notes:
33
+ # If a config is not specified, then the global OCI.config will be used.
34
+ # This client is not thread-safe
33
35
  #
34
- # A region must be specified in either the config or the region parameter. If specified
35
- # in both, then the region parameter will be used.
36
+ # A region must be specified in either the config or the region parameter. If specified in both,
37
+ # then the region parameter will be used.
36
38
  #
37
39
  # @param [Config] config A Config object.
38
40
  # @param [String] region A region used to determine the service endpoint. This will usually
@@ -129,8 +131,8 @@ module OCI
129
131
 
130
132
  # Header Params
131
133
  header_params = {}
132
- header_params['accept'] = 'application/json'
133
- header_params['content-type'] = 'application/json'
134
+ header_params[:accept] = 'application/json'
135
+ header_params[:'content-type'] = 'application/json'
134
136
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
135
137
  # rubocop:enable Style/NegatedIf
136
138
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
@@ -193,8 +195,8 @@ module OCI
193
195
 
194
196
  # Header Params
195
197
  header_params = {}
196
- header_params['accept'] = 'application/json'
197
- header_params['content-type'] = 'application/json'
198
+ header_params[:accept] = 'application/json'
199
+ header_params[:'content-type'] = 'application/json'
198
200
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
199
201
  # rubocop:enable Style/NegatedIf
200
202
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
@@ -265,8 +267,8 @@ module OCI
265
267
 
266
268
  # Header Params
267
269
  header_params = {}
268
- header_params['accept'] = 'application/json'
269
- header_params['content-type'] = 'application/json'
270
+ header_params[:accept] = 'application/json'
271
+ header_params[:'content-type'] = 'application/json'
270
272
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
271
273
  # rubocop:enable Style/NegatedIf
272
274
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
@@ -329,8 +331,8 @@ module OCI
329
331
 
330
332
  # Header Params
331
333
  header_params = {}
332
- header_params['accept'] = 'application/json'
333
- header_params['content-type'] = 'application/json'
334
+ header_params[:accept] = 'application/json'
335
+ header_params[:'content-type'] = 'application/json'
334
336
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
335
337
  # rubocop:enable Style/NegatedIf
336
338
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
@@ -385,8 +387,8 @@ module OCI
385
387
 
386
388
  # Header Params
387
389
  header_params = {}
388
- header_params['accept'] = 'application/json'
389
- header_params['content-type'] = 'application/json'
390
+ header_params[:accept] = 'application/json'
391
+ header_params[:'content-type'] = 'application/json'
390
392
  # rubocop:enable Style/NegatedIf
391
393
 
392
394
  post_body = @api_client.object_to_http_body(create_volume_backup_policy_assignment_details)
@@ -449,8 +451,8 @@ module OCI
449
451
 
450
452
  # Header Params
451
453
  header_params = {}
452
- header_params['accept'] = 'application/json'
453
- header_params['content-type'] = 'application/json'
454
+ header_params[:accept] = 'application/json'
455
+ header_params[:'content-type'] = 'application/json'
454
456
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
455
457
  # rubocop:enable Style/NegatedIf
456
458
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
@@ -509,8 +511,8 @@ module OCI
509
511
 
510
512
  # Header Params
511
513
  header_params = {}
512
- header_params['accept'] = 'application/json'
513
- header_params['content-type'] = 'application/json'
514
+ header_params[:accept] = 'application/json'
515
+ header_params[:'content-type'] = 'application/json'
514
516
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
515
517
  # rubocop:enable Style/NegatedIf
516
518
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
@@ -570,8 +572,8 @@ module OCI
570
572
 
571
573
  # Header Params
572
574
  header_params = {}
573
- header_params['accept'] = 'application/json'
574
- header_params['content-type'] = 'application/json'
575
+ header_params[:accept] = 'application/json'
576
+ header_params[:'content-type'] = 'application/json'
575
577
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
576
578
  # rubocop:enable Style/NegatedIf
577
579
 
@@ -625,8 +627,8 @@ module OCI
625
627
 
626
628
  # Header Params
627
629
  header_params = {}
628
- header_params['accept'] = 'application/json'
629
- header_params['content-type'] = 'application/json'
630
+ header_params[:accept] = 'application/json'
631
+ header_params[:'content-type'] = 'application/json'
630
632
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
631
633
  # rubocop:enable Style/NegatedIf
632
634
 
@@ -655,6 +657,62 @@ module OCI
655
657
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
656
658
 
657
659
 
660
+ # Remove kms for the specific boot volume. If the volume doesn't use KMS, then do nothing.
661
+ #
662
+ # @param [String] boot_volume_id The OCID of the boot volume.
663
+ # @param [Hash] opts the optional parameters
664
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
665
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
666
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
667
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
668
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
669
+ #
670
+ # @return [Response] A Response object with data of type nil
671
+ def delete_boot_volume_kms_key(boot_volume_id, opts = {})
672
+ logger.debug 'Calling operation BlockstorageClient#delete_boot_volume_kms_key.' if logger
673
+
674
+ raise "Missing the required parameter 'boot_volume_id' when calling delete_boot_volume_kms_key." if boot_volume_id.nil?
675
+ raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_id)
676
+
677
+ path = '/bootVolumes/{bootVolumeId}/kmsKey'.sub('{bootVolumeId}', boot_volume_id.to_s)
678
+ operation_signing_strategy = :standard
679
+
680
+ # rubocop:disable Style/NegatedIf
681
+ # Query Params
682
+ query_params = {}
683
+
684
+ # Header Params
685
+ header_params = {}
686
+ header_params[:accept] = 'application/json'
687
+ header_params[:'content-type'] = 'application/json'
688
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
689
+ # rubocop:enable Style/NegatedIf
690
+
691
+ post_body = nil
692
+
693
+ # rubocop:disable Metrics/BlockLength
694
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_boot_volume_kms_key') do
695
+ @api_client.call_api(
696
+ :DELETE,
697
+ path,
698
+ endpoint,
699
+ header_params: header_params,
700
+ query_params: query_params,
701
+ operation_signing_strategy: operation_signing_strategy,
702
+ body: post_body
703
+ )
704
+ end
705
+ # rubocop:enable Metrics/BlockLength
706
+ end
707
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
708
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
709
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
710
+
711
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
712
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
713
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
714
+
715
+
658
716
  # Deletes the specified volume. The volume cannot have an active connection to an instance.
659
717
  # To disconnect the volume from a connected instance, see
660
718
  # [Disconnecting From a Volume](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/disconnectingfromavolume.htm).
@@ -684,8 +742,8 @@ module OCI
684
742
 
685
743
  # Header Params
686
744
  header_params = {}
687
- header_params['accept'] = 'application/json'
688
- header_params['content-type'] = 'application/json'
745
+ header_params[:accept] = 'application/json'
746
+ header_params[:'content-type'] = 'application/json'
689
747
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
690
748
  # rubocop:enable Style/NegatedIf
691
749
 
@@ -739,8 +797,8 @@ module OCI
739
797
 
740
798
  # Header Params
741
799
  header_params = {}
742
- header_params['accept'] = 'application/json'
743
- header_params['content-type'] = 'application/json'
800
+ header_params[:accept] = 'application/json'
801
+ header_params[:'content-type'] = 'application/json'
744
802
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
745
803
  # rubocop:enable Style/NegatedIf
746
804
 
@@ -794,8 +852,8 @@ module OCI
794
852
 
795
853
  # Header Params
796
854
  header_params = {}
797
- header_params['accept'] = 'application/json'
798
- header_params['content-type'] = 'application/json'
855
+ header_params[:accept] = 'application/json'
856
+ header_params[:'content-type'] = 'application/json'
799
857
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
800
858
  # rubocop:enable Style/NegatedIf
801
859
 
@@ -851,8 +909,8 @@ module OCI
851
909
 
852
910
  # Header Params
853
911
  header_params = {}
854
- header_params['accept'] = 'application/json'
855
- header_params['content-type'] = 'application/json'
912
+ header_params[:accept] = 'application/json'
913
+ header_params[:'content-type'] = 'application/json'
856
914
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
857
915
  # rubocop:enable Style/NegatedIf
858
916
 
@@ -906,8 +964,8 @@ module OCI
906
964
 
907
965
  # Header Params
908
966
  header_params = {}
909
- header_params['accept'] = 'application/json'
910
- header_params['content-type'] = 'application/json'
967
+ header_params[:accept] = 'application/json'
968
+ header_params[:'content-type'] = 'application/json'
911
969
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
912
970
  # rubocop:enable Style/NegatedIf
913
971
 
@@ -931,6 +989,62 @@ module OCI
931
989
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
932
990
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
933
991
 
992
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
993
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
994
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
995
+
996
+
997
+ # Remove kms for the specific volume. If the volume doesn't use KMS, then do nothing.
998
+ #
999
+ # @param [String] volume_id The OCID of the volume.
1000
+ # @param [Hash] opts the optional parameters
1001
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1002
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1003
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1004
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1005
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1006
+ #
1007
+ # @return [Response] A Response object with data of type nil
1008
+ def delete_volume_kms_key(volume_id, opts = {})
1009
+ logger.debug 'Calling operation BlockstorageClient#delete_volume_kms_key.' if logger
1010
+
1011
+ raise "Missing the required parameter 'volume_id' when calling delete_volume_kms_key." if volume_id.nil?
1012
+ raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_id)
1013
+
1014
+ path = '/volumes/{volumeId}/kmsKey'.sub('{volumeId}', volume_id.to_s)
1015
+ operation_signing_strategy = :standard
1016
+
1017
+ # rubocop:disable Style/NegatedIf
1018
+ # Query Params
1019
+ query_params = {}
1020
+
1021
+ # Header Params
1022
+ header_params = {}
1023
+ header_params[:accept] = 'application/json'
1024
+ header_params[:'content-type'] = 'application/json'
1025
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
1026
+ # rubocop:enable Style/NegatedIf
1027
+
1028
+ post_body = nil
1029
+
1030
+ # rubocop:disable Metrics/BlockLength
1031
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#delete_volume_kms_key') do
1032
+ @api_client.call_api(
1033
+ :DELETE,
1034
+ path,
1035
+ endpoint,
1036
+ header_params: header_params,
1037
+ query_params: query_params,
1038
+ operation_signing_strategy: operation_signing_strategy,
1039
+ body: post_body
1040
+ )
1041
+ end
1042
+ # rubocop:enable Metrics/BlockLength
1043
+ end
1044
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1045
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1046
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1047
+
934
1048
  # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
935
1049
  # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
936
1050
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
@@ -958,8 +1072,8 @@ module OCI
958
1072
 
959
1073
  # Header Params
960
1074
  header_params = {}
961
- header_params['accept'] = 'application/json'
962
- header_params['content-type'] = 'application/json'
1075
+ header_params[:accept] = 'application/json'
1076
+ header_params[:'content-type'] = 'application/json'
963
1077
  # rubocop:enable Style/NegatedIf
964
1078
 
965
1079
  post_body = nil
@@ -1011,8 +1125,8 @@ module OCI
1011
1125
 
1012
1126
  # Header Params
1013
1127
  header_params = {}
1014
- header_params['accept'] = 'application/json'
1015
- header_params['content-type'] = 'application/json'
1128
+ header_params[:accept] = 'application/json'
1129
+ header_params[:'content-type'] = 'application/json'
1016
1130
  # rubocop:enable Style/NegatedIf
1017
1131
 
1018
1132
  post_body = nil
@@ -1037,6 +1151,63 @@ module OCI
1037
1151
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1038
1152
  # rubocop:enable Lint/UnusedMethodArgument
1039
1153
 
1154
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1155
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1156
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1157
+
1158
+
1159
+ # Gets kms key id for the specified boot volume.
1160
+ #
1161
+ # @param [String] boot_volume_id The OCID of the boot volume.
1162
+ # @param [Hash] opts the optional parameters
1163
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1164
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1165
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1166
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1167
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1168
+ #
1169
+ # @return [Response] A Response object with data of type {OCI::Core::Models::BootVolumeKmsKey BootVolumeKmsKey}
1170
+ def get_boot_volume_kms_key(boot_volume_id, opts = {})
1171
+ logger.debug 'Calling operation BlockstorageClient#get_boot_volume_kms_key.' if logger
1172
+
1173
+ raise "Missing the required parameter 'boot_volume_id' when calling get_boot_volume_kms_key." if boot_volume_id.nil?
1174
+ raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_id)
1175
+
1176
+ path = '/bootVolumes/{bootVolumeId}/kmsKey'.sub('{bootVolumeId}', boot_volume_id.to_s)
1177
+ operation_signing_strategy = :standard
1178
+
1179
+ # rubocop:disable Style/NegatedIf
1180
+ # Query Params
1181
+ query_params = {}
1182
+
1183
+ # Header Params
1184
+ header_params = {}
1185
+ header_params[:accept] = 'application/json'
1186
+ header_params[:'content-type'] = 'application/json'
1187
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
1188
+ # rubocop:enable Style/NegatedIf
1189
+
1190
+ post_body = nil
1191
+
1192
+ # rubocop:disable Metrics/BlockLength
1193
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#get_boot_volume_kms_key') do
1194
+ @api_client.call_api(
1195
+ :GET,
1196
+ path,
1197
+ endpoint,
1198
+ header_params: header_params,
1199
+ query_params: query_params,
1200
+ operation_signing_strategy: operation_signing_strategy,
1201
+ body: post_body,
1202
+ return_type: 'OCI::Core::Models::BootVolumeKmsKey'
1203
+ )
1204
+ end
1205
+ # rubocop:enable Metrics/BlockLength
1206
+ end
1207
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1208
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1209
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1210
+
1040
1211
  # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1041
1212
  # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1042
1213
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
@@ -1064,8 +1235,8 @@ module OCI
1064
1235
 
1065
1236
  # Header Params
1066
1237
  header_params = {}
1067
- header_params['accept'] = 'application/json'
1068
- header_params['content-type'] = 'application/json'
1238
+ header_params[:accept] = 'application/json'
1239
+ header_params[:'content-type'] = 'application/json'
1069
1240
  # rubocop:enable Style/NegatedIf
1070
1241
 
1071
1242
  post_body = nil
@@ -1117,8 +1288,8 @@ module OCI
1117
1288
 
1118
1289
  # Header Params
1119
1290
  header_params = {}
1120
- header_params['accept'] = 'application/json'
1121
- header_params['content-type'] = 'application/json'
1291
+ header_params[:accept] = 'application/json'
1292
+ header_params[:'content-type'] = 'application/json'
1122
1293
  # rubocop:enable Style/NegatedIf
1123
1294
 
1124
1295
  post_body = nil
@@ -1170,8 +1341,8 @@ module OCI
1170
1341
 
1171
1342
  # Header Params
1172
1343
  header_params = {}
1173
- header_params['accept'] = 'application/json'
1174
- header_params['content-type'] = 'application/json'
1344
+ header_params[:accept] = 'application/json'
1345
+ header_params[:'content-type'] = 'application/json'
1175
1346
  # rubocop:enable Style/NegatedIf
1176
1347
 
1177
1348
  post_body = nil
@@ -1233,8 +1404,8 @@ module OCI
1233
1404
 
1234
1405
  # Header Params
1235
1406
  header_params = {}
1236
- header_params['accept'] = 'application/json'
1237
- header_params['content-type'] = 'application/json'
1407
+ header_params[:accept] = 'application/json'
1408
+ header_params[:'content-type'] = 'application/json'
1238
1409
  # rubocop:enable Style/NegatedIf
1239
1410
 
1240
1411
  post_body = nil
@@ -1285,8 +1456,8 @@ module OCI
1285
1456
 
1286
1457
  # Header Params
1287
1458
  header_params = {}
1288
- header_params['accept'] = 'application/json'
1289
- header_params['content-type'] = 'application/json'
1459
+ header_params[:accept] = 'application/json'
1460
+ header_params[:'content-type'] = 'application/json'
1290
1461
  # rubocop:enable Style/NegatedIf
1291
1462
 
1292
1463
  post_body = nil
@@ -1338,8 +1509,8 @@ module OCI
1338
1509
 
1339
1510
  # Header Params
1340
1511
  header_params = {}
1341
- header_params['accept'] = 'application/json'
1342
- header_params['content-type'] = 'application/json'
1512
+ header_params[:accept] = 'application/json'
1513
+ header_params[:'content-type'] = 'application/json'
1343
1514
  # rubocop:enable Style/NegatedIf
1344
1515
 
1345
1516
  post_body = nil
@@ -1391,8 +1562,8 @@ module OCI
1391
1562
 
1392
1563
  # Header Params
1393
1564
  header_params = {}
1394
- header_params['accept'] = 'application/json'
1395
- header_params['content-type'] = 'application/json'
1565
+ header_params[:accept] = 'application/json'
1566
+ header_params[:'content-type'] = 'application/json'
1396
1567
  # rubocop:enable Style/NegatedIf
1397
1568
 
1398
1569
  post_body = nil
@@ -1422,6 +1593,63 @@ module OCI
1422
1593
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1423
1594
 
1424
1595
 
1596
+ # Gets kms key id for the specified volume.
1597
+ #
1598
+ # @param [String] volume_id The OCID of the volume.
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 the operation will not retry
1602
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
1603
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
1604
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
1605
+ #
1606
+ # @return [Response] A Response object with data of type {OCI::Core::Models::VolumeKmsKey VolumeKmsKey}
1607
+ def get_volume_kms_key(volume_id, opts = {})
1608
+ logger.debug 'Calling operation BlockstorageClient#get_volume_kms_key.' if logger
1609
+
1610
+ raise "Missing the required parameter 'volume_id' when calling get_volume_kms_key." if volume_id.nil?
1611
+ raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_id)
1612
+
1613
+ path = '/volumes/{volumeId}/kmsKey'.sub('{volumeId}', volume_id.to_s)
1614
+ operation_signing_strategy = :standard
1615
+
1616
+ # rubocop:disable Style/NegatedIf
1617
+ # Query Params
1618
+ query_params = {}
1619
+
1620
+ # Header Params
1621
+ header_params = {}
1622
+ header_params[:accept] = 'application/json'
1623
+ header_params[:'content-type'] = 'application/json'
1624
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
1625
+ # rubocop:enable Style/NegatedIf
1626
+
1627
+ post_body = nil
1628
+
1629
+ # rubocop:disable Metrics/BlockLength
1630
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#get_volume_kms_key') do
1631
+ @api_client.call_api(
1632
+ :GET,
1633
+ path,
1634
+ endpoint,
1635
+ header_params: header_params,
1636
+ query_params: query_params,
1637
+ operation_signing_strategy: operation_signing_strategy,
1638
+ body: post_body,
1639
+ return_type: 'OCI::Core::Models::VolumeKmsKey'
1640
+ )
1641
+ end
1642
+ # rubocop:enable Metrics/BlockLength
1643
+ end
1644
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1645
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1646
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1647
+
1648
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1649
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1650
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1651
+
1652
+
1425
1653
  # Lists the boot volume backups in the specified compartment. You can filter the results by boot volume.
1426
1654
  #
1427
1655
  # @param [String] compartment_id The OCID of the compartment.
@@ -1488,8 +1716,8 @@ module OCI
1488
1716
 
1489
1717
  # Header Params
1490
1718
  header_params = {}
1491
- header_params['accept'] = 'application/json'
1492
- header_params['content-type'] = 'application/json'
1719
+ header_params[:accept] = 'application/json'
1720
+ header_params[:'content-type'] = 'application/json'
1493
1721
  # rubocop:enable Style/NegatedIf
1494
1722
 
1495
1723
  post_body = nil
@@ -1556,8 +1784,8 @@ module OCI
1556
1784
 
1557
1785
  # Header Params
1558
1786
  header_params = {}
1559
- header_params['accept'] = 'application/json'
1560
- header_params['content-type'] = 'application/json'
1787
+ header_params[:accept] = 'application/json'
1788
+ header_params[:'content-type'] = 'application/json'
1561
1789
  # rubocop:enable Style/NegatedIf
1562
1790
 
1563
1791
  post_body = nil
@@ -1612,8 +1840,8 @@ module OCI
1612
1840
 
1613
1841
  # Header Params
1614
1842
  header_params = {}
1615
- header_params['accept'] = 'application/json'
1616
- header_params['content-type'] = 'application/json'
1843
+ header_params[:accept] = 'application/json'
1844
+ header_params[:'content-type'] = 'application/json'
1617
1845
  # rubocop:enable Style/NegatedIf
1618
1846
 
1619
1847
  post_body = nil
@@ -1708,8 +1936,8 @@ module OCI
1708
1936
 
1709
1937
  # Header Params
1710
1938
  header_params = {}
1711
- header_params['accept'] = 'application/json'
1712
- header_params['content-type'] = 'application/json'
1939
+ header_params[:accept] = 'application/json'
1940
+ header_params[:'content-type'] = 'application/json'
1713
1941
  # rubocop:enable Style/NegatedIf
1714
1942
 
1715
1943
  post_body = nil
@@ -1798,8 +2026,8 @@ module OCI
1798
2026
 
1799
2027
  # Header Params
1800
2028
  header_params = {}
1801
- header_params['accept'] = 'application/json'
1802
- header_params['content-type'] = 'application/json'
2029
+ header_params[:accept] = 'application/json'
2030
+ header_params[:'content-type'] = 'application/json'
1803
2031
  # rubocop:enable Style/NegatedIf
1804
2032
 
1805
2033
  post_body = nil
@@ -1897,8 +2125,8 @@ module OCI
1897
2125
 
1898
2126
  # Header Params
1899
2127
  header_params = {}
1900
- header_params['accept'] = 'application/json'
1901
- header_params['content-type'] = 'application/json'
2128
+ header_params[:accept] = 'application/json'
2129
+ header_params[:'content-type'] = 'application/json'
1902
2130
  # rubocop:enable Style/NegatedIf
1903
2131
 
1904
2132
  post_body = nil
@@ -1998,8 +2226,8 @@ module OCI
1998
2226
 
1999
2227
  # Header Params
2000
2228
  header_params = {}
2001
- header_params['accept'] = 'application/json'
2002
- header_params['content-type'] = 'application/json'
2229
+ header_params[:accept] = 'application/json'
2230
+ header_params[:'content-type'] = 'application/json'
2003
2231
  # rubocop:enable Style/NegatedIf
2004
2232
 
2005
2233
  post_body = nil
@@ -2055,8 +2283,8 @@ module OCI
2055
2283
 
2056
2284
  # Header Params
2057
2285
  header_params = {}
2058
- header_params['accept'] = 'application/json'
2059
- header_params['content-type'] = 'application/json'
2286
+ header_params[:accept] = 'application/json'
2287
+ header_params[:'content-type'] = 'application/json'
2060
2288
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2061
2289
  # rubocop:enable Style/NegatedIf
2062
2290
 
@@ -2115,8 +2343,8 @@ module OCI
2115
2343
 
2116
2344
  # Header Params
2117
2345
  header_params = {}
2118
- header_params['accept'] = 'application/json'
2119
- header_params['content-type'] = 'application/json'
2346
+ header_params[:accept] = 'application/json'
2347
+ header_params[:'content-type'] = 'application/json'
2120
2348
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2121
2349
  # rubocop:enable Style/NegatedIf
2122
2350
 
@@ -2146,6 +2374,65 @@ module OCI
2146
2374
  # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
2147
2375
 
2148
2376
 
2377
+ # Update kms key id for the specific volume.
2378
+ #
2379
+ # @param [String] boot_volume_id The OCID of the boot volume.
2380
+ # @param [OCI::Core::Models::UpdateBootVolumeKmsKeyDetails] update_boot_volume_kms_key_details Update kms key id for the specific boot volume.
2381
+ # @param [Hash] opts the optional parameters
2382
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2383
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
2384
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2385
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2386
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
2387
+ #
2388
+ # @return [Response] A Response object with data of type {OCI::Core::Models::BootVolumeKmsKey BootVolumeKmsKey}
2389
+ def update_boot_volume_kms_key(boot_volume_id, update_boot_volume_kms_key_details, opts = {})
2390
+ logger.debug 'Calling operation BlockstorageClient#update_boot_volume_kms_key.' if logger
2391
+
2392
+ raise "Missing the required parameter 'boot_volume_id' when calling update_boot_volume_kms_key." if boot_volume_id.nil?
2393
+ raise "Missing the required parameter 'update_boot_volume_kms_key_details' when calling update_boot_volume_kms_key." if update_boot_volume_kms_key_details.nil?
2394
+ raise "Parameter value for 'boot_volume_id' must not be blank" if OCI::Internal::Util.blank_string?(boot_volume_id)
2395
+
2396
+ path = '/bootVolumes/{bootVolumeId}/kmsKey'.sub('{bootVolumeId}', boot_volume_id.to_s)
2397
+ operation_signing_strategy = :standard
2398
+
2399
+ # rubocop:disable Style/NegatedIf
2400
+ # Query Params
2401
+ query_params = {}
2402
+
2403
+ # Header Params
2404
+ header_params = {}
2405
+ header_params[:accept] = 'application/json'
2406
+ header_params[:'content-type'] = 'application/json'
2407
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2408
+ # rubocop:enable Style/NegatedIf
2409
+
2410
+ post_body = @api_client.object_to_http_body(update_boot_volume_kms_key_details)
2411
+
2412
+ # rubocop:disable Metrics/BlockLength
2413
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#update_boot_volume_kms_key') do
2414
+ @api_client.call_api(
2415
+ :PUT,
2416
+ path,
2417
+ endpoint,
2418
+ header_params: header_params,
2419
+ query_params: query_params,
2420
+ operation_signing_strategy: operation_signing_strategy,
2421
+ body: post_body,
2422
+ return_type: 'OCI::Core::Models::BootVolumeKmsKey'
2423
+ )
2424
+ end
2425
+ # rubocop:enable Metrics/BlockLength
2426
+ end
2427
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2428
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
2429
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
2430
+
2431
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2432
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
2433
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
2434
+
2435
+
2149
2436
  # Updates the specified volume's display name.
2150
2437
  # Avoid entering confidential information.
2151
2438
  #
@@ -2175,8 +2462,8 @@ module OCI
2175
2462
 
2176
2463
  # Header Params
2177
2464
  header_params = {}
2178
- header_params['accept'] = 'application/json'
2179
- header_params['content-type'] = 'application/json'
2465
+ header_params[:accept] = 'application/json'
2466
+ header_params[:'content-type'] = 'application/json'
2180
2467
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2181
2468
  # rubocop:enable Style/NegatedIf
2182
2469
 
@@ -2235,8 +2522,8 @@ module OCI
2235
2522
 
2236
2523
  # Header Params
2237
2524
  header_params = {}
2238
- header_params['accept'] = 'application/json'
2239
- header_params['content-type'] = 'application/json'
2525
+ header_params[:accept] = 'application/json'
2526
+ header_params[:'content-type'] = 'application/json'
2240
2527
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2241
2528
  # rubocop:enable Style/NegatedIf
2242
2529
 
@@ -2299,8 +2586,8 @@ module OCI
2299
2586
 
2300
2587
  # Header Params
2301
2588
  header_params = {}
2302
- header_params['accept'] = 'application/json'
2303
- header_params['content-type'] = 'application/json'
2589
+ header_params[:accept] = 'application/json'
2590
+ header_params[:'content-type'] = 'application/json'
2304
2591
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2305
2592
  # rubocop:enable Style/NegatedIf
2306
2593
 
@@ -2357,8 +2644,8 @@ module OCI
2357
2644
 
2358
2645
  # Header Params
2359
2646
  header_params = {}
2360
- header_params['accept'] = 'application/json'
2361
- header_params['content-type'] = 'application/json'
2647
+ header_params[:accept] = 'application/json'
2648
+ header_params[:'content-type'] = 'application/json'
2362
2649
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2363
2650
  # rubocop:enable Style/NegatedIf
2364
2651
 
@@ -2383,6 +2670,65 @@ module OCI
2383
2670
  # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
2384
2671
  # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
2385
2672
 
2673
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2674
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
2675
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
2676
+
2677
+
2678
+ # Update kms key id for the specific volume.
2679
+ #
2680
+ # @param [String] volume_id The OCID of the volume.
2681
+ # @param [OCI::Core::Models::UpdateVolumeKmsKeyDetails] update_volume_kms_key_details Update kms key id for the specific volume.
2682
+ # @param [Hash] opts the optional parameters
2683
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
2684
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
2685
+ # @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
2686
+ # parameter to the value of the etag from a previous GET or POST response for that resource. The resource
2687
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
2688
+ #
2689
+ # @return [Response] A Response object with data of type {OCI::Core::Models::VolumeKmsKey VolumeKmsKey}
2690
+ def update_volume_kms_key(volume_id, update_volume_kms_key_details, opts = {})
2691
+ logger.debug 'Calling operation BlockstorageClient#update_volume_kms_key.' if logger
2692
+
2693
+ raise "Missing the required parameter 'volume_id' when calling update_volume_kms_key." if volume_id.nil?
2694
+ raise "Missing the required parameter 'update_volume_kms_key_details' when calling update_volume_kms_key." if update_volume_kms_key_details.nil?
2695
+ raise "Parameter value for 'volume_id' must not be blank" if OCI::Internal::Util.blank_string?(volume_id)
2696
+
2697
+ path = '/volumes/{volumeId}/kmsKey'.sub('{volumeId}', volume_id.to_s)
2698
+ operation_signing_strategy = :standard
2699
+
2700
+ # rubocop:disable Style/NegatedIf
2701
+ # Query Params
2702
+ query_params = {}
2703
+
2704
+ # Header Params
2705
+ header_params = {}
2706
+ header_params[:accept] = 'application/json'
2707
+ header_params[:'content-type'] = 'application/json'
2708
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
2709
+ # rubocop:enable Style/NegatedIf
2710
+
2711
+ post_body = @api_client.object_to_http_body(update_volume_kms_key_details)
2712
+
2713
+ # rubocop:disable Metrics/BlockLength
2714
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'BlockstorageClient#update_volume_kms_key') do
2715
+ @api_client.call_api(
2716
+ :PUT,
2717
+ path,
2718
+ endpoint,
2719
+ header_params: header_params,
2720
+ query_params: query_params,
2721
+ operation_signing_strategy: operation_signing_strategy,
2722
+ body: post_body,
2723
+ return_type: 'OCI::Core::Models::VolumeKmsKey'
2724
+ )
2725
+ end
2726
+ # rubocop:enable Metrics/BlockLength
2727
+ end
2728
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
2729
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
2730
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
2731
+
2386
2732
  private
2387
2733
 
2388
2734
  def applicable_retry_config(opts = {})