Class: OCI::Identity::IdentityClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::Identity::IdentityClientCompositeOperations
- Defined in:
- lib/oci/identity/identity_client_composite_operations.rb
Overview
This class provides a wrapper around IdentityClient 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::Identity::IdentityClient
readonly
The IdentityClient used to communicate with the service_client.
Instance Method Summary collapse
-
#add_user_to_group_and_wait_for_state(add_user_to_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#add_user_to_group and then waits for the Models::UserGroupMembership acted upon to enter the given state(s).
-
#bulk_delete_resources_and_wait_for_state(compartment_id, bulk_delete_resources_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#bulk_delete_resources and then waits for the Models::WorkRequest to enter the given state(s).
-
#bulk_delete_tags_and_wait_for_state(bulk_delete_tags_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#bulk_delete_tags and then waits for the Models::WorkRequest to enter the given state(s).
-
#bulk_move_resources_and_wait_for_state(compartment_id, bulk_move_resources_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#bulk_move_resources and then waits for the Models::WorkRequest to enter the given state(s).
-
#cascade_delete_tag_namespace_and_wait_for_state(tag_namespace_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#cascade_delete_tag_namespace and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_compartment_and_wait_for_state(create_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_compartment and then waits for the Models::Compartment acted upon to enter the given state(s).
-
#create_dynamic_group_and_wait_for_state(create_dynamic_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_dynamic_group and then waits for the Models::DynamicGroup acted upon to enter the given state(s).
-
#create_group_and_wait_for_state(create_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_group and then waits for the Models::Group acted upon to enter the given state(s).
-
#create_identity_provider_and_wait_for_state(create_identity_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_identity_provider and then waits for the Models::IdentityProvider acted upon to enter the given state(s).
-
#create_idp_group_mapping_and_wait_for_state(create_idp_group_mapping_details, identity_provider_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_idp_group_mapping and then waits for the Models::IdpGroupMapping acted upon to enter the given state(s).
-
#create_mfa_totp_device_and_wait_for_state(user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_mfa_totp_device and then waits for the Models::MfaTotpDevice acted upon to enter the given state(s).
-
#create_policy_and_wait_for_state(create_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_policy and then waits for the Models::Policy acted upon to enter the given state(s).
-
#create_tag_and_wait_for_state(tag_namespace_id, create_tag_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_tag and then waits for the Models::Tag acted upon to enter the given state(s).
-
#create_tag_default_and_wait_for_state(create_tag_default_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_tag_default and then waits for the Models::TagDefault acted upon to enter the given state(s).
-
#create_tag_namespace_and_wait_for_state(create_tag_namespace_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_tag_namespace and then waits for the Models::TagNamespace acted upon to enter the given state(s).
-
#create_user_and_wait_for_state(create_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_user and then waits for the Models::User acted upon to enter the given state(s).
-
#delete_compartment_and_wait_for_state(compartment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_dynamic_group_and_wait_for_state(dynamic_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_dynamic_group and then waits for the Models::DynamicGroup acted upon to enter the given state(s).
-
#delete_group_and_wait_for_state(group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_group and then waits for the Models::Group acted upon to enter the given state(s).
-
#delete_identity_provider_and_wait_for_state(identity_provider_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_identity_provider and then waits for the Models::IdentityProvider acted upon to enter the given state(s).
-
#delete_policy_and_wait_for_state(policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_policy and then waits for the Models::Policy acted upon to enter the given state(s).
-
#delete_tag_and_wait_for_state(tag_namespace_id, tag_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_tag and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_tag_default_and_wait_for_state(tag_default_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_tag_default and then waits for the Models::TagDefault acted upon to enter the given state(s).
-
#delete_tag_namespace_and_wait_for_state(tag_namespace_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_tag_namespace and then waits for the Models::TagNamespace acted upon to enter the given state(s).
-
#delete_user_and_wait_for_state(user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_user and then waits for the Models::User acted upon to enter the given state(s).
-
#generate_totp_seed_and_wait_for_state(user_id, mfa_totp_device_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#generate_totp_seed and then waits for the Models::MfaTotpDevice acted upon to enter the given state(s).
-
#initialize(service_client = OCI::Identity::IdentityClient.new) ⇒ IdentityClientCompositeOperations
constructor
Initializes a new IdentityClientCompositeOperations.
-
#move_compartment_and_wait_for_state(compartment_id, move_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#move_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#recover_compartment_and_wait_for_state(compartment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#recover_compartment and then waits for the Models::Compartment acted upon to enter the given state(s).
-
#update_compartment_and_wait_for_state(compartment_id, update_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_compartment and then waits for the Models::Compartment acted upon to enter the given state(s).
-
#update_dynamic_group_and_wait_for_state(dynamic_group_id, update_dynamic_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_dynamic_group and then waits for the Models::DynamicGroup acted upon to enter the given state(s).
-
#update_group_and_wait_for_state(group_id, update_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_group and then waits for the Models::Group acted upon to enter the given state(s).
-
#update_identity_provider_and_wait_for_state(identity_provider_id, update_identity_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_identity_provider and then waits for the Models::IdentityProvider acted upon to enter the given state(s).
-
#update_idp_group_mapping_and_wait_for_state(identity_provider_id, mapping_id, update_idp_group_mapping_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_idp_group_mapping and then waits for the Models::IdpGroupMapping acted upon to enter the given state(s).
-
#update_policy_and_wait_for_state(policy_id, update_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_policy and then waits for the Models::Policy acted upon to enter the given state(s).
-
#update_tag_and_wait_for_state(tag_namespace_id, tag_name, update_tag_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_tag and then waits for the Models::Tag acted upon to enter the given state(s).
-
#update_tag_default_and_wait_for_state(tag_default_id, update_tag_default_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_tag_default and then waits for the Models::TagDefault acted upon to enter the given state(s).
-
#update_tag_namespace_and_wait_for_state(tag_namespace_id, update_tag_namespace_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_tag_namespace and then waits for the Models::TagNamespace acted upon to enter the given state(s).
-
#update_user_and_wait_for_state(user_id, update_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_user and then waits for the Models::User acted upon to enter the given state(s).
-
#update_user_capabilities_and_wait_for_state(user_id, update_user_capabilities_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_user_capabilities and then waits for the Models::User acted upon to enter the given state(s).
-
#update_user_state_and_wait_for_state(user_id, update_state_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_user_state and then waits for the Models::User acted upon to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::Identity::IdentityClient.new) ⇒ IdentityClientCompositeOperations
Initializes a new IdentityClientCompositeOperations
20 21 22 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 20 def initialize(service_client = OCI::Identity::IdentityClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::Identity::IdentityClient (readonly)
The OCI::Identity::IdentityClient used to communicate with the service_client
14 15 16 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 14 def service_client @service_client end |
Instance Method Details
#add_user_to_group_and_wait_for_state(add_user_to_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#add_user_to_group and then waits for the Models::UserGroupMembership acted upon to enter the given state(s).
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 39 def add_user_to_group_and_wait_for_state(add_user_to_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.add_user_to_group(add_user_to_group_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_user_group_membership(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 |
#bulk_delete_resources_and_wait_for_state(compartment_id, bulk_delete_resources_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#bulk_delete_resources and then waits for the Models::WorkRequest to enter the given state(s).
79 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 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 79 def bulk_delete_resources_and_wait_for_state(compartment_id, bulk_delete_resources_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.bulk_delete_resources(compartment_id, bulk_delete_resources_details, base_operation_opts) use_util = OCI::Identity::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::Identity::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 |
#bulk_delete_tags_and_wait_for_state(bulk_delete_tags_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#bulk_delete_tags and then waits for the Models::WorkRequest to enter the given state(s).
128 129 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 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 128 def (, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.(, base_operation_opts) use_util = OCI::Identity::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::Identity::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 |
#bulk_move_resources_and_wait_for_state(compartment_id, bulk_move_resources_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#bulk_move_resources and then waits for the Models::WorkRequest to enter the given state(s).
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 178 def bulk_move_resources_and_wait_for_state(compartment_id, bulk_move_resources_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.bulk_move_resources(compartment_id, bulk_move_resources_details, base_operation_opts) use_util = OCI::Identity::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::Identity::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 |
#cascade_delete_tag_namespace_and_wait_for_state(tag_namespace_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#cascade_delete_tag_namespace and then waits for the Models::WorkRequest to enter the given state(s).
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 228 def cascade_delete_tag_namespace_and_wait_for_state(tag_namespace_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cascade_delete_tag_namespace(tag_namespace_id, base_operation_opts) use_util = OCI::Identity::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::Identity::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_compartment_and_wait_for_state(create_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_compartment and then waits for the Models::Compartment acted upon to enter the given state(s).
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 277 def create_compartment_and_wait_for_state(create_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_compartment(create_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_compartment(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_dynamic_group_and_wait_for_state(create_dynamic_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_dynamic_group and then waits for the Models::DynamicGroup acted upon to enter the given state(s).
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 316 def create_dynamic_group_and_wait_for_state(create_dynamic_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_dynamic_group(create_dynamic_group_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_dynamic_group(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_group_and_wait_for_state(create_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_group and then waits for the Models::Group acted upon to enter the given state(s).
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 355 def create_group_and_wait_for_state(create_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_group(create_group_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_group(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_identity_provider_and_wait_for_state(create_identity_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_identity_provider and then waits for the Models::IdentityProvider acted upon to enter the given state(s).
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 394 def create_identity_provider_and_wait_for_state(create_identity_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_identity_provider(create_identity_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_identity_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_idp_group_mapping_and_wait_for_state(create_idp_group_mapping_details, identity_provider_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_idp_group_mapping and then waits for the Models::IdpGroupMapping acted upon to enter the given state(s).
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 434 def create_idp_group_mapping_and_wait_for_state(create_idp_group_mapping_details, identity_provider_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_idp_group_mapping(create_idp_group_mapping_details, identity_provider_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_idp_group_mapping(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_mfa_totp_device_and_wait_for_state(user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_mfa_totp_device and then waits for the Models::MfaTotpDevice acted upon to enter the given state(s).
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 473 def create_mfa_totp_device_and_wait_for_state(user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_mfa_totp_device(user_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_mfa_totp_device(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_policy_and_wait_for_state(create_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_policy and then waits for the Models::Policy acted upon to enter the given state(s).
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 512 def create_policy_and_wait_for_state(create_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_policy(create_policy_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_policy(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_tag_and_wait_for_state(tag_namespace_id, create_tag_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_tag and then waits for the Models::Tag 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/identity/identity_client_composite_operations.rb', line 553 def create_tag_and_wait_for_state(tag_namespace_id, create_tag_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_tag(tag_namespace_id, create_tag_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_tag(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_tag_default_and_wait_for_state(create_tag_default_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_tag_default and then waits for the Models::TagDefault acted upon to enter the given state(s).
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 592 def create_tag_default_and_wait_for_state(create_tag_default_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_tag_default(create_tag_default_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_tag_default(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_tag_namespace_and_wait_for_state(create_tag_namespace_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_tag_namespace and then waits for the Models::TagNamespace acted upon to enter the given state(s).
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 631 def create_tag_namespace_and_wait_for_state(create_tag_namespace_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_tag_namespace(create_tag_namespace_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_tag_namespace(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_user_and_wait_for_state(create_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#create_user and then waits for the Models::User acted upon to enter the given state(s).
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 670 def create_user_and_wait_for_state(create_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_user(create_user_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_user(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_compartment_and_wait_for_state(compartment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_compartment and then waits for the Models::WorkRequest to enter the given state(s).
709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 709 def delete_compartment_and_wait_for_state(compartment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_compartment(compartment_id, base_operation_opts) use_util = OCI::Identity::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::Identity::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_dynamic_group_and_wait_for_state(dynamic_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_dynamic_group and then waits for the Models::DynamicGroup acted upon to enter the given state(s).
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 758 def delete_dynamic_group_and_wait_for_state(dynamic_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_dynamic_group(dynamic_group_id) operation_result = @service_client.delete_dynamic_group(dynamic_group_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_group_and_wait_for_state(group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_group and then waits for the Models::Group acted upon to enter the given state(s).
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 798 def delete_group_and_wait_for_state(group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_group(group_id) operation_result = @service_client.delete_group(group_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_identity_provider_and_wait_for_state(identity_provider_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_identity_provider and then waits for the Models::IdentityProvider acted upon to enter the given state(s).
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 838 def delete_identity_provider_and_wait_for_state(identity_provider_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_identity_provider(identity_provider_id) operation_result = @service_client.delete_identity_provider(identity_provider_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_policy_and_wait_for_state(policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_policy and then waits for the Models::Policy acted upon to enter the given state(s).
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 878 def delete_policy_and_wait_for_state(policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_policy(policy_id) operation_result = @service_client.delete_policy(policy_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_tag_and_wait_for_state(tag_namespace_id, tag_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_tag and then waits for the Models::WorkRequest to enter the given state(s).
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 921 def delete_tag_and_wait_for_state(tag_namespace_id, tag_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_tag(tag_namespace_id, tag_name, base_operation_opts) use_util = OCI::Identity::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::Identity::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_tag_default_and_wait_for_state(tag_default_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_tag_default and then waits for the Models::TagDefault acted upon to enter the given state(s).
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 970 def delete_tag_default_and_wait_for_state(tag_default_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_tag_default(tag_default_id) operation_result = @service_client.delete_tag_default(tag_default_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_tag_namespace_and_wait_for_state(tag_namespace_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_tag_namespace and then waits for the Models::TagNamespace acted upon to enter the given state(s).
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1011 def delete_tag_namespace_and_wait_for_state(tag_namespace_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_tag_namespace(tag_namespace_id) operation_result = @service_client.delete_tag_namespace(tag_namespace_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_user_and_wait_for_state(user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#delete_user and then waits for the Models::User acted upon to enter the given state(s).
1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1051 def delete_user_and_wait_for_state(user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_user(user_id) operation_result = @service_client.delete_user(user_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 |
#generate_totp_seed_and_wait_for_state(user_id, mfa_totp_device_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#generate_totp_seed and then waits for the Models::MfaTotpDevice acted upon to enter the given state(s).
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1092 def generate_totp_seed_and_wait_for_state(user_id, mfa_totp_device_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.generate_totp_seed(user_id, mfa_totp_device_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_mfa_totp_device(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 |
#move_compartment_and_wait_for_state(compartment_id, move_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#move_compartment and then waits for the Models::WorkRequest to enter the given state(s).
1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1132 def move_compartment_and_wait_for_state(compartment_id, move_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.move_compartment(compartment_id, move_compartment_details, base_operation_opts) use_util = OCI::Identity::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::Identity::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 |
#recover_compartment_and_wait_for_state(compartment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#recover_compartment and then waits for the Models::Compartment acted upon to enter the given state(s).
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1181 def recover_compartment_and_wait_for_state(compartment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.recover_compartment(compartment_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_compartment(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_compartment_and_wait_for_state(compartment_id, update_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_compartment and then waits for the Models::Compartment acted upon to enter the given state(s).
1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1221 def update_compartment_and_wait_for_state(compartment_id, update_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_compartment(compartment_id, update_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_compartment(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_dynamic_group_and_wait_for_state(dynamic_group_id, update_dynamic_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_dynamic_group and then waits for the Models::DynamicGroup acted upon to enter the given state(s).
1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1261 def update_dynamic_group_and_wait_for_state(dynamic_group_id, update_dynamic_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_dynamic_group(dynamic_group_id, update_dynamic_group_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_dynamic_group(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_group_and_wait_for_state(group_id, update_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_group and then waits for the Models::Group acted upon to enter the given state(s).
1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1301 def update_group_and_wait_for_state(group_id, update_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_group(group_id, update_group_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_group(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_identity_provider_and_wait_for_state(identity_provider_id, update_identity_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_identity_provider and then waits for the Models::IdentityProvider acted upon to enter the given state(s).
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1341 def update_identity_provider_and_wait_for_state(identity_provider_id, update_identity_provider_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_identity_provider(identity_provider_id, update_identity_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_identity_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_idp_group_mapping_and_wait_for_state(identity_provider_id, mapping_id, update_idp_group_mapping_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_idp_group_mapping and then waits for the Models::IdpGroupMapping acted upon to enter the given state(s).
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1382 def update_idp_group_mapping_and_wait_for_state(identity_provider_id, mapping_id, update_idp_group_mapping_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_idp_group_mapping(identity_provider_id, mapping_id, update_idp_group_mapping_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_idp_group_mapping(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_policy_and_wait_for_state(policy_id, update_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_policy and then waits for the Models::Policy acted upon to enter the given state(s).
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1422 def update_policy_and_wait_for_state(policy_id, update_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_policy(policy_id, update_policy_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_policy(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_tag_and_wait_for_state(tag_namespace_id, tag_name, update_tag_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_tag and then waits for the Models::Tag acted upon to enter the given state(s).
1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1465 def update_tag_and_wait_for_state(tag_namespace_id, tag_name, update_tag_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_tag(tag_namespace_id, tag_name, update_tag_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_tag(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_tag_default_and_wait_for_state(tag_default_id, update_tag_default_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_tag_default and then waits for the Models::TagDefault acted upon to enter the given state(s).
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1505 def update_tag_default_and_wait_for_state(tag_default_id, update_tag_default_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_tag_default(tag_default_id, update_tag_default_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_tag_default(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_tag_namespace_and_wait_for_state(tag_namespace_id, update_tag_namespace_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_tag_namespace and then waits for the Models::TagNamespace acted upon to enter the given state(s).
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1546 def update_tag_namespace_and_wait_for_state(tag_namespace_id, update_tag_namespace_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_tag_namespace(tag_namespace_id, update_tag_namespace_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_tag_namespace(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_user_and_wait_for_state(user_id, update_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_user and then waits for the Models::User acted upon to enter the given state(s).
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1586 def update_user_and_wait_for_state(user_id, update_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_user(user_id, update_user_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_user(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_user_capabilities_and_wait_for_state(user_id, update_user_capabilities_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_user_capabilities and then waits for the Models::User acted upon to enter the given state(s).
1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1626 def update_user_capabilities_and_wait_for_state(user_id, update_user_capabilities_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_user_capabilities(user_id, update_user_capabilities_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_user(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_user_state_and_wait_for_state(user_id, update_state_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Identity::IdentityClient#update_user_state and then waits for the Models::User acted upon to enter the given state(s).
1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 |
# File 'lib/oci/identity/identity_client_composite_operations.rb', line 1666 def update_user_state_and_wait_for_state(user_id, update_state_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_user_state(user_id, update_state_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_user(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 |