Class: OCI::CloudGuard::CloudGuardClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::CloudGuard::CloudGuardClientCompositeOperations
- Defined in:
- lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb
Overview
This class provides a wrapper around CloudGuardClient 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::CloudGuard::CloudGuardClient
readonly
The CloudGuardClient used to communicate with the service_client.
Instance Method Summary collapse
-
#add_compartment_and_wait_for_state(security_zone_id, add_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#add_compartment and then waits for the Models::SecurityZone acted upon to enter the given state(s).
-
#change_data_source_compartment_and_wait_for_state(data_source_id, change_data_source_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#change_data_source_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_data_mask_rule_and_wait_for_state(create_data_mask_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_data_mask_rule and then waits for the Models::DataMaskRule acted upon to enter the given state(s).
-
#create_data_source_and_wait_for_state(create_data_source_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_data_source and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_detector_recipe_and_wait_for_state(create_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_detector_recipe and then waits for the Models::DetectorRecipe acted upon to enter the given state(s).
-
#create_detector_recipe_detector_rule_and_wait_for_state(detector_recipe_id, create_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_detector_recipe_detector_rule and then waits for the Models::DetectorRecipeDetectorRule acted upon to enter the given state(s).
-
#create_managed_list_and_wait_for_state(create_managed_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_managed_list and then waits for the Models::ManagedList acted upon to enter the given state(s).
-
#create_responder_recipe_and_wait_for_state(create_responder_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_responder_recipe and then waits for the Models::ResponderRecipe acted upon to enter the given state(s).
-
#create_security_recipe_and_wait_for_state(create_security_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_security_recipe and then waits for the Models::SecurityRecipe acted upon to enter the given state(s).
-
#create_security_zone_and_wait_for_state(create_security_zone_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_security_zone and then waits for the Models::SecurityZone acted upon to enter the given state(s).
-
#create_target_and_wait_for_state(create_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_target and then waits for the Models::Target acted upon to enter the given state(s).
-
#create_target_detector_recipe_and_wait_for_state(target_id, attach_target_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_target_detector_recipe and then waits for the Models::TargetDetectorRecipe acted upon to enter the given state(s).
-
#delete_data_mask_rule_and_wait_for_state(data_mask_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_data_mask_rule and then waits for the Models::DataMaskRule acted upon to enter the given state(s).
-
#delete_data_source_and_wait_for_state(data_source_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_data_source and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_detector_recipe_and_wait_for_state(detector_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_detector_recipe and then waits for the Models::DetectorRecipe acted upon to enter the given state(s).
-
#delete_managed_list_and_wait_for_state(managed_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_managed_list and then waits for the Models::ManagedList acted upon to enter the given state(s).
-
#delete_responder_recipe_and_wait_for_state(responder_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_responder_recipe and then waits for the Models::ResponderRecipe acted upon to enter the given state(s).
-
#delete_security_recipe_and_wait_for_state(security_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_security_recipe and then waits for the Models::SecurityRecipe acted upon to enter the given state(s).
-
#delete_security_zone_and_wait_for_state(security_zone_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_security_zone and then waits for the Models::SecurityZone acted upon to enter the given state(s).
-
#delete_target_and_wait_for_state(target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_target and then waits for the Models::Target acted upon to enter the given state(s).
-
#initialize(service_client = OCI::CloudGuard::CloudGuardClient.new) ⇒ CloudGuardClientCompositeOperations
constructor
Initializes a new CloudGuardClientCompositeOperations.
-
#remove_compartment_and_wait_for_state(security_zone_id, remove_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#remove_compartment and then waits for the Models::SecurityZone acted upon to enter the given state(s).
-
#update_data_mask_rule_and_wait_for_state(data_mask_rule_id, update_data_mask_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_data_mask_rule and then waits for the Models::DataMaskRule acted upon to enter the given state(s).
-
#update_data_source_and_wait_for_state(data_source_id, update_data_source_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_data_source and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_detector_recipe_and_wait_for_state(detector_recipe_id, update_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_detector_recipe and then waits for the Models::DetectorRecipe acted upon to enter the given state(s).
-
#update_detector_recipe_detector_rule_and_wait_for_state(detector_recipe_id, detector_rule_id, update_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_detector_recipe_detector_rule and then waits for the Models::DetectorRecipeDetectorRule acted upon to enter the given state(s).
-
#update_managed_list_and_wait_for_state(managed_list_id, update_managed_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_managed_list and then waits for the Models::ManagedList acted upon to enter the given state(s).
-
#update_problem_status_and_wait_for_state(problem_id, update_problem_status_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_problem_status and then waits for the Models::Problem acted upon to enter the given state(s).
-
#update_responder_recipe_and_wait_for_state(responder_recipe_id, update_responder_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_responder_recipe and then waits for the Models::ResponderRecipe acted upon to enter the given state(s).
-
#update_responder_recipe_responder_rule_and_wait_for_state(responder_recipe_id, responder_rule_id, update_responder_recipe_responder_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_responder_recipe_responder_rule and then waits for the Models::ResponderRecipeResponderRule acted upon to enter the given state(s).
-
#update_security_recipe_and_wait_for_state(security_recipe_id, update_security_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_security_recipe and then waits for the Models::SecurityRecipe acted upon to enter the given state(s).
-
#update_security_zone_and_wait_for_state(security_zone_id, update_security_zone_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_security_zone and then waits for the Models::SecurityZone acted upon to enter the given state(s).
-
#update_target_and_wait_for_state(target_id, update_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target and then waits for the Models::Target acted upon to enter the given state(s).
-
#update_target_detector_recipe_and_wait_for_state(target_id, target_detector_recipe_id, update_target_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target_detector_recipe and then waits for the Models::TargetDetectorRecipe acted upon to enter the given state(s).
-
#update_target_detector_recipe_detector_rule_and_wait_for_state(target_id, target_detector_recipe_id, detector_rule_id, update_target_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target_detector_recipe_detector_rule and then waits for the Models::TargetDetectorRecipeDetectorRule acted upon to enter the given state(s).
-
#update_target_responder_recipe_responder_rule_and_wait_for_state(target_id, target_responder_recipe_id, responder_rule_id, update_target_responder_recipe_responder_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target_responder_recipe_responder_rule and then waits for the Models::TargetResponderRecipeResponderRule acted upon to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::CloudGuard::CloudGuardClient.new) ⇒ CloudGuardClientCompositeOperations
Initializes a new CloudGuardClientCompositeOperations
22 23 24 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 22 def initialize(service_client = OCI::CloudGuard::CloudGuardClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::CloudGuard::CloudGuardClient (readonly)
The OCI::CloudGuard::CloudGuardClient used to communicate with the service_client
16 17 18 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 16 def service_client @service_client end |
Instance Method Details
#add_compartment_and_wait_for_state(security_zone_id, add_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#add_compartment and then waits for the Models::SecurityZone acted upon 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 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 42 def add_compartment_and_wait_for_state(security_zone_id, add_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.add_compartment(security_zone_id, add_compartment_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_security_zone(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 |
#change_data_source_compartment_and_wait_for_state(data_source_id, change_data_source_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#change_data_source_compartment and then waits for the Models::WorkRequest to enter the given state(s).
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 82 def change_data_source_compartment_and_wait_for_state(data_source_id, change_data_source_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_data_source_compartment(data_source_id, change_data_source_compartment_details, base_operation_opts) use_util = OCI::CloudGuard::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'] begin if use_util waiter_result = OCI::CloudGuard::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_data_mask_rule_and_wait_for_state(create_data_mask_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_data_mask_rule and then waits for the Models::DataMaskRule 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/cloud_guard/cloud_guard_client_composite_operations.rb', line 131 def create_data_mask_rule_and_wait_for_state(create_data_mask_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_data_mask_rule(create_data_mask_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_data_mask_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_data_source_and_wait_for_state(create_data_source_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_data_source and then waits for the Models::WorkRequest 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 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 170 def create_data_source_and_wait_for_state(create_data_source_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_data_source(create_data_source_details, base_operation_opts) use_util = OCI::CloudGuard::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'] begin if use_util waiter_result = OCI::CloudGuard::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_detector_recipe_and_wait_for_state(create_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_detector_recipe and then waits for the Models::DetectorRecipe acted upon to enter the given state(s).
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 219 def create_detector_recipe_and_wait_for_state(create_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_detector_recipe(create_detector_recipe_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_detector_recipe(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_detector_recipe_detector_rule_and_wait_for_state(detector_recipe_id, create_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_detector_recipe_detector_rule and then waits for the Models::DetectorRecipeDetectorRule 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 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 259 def create_detector_recipe_detector_rule_and_wait_for_state(detector_recipe_id, create_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_detector_recipe_detector_rule(detector_recipe_id, create_detector_recipe_detector_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_detector_recipe_detector_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_managed_list_and_wait_for_state(create_managed_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_managed_list and then waits for the Models::ManagedList acted upon to enter the given state(s).
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 298 def create_managed_list_and_wait_for_state(create_managed_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_managed_list(create_managed_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_managed_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_responder_recipe_and_wait_for_state(create_responder_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_responder_recipe and then waits for the Models::ResponderRecipe acted upon to enter the given state(s).
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 337 def create_responder_recipe_and_wait_for_state(create_responder_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_responder_recipe(create_responder_recipe_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_responder_recipe(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_security_recipe_and_wait_for_state(create_security_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_security_recipe and then waits for the Models::SecurityRecipe acted upon to enter the given state(s).
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 376 def create_security_recipe_and_wait_for_state(create_security_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_security_recipe(create_security_recipe_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_security_recipe(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_security_zone_and_wait_for_state(create_security_zone_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_security_zone and then waits for the Models::SecurityZone acted upon to enter the given state(s).
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 415 def create_security_zone_and_wait_for_state(create_security_zone_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_security_zone(create_security_zone_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_security_zone(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_target_and_wait_for_state(create_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_target and then waits for the Models::Target acted upon to enter the given state(s).
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 454 def create_target_and_wait_for_state(create_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_target(create_target_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_target(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_target_detector_recipe_and_wait_for_state(target_id, attach_target_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#create_target_detector_recipe and then waits for the Models::TargetDetectorRecipe acted upon to enter the given state(s).
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 494 def create_target_detector_recipe_and_wait_for_state(target_id, attach_target_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_target_detector_recipe(target_id, attach_target_detector_recipe_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_target_detector_recipe(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 |
#delete_data_mask_rule_and_wait_for_state(data_mask_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_data_mask_rule and then waits for the Models::DataMaskRule acted upon to enter the given state(s).
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 533 def delete_data_mask_rule_and_wait_for_state(data_mask_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_data_mask_rule(data_mask_rule_id) operation_result = @service_client.delete_data_mask_rule(data_mask_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_data_source_and_wait_for_state(data_source_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_data_source and then waits for the Models::WorkRequest to enter the given state(s).
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 602 603 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 573 def delete_data_source_and_wait_for_state(data_source_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_data_source(data_source_id, base_operation_opts) use_util = OCI::CloudGuard::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'] begin if use_util waiter_result = OCI::CloudGuard::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_detector_recipe_and_wait_for_state(detector_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_detector_recipe and then waits for the Models::DetectorRecipe acted upon to enter the given state(s).
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 622 def delete_detector_recipe_and_wait_for_state(detector_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_detector_recipe(detector_recipe_id) operation_result = @service_client.delete_detector_recipe(detector_recipe_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_managed_list_and_wait_for_state(managed_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_managed_list and then waits for the Models::ManagedList acted upon to enter the given state(s).
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 662 def delete_managed_list_and_wait_for_state(managed_list_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_managed_list(managed_list_id) operation_result = @service_client.delete_managed_list(managed_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_responder_recipe_and_wait_for_state(responder_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_responder_recipe and then waits for the Models::ResponderRecipe acted upon to enter the given state(s).
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 702 def delete_responder_recipe_and_wait_for_state(responder_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_responder_recipe(responder_recipe_id) operation_result = @service_client.delete_responder_recipe(responder_recipe_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_security_recipe_and_wait_for_state(security_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_security_recipe and then waits for the Models::SecurityRecipe acted upon to enter the given state(s).
742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 742 def delete_security_recipe_and_wait_for_state(security_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_security_recipe(security_recipe_id) operation_result = @service_client.delete_security_recipe(security_recipe_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_security_zone_and_wait_for_state(security_zone_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_security_zone and then waits for the Models::SecurityZone acted upon to enter the given state(s).
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 782 def delete_security_zone_and_wait_for_state(security_zone_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_security_zone(security_zone_id) operation_result = @service_client.delete_security_zone(security_zone_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_target_and_wait_for_state(target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#delete_target and then waits for the Models::Target acted upon to enter the given state(s).
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 822 def delete_target_and_wait_for_state(target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_target(target_id) operation_result = @service_client.delete_target(target_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 |
#remove_compartment_and_wait_for_state(security_zone_id, remove_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#remove_compartment and then waits for the Models::SecurityZone acted upon to enter the given state(s).
863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 863 def remove_compartment_and_wait_for_state(security_zone_id, remove_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.remove_compartment(security_zone_id, remove_compartment_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_security_zone(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_data_mask_rule_and_wait_for_state(data_mask_rule_id, update_data_mask_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_data_mask_rule and then waits for the Models::DataMaskRule acted upon to enter the given state(s).
903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 903 def update_data_mask_rule_and_wait_for_state(data_mask_rule_id, update_data_mask_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_data_mask_rule(data_mask_rule_id, update_data_mask_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_data_mask_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_data_source_and_wait_for_state(data_source_id, update_data_source_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_data_source and then waits for the Models::WorkRequest to enter the given state(s).
943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 943 def update_data_source_and_wait_for_state(data_source_id, update_data_source_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_data_source(data_source_id, update_data_source_details, base_operation_opts) use_util = OCI::CloudGuard::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'] begin if use_util waiter_result = OCI::CloudGuard::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_detector_recipe_and_wait_for_state(detector_recipe_id, update_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_detector_recipe and then waits for the Models::DetectorRecipe acted upon to enter the given state(s).
993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 993 def update_detector_recipe_and_wait_for_state(detector_recipe_id, update_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_detector_recipe(detector_recipe_id, update_detector_recipe_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_detector_recipe(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_detector_recipe_detector_rule_and_wait_for_state(detector_recipe_id, detector_rule_id, update_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_detector_recipe_detector_rule and then waits for the Models::DetectorRecipeDetectorRule acted upon to enter the given state(s).
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1034 def update_detector_recipe_detector_rule_and_wait_for_state(detector_recipe_id, detector_rule_id, update_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_detector_recipe_detector_rule(detector_recipe_id, detector_rule_id, update_detector_recipe_detector_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_detector_recipe_detector_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_managed_list_and_wait_for_state(managed_list_id, update_managed_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_managed_list and then waits for the Models::ManagedList acted upon to enter the given state(s).
1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1074 def update_managed_list_and_wait_for_state(managed_list_id, update_managed_list_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_managed_list(managed_list_id, update_managed_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_managed_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_problem_status_and_wait_for_state(problem_id, update_problem_status_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_problem_status and then waits for the Models::Problem acted upon to enter the given state(s).
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1114 def update_problem_status_and_wait_for_state(problem_id, update_problem_status_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_problem_status(problem_id, update_problem_status_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_problem(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_responder_recipe_and_wait_for_state(responder_recipe_id, update_responder_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_responder_recipe and then waits for the Models::ResponderRecipe acted upon to enter the given state(s).
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1154 def update_responder_recipe_and_wait_for_state(responder_recipe_id, update_responder_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_responder_recipe(responder_recipe_id, update_responder_recipe_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_responder_recipe(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_responder_recipe_responder_rule_and_wait_for_state(responder_recipe_id, responder_rule_id, update_responder_recipe_responder_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_responder_recipe_responder_rule and then waits for the Models::ResponderRecipeResponderRule acted upon to enter the given state(s).
1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1195 def update_responder_recipe_responder_rule_and_wait_for_state(responder_recipe_id, responder_rule_id, update_responder_recipe_responder_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_responder_recipe_responder_rule(responder_recipe_id, responder_rule_id, update_responder_recipe_responder_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_responder_recipe_responder_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_security_recipe_and_wait_for_state(security_recipe_id, update_security_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_security_recipe and then waits for the Models::SecurityRecipe acted upon to enter the given state(s).
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1235 def update_security_recipe_and_wait_for_state(security_recipe_id, update_security_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_security_recipe(security_recipe_id, update_security_recipe_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_security_recipe(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_security_zone_and_wait_for_state(security_zone_id, update_security_zone_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_security_zone and then waits for the Models::SecurityZone acted upon to enter the given state(s).
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1275 def update_security_zone_and_wait_for_state(security_zone_id, update_security_zone_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_security_zone(security_zone_id, update_security_zone_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_security_zone(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_target_and_wait_for_state(target_id, update_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target and then waits for the Models::Target acted upon to enter the given state(s).
1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1315 def update_target_and_wait_for_state(target_id, update_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_target(target_id, update_target_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_target(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_target_detector_recipe_and_wait_for_state(target_id, target_detector_recipe_id, update_target_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target_detector_recipe and then waits for the Models::TargetDetectorRecipe acted upon to enter the given state(s).
1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1356 def update_target_detector_recipe_and_wait_for_state(target_id, target_detector_recipe_id, update_target_detector_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_target_detector_recipe(target_id, target_detector_recipe_id, update_target_detector_recipe_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_target_detector_recipe(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_target_detector_recipe_detector_rule_and_wait_for_state(target_id, target_detector_recipe_id, detector_rule_id, update_target_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target_detector_recipe_detector_rule and then waits for the Models::TargetDetectorRecipeDetectorRule acted upon to enter the given state(s).
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1398 def update_target_detector_recipe_detector_rule_and_wait_for_state(target_id, target_detector_recipe_id, detector_rule_id, update_target_detector_recipe_detector_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_target_detector_recipe_detector_rule(target_id, target_detector_recipe_id, detector_rule_id, update_target_detector_recipe_detector_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_target_detector_recipe_detector_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_target_responder_recipe_responder_rule_and_wait_for_state(target_id, target_responder_recipe_id, responder_rule_id, update_target_responder_recipe_responder_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::CloudGuard::CloudGuardClient#update_target_responder_recipe_responder_rule and then waits for the Models::TargetResponderRecipeResponderRule acted upon to enter the given state(s).
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 |
# File 'lib/oci/cloud_guard/cloud_guard_client_composite_operations.rb', line 1440 def update_target_responder_recipe_responder_rule_and_wait_for_state(target_id, target_responder_recipe_id, responder_rule_id, update_target_responder_recipe_responder_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_target_responder_recipe_responder_rule(target_id, target_responder_recipe_id, responder_rule_id, update_target_responder_recipe_responder_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_target_responder_recipe_responder_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 |