oci 2.5.9 → 2.5.10
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/oci/autoscaling/auto_scaling_client.rb +73 -0
- data/lib/oci/autoscaling/autoscaling.rb +1 -0
- data/lib/oci/autoscaling/models/change_auto_scaling_compartment_details.rb +154 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +0 -1
- data/lib/oci/container_engine/models/work_request_error.rb +0 -1
- data/lib/oci/core/blockstorage_client.rb +342 -0
- data/lib/oci/core/compute_client.rb +77 -5
- data/lib/oci/core/compute_client_composite_operations.rb +3 -3
- data/lib/oci/core/compute_management_client.rb +211 -0
- data/lib/oci/core/core.rb +27 -0
- data/lib/oci/core/models/add_network_security_group_security_rules_details.rb +153 -0
- data/lib/oci/core/models/add_security_rule_details.rb +388 -0
- data/lib/oci/core/models/added_network_security_group_security_rules.rb +153 -0
- data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_boot_volume_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_image_compartment_details.rb +154 -0
- data/lib/oci/core/models/change_instance_configuration_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_instance_pool_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_nat_gateway_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_route_table_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_security_list_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_service_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_subnet_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_vcn_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_volume_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_group_compartment_details.rb +153 -0
- data/lib/oci/core/models/create_network_security_group_details.rb +223 -0
- data/lib/oci/core/models/create_vnic_details.rb +18 -1
- data/lib/oci/core/models/image.rb +2 -1
- data/lib/oci/core/models/instance_configuration.rb +3 -1
- data/lib/oci/core/models/instance_configuration_create_vnic_details.rb +18 -1
- data/lib/oci/core/models/instance_configuration_instance_source_via_image_details.rb +15 -1
- data/lib/oci/core/models/instance_configuration_summary.rb +3 -3
- data/lib/oci/core/models/instance_pool.rb +4 -1
- data/lib/oci/core/models/instance_pool_summary.rb +3 -3
- data/lib/oci/core/models/network_security_group.rb +324 -0
- data/lib/oci/core/models/network_security_group_vnic.rb +188 -0
- data/lib/oci/core/models/remove_network_security_group_security_rules_details.rb +154 -0
- data/lib/oci/core/models/security_list.rb +5 -0
- data/lib/oci/core/models/security_rule.rb +455 -0
- data/lib/oci/core/models/update_network_security_group_details.rb +189 -0
- data/lib/oci/core/models/update_network_security_group_security_rules_details.rb +153 -0
- data/lib/oci/core/models/update_security_rule_details.rb +404 -0
- data/lib/oci/core/models/update_vnic_details.rb +20 -1
- data/lib/oci/core/models/updated_network_security_group_security_rules.rb +153 -0
- data/lib/oci/core/models/vnic.rb +18 -1
- data/lib/oci/core/virtual_network_client.rb +1228 -132
- data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
- data/lib/oci/database/database.rb +19 -0
- data/lib/oci/database/database_client.rb +1066 -46
- data/lib/oci/database/database_client_composite_operations.rb +317 -0
- data/lib/oci/database/models/autonomous_container_database.rb +416 -0
- data/lib/oci/database/models/autonomous_container_database_backup_config.rb +157 -0
- data/lib/oci/database/models/autonomous_container_database_summary.rb +420 -0
- data/lib/oci/database/models/autonomous_database.rb +58 -1
- data/lib/oci/database/models/autonomous_database_backup.rb +16 -1
- data/lib/oci/database/models/autonomous_database_backup_summary.rb +16 -1
- data/lib/oci/database/models/autonomous_database_connection_strings.rb +11 -1
- data/lib/oci/database/models/autonomous_database_connection_urls.rb +170 -0
- data/lib/oci/database/models/autonomous_database_summary.rb +58 -1
- data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +224 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure.rb +419 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_maintenance_window.rb +186 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_shape_summary.rb +224 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_summary.rb +436 -0
- data/lib/oci/database/models/backup.rb +1 -0
- data/lib/oci/database/models/backup_summary.rb +1 -0
- data/lib/oci/database/models/create_autonomous_container_database_details.rb +284 -0
- data/lib/oci/database/models/create_autonomous_database_base.rb +46 -1
- data/lib/oci/database/models/create_autonomous_database_clone_details.rb +13 -1
- data/lib/oci/database/models/create_autonomous_database_details.rb +13 -1
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +34 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
- data/lib/oci/database/models/day_of_week.rb +174 -0
- data/lib/oci/database/models/db_system.rb +34 -1
- data/lib/oci/database/models/db_system_summary.rb +34 -1
- data/lib/oci/database/models/launch_autonomous_exadata_infrastructure_details.rb +304 -0
- data/lib/oci/database/models/launch_db_system_base.rb +35 -2
- data/lib/oci/database/models/launch_db_system_details.rb +11 -2
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +11 -2
- data/lib/oci/database/models/maintenance_run.rb +392 -0
- data/lib/oci/database/models/maintenance_run_summary.rb +395 -0
- data/lib/oci/database/models/maintenance_window.rb +226 -0
- data/lib/oci/database/models/month.rb +179 -0
- data/lib/oci/database/models/restore_autonomous_database_details.rb +30 -4
- data/lib/oci/database/models/update_autonomous_container_database_details.rb +230 -0
- data/lib/oci/database/models/update_autonomous_database_details.rb +18 -1
- data/lib/oci/database/models/update_autonomous_exadata_infrastructure_details.rb +203 -0
- data/lib/oci/database/models/update_db_system_details.rb +37 -4
- data/lib/oci/database/models/update_maintenance_run_details.rb +154 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +62 -0
- data/lib/oci/email/models/change_sender_compartment_details.rb +157 -0
- data/lib/oci/key_management/key_management.rb +1 -0
- data/lib/oci/key_management/kms_crypto_client.rb +4 -4
- data/lib/oci/key_management/kms_management_client.rb +161 -10
- data/lib/oci/key_management/kms_management_client_composite_operations.rb +79 -0
- data/lib/oci/key_management/kms_vault_client.rb +16 -11
- data/lib/oci/key_management/models/key.rb +17 -1
- data/lib/oci/key_management/models/schedule_key_deletion_details.rb +156 -0
- data/lib/oci/load_balancer/load_balancer.rb +1 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +64 -0
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +16 -1
- data/lib/oci/load_balancer/models/remove_http_request_header_rule.rb +1 -1
- data/lib/oci/load_balancer/models/remove_http_response_header_rule.rb +1 -1
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +9 -5
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -0
- data/lib/oci/load_balancer/models/update_network_security_groups_details.rb +154 -0
- data/lib/oci/monitoring/models/metric.rb +1 -0
- data/lib/oci/object_storage/models/work_request_error.rb +1 -0
- data/lib/oci/resource_manager/models/change_stack_compartment_details.rb +155 -0
- data/lib/oci/resource_manager/models/work_request.rb +293 -0
- data/lib/oci/resource_manager/models/work_request_error.rb +170 -0
- data/lib/oci/resource_manager/models/work_request_log_entry.rb +159 -0
- data/lib/oci/resource_manager/models/work_request_resource.rb +217 -0
- data/lib/oci/resource_manager/models/work_request_summary.rb +254 -0
- data/lib/oci/resource_manager/resource_manager.rb +6 -0
- data/lib/oci/resource_manager/resource_manager_client.rb +338 -0
- data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +50 -0
- data/lib/oci/streaming/stream_admin_client.rb +2 -2
- data/lib/oci/streaming/stream_client.rb +1 -1
- data/lib/oci/version.rb +1 -1
- metadata +58 -2
|
@@ -23,6 +23,7 @@ require 'oci/key_management/models/key_shape'
|
|
|
23
23
|
require 'oci/key_management/models/key_summary'
|
|
24
24
|
require 'oci/key_management/models/key_version'
|
|
25
25
|
require 'oci/key_management/models/key_version_summary'
|
|
26
|
+
require 'oci/key_management/models/schedule_key_deletion_details'
|
|
26
27
|
require 'oci/key_management/models/schedule_vault_deletion_details'
|
|
27
28
|
require 'oci/key_management/models/update_key_details'
|
|
28
29
|
require 'oci/key_management/models/update_vault_details'
|
|
@@ -42,7 +42,7 @@ module OCI
|
|
|
42
42
|
def initialize(config: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
|
43
43
|
raise 'A fully qualified endpoint URL must be defined' unless endpoint
|
|
44
44
|
|
|
45
|
-
@endpoint = endpoint + '/
|
|
45
|
+
@endpoint = endpoint + '/'
|
|
46
46
|
|
|
47
47
|
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
|
48
48
|
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
|
@@ -98,7 +98,7 @@ module OCI
|
|
|
98
98
|
|
|
99
99
|
raise "Missing the required parameter 'decrypt_data_details' when calling decrypt." if decrypt_data_details.nil?
|
|
100
100
|
|
|
101
|
-
path = '/decrypt'
|
|
101
|
+
path = '/20180608/decrypt'
|
|
102
102
|
operation_signing_strategy = :standard
|
|
103
103
|
|
|
104
104
|
# rubocop:disable Style/NegatedIf
|
|
@@ -156,7 +156,7 @@ module OCI
|
|
|
156
156
|
|
|
157
157
|
raise "Missing the required parameter 'encrypt_data_details' when calling encrypt." if encrypt_data_details.nil?
|
|
158
158
|
|
|
159
|
-
path = '/encrypt'
|
|
159
|
+
path = '/20180608/encrypt'
|
|
160
160
|
operation_signing_strategy = :standard
|
|
161
161
|
|
|
162
162
|
# rubocop:disable Style/NegatedIf
|
|
@@ -212,7 +212,7 @@ module OCI
|
|
|
212
212
|
|
|
213
213
|
raise "Missing the required parameter 'generate_key_details' when calling generate_data_encryption_key." if generate_key_details.nil?
|
|
214
214
|
|
|
215
|
-
path = '/generateDataEncryptionKey'
|
|
215
|
+
path = '/20180608/generateDataEncryptionKey'
|
|
216
216
|
operation_signing_strategy = :standard
|
|
217
217
|
|
|
218
218
|
# rubocop:disable Style/NegatedIf
|
|
@@ -42,7 +42,7 @@ module OCI
|
|
|
42
42
|
def initialize(config: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
|
43
43
|
raise 'A fully qualified endpoint URL must be defined' unless endpoint
|
|
44
44
|
|
|
45
|
-
@endpoint = endpoint + '/
|
|
45
|
+
@endpoint = endpoint + '/'
|
|
46
46
|
|
|
47
47
|
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
|
48
48
|
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
|
@@ -82,6 +82,81 @@ module OCI
|
|
|
82
82
|
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
83
83
|
|
|
84
84
|
|
|
85
|
+
# Cancels the scheduled deletion of the specified key. Canceling
|
|
86
|
+
# a scheduled deletion restores the key to the respective
|
|
87
|
+
# states they were in before the deletion was scheduled.
|
|
88
|
+
#
|
|
89
|
+
# @param [String] key_id The OCID of the key.
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
92
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
93
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a
|
|
94
|
+
# resource, set the `if-match` parameter to the value of the etag from a
|
|
95
|
+
# previous GET or POST response for that resource. The resource will be
|
|
96
|
+
# updated or deleted only if the etag you provide matches the resource's
|
|
97
|
+
# current etag value.
|
|
98
|
+
#
|
|
99
|
+
# @option opts [String] :opc_request_id Unique identifier for the request. If provided, the returned request ID
|
|
100
|
+
# will include this value. Otherwise, a random request ID will be
|
|
101
|
+
# generated by the service.
|
|
102
|
+
#
|
|
103
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case
|
|
104
|
+
# of a timeout or server error without risk of executing that same action
|
|
105
|
+
# again. Retry tokens expire after 24 hours, but can be invalidated
|
|
106
|
+
# before then due to conflicting operations (e.g., if a resource has been
|
|
107
|
+
# deleted and purged from the system, then a retry of the original
|
|
108
|
+
# creation request may be rejected).
|
|
109
|
+
#
|
|
110
|
+
# @return [Response] A Response object with data of type {OCI::KeyManagement::Models::Key Key}
|
|
111
|
+
def cancel_key_deletion(key_id, opts = {})
|
|
112
|
+
logger.debug 'Calling operation KmsManagementClient#cancel_key_deletion.' if logger
|
|
113
|
+
|
|
114
|
+
raise "Missing the required parameter 'key_id' when calling cancel_key_deletion." if key_id.nil?
|
|
115
|
+
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
116
|
+
|
|
117
|
+
path = '/20180608/keys/{keyId}/actions/cancelDeletion'.sub('{keyId}', key_id.to_s)
|
|
118
|
+
operation_signing_strategy = :standard
|
|
119
|
+
|
|
120
|
+
# rubocop:disable Style/NegatedIf
|
|
121
|
+
# Query Params
|
|
122
|
+
query_params = {}
|
|
123
|
+
|
|
124
|
+
# Header Params
|
|
125
|
+
header_params = {}
|
|
126
|
+
header_params[:accept] = 'application/json'
|
|
127
|
+
header_params[:'content-type'] = 'application/json'
|
|
128
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
129
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
130
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
131
|
+
# rubocop:enable Style/NegatedIf
|
|
132
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
133
|
+
|
|
134
|
+
post_body = nil
|
|
135
|
+
|
|
136
|
+
# rubocop:disable Metrics/BlockLength
|
|
137
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'KmsManagementClient#cancel_key_deletion') do
|
|
138
|
+
@api_client.call_api(
|
|
139
|
+
:POST,
|
|
140
|
+
path,
|
|
141
|
+
endpoint,
|
|
142
|
+
header_params: header_params,
|
|
143
|
+
query_params: query_params,
|
|
144
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
145
|
+
body: post_body,
|
|
146
|
+
return_type: 'OCI::KeyManagement::Models::Key'
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
# rubocop:enable Metrics/BlockLength
|
|
150
|
+
end
|
|
151
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
152
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
153
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
154
|
+
|
|
155
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
156
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
157
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
158
|
+
|
|
159
|
+
|
|
85
160
|
# Creates a new key.
|
|
86
161
|
# @param [OCI::KeyManagement::Models::CreateKeyDetails] create_key_details CreateKeyDetails
|
|
87
162
|
# @param [Hash] opts the optional parameters
|
|
@@ -104,7 +179,7 @@ module OCI
|
|
|
104
179
|
|
|
105
180
|
raise "Missing the required parameter 'create_key_details' when calling create_key." if create_key_details.nil?
|
|
106
181
|
|
|
107
|
-
path = '/keys'
|
|
182
|
+
path = '/20180608/keys'
|
|
108
183
|
operation_signing_strategy = :standard
|
|
109
184
|
|
|
110
185
|
# rubocop:disable Style/NegatedIf
|
|
@@ -171,7 +246,7 @@ module OCI
|
|
|
171
246
|
raise "Missing the required parameter 'key_id' when calling create_key_version." if key_id.nil?
|
|
172
247
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
173
248
|
|
|
174
|
-
path = '/keys/{keyId}/keyVersions'.sub('{keyId}', key_id.to_s)
|
|
249
|
+
path = '/20180608/keys/{keyId}/keyVersions'.sub('{keyId}', key_id.to_s)
|
|
175
250
|
operation_signing_strategy = :standard
|
|
176
251
|
|
|
177
252
|
# rubocop:disable Style/NegatedIf
|
|
@@ -244,7 +319,7 @@ module OCI
|
|
|
244
319
|
raise "Missing the required parameter 'key_id' when calling disable_key." if key_id.nil?
|
|
245
320
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
246
321
|
|
|
247
|
-
path = '/keys/{keyId}/actions/disable'.sub('{keyId}', key_id.to_s)
|
|
322
|
+
path = '/20180608/keys/{keyId}/actions/disable'.sub('{keyId}', key_id.to_s)
|
|
248
323
|
operation_signing_strategy = :standard
|
|
249
324
|
|
|
250
325
|
# rubocop:disable Style/NegatedIf
|
|
@@ -318,7 +393,7 @@ module OCI
|
|
|
318
393
|
raise "Missing the required parameter 'key_id' when calling enable_key." if key_id.nil?
|
|
319
394
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
320
395
|
|
|
321
|
-
path = '/keys/{keyId}/actions/enable'.sub('{keyId}', key_id.to_s)
|
|
396
|
+
path = '/20180608/keys/{keyId}/actions/enable'.sub('{keyId}', key_id.to_s)
|
|
322
397
|
operation_signing_strategy = :standard
|
|
323
398
|
|
|
324
399
|
# rubocop:disable Style/NegatedIf
|
|
@@ -378,7 +453,7 @@ module OCI
|
|
|
378
453
|
raise "Missing the required parameter 'key_id' when calling get_key." if key_id.nil?
|
|
379
454
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
380
455
|
|
|
381
|
-
path = '/keys/{keyId}'.sub('{keyId}', key_id.to_s)
|
|
456
|
+
path = '/20180608/keys/{keyId}'.sub('{keyId}', key_id.to_s)
|
|
382
457
|
operation_signing_strategy = :standard
|
|
383
458
|
|
|
384
459
|
# rubocop:disable Style/NegatedIf
|
|
@@ -438,7 +513,7 @@ module OCI
|
|
|
438
513
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
439
514
|
raise "Parameter value for 'key_version_id' must not be blank" if OCI::Internal::Util.blank_string?(key_version_id)
|
|
440
515
|
|
|
441
|
-
path = '/keys/{keyId}/keyVersions/{keyVersionId}'.sub('{keyId}', key_id.to_s).sub('{keyVersionId}', key_version_id.to_s)
|
|
516
|
+
path = '/20180608/keys/{keyId}/keyVersions/{keyVersionId}'.sub('{keyId}', key_id.to_s).sub('{keyVersionId}', key_version_id.to_s)
|
|
442
517
|
operation_signing_strategy = :standard
|
|
443
518
|
|
|
444
519
|
# rubocop:disable Style/NegatedIf
|
|
@@ -516,7 +591,7 @@ module OCI
|
|
|
516
591
|
end
|
|
517
592
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
518
593
|
|
|
519
|
-
path = '/keys/{keyId}/keyVersions'.sub('{keyId}', key_id.to_s)
|
|
594
|
+
path = '/20180608/keys/{keyId}/keyVersions'.sub('{keyId}', key_id.to_s)
|
|
520
595
|
operation_signing_strategy = :standard
|
|
521
596
|
|
|
522
597
|
# rubocop:disable Style/NegatedIf
|
|
@@ -597,7 +672,7 @@ module OCI
|
|
|
597
672
|
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
598
673
|
end
|
|
599
674
|
|
|
600
|
-
path = '/keys'
|
|
675
|
+
path = '/20180608/keys'
|
|
601
676
|
operation_signing_strategy = :standard
|
|
602
677
|
|
|
603
678
|
# rubocop:disable Style/NegatedIf
|
|
@@ -642,6 +717,82 @@ module OCI
|
|
|
642
717
|
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
643
718
|
|
|
644
719
|
|
|
720
|
+
# Schedules the deletion of the specified key. This sets the state of the key
|
|
721
|
+
# to `PENDING_DELETION` and then deletes it after the retention period ends.
|
|
722
|
+
#
|
|
723
|
+
# @param [String] key_id The OCID of the key.
|
|
724
|
+
# @param [OCI::KeyManagement::Models::ScheduleKeyDeletionDetails] schedule_key_deletion_details ScheduleKeyDeletionDetails
|
|
725
|
+
# @param [Hash] opts the optional parameters
|
|
726
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
727
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
728
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a
|
|
729
|
+
# resource, set the `if-match` parameter to the value of the etag from a
|
|
730
|
+
# previous GET or POST response for that resource. The resource will be
|
|
731
|
+
# updated or deleted only if the etag you provide matches the resource's
|
|
732
|
+
# current etag value.
|
|
733
|
+
#
|
|
734
|
+
# @option opts [String] :opc_request_id Unique identifier for the request. If provided, the returned request ID
|
|
735
|
+
# will include this value. Otherwise, a random request ID will be
|
|
736
|
+
# generated by the service.
|
|
737
|
+
#
|
|
738
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case
|
|
739
|
+
# of a timeout or server error without risk of executing that same action
|
|
740
|
+
# again. Retry tokens expire after 24 hours, but can be invalidated
|
|
741
|
+
# before then due to conflicting operations (e.g., if a resource has been
|
|
742
|
+
# deleted and purged from the system, then a retry of the original
|
|
743
|
+
# creation request may be rejected).
|
|
744
|
+
#
|
|
745
|
+
# @return [Response] A Response object with data of type {OCI::KeyManagement::Models::Key Key}
|
|
746
|
+
def schedule_key_deletion(key_id, schedule_key_deletion_details, opts = {})
|
|
747
|
+
logger.debug 'Calling operation KmsManagementClient#schedule_key_deletion.' if logger
|
|
748
|
+
|
|
749
|
+
raise "Missing the required parameter 'key_id' when calling schedule_key_deletion." if key_id.nil?
|
|
750
|
+
raise "Missing the required parameter 'schedule_key_deletion_details' when calling schedule_key_deletion." if schedule_key_deletion_details.nil?
|
|
751
|
+
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
752
|
+
|
|
753
|
+
path = '/20180608/keys/{keyId}/actions/scheduleDeletion'.sub('{keyId}', key_id.to_s)
|
|
754
|
+
operation_signing_strategy = :standard
|
|
755
|
+
|
|
756
|
+
# rubocop:disable Style/NegatedIf
|
|
757
|
+
# Query Params
|
|
758
|
+
query_params = {}
|
|
759
|
+
|
|
760
|
+
# Header Params
|
|
761
|
+
header_params = {}
|
|
762
|
+
header_params[:accept] = 'application/json'
|
|
763
|
+
header_params[:'content-type'] = 'application/json'
|
|
764
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
765
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
766
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
767
|
+
# rubocop:enable Style/NegatedIf
|
|
768
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
769
|
+
|
|
770
|
+
post_body = @api_client.object_to_http_body(schedule_key_deletion_details)
|
|
771
|
+
|
|
772
|
+
# rubocop:disable Metrics/BlockLength
|
|
773
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'KmsManagementClient#schedule_key_deletion') do
|
|
774
|
+
@api_client.call_api(
|
|
775
|
+
:POST,
|
|
776
|
+
path,
|
|
777
|
+
endpoint,
|
|
778
|
+
header_params: header_params,
|
|
779
|
+
query_params: query_params,
|
|
780
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
781
|
+
body: post_body,
|
|
782
|
+
return_type: 'OCI::KeyManagement::Models::Key'
|
|
783
|
+
)
|
|
784
|
+
end
|
|
785
|
+
# rubocop:enable Metrics/BlockLength
|
|
786
|
+
end
|
|
787
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
788
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
789
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
790
|
+
|
|
791
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
792
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
793
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
794
|
+
|
|
795
|
+
|
|
645
796
|
# Updates the properties of a key. Specifically, you can update the
|
|
646
797
|
# `displayName`, `freeformTags`, and `definedTags` properties. Furthermore,
|
|
647
798
|
# the key must in an `ACTIVE` or `CREATING` state to be updated.
|
|
@@ -669,7 +820,7 @@ module OCI
|
|
|
669
820
|
raise "Missing the required parameter 'update_key_details' when calling update_key." if update_key_details.nil?
|
|
670
821
|
raise "Parameter value for 'key_id' must not be blank" if OCI::Internal::Util.blank_string?(key_id)
|
|
671
822
|
|
|
672
|
-
path = '/keys/{keyId}'.sub('{keyId}', key_id.to_s)
|
|
823
|
+
path = '/20180608/keys/{keyId}'.sub('{keyId}', key_id.to_s)
|
|
673
824
|
operation_signing_strategy = :standard
|
|
674
825
|
|
|
675
826
|
# rubocop:disable Style/NegatedIf
|
|
@@ -24,6 +24,45 @@ module OCI
|
|
|
24
24
|
# rubocop:disable Layout/EmptyLines
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
# Calls {OCI::KeyManagement::KmsManagementClient#cancel_key_deletion} and then waits for the {OCI::KeyManagement::Models::Key} acted upon
|
|
28
|
+
# to enter the given state(s).
|
|
29
|
+
#
|
|
30
|
+
# @param [String] key_id The OCID of the key.
|
|
31
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::KeyManagement::Models::Key#lifecycle_state}
|
|
32
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::KeyManagement::KmsManagementClient#cancel_key_deletion}
|
|
33
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
34
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
35
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
36
|
+
#
|
|
37
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::KeyManagement::Models::Key}
|
|
38
|
+
def cancel_key_deletion_and_wait_for_state(key_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
39
|
+
operation_result = @service_client.cancel_key_deletion(key_id, base_operation_opts)
|
|
40
|
+
|
|
41
|
+
return operation_result if wait_for_states.empty?
|
|
42
|
+
|
|
43
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
44
|
+
wait_for_resource_id = operation_result.data.id
|
|
45
|
+
|
|
46
|
+
begin
|
|
47
|
+
waiter_result = @service_client.get_key(wait_for_resource_id).wait_until(
|
|
48
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
49
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
50
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
51
|
+
)
|
|
52
|
+
result_to_return = waiter_result
|
|
53
|
+
|
|
54
|
+
return result_to_return
|
|
55
|
+
rescue StandardError
|
|
56
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
60
|
+
# rubocop:enable Layout/EmptyLines
|
|
61
|
+
|
|
62
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
63
|
+
# rubocop:disable Layout/EmptyLines
|
|
64
|
+
|
|
65
|
+
|
|
27
66
|
# Calls {OCI::KeyManagement::KmsManagementClient#create_key} and then waits for the {OCI::KeyManagement::Models::Key} acted upon
|
|
28
67
|
# to enter the given state(s).
|
|
29
68
|
#
|
|
@@ -141,6 +180,46 @@ module OCI
|
|
|
141
180
|
# rubocop:disable Layout/EmptyLines
|
|
142
181
|
|
|
143
182
|
|
|
183
|
+
# Calls {OCI::KeyManagement::KmsManagementClient#schedule_key_deletion} and then waits for the {OCI::KeyManagement::Models::Key} acted upon
|
|
184
|
+
# to enter the given state(s).
|
|
185
|
+
#
|
|
186
|
+
# @param [String] key_id The OCID of the key.
|
|
187
|
+
# @param [OCI::KeyManagement::Models::ScheduleKeyDeletionDetails] schedule_key_deletion_details ScheduleKeyDeletionDetails
|
|
188
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::KeyManagement::Models::Key#lifecycle_state}
|
|
189
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::KeyManagement::KmsManagementClient#schedule_key_deletion}
|
|
190
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
191
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
192
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
193
|
+
#
|
|
194
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::KeyManagement::Models::Key}
|
|
195
|
+
def schedule_key_deletion_and_wait_for_state(key_id, schedule_key_deletion_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
196
|
+
operation_result = @service_client.schedule_key_deletion(key_id, schedule_key_deletion_details, base_operation_opts)
|
|
197
|
+
|
|
198
|
+
return operation_result if wait_for_states.empty?
|
|
199
|
+
|
|
200
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
201
|
+
wait_for_resource_id = operation_result.data.id
|
|
202
|
+
|
|
203
|
+
begin
|
|
204
|
+
waiter_result = @service_client.get_key(wait_for_resource_id).wait_until(
|
|
205
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
206
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
207
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
208
|
+
)
|
|
209
|
+
result_to_return = waiter_result
|
|
210
|
+
|
|
211
|
+
return result_to_return
|
|
212
|
+
rescue StandardError
|
|
213
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
217
|
+
# rubocop:enable Layout/EmptyLines
|
|
218
|
+
|
|
219
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
220
|
+
# rubocop:disable Layout/EmptyLines
|
|
221
|
+
|
|
222
|
+
|
|
144
223
|
# Calls {OCI::KeyManagement::KmsManagementClient#update_key} and then waits for the {OCI::KeyManagement::Models::Key} acted upon
|
|
145
224
|
# to enter the given state(s).
|
|
146
225
|
#
|
|
@@ -76,7 +76,7 @@ module OCI
|
|
|
76
76
|
@retry_config = retry_config
|
|
77
77
|
|
|
78
78
|
if endpoint
|
|
79
|
-
@endpoint = endpoint + '/
|
|
79
|
+
@endpoint = endpoint + '/'
|
|
80
80
|
else
|
|
81
81
|
region ||= config.region
|
|
82
82
|
region ||= signer.region if signer.respond_to?(:region)
|
|
@@ -94,7 +94,7 @@ module OCI
|
|
|
94
94
|
|
|
95
95
|
raise 'A region must be specified.' unless @region
|
|
96
96
|
|
|
97
|
-
@endpoint = OCI::Regions.get_service_endpoint(@region, :KmsVaultClient) + '/
|
|
97
|
+
@endpoint = OCI::Regions.get_service_endpoint(@region, :KmsVaultClient) + '/'
|
|
98
98
|
logger.info "KmsVaultClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -110,7 +110,8 @@ module OCI
|
|
|
110
110
|
|
|
111
111
|
# Cancels the scheduled deletion of the specified vault. Canceling a scheduled deletion
|
|
112
112
|
# restores the vault and all keys in it to the respective states they were in before
|
|
113
|
-
# the deletion was scheduled.
|
|
113
|
+
# the deletion was scheduled. All the keys that have already been scheduled deletion before the
|
|
114
|
+
# scheduled deletion of the vault will also remain in their state and timeOfDeletion.
|
|
114
115
|
#
|
|
115
116
|
# @param [String] vault_id The OCID of the vault.
|
|
116
117
|
# @param [Hash] opts the optional parameters
|
|
@@ -140,7 +141,7 @@ module OCI
|
|
|
140
141
|
raise "Missing the required parameter 'vault_id' when calling cancel_vault_deletion." if vault_id.nil?
|
|
141
142
|
raise "Parameter value for 'vault_id' must not be blank" if OCI::Internal::Util.blank_string?(vault_id)
|
|
142
143
|
|
|
143
|
-
path = '/vaults/{vaultId}/actions/cancelDeletion'.sub('{vaultId}', vault_id.to_s)
|
|
144
|
+
path = '/20180608/vaults/{vaultId}/actions/cancelDeletion'.sub('{vaultId}', vault_id.to_s)
|
|
144
145
|
operation_signing_strategy = :standard
|
|
145
146
|
|
|
146
147
|
# rubocop:disable Style/NegatedIf
|
|
@@ -209,7 +210,7 @@ module OCI
|
|
|
209
210
|
|
|
210
211
|
raise "Missing the required parameter 'create_vault_details' when calling create_vault." if create_vault_details.nil?
|
|
211
212
|
|
|
212
|
-
path = '/vaults'
|
|
213
|
+
path = '/20180608/vaults'
|
|
213
214
|
operation_signing_strategy = :standard
|
|
214
215
|
|
|
215
216
|
# rubocop:disable Style/NegatedIf
|
|
@@ -268,7 +269,7 @@ module OCI
|
|
|
268
269
|
raise "Missing the required parameter 'vault_id' when calling get_vault." if vault_id.nil?
|
|
269
270
|
raise "Parameter value for 'vault_id' must not be blank" if OCI::Internal::Util.blank_string?(vault_id)
|
|
270
271
|
|
|
271
|
-
path = '/vaults/{vaultId}'.sub('{vaultId}', vault_id.to_s)
|
|
272
|
+
path = '/20180608/vaults/{vaultId}'.sub('{vaultId}', vault_id.to_s)
|
|
272
273
|
operation_signing_strategy = :standard
|
|
273
274
|
|
|
274
275
|
# rubocop:disable Style/NegatedIf
|
|
@@ -345,7 +346,7 @@ module OCI
|
|
|
345
346
|
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
346
347
|
end
|
|
347
348
|
|
|
348
|
-
path = '/vaults'
|
|
349
|
+
path = '/20180608/vaults'
|
|
349
350
|
operation_signing_strategy = :standard
|
|
350
351
|
|
|
351
352
|
# rubocop:disable Style/NegatedIf
|
|
@@ -390,8 +391,12 @@ module OCI
|
|
|
390
391
|
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
391
392
|
|
|
392
393
|
|
|
393
|
-
# Schedules the deletion of the specified vault. This sets the state of the vault and
|
|
394
|
-
# to `PENDING_DELETION` and then deletes them
|
|
394
|
+
# Schedules the deletion of the specified vault. This sets the state of the vault and
|
|
395
|
+
# keys that are not scheduled deletion in it to `PENDING_DELETION` and then deletes them
|
|
396
|
+
# after the retention period ends.
|
|
397
|
+
# The state and the timeOfDeletion of the keys that have already been scheduled for deletion
|
|
398
|
+
# will not change. If any keys in it are scheduled for deletion after the specified timeOfDeletion
|
|
399
|
+
# for the vault, the call will be rejected with status code 409.
|
|
395
400
|
#
|
|
396
401
|
# @param [String] vault_id The OCID of the vault.
|
|
397
402
|
# @param [OCI::KeyManagement::Models::ScheduleVaultDeletionDetails] schedule_vault_deletion_details ScheduleVaultDeletionDetails
|
|
@@ -423,7 +428,7 @@ module OCI
|
|
|
423
428
|
raise "Missing the required parameter 'schedule_vault_deletion_details' when calling schedule_vault_deletion." if schedule_vault_deletion_details.nil?
|
|
424
429
|
raise "Parameter value for 'vault_id' must not be blank" if OCI::Internal::Util.blank_string?(vault_id)
|
|
425
430
|
|
|
426
|
-
path = '/vaults/{vaultId}/actions/scheduleDeletion'.sub('{vaultId}', vault_id.to_s)
|
|
431
|
+
path = '/20180608/vaults/{vaultId}/actions/scheduleDeletion'.sub('{vaultId}', vault_id.to_s)
|
|
427
432
|
operation_signing_strategy = :standard
|
|
428
433
|
|
|
429
434
|
# rubocop:disable Style/NegatedIf
|
|
@@ -493,7 +498,7 @@ module OCI
|
|
|
493
498
|
raise "Missing the required parameter 'update_vault_details' when calling update_vault." if update_vault_details.nil?
|
|
494
499
|
raise "Parameter value for 'vault_id' must not be blank" if OCI::Internal::Util.blank_string?(vault_id)
|
|
495
500
|
|
|
496
|
-
path = '/vaults/{vaultId}'.sub('{vaultId}', vault_id.to_s)
|
|
501
|
+
path = '/20180608/vaults/{vaultId}'.sub('{vaultId}', vault_id.to_s)
|
|
497
502
|
operation_signing_strategy = :standard
|
|
498
503
|
|
|
499
504
|
# rubocop:disable Style/NegatedIf
|