Class: OCI::Apigateway::ApiGatewayClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::Apigateway::ApiGatewayClientCompositeOperations
- Defined in:
- lib/oci/apigateway/api_gateway_client_composite_operations.rb
Overview
This class provides a wrapper around ApiGatewayClient 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::Apigateway::ApiGatewayClient
readonly
The ApiGatewayClient used to communicate with the service_client.
Instance Method Summary collapse
-
#add_api_lock_and_wait_for_state(api_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#add_api_lock and then waits for the Models::Api acted upon to enter the given state(s).
-
#add_certificate_lock_and_wait_for_state(certificate_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#add_certificate_lock and then waits for the Models::Certificate acted upon to enter the given state(s).
-
#add_sdk_lock_and_wait_for_state(sdk_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#add_sdk_lock and then waits for the Models::Sdk acted upon to enter the given state(s).
-
#change_api_compartment_and_wait_for_state(api_id, change_api_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#change_api_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_api_and_wait_for_state(create_api_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#create_api and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_certificate_and_wait_for_state(create_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#create_certificate and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_sdk_and_wait_for_state(create_sdk_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#create_sdk and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_api_and_wait_for_state(api_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#delete_api and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#delete_certificate and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_sdk_and_wait_for_state(sdk_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#delete_sdk and then waits for the Models::WorkRequest to enter the given state(s).
-
#initialize(service_client = OCI::Apigateway::ApiGatewayClient.new) ⇒ ApiGatewayClientCompositeOperations
constructor
Initializes a new ApiGatewayClientCompositeOperations.
-
#remove_api_lock_and_wait_for_state(api_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#remove_api_lock and then waits for the Models::Api acted upon to enter the given state(s).
-
#remove_certificate_lock_and_wait_for_state(certificate_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#remove_certificate_lock and then waits for the Models::Certificate acted upon to enter the given state(s).
-
#remove_sdk_lock_and_wait_for_state(sdk_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#remove_sdk_lock and then waits for the Models::Sdk acted upon to enter the given state(s).
-
#update_api_and_wait_for_state(api_id, update_api_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#update_api and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_certificate_and_wait_for_state(certificate_id, update_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#update_certificate and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_sdk_and_wait_for_state(sdk_id, update_sdk_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#update_sdk and then waits for the Models::Sdk acted upon to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::Apigateway::ApiGatewayClient.new) ⇒ ApiGatewayClientCompositeOperations
Initializes a new ApiGatewayClientCompositeOperations
22 23 24 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 22 def initialize(service_client = OCI::Apigateway::ApiGatewayClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::Apigateway::ApiGatewayClient (readonly)
The OCI::Apigateway::ApiGatewayClient used to communicate with the service_client
16 17 18 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 16 def service_client @service_client end |
Instance Method Details
#add_api_lock_and_wait_for_state(api_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#add_api_lock and then waits for the Models::Api 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/apigateway/api_gateway_client_composite_operations.rb', line 42 def add_api_lock_and_wait_for_state(api_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.add_api_lock(api_id, add_resource_lock_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_api(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 |
#add_certificate_lock_and_wait_for_state(certificate_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#add_certificate_lock and then waits for the Models::Certificate acted upon 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 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 82 def add_certificate_lock_and_wait_for_state(certificate_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.add_certificate_lock(certificate_id, add_resource_lock_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_certificate(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#add_sdk_lock_and_wait_for_state(sdk_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#add_sdk_lock and then waits for the Models::Sdk acted upon to enter the given state(s).
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 122 def add_sdk_lock_and_wait_for_state(sdk_id, add_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.add_sdk_lock(sdk_id, add_resource_lock_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_sdk(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_api_compartment_and_wait_for_state(api_id, change_api_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#change_api_compartment and then waits for the Models::WorkRequest to enter the given state(s).
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 162 def change_api_compartment_and_wait_for_state(api_id, change_api_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_api_compartment(api_id, change_api_compartment_details, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_api_and_wait_for_state(create_api_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#create_api and then waits for the Models::WorkRequest to enter the given state(s).
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 212 def create_api_and_wait_for_state(create_api_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_api(create_api_details, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_certificate_and_wait_for_state(create_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#create_certificate and then waits for the 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 293 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 262 def create_certificate_and_wait_for_state(create_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_certificate(create_certificate_details, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_sdk_and_wait_for_state(create_sdk_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#create_sdk and then waits for the Models::WorkRequest to enter the given state(s).
312 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/apigateway/api_gateway_client_composite_operations.rb', line 312 def create_sdk_and_wait_for_state(create_sdk_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_sdk(create_sdk_details, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_api_and_wait_for_state(api_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#delete_api and then waits for the Models::WorkRequest to enter the given state(s).
362 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/apigateway/api_gateway_client_composite_operations.rb', line 362 def delete_api_and_wait_for_state(api_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_api(api_id, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#delete_certificate and then waits for the Models::WorkRequest to enter the given state(s).
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 412 def delete_certificate_and_wait_for_state(certificate_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_certificate(certificate_id, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_sdk_and_wait_for_state(sdk_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#delete_sdk and then waits for the Models::WorkRequest to enter the given state(s).
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 462 def delete_sdk_and_wait_for_state(sdk_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_sdk(sdk_id, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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 |
#remove_api_lock_and_wait_for_state(api_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#remove_api_lock and then waits for the Models::Api acted upon to enter the given state(s).
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 513 def remove_api_lock_and_wait_for_state(api_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.remove_api_lock(api_id, remove_resource_lock_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_api(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 |
#remove_certificate_lock_and_wait_for_state(certificate_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#remove_certificate_lock and then waits for the Models::Certificate acted upon to enter the given state(s).
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 553 def remove_certificate_lock_and_wait_for_state(certificate_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.remove_certificate_lock(certificate_id, remove_resource_lock_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_certificate(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#remove_sdk_lock_and_wait_for_state(sdk_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#remove_sdk_lock and then waits for the Models::Sdk acted upon to enter the given state(s).
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 593 def remove_sdk_lock_and_wait_for_state(sdk_id, remove_resource_lock_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.remove_sdk_lock(sdk_id, remove_resource_lock_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_sdk(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_api_and_wait_for_state(api_id, update_api_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#update_api and then waits for the Models::WorkRequest to enter the given state(s).
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 633 def update_api_and_wait_for_state(api_id, update_api_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_api(api_id, update_api_details, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_certificate_and_wait_for_state(certificate_id, update_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#update_certificate and then waits for the Models::WorkRequest to enter the given state(s).
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 684 def update_certificate_and_wait_for_state(certificate_id, update_certificate_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_certificate(certificate_id, update_certificate_details, base_operation_opts) use_util = OCI::Apigateway::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::Apigateway::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_sdk_and_wait_for_state(sdk_id, update_sdk_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Apigateway::ApiGatewayClient#update_sdk and then waits for the Models::Sdk acted upon to enter the given state(s).
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 |
# File 'lib/oci/apigateway/api_gateway_client_composite_operations.rb', line 735 def update_sdk_and_wait_for_state(sdk_id, update_sdk_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_sdk(sdk_id, update_sdk_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_sdk(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 |