Class: OCI::Waas::WaasClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::Waas::WaasClientCompositeOperations
- Defined in:
- lib/oci/waas/waas_client_composite_operations.rb
Overview
This class provides a wrapper around WaasClient and offers convenience methods for operations that would otherwise need to be chained together. For example, instead of performing an action on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource to enter a given state, you can call a single method in this class to accomplish the same functionality
Instance Attribute Summary collapse
-
#service_client ⇒ OCI::Waas::WaasClient
readonly
The WaasClient used to communicate with the service_client.
Instance Method Summary collapse
-
#accept_recommendations_and_wait_for_state(waas_policy_id, protection_rule_keys, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#accept_recommendations and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_address_list_and_wait_for_state(create_address_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_address_list and then waits for the Models::AddressList acted upon to enter the given state(s).
-
#create_certificate_and_wait_for_state(create_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_certificate and then waits for the Models::Certificate acted upon to enter the given state(s).
-
#create_custom_protection_rule_and_wait_for_state(create_custom_protection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_custom_protection_rule and then waits for the Models::CustomProtectionRule acted upon to enter the given state(s).
-
#create_waas_policy_and_wait_for_state(create_waas_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_waas_policy and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_address_list_and_wait_for_state(address_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_address_list and then waits for the Models::AddressList acted upon to enter the given state(s).
-
#delete_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_certificate and then waits for the Models::Certificate acted upon to enter the given state(s).
-
#delete_custom_protection_rule_and_wait_for_state(custom_protection_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_custom_protection_rule and then waits for the Models::CustomProtectionRule acted upon to enter the given state(s).
-
#delete_waas_policy_and_wait_for_state(waas_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_waas_policy and then waits for the Models::WorkRequest to enter the given state(s).
-
#initialize(service_client = OCI::Waas::WaasClient.new) ⇒ WaasClientCompositeOperations
constructor
Initializes a new WaasClientCompositeOperations.
-
#purge_cache_and_wait_for_state(waas_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#purge_cache and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_access_rules_and_wait_for_state(waas_policy_id, access_rules, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_access_rules and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_address_list_and_wait_for_state(address_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_address_list and then waits for the Models::AddressList acted upon to enter the given state(s).
-
#update_caching_rules_and_wait_for_state(waas_policy_id, caching_rules_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_caching_rules and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_captchas_and_wait_for_state(waas_policy_id, captchas, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_captchas and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_certificate and then waits for the Models::Certificate acted upon to enter the given state(s).
-
#update_custom_protection_rule_and_wait_for_state(custom_protection_rule_id, update_custom_protection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_custom_protection_rule and then waits for the Models::CustomProtectionRule acted upon to enter the given state(s).
-
#update_device_fingerprint_challenge_and_wait_for_state(waas_policy_id, update_device_fingerprint_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_device_fingerprint_challenge and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_good_bots_and_wait_for_state(waas_policy_id, good_bots, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_good_bots and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_human_interaction_challenge_and_wait_for_state(waas_policy_id, update_human_interaction_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_human_interaction_challenge and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_js_challenge_and_wait_for_state(waas_policy_id, update_js_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_js_challenge and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_policy_config_and_wait_for_state(waas_policy_id, update_policy_config_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_policy_config and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_protection_rules_and_wait_for_state(waas_policy_id, protection_rules, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_protection_rules and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_protection_settings_and_wait_for_state(waas_policy_id, update_protection_settings_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_protection_settings and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_threat_feeds_and_wait_for_state(waas_policy_id, threat_feeds, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_threat_feeds and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_waas_policy_and_wait_for_state(waas_policy_id, update_waas_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waas_policy and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_waas_policy_custom_protection_rules_and_wait_for_state(waas_policy_id, update_custom_protection_rules_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waas_policy_custom_protection_rules and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_waf_address_rate_limiting_and_wait_for_state(waas_policy_id, update_waf_address_rate_limiting_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waf_address_rate_limiting and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_waf_config_and_wait_for_state(waas_policy_id, update_waf_config_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waf_config and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_whitelists_and_wait_for_state(waas_policy_id, whitelists, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_whitelists and then waits for the Models::WorkRequest to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::Waas::WaasClient.new) ⇒ WaasClientCompositeOperations
Initializes a new WaasClientCompositeOperations
22 23 24 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 22 def initialize(service_client = OCI::Waas::WaasClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::Waas::WaasClient (readonly)
The OCI::Waas::WaasClient used to communicate with the service_client
16 17 18 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 16 def service_client @service_client end |
Instance Method Details
#accept_recommendations_and_wait_for_state(waas_policy_id, protection_rule_keys, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#accept_recommendations and then waits for the Models::WorkRequest to enter the given state(s).
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 42 def accept_recommendations_and_wait_for_state(waas_policy_id, protection_rule_keys, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.accept_recommendations(waas_policy_id, protection_rule_keys, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_address_list_and_wait_for_state(create_address_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_address_list and then waits for the Models::AddressList acted upon to enter the given state(s).
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 92 def create_address_list_and_wait_for_state(create_address_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_address_list(create_address_list_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_address_list(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_certificate_and_wait_for_state(create_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_certificate and then waits for the Models::Certificate acted upon to enter the given state(s).
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 131 def create_certificate_and_wait_for_state(create_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_certificate(create_certificate_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_certificate(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_custom_protection_rule_and_wait_for_state(create_custom_protection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_custom_protection_rule and then waits for the Models::CustomProtectionRule acted upon to enter the given state(s).
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 170 def create_custom_protection_rule_and_wait_for_state(create_custom_protection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_custom_protection_rule(create_custom_protection_rule_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_custom_protection_rule(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_waas_policy_and_wait_for_state(create_waas_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#create_waas_policy and then waits for the Models::WorkRequest to enter the given state(s).
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 209 def create_waas_policy_and_wait_for_state(create_waas_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_waas_policy(create_waas_policy_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_address_list_and_wait_for_state(address_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_address_list and then waits for the Models::AddressList acted upon to enter the given state(s).
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 259 def delete_address_list_and_wait_for_state(address_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_address_list(address_list_id) operation_result = @service_client.delete_address_list(address_list_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_certificate and then waits for the Models::Certificate acted upon to enter the given state(s).
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 299 def delete_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_certificate(certificate_id) operation_result = @service_client.delete_certificate(certificate_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_custom_protection_rule_and_wait_for_state(custom_protection_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_custom_protection_rule and then waits for the Models::CustomProtectionRule acted upon to enter the given state(s).
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 339 def delete_custom_protection_rule_and_wait_for_state(custom_protection_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_custom_protection_rule(custom_protection_rule_id) operation_result = @service_client.delete_custom_protection_rule(custom_protection_rule_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_waas_policy_and_wait_for_state(waas_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#delete_waas_policy and then waits for the Models::WorkRequest to enter the given state(s).
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 379 def delete_waas_policy_and_wait_for_state(waas_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_waas_policy(waas_policy_id, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#purge_cache_and_wait_for_state(waas_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#purge_cache and then waits for the Models::WorkRequest to enter the given state(s).
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 429 def purge_cache_and_wait_for_state(waas_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.purge_cache(waas_policy_id, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_access_rules_and_wait_for_state(waas_policy_id, access_rules, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_access_rules and then waits for the Models::WorkRequest to enter the given state(s).
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 480 def update_access_rules_and_wait_for_state(waas_policy_id, access_rules, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_access_rules(waas_policy_id, access_rules, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_address_list_and_wait_for_state(address_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_address_list and then waits for the Models::AddressList acted upon to enter the given state(s).
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 530 def update_address_list_and_wait_for_state(address_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_address_list(address_list_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_address_list(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_caching_rules_and_wait_for_state(waas_policy_id, caching_rules_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_caching_rules and then waits for the Models::WorkRequest to enter the given state(s).
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 570 def update_caching_rules_and_wait_for_state(waas_policy_id, caching_rules_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_caching_rules(waas_policy_id, caching_rules_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_captchas_and_wait_for_state(waas_policy_id, captchas, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_captchas and then waits for the Models::WorkRequest to enter the given state(s).
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 621 def update_captchas_and_wait_for_state(waas_policy_id, captchas, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_captchas(waas_policy_id, captchas, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_certificate and then waits for the Models::Certificate acted upon to enter the given state(s).
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 671 def update_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_certificate(certificate_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_certificate(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_custom_protection_rule_and_wait_for_state(custom_protection_rule_id, update_custom_protection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_custom_protection_rule and then waits for the Models::CustomProtectionRule acted upon to enter the given state(s).
711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 711 def update_custom_protection_rule_and_wait_for_state(custom_protection_rule_id, update_custom_protection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_custom_protection_rule(custom_protection_rule_id, update_custom_protection_rule_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_custom_protection_rule(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_device_fingerprint_challenge_and_wait_for_state(waas_policy_id, update_device_fingerprint_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_device_fingerprint_challenge and then waits for the Models::WorkRequest to enter the given state(s).
751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 751 def update_device_fingerprint_challenge_and_wait_for_state(waas_policy_id, update_device_fingerprint_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_device_fingerprint_challenge(waas_policy_id, update_device_fingerprint_challenge_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_good_bots_and_wait_for_state(waas_policy_id, good_bots, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_good_bots and then waits for the Models::WorkRequest to enter the given state(s).
802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 802 def update_good_bots_and_wait_for_state(waas_policy_id, good_bots, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_good_bots(waas_policy_id, good_bots, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_human_interaction_challenge_and_wait_for_state(waas_policy_id, update_human_interaction_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_human_interaction_challenge and then waits for the Models::WorkRequest to enter the given state(s).
853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 853 def update_human_interaction_challenge_and_wait_for_state(waas_policy_id, update_human_interaction_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_human_interaction_challenge(waas_policy_id, update_human_interaction_challenge_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_js_challenge_and_wait_for_state(waas_policy_id, update_js_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_js_challenge and then waits for the Models::WorkRequest to enter the given state(s).
904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 904 def update_js_challenge_and_wait_for_state(waas_policy_id, update_js_challenge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_js_challenge(waas_policy_id, update_js_challenge_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_policy_config_and_wait_for_state(waas_policy_id, update_policy_config_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_policy_config and then waits for the Models::WorkRequest to enter the given state(s).
955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 955 def update_policy_config_and_wait_for_state(waas_policy_id, update_policy_config_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_policy_config(waas_policy_id, update_policy_config_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_protection_rules_and_wait_for_state(waas_policy_id, protection_rules, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_protection_rules and then waits for the Models::WorkRequest to enter the given state(s).
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1006 def update_protection_rules_and_wait_for_state(waas_policy_id, protection_rules, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_protection_rules(waas_policy_id, protection_rules, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_protection_settings_and_wait_for_state(waas_policy_id, update_protection_settings_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_protection_settings and then waits for the Models::WorkRequest to enter the given state(s).
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1057 def update_protection_settings_and_wait_for_state(waas_policy_id, update_protection_settings_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_protection_settings(waas_policy_id, update_protection_settings_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_threat_feeds_and_wait_for_state(waas_policy_id, threat_feeds, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_threat_feeds and then waits for the Models::WorkRequest to enter the given state(s).
1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1108 def update_threat_feeds_and_wait_for_state(waas_policy_id, threat_feeds, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_threat_feeds(waas_policy_id, threat_feeds, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_waas_policy_and_wait_for_state(waas_policy_id, update_waas_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waas_policy and then waits for the Models::WorkRequest to enter the given state(s).
1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1159 def update_waas_policy_and_wait_for_state(waas_policy_id, update_waas_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_waas_policy(waas_policy_id, update_waas_policy_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_waas_policy_custom_protection_rules_and_wait_for_state(waas_policy_id, update_custom_protection_rules_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waas_policy_custom_protection_rules and then waits for the Models::WorkRequest to enter the given state(s).
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1210 def update_waas_policy_custom_protection_rules_and_wait_for_state(waas_policy_id, update_custom_protection_rules_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_waas_policy_custom_protection_rules(waas_policy_id, update_custom_protection_rules_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_waf_address_rate_limiting_and_wait_for_state(waas_policy_id, update_waf_address_rate_limiting_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waf_address_rate_limiting and then waits for the Models::WorkRequest to enter the given state(s).
1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1261 def update_waf_address_rate_limiting_and_wait_for_state(waas_policy_id, update_waf_address_rate_limiting_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_waf_address_rate_limiting(waas_policy_id, update_waf_address_rate_limiting_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_waf_config_and_wait_for_state(waas_policy_id, update_waf_config_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_waf_config and then waits for the Models::WorkRequest to enter the given state(s).
1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1312 def update_waf_config_and_wait_for_state(waas_policy_id, update_waf_config_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_waf_config(waas_policy_id, update_waf_config_details, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_whitelists_and_wait_for_state(waas_policy_id, whitelists, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Waas::WaasClient#update_whitelists and then waits for the Models::WorkRequest to enter the given state(s).
1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 |
# File 'lib/oci/waas/waas_client_composite_operations.rb', line 1363 def update_whitelists_and_wait_for_state(waas_policy_id, whitelists, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_whitelists(waas_policy_id, whitelists, base_operation_opts) use_util = OCI::Waas::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Waas::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |