def delete_resource(self): return oci_wait_utils.call_and_wait( call_fn=self.client.delete_budget, call_fn_args=(), call_fn_kwargs=dict(budget_id=self.module.params.get("budget_id")), waiter_type=oci_wait_utils.LIFECYCLE_STATE_WAITER_KEY, operation=oci_common_utils.DELETE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_terminated_states(), )
def create_resource(self): create_details = self.get_create_model() return oci_wait_utils.call_and_wait( call_fn=self.client.create_network_security_group, call_fn_args=(), call_fn_kwargs=dict(create_network_security_group_details=create_details), waiter_type=oci_wait_utils.LIFECYCLE_STATE_WAITER_KEY, operation=oci_common_utils.CREATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def delete_resource(self): return oci_wait_utils.call_and_wait( call_fn=self.client.delete_auto_scaling_configuration, call_fn_args=(), call_fn_kwargs=dict(auto_scaling_configuration_id=self.module. params.get("auto_scaling_configuration_id")), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.DELETE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_terminated_states(), )
def create_resource(self): create_details = self.get_create_model() return oci_wait_utils.call_and_wait( call_fn=self.client.create_auto_scaling_configuration, call_fn_args=(), call_fn_kwargs=dict( create_auto_scaling_configuration_details=create_details), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.CREATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def delete_resource(self): return oci_wait_utils.call_and_wait( call_fn=self.client.delete_api_key, call_fn_args=(), call_fn_kwargs=dict( user_id=self.module.params.get("user_id"), fingerprint=self.module.params.get("fingerprint"), ), type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.DELETE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_terminated_states(), )
def create_resource(self): create_details = self.get_create_model() return oci_wait_utils.call_and_wait( call_fn=self.client.launch_autonomous_exadata_infrastructure, call_fn_args=(), call_fn_kwargs=dict( launch_autonomous_exadata_infrastructure_details=create_details ), waiter_type=oci_wait_utils.LIFECYCLE_STATE_WAITER_KEY, operation=oci_common_utils.CREATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def delete_resource(self): return oci_wait_utils.call_and_wait( call_fn=self.client.delete_object_lifecycle_policy, call_fn_args=(), call_fn_kwargs=dict( namespace_name=self.module.params.get("namespace_name"), bucket_name=self.module.params.get("bucket_name"), ), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.DELETE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_terminated_states(), )
def create_resource(self): create_api_key_details = self.get_create_model() return oci_wait_utils.call_and_wait( call_fn=self.client.upload_api_key, call_fn_args=(), call_fn_kwargs=dict( user_id=self.module.params.get("user_id"), create_api_key_details=create_api_key_details, ), type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.CREATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def update_resource(self): update_details = self.get_update_model() return oci_wait_utils.call_and_wait( call_fn=self.client.update_dynamic_group, call_fn_args=(), call_fn_kwargs=dict( dynamic_group_id=self.module.params.get("dynamic_group_id"), update_dynamic_group_details=update_details, ), waiter_type=oci_wait_utils.LIFECYCLE_STATE_WAITER_KEY, operation=oci_common_utils.UPDATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def update_resource(self): update_details = self.get_update_model() return oci_wait_utils.call_and_wait( call_fn=self.client.update_configuration, call_fn_args=(), call_fn_kwargs=dict( compartment_id=self.module.params.get("compartment_id"), update_configuration_details=update_details, ), waiter_type=oci_wait_utils.WORK_REQUEST_WAITER_KEY, operation=oci_common_utils.UPDATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_work_request_completed_states(), )
def update_resource(self): update_details = self.get_update_model() return oci_wait_utils.call_and_wait( call_fn=self.client.put_object_lifecycle_policy, call_fn_args=(), call_fn_kwargs=dict( namespace_name=self.module.params.get("namespace_name"), bucket_name=self.module.params.get("bucket_name"), put_object_lifecycle_policy_details=update_details, ), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.UPDATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def reset_idp_scim_client(self): return oci_wait_utils.call_and_wait( call_fn=self.client.reset_idp_scim_client, call_fn_args=(), call_fn_kwargs=dict( identity_provider_id=self.module.params.get("identity_provider_id") ), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation="{0}_{1}".format( self.module.params.get("action").upper(), oci_common_utils.ACTION_OPERATION_KEY, ), waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or self.get_action_desired_states(self.module.params.get("action")), )
def update_resource(self): update_details = self.get_update_model() return oci_wait_utils.call_and_wait( call_fn=self.client.update_auto_scaling_policy, call_fn_args=(), call_fn_kwargs=dict( auto_scaling_configuration_id=self.module.params.get( "auto_scaling_configuration_id"), auto_scaling_policy_id=self.module.params.get( "auto_scaling_policy_id"), update_auto_scaling_policy_details=update_details, ), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation=oci_common_utils.UPDATE_OPERATION_KEY, waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_resource_active_states(), )
def copy(self): action_details = convert_input_data_to_model_class( self.module.params, CopyVolumeBackupDetails) return oci_wait_utils.call_and_wait( call_fn=self.client.copy_volume_backup, call_fn_args=(), call_fn_kwargs=dict( volume_backup_id=self.module.params.get("volume_backup_id"), copy_volume_backup_details=action_details, ), waiter_type=oci_wait_utils.LIFECYCLE_STATE_WAITER_KEY, operation="{0}_{1}".format( self.module.params.get("action").upper(), oci_common_utils.ACTION_OPERATION_KEY, ), waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or self.get_action_desired_states(self.module.params.get("action")), )
def restore_objects(self): action_details = convert_input_data_to_model_class( self.module.params, RestoreObjectsDetails) return oci_wait_utils.call_and_wait( call_fn=self.client.restore_objects, call_fn_args=(), call_fn_kwargs=dict( namespace_name=self.module.params.get("namespace_name"), bucket_name=self.module.params.get("bucket_name"), restore_objects_details=action_details, ), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation="{0}_{1}".format( self.module.params.get("action").upper(), oci_common_utils.ACTION_OPERATION_KEY, ), waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or self.get_action_desired_states(self.module.params.get("action")), )
def copy_object(self): action_details = convert_input_data_to_model_class( self.module.params, CopyObjectDetails) return oci_wait_utils.call_and_wait( call_fn=self.client.copy_object, call_fn_args=(), call_fn_kwargs=dict( namespace_name=self.module.params.get("namespace_name"), bucket_name=self.module.params.get("bucket_name"), copy_object_details=action_details, ), waiter_type=oci_wait_utils.WORK_REQUEST_WAITER_KEY, operation="{0}_{1}".format( self.module.params.get("action").upper(), oci_common_utils.ACTION_OPERATION_KEY, ), waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or oci_common_utils.get_work_request_completed_states(), )
def update_network_security_group_security_rules(self): action_details = convert_input_data_to_model_class( self.module.params, UpdateNetworkSecurityGroupSecurityRulesDetails) return oci_wait_utils.call_and_wait( call_fn=self.client.update_network_security_group_security_rules, call_fn_args=(), call_fn_kwargs=dict( network_security_group_id=self.module.params.get( "network_security_group_id"), update_network_security_group_security_rules_details= action_details, ), waiter_type=oci_wait_utils.NONE_WAITER_KEY, operation="{0}_{1}".format( self.module.params.get("action").upper(), oci_common_utils.ACTION_OPERATION_KEY, ), waiter_client=self.client, resource_helper=self, wait_for_states=self.module.params.get("wait_until") or self.get_action_desired_states(self.module.params.get("action")), )