Class: OCI::Oda::ManagementClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::Oda::ManagementClientCompositeOperations
- Defined in:
- lib/oci/oda/management_client_composite_operations.rb
Overview
This class provides a wrapper around ManagementClient 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::Oda::ManagementClient
readonly
The ManagementClient used to communicate with the service_client.
Instance Method Summary collapse
-
#create_authentication_provider_and_wait_for_state(oda_instance_id, create_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_authentication_provider and then waits for the OCI::Oda::Models::AuthenticationProvider acted upon to enter the given state(s).
-
#create_digital_assistant_and_wait_for_state(oda_instance_id, create_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_digital_assistant and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
-
#create_skill_and_wait_for_state(oda_instance_id, create_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
-
#create_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, create_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_skill_parameter and then waits for the OCI::Oda::Models::SkillParameter acted upon to enter the given state(s).
-
#create_translator_and_wait_for_state(oda_instance_id, create_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_translator and then waits for the OCI::Oda::Models::Translator acted upon to enter the given state(s).
-
#export_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, export_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#export_digital_assistant and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
-
#export_skill_and_wait_for_state(oda_instance_id, skill_id, export_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#export_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
-
#import_bot_and_wait_for_state(oda_instance_id, import_bot_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#import_bot and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
-
#initialize(service_client = OCI::Oda::ManagementClient.new) ⇒ ManagementClientCompositeOperations
constructor
Initializes a new ManagementClientCompositeOperations.
-
#publish_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#publish_digital_assistant and then waits for the OCI::Oda::Models::DigitalAssistant acted upon to enter the given state(s).
-
#publish_skill_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#publish_skill and then waits for the OCI::Oda::Models::Skill acted upon to enter the given state(s).
-
#start_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#start_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).
-
#stop_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#stop_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).
-
#update_authentication_provider_and_wait_for_state(oda_instance_id, authentication_provider_id, update_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_authentication_provider and then waits for the OCI::Oda::Models::AuthenticationProvider acted upon to enter the given state(s).
-
#update_channel_and_wait_for_state(oda_instance_id, channel_id, update_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).
-
#update_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, update_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_digital_assistant and then waits for the OCI::Oda::Models::DigitalAssistant acted upon to enter the given state(s).
-
#update_digital_assistant_parameter_and_wait_for_state(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_digital_assistant_parameter and then waits for the OCI::Oda::Models::DigitalAssistantParameter acted upon to enter the given state(s).
-
#update_skill_and_wait_for_state(oda_instance_id, skill_id, update_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_skill and then waits for the OCI::Oda::Models::Skill acted upon to enter the given state(s).
-
#update_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_skill_parameter and then waits for the OCI::Oda::Models::SkillParameter acted upon to enter the given state(s).
-
#update_translator_and_wait_for_state(oda_instance_id, translator_id, update_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_translator and then waits for the OCI::Oda::Models::Translator acted upon to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::Oda::ManagementClient.new) ⇒ ManagementClientCompositeOperations
Initializes a new ManagementClientCompositeOperations
20 21 22 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 20 def initialize(service_client = OCI::Oda::ManagementClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::Oda::ManagementClient (readonly)
The OCI::Oda::ManagementClient used to communicate with the service_client
14 15 16 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 14 def service_client @service_client end |
Instance Method Details
#create_authentication_provider_and_wait_for_state(oda_instance_id, create_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_authentication_provider and then waits for the OCI::Oda::Models::AuthenticationProvider acted upon to enter the given state(s).
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 40 def create_authentication_provider_and_wait_for_state(oda_instance_id, create_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_authentication_provider(oda_instance_id, create_authentication_provider_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_authentication_provider(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_digital_assistant_and_wait_for_state(oda_instance_id, create_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_digital_assistant and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
80 81 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 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 80 def create_digital_assistant_and_wait_for_state(oda_instance_id, create_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_digital_assistant(oda_instance_id, create_digital_assistant_details, base_operation_opts) use_util = OCI::Oda::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::Oda::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_skill_and_wait_for_state(oda_instance_id, create_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 130 def create_skill_and_wait_for_state(oda_instance_id, create_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_skill(oda_instance_id, create_skill_details, base_operation_opts) use_util = OCI::Oda::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::Oda::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_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, create_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_skill_parameter and then waits for the OCI::Oda::Models::SkillParameter acted upon to enter the given state(s).
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 181 def create_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, create_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_skill_parameter(oda_instance_id, skill_id, create_skill_parameter_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_skill_parameter(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_translator_and_wait_for_state(oda_instance_id, create_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#create_translator and then waits for the OCI::Oda::Models::Translator acted upon to enter the given state(s).
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 221 def create_translator_and_wait_for_state(oda_instance_id, create_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_translator(oda_instance_id, create_translator_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_translator(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 |
#export_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, export_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#export_digital_assistant and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 262 def export_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, export_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.export_digital_assistant(oda_instance_id, digital_assistant_id, export_digital_assistant_details, base_operation_opts) use_util = OCI::Oda::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::Oda::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 |
#export_skill_and_wait_for_state(oda_instance_id, skill_id, export_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#export_skill and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 313 def export_skill_and_wait_for_state(oda_instance_id, skill_id, export_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.export_skill(oda_instance_id, skill_id, export_skill_details, base_operation_opts) use_util = OCI::Oda::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::Oda::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 |
#import_bot_and_wait_for_state(oda_instance_id, import_bot_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#import_bot and then waits for the OCI::Oda::Models::WorkRequest to enter the given state(s).
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 363 def import_bot_and_wait_for_state(oda_instance_id, import_bot_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.import_bot(oda_instance_id, import_bot_details, base_operation_opts) use_util = OCI::Oda::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::Oda::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 |
#publish_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#publish_digital_assistant and then waits for the OCI::Oda::Models::DigitalAssistant acted upon to enter the given state(s).
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 413 def publish_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.publish_digital_assistant(oda_instance_id, digital_assistant_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_digital_assistant(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 |
#publish_skill_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#publish_skill and then waits for the OCI::Oda::Models::Skill acted upon to enter the given state(s).
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 453 def publish_skill_and_wait_for_state(oda_instance_id, skill_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.publish_skill(oda_instance_id, skill_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_skill(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 |
#start_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#start_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 493 def start_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.start_channel(oda_instance_id, channel_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_channel(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 |
#stop_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#stop_channel and then waits for the OCI::Oda::Models::Channel 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 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 533 def stop_channel_and_wait_for_state(oda_instance_id, channel_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.stop_channel(oda_instance_id, channel_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_channel(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_authentication_provider_and_wait_for_state(oda_instance_id, authentication_provider_id, update_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_authentication_provider and then waits for the OCI::Oda::Models::AuthenticationProvider acted upon to enter the given state(s).
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 574 def update_authentication_provider_and_wait_for_state(oda_instance_id, authentication_provider_id, update_authentication_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_authentication_provider(oda_instance_id, authentication_provider_id, update_authentication_provider_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_authentication_provider(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_channel_and_wait_for_state(oda_instance_id, channel_id, update_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_channel and then waits for the OCI::Oda::Models::Channel acted upon to enter the given state(s).
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 615 def update_channel_and_wait_for_state(oda_instance_id, channel_id, update_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_channel(oda_instance_id, channel_id, update_channel_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_channel(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_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, update_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_digital_assistant and then waits for the OCI::Oda::Models::DigitalAssistant acted upon to enter the given state(s).
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 656 def update_digital_assistant_and_wait_for_state(oda_instance_id, digital_assistant_id, update_digital_assistant_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_digital_assistant(oda_instance_id, digital_assistant_id, update_digital_assistant_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_digital_assistant(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_digital_assistant_parameter_and_wait_for_state(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_digital_assistant_parameter and then waits for the OCI::Oda::Models::DigitalAssistantParameter acted upon to enter the given state(s).
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 698 def update_digital_assistant_parameter_and_wait_for_state(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_digital_assistant_parameter(oda_instance_id, digital_assistant_id, parameter_name, update_digital_assistant_parameter_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_digital_assistant_parameter(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_skill_and_wait_for_state(oda_instance_id, skill_id, update_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_skill and then waits for the OCI::Oda::Models::Skill acted upon to enter the given state(s).
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 739 def update_skill_and_wait_for_state(oda_instance_id, skill_id, update_skill_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_skill(oda_instance_id, skill_id, update_skill_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_skill(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_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_skill_parameter and then waits for the OCI::Oda::Models::SkillParameter acted upon to enter the given state(s).
781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 781 def update_skill_parameter_and_wait_for_state(oda_instance_id, skill_id, parameter_name, update_skill_parameter_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_skill_parameter(oda_instance_id, skill_id, parameter_name, update_skill_parameter_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_skill_parameter(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_translator_and_wait_for_state(oda_instance_id, translator_id, update_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Oda::ManagementClient#update_translator and then waits for the OCI::Oda::Models::Translator 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 |
# File 'lib/oci/oda/management_client_composite_operations.rb', line 822 def update_translator_and_wait_for_state(oda_instance_id, translator_id, update_translator_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_translator(oda_instance_id, translator_id, update_translator_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_translator(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 |