oci 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/oci.rb +1 -0
- data/lib/oci/analytics/analytics_client.rb +15 -0
- data/lib/oci/announcements_service/announcement_client.rb +4 -0
- data/lib/oci/apigateway/api_gateway_client.rb +15 -0
- data/lib/oci/apigateway/deployment_client.rb +6 -0
- data/lib/oci/apigateway/gateway_client.rb +6 -0
- data/lib/oci/apigateway/work_requests_client.rb +5 -0
- data/lib/oci/application_migration/application_migration_client.rb +19 -0
- data/lib/oci/audit/audit_client.rb +4 -1
- data/lib/oci/audit/models/audit_event.rb +8 -7
- data/lib/oci/audit/models/data.rb +0 -107
- data/lib/oci/audit/models/identity.rb +0 -17
- data/lib/oci/audit/models/request.rb +0 -46
- data/lib/oci/audit/models/response.rb +0 -34
- data/lib/oci/audit/models/state_change.rb +0 -9
- data/lib/oci/auth/signers/ephemeral_resource_principals_signer.rb +0 -1
- data/lib/oci/auth/signers/resource_principals_signer.rb +1 -1
- data/lib/oci/autoscaling/auto_scaling_client.rb +11 -0
- data/lib/oci/bds/bds_client.rb +16 -0
- data/lib/oci/blockchain/blockchain.rb +1 -0
- data/lib/oci/blockchain/blockchain_platform_client.rb +57 -0
- data/lib/oci/blockchain/models/blockchain_platform.rb +36 -3
- data/lib/oci/blockchain/models/blockchain_platform_by_hostname.rb +1 -1
- data/lib/oci/blockchain/models/blockchain_platform_summary.rb +1 -1
- data/lib/oci/blockchain/models/create_blockchain_platform_details.rb +2 -2
- data/lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb +1 -1
- data/lib/oci/blockchain/models/work_request.rb +1 -0
- data/lib/oci/blockchain/models/work_request_resource.rb +18 -4
- data/lib/oci/blockchain/models/work_request_resource_sub_type_detail.rb +206 -0
- data/lib/oci/blockchain/models/work_request_summary.rb +1 -0
- data/lib/oci/budget/budget_client.rb +10 -0
- data/lib/oci/cims/incident_client.rb +7 -0
- data/lib/oci/cims/user_client.rb +1 -0
- data/lib/oci/cloud_guard/cloud_guard_client.rb +82 -0
- data/lib/oci/cloud_guard/models/rule_summary.rb +1 -0
- data/lib/oci/compute_instance_agent/compute_instance_agent_client.rb +6 -0
- data/lib/oci/container_engine/container_engine_client.rb +18 -0
- data/lib/oci/core/blockstorage_client.rb +53 -0
- data/lib/oci/core/compute_client.rb +71 -0
- data/lib/oci/core/compute_management_client.rb +28 -0
- data/lib/oci/core/virtual_network_client.rb +194 -0
- data/lib/oci/data_catalog/data_catalog.rb +5 -0
- data/lib/oci/data_catalog/data_catalog_client.rb +307 -4
- data/lib/oci/data_catalog/models/attribute.rb +45 -4
- data/lib/oci/data_catalog/models/attribute_summary.rb +45 -4
- data/lib/oci/data_catalog/models/faceted_search_aggregation.rb +55 -4
- data/lib/oci/{database/models/create_autonomous_data_warehouse_backup_details.rb → data_catalog/models/rule_attribute.rb} +25 -18
- data/lib/oci/data_catalog/models/rule_collection.rb +161 -0
- data/lib/oci/data_catalog/models/rule_origin_type.rb +12 -0
- data/lib/oci/data_catalog/models/rule_summary.rb +439 -0
- data/lib/oci/data_catalog/models/rule_type.rb +12 -0
- data/lib/oci/data_catalog/models/search_result_collection.rb +18 -4
- data/lib/oci/data_flow/data_flow_client.rb +24 -0
- data/lib/oci/data_integration/data_integration_client.rb +92 -0
- data/lib/oci/data_safe/data_safe.rb +8 -0
- data/lib/oci/data_safe/data_safe_client.rb +606 -13
- data/lib/oci/data_safe/data_safe_client_composite_operations.rb +198 -0
- data/lib/oci/data_safe/models/change_on_prem_connector_compartment_details.rb +154 -0
- data/lib/oci/data_safe/models/create_data_safe_private_endpoint_details.rb +1 -1
- data/lib/oci/{database/models/update_autonomous_data_warehouse_details.rb → data_safe/models/create_on_prem_connector_details.rb} +27 -49
- data/lib/oci/data_safe/models/data_safe_configuration.rb +5 -5
- data/lib/oci/data_safe/models/data_safe_private_endpoint.rb +2 -2
- data/lib/oci/data_safe/models/data_safe_private_endpoint_summary.rb +1 -1
- data/lib/oci/data_safe/models/enable_data_safe_configuration_details.rb +6 -40
- data/lib/oci/{database/models/generate_autonomous_data_warehouse_wallet_details.rb → data_safe/models/generate_on_prem_connector_configuration_details.rb} +3 -4
- data/lib/oci/{database/models/autonomous_data_warehouse_backup_summary.rb → data_safe/models/on_prem_connector.rb} +98 -98
- data/lib/oci/data_safe/models/on_prem_connector_lifecycle_state.rb +16 -0
- data/lib/oci/{database/models/autonomous_data_warehouse_backup.rb → data_safe/models/on_prem_connector_summary.rb} +90 -99
- data/lib/oci/data_safe/models/service_list.rb +1 -0
- data/lib/oci/data_safe/models/update_data_safe_private_endpoint_details.rb +1 -1
- data/lib/oci/data_safe/models/update_on_prem_connector_details.rb +198 -0
- data/lib/oci/data_safe/models/update_on_prem_connector_wallet_details.rb +156 -0
- data/lib/oci/data_safe/models/work_request.rb +11 -6
- data/lib/oci/data_safe/models/work_request_error.rb +3 -4
- data/lib/oci/data_safe/models/work_request_log_entry.rb +3 -3
- data/lib/oci/data_safe/models/work_request_summary.rb +13 -8
- data/lib/oci/data_science/data_science_client.rb +34 -0
- data/lib/oci/database/database.rb +4 -8
- data/lib/oci/database/database_client.rb +523 -766
- data/lib/oci/database/database_client_composite_operations.rb +1299 -330
- data/lib/oci/database/models/activate_exadata_infrastructure_details.rb +2 -1
- data/lib/oci/database/models/autonomous_container_database.rb +3 -3
- data/lib/oci/database/models/autonomous_container_database_dataguard_association.rb +2 -2
- data/lib/oci/database/models/autonomous_container_database_summary.rb +3 -3
- data/lib/oci/database/models/autonomous_data_warehouse.rb +8 -21
- data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +8 -21
- data/lib/oci/database/models/autonomous_database.rb +35 -3
- data/lib/oci/database/models/autonomous_database_apex.rb +169 -0
- data/lib/oci/database/models/autonomous_database_dataguard_association.rb +2 -2
- data/lib/oci/database/models/autonomous_database_summary.rb +35 -3
- data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +2 -0
- data/lib/oci/database/models/autonomous_db_version_summary.rb +2 -0
- data/lib/oci/database/models/backup.rb +19 -5
- data/lib/oci/database/models/backup_summary.rb +19 -5
- data/lib/oci/database/models/change_cloud_exadata_infrastructure_compartment_details.rb +1 -1
- data/lib/oci/database/models/change_cloud_vm_cluster_compartment_details.rb +1 -1
- data/lib/oci/database/models/cloud_exadata_infrastructure.rb +2 -1
- data/lib/oci/database/models/cloud_exadata_infrastructure_summary.rb +2 -1
- data/lib/oci/database/models/cloud_vm_cluster.rb +1 -1
- data/lib/oci/database/models/cloud_vm_cluster_summary.rb +1 -1
- data/lib/oci/database/models/create_autonomous_container_database_details.rb +1 -1
- data/lib/oci/database/models/create_autonomous_database_base.rb +7 -3
- data/lib/oci/database/models/create_cloud_exadata_infrastructure_details.rb +1 -1
- data/lib/oci/database/models/create_cloud_vm_cluster_details.rb +2 -1
- data/lib/oci/database/models/create_database_base.rb +33 -4
- data/lib/oci/database/models/create_database_from_backup.rb +9 -1
- data/lib/oci/database/models/create_db_home_base.rb +30 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +9 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +9 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_database_details.rb +9 -1
- data/lib/oci/database/models/create_db_home_with_vm_cluster_id_details.rb +9 -1
- data/lib/oci/database/models/create_db_home_with_vm_cluster_id_from_backup_details.rb +9 -1
- data/lib/oci/database/models/create_exadata_infrastructure_details.rb +16 -2
- data/lib/oci/database/models/create_new_database_details.rb +9 -1
- data/lib/oci/database/models/create_vm_cluster_details.rb +2 -1
- data/lib/oci/database/models/database.rb +16 -2
- data/lib/oci/database/models/database_summary.rb +16 -2
- data/lib/oci/database/models/db_home.rb +16 -2
- data/lib/oci/database/models/db_home_summary.rb +16 -2
- data/lib/oci/database/models/db_system.rb +16 -2
- data/lib/oci/database/models/db_system_summary.rb +16 -2
- data/lib/oci/database/models/exadata_db_system_migration.rb +1 -1
- data/lib/oci/database/models/exadata_db_system_migration_summary.rb +1 -1
- data/lib/oci/database/models/exadata_infrastructure.rb +15 -1
- data/lib/oci/database/models/exadata_infrastructure_summary.rb +18 -2
- data/lib/oci/database/models/flex_component_collection.rb +150 -0
- data/lib/oci/database/models/flex_component_summary.rb +197 -0
- data/lib/oci/database/models/generate_recommended_network_details.rb +1 -1
- data/lib/oci/database/models/launch_db_system_base.rb +30 -1
- data/lib/oci/database/models/launch_db_system_details.rb +9 -1
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +9 -1
- data/lib/oci/database/models/launch_db_system_from_database_details.rb +9 -1
- data/lib/oci/database/models/launch_db_system_from_db_system_details.rb +9 -1
- data/lib/oci/database/models/maintenance_run.rb +2 -1
- data/lib/oci/database/models/maintenance_run_summary.rb +2 -1
- data/lib/oci/database/models/migrate_vault_key_details.rb +170 -0
- data/lib/oci/database/models/update_autonomous_container_database_details.rb +1 -1
- data/lib/oci/database/models/update_autonomous_database_details.rb +6 -2
- data/lib/oci/database/models/update_cloud_exadata_infrastructure_details.rb +1 -1
- data/lib/oci/database/models/update_cloud_vm_cluster_details.rb +3 -2
- data/lib/oci/database/models/update_database_details.rb +1 -1
- data/lib/oci/database/models/update_details.rb +1 -1
- data/lib/oci/database/models/update_exadata_infrastructure_details.rb +16 -2
- data/lib/oci/database/models/update_history_entry_summary.rb +2 -1
- data/lib/oci/database/models/update_summary.rb +1 -1
- data/lib/oci/database/models/update_vm_cluster_details.rb +3 -1
- data/lib/oci/database/models/update_vm_cluster_network_details.rb +1 -1
- data/lib/oci/database/models/vm_cluster.rb +2 -1
- data/lib/oci/database/models/vm_cluster_network_details.rb +1 -1
- data/lib/oci/database/models/vm_cluster_network_summary.rb +2 -1
- data/lib/oci/database/models/vm_cluster_summary.rb +1 -0
- data/lib/oci/database/models/vm_network_details.rb +2 -1
- data/lib/oci/dns/dns_client.rb +49 -0
- data/lib/oci/dts/appliance_export_job_client.rb +6 -0
- data/lib/oci/dts/shipping_vendors_client.rb +1 -0
- data/lib/oci/dts/transfer_appliance_client.rb +8 -0
- data/lib/oci/dts/transfer_appliance_entitlement_client.rb +3 -0
- data/lib/oci/dts/transfer_device_client.rb +5 -0
- data/lib/oci/dts/transfer_job_client.rb +6 -0
- data/lib/oci/dts/transfer_package_client.rb +7 -0
- data/lib/oci/email/email_client.rb +10 -0
- data/lib/oci/events/events_client.rb +6 -0
- data/lib/oci/file_storage/file_storage_client.rb +25 -0
- data/lib/oci/functions/functions_invoke_client.rb +1 -0
- data/lib/oci/functions/functions_management_client.rb +11 -0
- data/lib/oci/healthchecks/health_checks_client.rb +17 -0
- data/lib/oci/identity/identity_client.rb +120 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +12 -1
- data/lib/oci/integration/integration.rb +3 -0
- data/lib/oci/integration/integration_instance_client.rb +12 -0
- data/lib/oci/integration/models/create_custom_endpoint_details.rb +167 -0
- data/lib/oci/integration/models/create_integration_instance_details.rb +44 -1
- data/lib/oci/integration/models/custom_endpoint_details.rb +180 -0
- data/lib/oci/integration/models/integration_instance.rb +43 -1
- data/lib/oci/integration/models/integration_instance_summary.rb +43 -1
- data/lib/oci/integration/models/update_custom_endpoint_details.rb +167 -0
- data/lib/oci/integration/models/update_integration_instance_details.rb +47 -4
- data/lib/oci/key_management/kms_crypto_client.rb +4 -0
- data/lib/oci/key_management/kms_management_client.rb +31 -0
- data/lib/oci/key_management/kms_vault_client.rb +11 -0
- data/lib/oci/limits/limits_client.rb +4 -0
- data/lib/oci/limits/quotas_client.rb +5 -0
- data/lib/oci/load_balancer/load_balancer.rb +1 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +56 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +14 -1
- data/lib/oci/load_balancer/models/shape_details.rb +180 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +1 -1
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +1 -1
- data/lib/oci/load_balancer/models/update_load_balancer_shape_details.rb +22 -4
- data/lib/oci/log_analytics/log_analytics_client.rb +126 -0
- data/lib/oci/logging/logging_management_client.rb +32 -0
- data/lib/oci/loggingingestion/logging_client.rb +1 -0
- data/lib/oci/loggingsearch/log_search_client.rb +1 -0
- data/lib/oci/management_agent/management_agent.rb +2 -0
- data/lib/oci/management_agent/management_agent_client.rb +101 -0
- data/lib/oci/management_agent/models/availability_history_summary.rb +217 -0
- data/lib/oci/management_agent/models/availability_status.rb +12 -0
- data/lib/oci/management_agent/models/management_agent.rb +35 -1
- data/lib/oci/management_agent/models/management_agent_summary.rb +49 -1
- data/lib/oci/management_dashboard/dashx_apis_client.rb +14 -0
- data/lib/oci/marketplace/marketplace_client.rb +16 -0
- data/lib/oci/monitoring/monitoring_client.rb +12 -0
- data/lib/oci/mysql/channels_client.rb +625 -0
- data/lib/oci/mysql/channels_client_composite_operations.rb +271 -0
- data/lib/oci/mysql/db_backups_client.rb +11 -0
- data/lib/oci/mysql/db_system_client.rb +17 -0
- data/lib/oci/mysql/models/backup.rb +16 -3
- data/lib/oci/mysql/models/backup_summary.rb +17 -3
- data/lib/oci/mysql/models/ca_certificate.rb +189 -0
- data/lib/oci/mysql/models/channel.rb +340 -0
- data/lib/oci/mysql/models/channel_source.rb +189 -0
- data/lib/oci/mysql/models/channel_source_mysql.rb +230 -0
- data/lib/oci/mysql/models/channel_summary.rb +304 -0
- data/lib/oci/mysql/models/channel_target.rb +189 -0
- data/lib/oci/mysql/models/channel_target_db_system.rb +193 -0
- data/lib/oci/mysql/models/configuration.rb +2 -2
- data/lib/oci/mysql/models/configuration_summary.rb +2 -2
- data/lib/oci/mysql/models/configuration_variables.rb +30 -15
- data/lib/oci/mysql/models/create_backup_details.rb +2 -2
- data/lib/oci/mysql/models/create_backup_policy_details.rb +3 -0
- data/lib/oci/mysql/models/create_channel_details.rb +248 -0
- data/lib/oci/mysql/models/create_channel_source_details.rb +170 -0
- data/lib/oci/mysql/models/create_channel_source_from_mysql_details.rb +224 -0
- data/lib/oci/mysql/models/create_channel_target_details.rb +170 -0
- data/lib/oci/mysql/models/create_channel_target_from_db_system_details.rb +193 -0
- data/lib/oci/mysql/models/create_configuration_details.rb +2 -3
- data/lib/oci/mysql/models/create_db_system_details.rb +1 -1
- data/lib/oci/mysql/models/create_db_system_source_details.rb +1 -0
- data/lib/oci/mysql/models/create_db_system_source_from_none_details.rb +146 -0
- data/lib/oci/mysql/models/db_system.rb +15 -3
- data/lib/oci/mysql/models/db_system_snapshot.rb +437 -0
- data/lib/oci/mysql/models/db_system_source.rb +1 -0
- data/lib/oci/mysql/models/db_system_source_from_none.rb +146 -0
- data/lib/oci/mysql/models/db_system_summary.rb +2 -2
- data/lib/oci/mysql/models/pem_ca_certificate.rb +158 -0
- data/lib/oci/mysql/models/update_backup_details.rb +2 -2
- data/lib/oci/mysql/models/update_backup_policy_details.rb +3 -0
- data/lib/oci/mysql/models/update_channel_details.rb +234 -0
- data/lib/oci/mysql/models/update_channel_source_details.rb +171 -0
- data/lib/oci/mysql/models/update_channel_source_from_mysql_details.rb +224 -0
- data/lib/oci/mysql/models/update_channel_target_details.rb +170 -0
- data/lib/oci/mysql/models/update_channel_target_from_db_system_details.rb +179 -0
- data/lib/oci/mysql/models/update_configuration_details.rb +2 -2
- data/lib/oci/mysql/mysql.rb +23 -0
- data/lib/oci/mysql/mysqlaas_client.rb +7 -0
- data/lib/oci/mysql/work_requests_client.rb +4 -0
- data/lib/oci/nosql/nosql_client.rb +22 -0
- data/lib/oci/object_storage/models/object_lifecycle_rule.rb +11 -9
- data/lib/oci/object_storage/object_storage_client.rb +55 -6
- data/lib/oci/oce/oce_instance_client.rb +10 -0
- data/lib/oci/ocvp/esxi_host_client.rb +5 -0
- data/lib/oci/ocvp/sddc_client.rb +7 -0
- data/lib/oci/ocvp/work_request_client.rb +4 -0
- data/lib/oci/oda/oda_client.rb +12 -0
- data/lib/oci/ons/notification_control_plane_client.rb +6 -0
- data/lib/oci/ons/notification_data_plane_client.rb +10 -0
- data/lib/oci/opsi/models/sql_insight_aggregation.rb +2 -1
- data/lib/oci/opsi/models/sql_insight_thresholds.rb +21 -4
- data/lib/oci/opsi/operations_insights_client.rb +22 -3
- data/lib/oci/optimizer/optimizer_client.rb +22 -0
- data/lib/oci/os_management/os_management_client.rb +53 -0
- data/lib/oci/regions.rb +3 -0
- data/lib/oci/resource_manager/models/configuration_source_provider.rb +5 -1
- data/lib/oci/resource_manager/models/configuration_source_provider_summary.rb +3 -1
- data/lib/oci/resource_manager/models/create_configuration_source_provider_details.rb +4 -1
- data/lib/oci/resource_manager/models/create_github_access_token_configuration_source_provider_details.rb +200 -0
- data/lib/oci/resource_manager/models/create_gitlab_access_token_configuration_source_provider_details.rb +3 -3
- data/lib/oci/resource_manager/models/github_access_token_configuration_source_provider.rb +198 -0
- data/lib/oci/resource_manager/models/github_access_token_configuration_source_provider_summary.rb +198 -0
- data/lib/oci/resource_manager/models/gitlab_access_token_configuration_source_provider.rb +2 -2
- data/lib/oci/resource_manager/models/gitlab_access_token_configuration_source_provider_summary.rb +2 -2
- data/lib/oci/resource_manager/models/update_configuration_source_provider_details.rb +4 -1
- data/lib/oci/resource_manager/models/update_github_access_token_configuration_source_provider_details.rb +196 -0
- data/lib/oci/resource_manager/models/update_gitlab_access_token_configuration_source_provider_details.rb +3 -3
- data/lib/oci/resource_manager/resource_manager.rb +4 -0
- data/lib/oci/resource_manager/resource_manager_client.rb +36 -2
- data/lib/oci/resource_search/resource_search_client.rb +3 -0
- data/lib/oci/rover/models/change_rover_cluster_compartment_details.rb +155 -0
- data/lib/oci/{database/models/autonomous_data_warehouse_console_token_details.rb → rover/models/change_rover_entitlement_compartment_details.rb} +13 -23
- data/lib/oci/rover/models/change_rover_node_compartment_details.rb +155 -0
- data/lib/oci/rover/models/create_rover_cluster_details.rb +459 -0
- data/lib/oci/rover/models/create_rover_entitlement_details.rb +320 -0
- data/lib/oci/rover/models/create_rover_node_details.rb +501 -0
- data/lib/oci/rover/models/enclosure_type.rb +11 -0
- data/lib/oci/rover/models/lifecycle_state.rb +15 -0
- data/lib/oci/rover/models/node_type.rb +11 -0
- data/lib/oci/rover/models/rover_cluster.rb +610 -0
- data/lib/oci/rover/models/rover_cluster_certificate.rb +150 -0
- data/lib/oci/{database/models/restore_autonomous_data_warehouse_details.rb → rover/models/rover_cluster_collection.rb} +11 -12
- data/lib/oci/{database/models/create_autonomous_data_warehouse_details.rb → rover/models/rover_cluster_summary.rb} +99 -84
- data/lib/oci/rover/models/rover_entitlement.rb +363 -0
- data/lib/oci/rover/models/rover_entitlement_collection.rb +150 -0
- data/lib/oci/rover/models/rover_entitlement_summary.rb +285 -0
- data/lib/oci/rover/models/rover_node.rb +661 -0
- data/lib/oci/rover/models/rover_node_action_set_key_details.rb +154 -0
- data/lib/oci/rover/models/rover_node_certificate.rb +150 -0
- data/lib/oci/rover/models/rover_node_collection.rb +150 -0
- data/lib/oci/rover/models/rover_node_encryption_key.rb +154 -0
- data/lib/oci/rover/models/rover_node_get_rpt.rb +168 -0
- data/lib/oci/rover/models/rover_node_set_key.rb +154 -0
- data/lib/oci/rover/models/rover_node_summary.rb +323 -0
- data/lib/oci/rover/models/rover_workload.rb +264 -0
- data/lib/oci/rover/models/shipping_address.rb +276 -0
- data/lib/oci/rover/models/sort_orders.rb +11 -0
- data/lib/oci/rover/models/update_rover_cluster_details.rb +445 -0
- data/lib/oci/rover/models/update_rover_entitlement_details.rb +306 -0
- data/lib/oci/rover/models/update_rover_node_details.rb +487 -0
- data/lib/oci/rover/rover.rb +54 -0
- data/lib/oci/rover/rover_cluster_client.rb +549 -0
- data/lib/oci/rover/rover_cluster_client_composite_operations.rb +144 -0
- data/lib/oci/rover/rover_entitlement_client.rb +514 -0
- data/lib/oci/rover/rover_entitlement_client_composite_operations.rb +144 -0
- data/lib/oci/rover/rover_node_client.rb +738 -0
- data/lib/oci/rover/rover_node_client_composite_operations.rb +144 -0
- data/lib/oci/rover/util.rb +3 -0
- data/lib/oci/sch/service_connector_client.rb +12 -0
- data/lib/oci/secrets/secrets_client.rb +2 -0
- data/lib/oci/streaming/stream_admin_client.rb +18 -0
- data/lib/oci/streaming/stream_client.rb +8 -0
- data/lib/oci/tenant_manager_control_plane/link_client.rb +3 -0
- data/lib/oci/tenant_manager_control_plane/recipient_invitation_client.rb +5 -0
- data/lib/oci/tenant_manager_control_plane/sender_invitation_client.rb +5 -0
- data/lib/oci/tenant_manager_control_plane/work_request_client.rb +4 -0
- data/lib/oci/usage_api/usageapi_client.rb +2 -0
- data/lib/oci/vault/vaults_client.rb +11 -0
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/redirect_client.rb +6 -0
- data/lib/oci/waas/waas_client.rb +66 -0
- data/lib/oci/work_requests/work_request_client.rb +4 -0
- metadata +91 -10
|
@@ -105,31 +105,544 @@ module OCI
|
|
|
105
105
|
# rubocop:disable Layout/EmptyLines
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
108
|
+
# Calls {OCI::Database::DatabaseClient#change_autonomous_container_database_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
109
|
+
# to enter the given state(s).
|
|
110
|
+
#
|
|
111
|
+
# @param [OCI::Database::Models::ChangeCompartmentDetails] change_compartment_details Request to move Autonomous Container Database to a different compartment
|
|
112
|
+
# @param [String] autonomous_container_database_id The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
113
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
114
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_autonomous_container_database_compartment}
|
|
115
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
116
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
117
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
118
|
+
#
|
|
119
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
120
|
+
def change_autonomous_container_database_compartment_and_wait_for_state(change_compartment_details, autonomous_container_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
121
|
+
operation_result = @service_client.change_autonomous_container_database_compartment(change_compartment_details, autonomous_container_database_id, base_operation_opts)
|
|
122
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
123
|
+
|
|
124
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
125
|
+
|
|
126
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
127
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
128
|
+
|
|
129
|
+
begin
|
|
130
|
+
if use_util
|
|
131
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
132
|
+
@service_client,
|
|
133
|
+
wait_for_resource_id,
|
|
134
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
135
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
136
|
+
)
|
|
137
|
+
else
|
|
138
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
139
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
140
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
141
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
142
|
+
)
|
|
143
|
+
end
|
|
144
|
+
result_to_return = waiter_result
|
|
145
|
+
|
|
146
|
+
return result_to_return
|
|
147
|
+
rescue StandardError
|
|
148
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
152
|
+
# rubocop:enable Layout/EmptyLines
|
|
153
|
+
|
|
154
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
155
|
+
# rubocop:disable Layout/EmptyLines
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
# Calls {OCI::Database::DatabaseClient#change_autonomous_database_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
159
|
+
# to enter the given state(s).
|
|
160
|
+
#
|
|
161
|
+
# @param [OCI::Database::Models::ChangeCompartmentDetails] change_compartment_details Request to move Autonomous Database to a different compartment
|
|
162
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
163
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
164
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_autonomous_database_compartment}
|
|
165
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
166
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
167
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
168
|
+
#
|
|
169
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
170
|
+
def change_autonomous_database_compartment_and_wait_for_state(change_compartment_details, autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
171
|
+
operation_result = @service_client.change_autonomous_database_compartment(change_compartment_details, autonomous_database_id, base_operation_opts)
|
|
172
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
173
|
+
|
|
174
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
175
|
+
|
|
176
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
177
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
178
|
+
|
|
179
|
+
begin
|
|
180
|
+
if use_util
|
|
181
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
182
|
+
@service_client,
|
|
183
|
+
wait_for_resource_id,
|
|
184
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
185
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
186
|
+
)
|
|
187
|
+
else
|
|
188
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
189
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
190
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
191
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
result_to_return = waiter_result
|
|
195
|
+
|
|
196
|
+
return result_to_return
|
|
197
|
+
rescue StandardError
|
|
198
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
202
|
+
# rubocop:enable Layout/EmptyLines
|
|
203
|
+
|
|
204
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
205
|
+
# rubocop:disable Layout/EmptyLines
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
# Calls {OCI::Database::DatabaseClient#change_autonomous_exadata_infrastructure_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
209
|
+
# to enter the given state(s).
|
|
210
|
+
#
|
|
211
|
+
# @param [OCI::Database::Models::ChangeCompartmentDetails] change_compartment_details Request to move an Autonomous Exadata Infrastructure resource to a different compartment.
|
|
212
|
+
# @param [String] autonomous_exadata_infrastructure_id The Autonomous Exadata Infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
213
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
214
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_autonomous_exadata_infrastructure_compartment}
|
|
215
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
216
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
217
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
218
|
+
#
|
|
219
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
220
|
+
def change_autonomous_exadata_infrastructure_compartment_and_wait_for_state(change_compartment_details, autonomous_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
221
|
+
operation_result = @service_client.change_autonomous_exadata_infrastructure_compartment(change_compartment_details, autonomous_exadata_infrastructure_id, base_operation_opts)
|
|
222
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
223
|
+
|
|
224
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
225
|
+
|
|
226
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
227
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
228
|
+
|
|
229
|
+
begin
|
|
230
|
+
if use_util
|
|
231
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
232
|
+
@service_client,
|
|
233
|
+
wait_for_resource_id,
|
|
234
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
235
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
236
|
+
)
|
|
237
|
+
else
|
|
238
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
239
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
240
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
241
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
242
|
+
)
|
|
243
|
+
end
|
|
244
|
+
result_to_return = waiter_result
|
|
245
|
+
|
|
246
|
+
return result_to_return
|
|
247
|
+
rescue StandardError
|
|
248
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
252
|
+
# rubocop:enable Layout/EmptyLines
|
|
253
|
+
|
|
254
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
255
|
+
# rubocop:disable Layout/EmptyLines
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
# Calls {OCI::Database::DatabaseClient#change_autonomous_vm_cluster_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
259
|
+
# to enter the given state(s).
|
|
260
|
+
#
|
|
261
|
+
# @param [OCI::Database::Models::ChangeAutonomousVmClusterCompartmentDetails] change_autonomous_vm_cluster_compartment_details Request to move Autonomous VM cluster to a different compartment
|
|
262
|
+
# @param [String] autonomous_vm_cluster_id The autonomous VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
263
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
264
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_autonomous_vm_cluster_compartment}
|
|
265
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
266
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
267
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
268
|
+
#
|
|
269
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
270
|
+
def change_autonomous_vm_cluster_compartment_and_wait_for_state(change_autonomous_vm_cluster_compartment_details, autonomous_vm_cluster_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
271
|
+
operation_result = @service_client.change_autonomous_vm_cluster_compartment(change_autonomous_vm_cluster_compartment_details, autonomous_vm_cluster_id, base_operation_opts)
|
|
272
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
273
|
+
|
|
274
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
275
|
+
|
|
276
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
277
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
278
|
+
|
|
279
|
+
begin
|
|
280
|
+
if use_util
|
|
281
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
282
|
+
@service_client,
|
|
283
|
+
wait_for_resource_id,
|
|
284
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
285
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
286
|
+
)
|
|
287
|
+
else
|
|
288
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
289
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
290
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
291
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
292
|
+
)
|
|
293
|
+
end
|
|
294
|
+
result_to_return = waiter_result
|
|
295
|
+
|
|
296
|
+
return result_to_return
|
|
297
|
+
rescue StandardError
|
|
298
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
302
|
+
# rubocop:enable Layout/EmptyLines
|
|
303
|
+
|
|
304
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
305
|
+
# rubocop:disable Layout/EmptyLines
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# Calls {OCI::Database::DatabaseClient#change_backup_destination_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
309
|
+
# to enter the given state(s).
|
|
310
|
+
#
|
|
311
|
+
# @param [OCI::Database::Models::ChangeCompartmentDetails] change_compartment_details Request to move backup destination to a different compartment.
|
|
312
|
+
#
|
|
313
|
+
# @param [String] backup_destination_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the backup destination.
|
|
314
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
315
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_backup_destination_compartment}
|
|
316
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
317
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
318
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
319
|
+
#
|
|
320
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
321
|
+
def change_backup_destination_compartment_and_wait_for_state(change_compartment_details, backup_destination_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
322
|
+
operation_result = @service_client.change_backup_destination_compartment(change_compartment_details, backup_destination_id, base_operation_opts)
|
|
323
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
324
|
+
|
|
325
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
326
|
+
|
|
327
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
328
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
329
|
+
|
|
330
|
+
begin
|
|
331
|
+
if use_util
|
|
332
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
333
|
+
@service_client,
|
|
334
|
+
wait_for_resource_id,
|
|
335
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
336
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
337
|
+
)
|
|
338
|
+
else
|
|
339
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
340
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
341
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
342
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
result_to_return = waiter_result
|
|
346
|
+
|
|
347
|
+
return result_to_return
|
|
348
|
+
rescue StandardError
|
|
349
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
353
|
+
# rubocop:enable Layout/EmptyLines
|
|
354
|
+
|
|
355
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
356
|
+
# rubocop:disable Layout/EmptyLines
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
# Calls {OCI::Database::DatabaseClient#change_cloud_exadata_infrastructure_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
360
|
+
# to enter the given state(s).
|
|
361
|
+
#
|
|
362
|
+
# @param [OCI::Database::Models::ChangeCloudExadataInfrastructureCompartmentDetails] change_cloud_exadata_infrastructure_compartment_details Request to move cloud Exadata infrastructure resource to a different compartment.
|
|
363
|
+
# @param [String] cloud_exadata_infrastructure_id The cloud Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
364
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
365
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_cloud_exadata_infrastructure_compartment}
|
|
366
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
367
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
368
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
369
|
+
#
|
|
370
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
371
|
+
def change_cloud_exadata_infrastructure_compartment_and_wait_for_state(change_cloud_exadata_infrastructure_compartment_details, cloud_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
372
|
+
operation_result = @service_client.change_cloud_exadata_infrastructure_compartment(change_cloud_exadata_infrastructure_compartment_details, cloud_exadata_infrastructure_id, base_operation_opts)
|
|
373
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
374
|
+
|
|
375
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
376
|
+
|
|
377
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
378
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
379
|
+
|
|
380
|
+
begin
|
|
381
|
+
if use_util
|
|
382
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
383
|
+
@service_client,
|
|
384
|
+
wait_for_resource_id,
|
|
385
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
386
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
387
|
+
)
|
|
388
|
+
else
|
|
389
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
390
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
391
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
392
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
393
|
+
)
|
|
394
|
+
end
|
|
395
|
+
result_to_return = waiter_result
|
|
396
|
+
|
|
397
|
+
return result_to_return
|
|
398
|
+
rescue StandardError
|
|
399
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
400
|
+
end
|
|
401
|
+
end
|
|
402
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
403
|
+
# rubocop:enable Layout/EmptyLines
|
|
404
|
+
|
|
405
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
406
|
+
# rubocop:disable Layout/EmptyLines
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
# Calls {OCI::Database::DatabaseClient#change_cloud_vm_cluster_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
410
|
+
# to enter the given state(s).
|
|
411
|
+
#
|
|
412
|
+
# @param [OCI::Database::Models::ChangeCloudVmClusterCompartmentDetails] change_cloud_vm_cluster_compartment_details Request to move cloud VM cluster to a different compartment
|
|
413
|
+
# @param [String] cloud_vm_cluster_id The cloud VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
414
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
415
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_cloud_vm_cluster_compartment}
|
|
416
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
417
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
418
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
419
|
+
#
|
|
420
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
421
|
+
def change_cloud_vm_cluster_compartment_and_wait_for_state(change_cloud_vm_cluster_compartment_details, cloud_vm_cluster_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
422
|
+
operation_result = @service_client.change_cloud_vm_cluster_compartment(change_cloud_vm_cluster_compartment_details, cloud_vm_cluster_id, base_operation_opts)
|
|
423
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
424
|
+
|
|
425
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
426
|
+
|
|
427
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
428
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
429
|
+
|
|
430
|
+
begin
|
|
431
|
+
if use_util
|
|
432
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
433
|
+
@service_client,
|
|
434
|
+
wait_for_resource_id,
|
|
435
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
436
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
437
|
+
)
|
|
438
|
+
else
|
|
439
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
440
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
441
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
442
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
443
|
+
)
|
|
444
|
+
end
|
|
445
|
+
result_to_return = waiter_result
|
|
446
|
+
|
|
447
|
+
return result_to_return
|
|
448
|
+
rescue StandardError
|
|
449
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
453
|
+
# rubocop:enable Layout/EmptyLines
|
|
454
|
+
|
|
455
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
456
|
+
# rubocop:disable Layout/EmptyLines
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
# Calls {OCI::Database::DatabaseClient#change_database_software_image_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
460
|
+
# to enter the given state(s).
|
|
461
|
+
#
|
|
462
|
+
# @param [OCI::Database::Models::ChangeCompartmentDetails] change_compartment_details Request to move Database Software Image to a different compartment
|
|
463
|
+
# @param [String] database_software_image_id The DB system [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
464
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
465
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_database_software_image_compartment}
|
|
466
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
467
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
468
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
469
|
+
#
|
|
470
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
471
|
+
def change_database_software_image_compartment_and_wait_for_state(change_compartment_details, database_software_image_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
472
|
+
operation_result = @service_client.change_database_software_image_compartment(change_compartment_details, database_software_image_id, base_operation_opts)
|
|
473
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
474
|
+
|
|
475
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
476
|
+
|
|
477
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
478
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
479
|
+
|
|
480
|
+
begin
|
|
481
|
+
if use_util
|
|
482
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
483
|
+
@service_client,
|
|
484
|
+
wait_for_resource_id,
|
|
485
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
486
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
487
|
+
)
|
|
488
|
+
else
|
|
489
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
490
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
491
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
492
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
493
|
+
)
|
|
494
|
+
end
|
|
495
|
+
result_to_return = waiter_result
|
|
496
|
+
|
|
497
|
+
return result_to_return
|
|
498
|
+
rescue StandardError
|
|
499
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
500
|
+
end
|
|
501
|
+
end
|
|
502
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
503
|
+
# rubocop:enable Layout/EmptyLines
|
|
504
|
+
|
|
505
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
506
|
+
# rubocop:disable Layout/EmptyLines
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
# Calls {OCI::Database::DatabaseClient#change_db_system_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
510
|
+
# to enter the given state(s).
|
|
511
|
+
#
|
|
512
|
+
# @param [OCI::Database::Models::ChangeCompartmentDetails] change_compartment_details Request to move the DB system to a different compartment.
|
|
513
|
+
# @param [String] db_system_id The DB system [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
514
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
515
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_db_system_compartment}
|
|
516
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
517
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
518
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
519
|
+
#
|
|
520
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
521
|
+
def change_db_system_compartment_and_wait_for_state(change_compartment_details, db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
522
|
+
operation_result = @service_client.change_db_system_compartment(change_compartment_details, db_system_id, base_operation_opts)
|
|
523
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
524
|
+
|
|
525
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
526
|
+
|
|
527
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
528
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
529
|
+
|
|
530
|
+
begin
|
|
531
|
+
if use_util
|
|
532
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
533
|
+
@service_client,
|
|
534
|
+
wait_for_resource_id,
|
|
535
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
536
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
537
|
+
)
|
|
538
|
+
else
|
|
539
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
540
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
541
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
542
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
543
|
+
)
|
|
544
|
+
end
|
|
545
|
+
result_to_return = waiter_result
|
|
546
|
+
|
|
547
|
+
return result_to_return
|
|
548
|
+
rescue StandardError
|
|
549
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
550
|
+
end
|
|
551
|
+
end
|
|
552
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
553
|
+
# rubocop:enable Layout/EmptyLines
|
|
554
|
+
|
|
555
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
556
|
+
# rubocop:disable Layout/EmptyLines
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
# Calls {OCI::Database::DatabaseClient#change_exadata_infrastructure_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
560
|
+
# to enter the given state(s).
|
|
561
|
+
#
|
|
562
|
+
# @param [OCI::Database::Models::ChangeExadataInfrastructureCompartmentDetails] change_exadata_infrastructure_compartment_details Request to move Exadata infrastructure to a different compartment
|
|
563
|
+
# @param [String] exadata_infrastructure_id The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
564
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
565
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_exadata_infrastructure_compartment}
|
|
566
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
567
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
568
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
569
|
+
#
|
|
570
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
571
|
+
def change_exadata_infrastructure_compartment_and_wait_for_state(change_exadata_infrastructure_compartment_details, exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
572
|
+
operation_result = @service_client.change_exadata_infrastructure_compartment(change_exadata_infrastructure_compartment_details, exadata_infrastructure_id, base_operation_opts)
|
|
573
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
574
|
+
|
|
575
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
576
|
+
|
|
577
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
578
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
579
|
+
|
|
580
|
+
begin
|
|
581
|
+
if use_util
|
|
582
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
583
|
+
@service_client,
|
|
584
|
+
wait_for_resource_id,
|
|
585
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
586
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
587
|
+
)
|
|
588
|
+
else
|
|
589
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
590
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
591
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
592
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
593
|
+
)
|
|
594
|
+
end
|
|
595
|
+
result_to_return = waiter_result
|
|
596
|
+
|
|
597
|
+
return result_to_return
|
|
598
|
+
rescue StandardError
|
|
599
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
600
|
+
end
|
|
601
|
+
end
|
|
602
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
603
|
+
# rubocop:enable Layout/EmptyLines
|
|
604
|
+
|
|
605
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
606
|
+
# rubocop:disable Layout/EmptyLines
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
# Calls {OCI::Database::DatabaseClient#change_key_store_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
109
610
|
# to enter the given state(s).
|
|
110
611
|
#
|
|
111
|
-
# @param [OCI::Database::Models::
|
|
112
|
-
#
|
|
113
|
-
# @param [
|
|
612
|
+
# @param [OCI::Database::Models::ChangeKeyStoreCompartmentDetails] change_key_store_compartment_details Request to move key store to a different compartment
|
|
613
|
+
#
|
|
614
|
+
# @param [String] key_store_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store.
|
|
615
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
616
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_key_store_compartment}
|
|
114
617
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
115
618
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
116
619
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
117
620
|
#
|
|
118
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
119
|
-
def
|
|
120
|
-
operation_result = @service_client.
|
|
621
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
622
|
+
def change_key_store_compartment_and_wait_for_state(change_key_store_compartment_details, key_store_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
623
|
+
operation_result = @service_client.change_key_store_compartment(change_key_store_compartment_details, key_store_id, base_operation_opts)
|
|
624
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
121
625
|
|
|
122
|
-
return operation_result if wait_for_states.empty?
|
|
626
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
123
627
|
|
|
124
628
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
125
|
-
wait_for_resource_id = operation_result.
|
|
629
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
126
630
|
|
|
127
631
|
begin
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
632
|
+
if use_util
|
|
633
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
634
|
+
@service_client,
|
|
635
|
+
wait_for_resource_id,
|
|
636
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
637
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
638
|
+
)
|
|
639
|
+
else
|
|
640
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
641
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
642
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
643
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
644
|
+
)
|
|
645
|
+
end
|
|
133
646
|
result_to_return = waiter_result
|
|
134
647
|
|
|
135
648
|
return result_to_return
|
|
@@ -144,31 +657,42 @@ module OCI
|
|
|
144
657
|
# rubocop:disable Layout/EmptyLines
|
|
145
658
|
|
|
146
659
|
|
|
147
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
660
|
+
# Calls {OCI::Database::DatabaseClient#change_vm_cluster_compartment} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
148
661
|
# to enter the given state(s).
|
|
149
662
|
#
|
|
150
|
-
# @param [OCI::Database::Models::
|
|
151
|
-
# @param [
|
|
152
|
-
# @param [
|
|
663
|
+
# @param [OCI::Database::Models::ChangeVmClusterCompartmentDetails] change_vm_cluster_compartment_details Request to move the Exadata Cloud@Customer VM cluster to a different compartment.
|
|
664
|
+
# @param [String] vm_cluster_id The VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
665
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
666
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#change_vm_cluster_compartment}
|
|
153
667
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
154
668
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
155
669
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
156
670
|
#
|
|
157
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
158
|
-
def
|
|
159
|
-
operation_result = @service_client.
|
|
671
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
672
|
+
def change_vm_cluster_compartment_and_wait_for_state(change_vm_cluster_compartment_details, vm_cluster_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
673
|
+
operation_result = @service_client.change_vm_cluster_compartment(change_vm_cluster_compartment_details, vm_cluster_id, base_operation_opts)
|
|
674
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
160
675
|
|
|
161
|
-
return operation_result if wait_for_states.empty?
|
|
676
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
162
677
|
|
|
163
678
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
164
|
-
wait_for_resource_id = operation_result.
|
|
679
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
165
680
|
|
|
166
681
|
begin
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
682
|
+
if use_util
|
|
683
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
684
|
+
@service_client,
|
|
685
|
+
wait_for_resource_id,
|
|
686
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
687
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
688
|
+
)
|
|
689
|
+
else
|
|
690
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
691
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
692
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
693
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
694
|
+
)
|
|
695
|
+
end
|
|
172
696
|
result_to_return = waiter_result
|
|
173
697
|
|
|
174
698
|
return result_to_return
|
|
@@ -183,19 +707,19 @@ module OCI
|
|
|
183
707
|
# rubocop:disable Layout/EmptyLines
|
|
184
708
|
|
|
185
709
|
|
|
186
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
710
|
+
# Calls {OCI::Database::DatabaseClient#create_autonomous_container_database} and then waits for the {OCI::Database::Models::AutonomousContainerDatabase} acted upon
|
|
187
711
|
# to enter the given state(s).
|
|
188
712
|
#
|
|
189
|
-
# @param [OCI::Database::Models::
|
|
190
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
191
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
713
|
+
# @param [OCI::Database::Models::CreateAutonomousContainerDatabaseDetails] create_autonomous_container_database_details Request to create an Autonomous Container Database in a specified Autonomous Exadata Infrastructure.
|
|
714
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousContainerDatabase#lifecycle_state}
|
|
715
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#create_autonomous_container_database}
|
|
192
716
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
193
717
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
194
718
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
195
719
|
#
|
|
196
|
-
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::
|
|
197
|
-
def
|
|
198
|
-
operation_result = @service_client.
|
|
720
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousContainerDatabase}
|
|
721
|
+
def create_autonomous_container_database_and_wait_for_state(create_autonomous_container_database_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
722
|
+
operation_result = @service_client.create_autonomous_container_database(create_autonomous_container_database_details, base_operation_opts)
|
|
199
723
|
|
|
200
724
|
return operation_result if wait_for_states.empty?
|
|
201
725
|
|
|
@@ -203,7 +727,7 @@ module OCI
|
|
|
203
727
|
wait_for_resource_id = operation_result.data.id
|
|
204
728
|
|
|
205
729
|
begin
|
|
206
|
-
waiter_result = @service_client.
|
|
730
|
+
waiter_result = @service_client.get_autonomous_container_database(wait_for_resource_id).wait_until(
|
|
207
731
|
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
208
732
|
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
209
733
|
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
@@ -421,7 +945,8 @@ module OCI
|
|
|
421
945
|
# Calls {OCI::Database::DatabaseClient#create_cloud_exadata_infrastructure} and then waits for the {OCI::Database::Models::CloudExadataInfrastructure} acted upon
|
|
422
946
|
# to enter the given state(s).
|
|
423
947
|
#
|
|
424
|
-
# @param [OCI::Database::Models::CreateCloudExadataInfrastructureDetails] create_cloud_exadata_infrastructure_details Request to create cloud Exadata infrastructure.
|
|
948
|
+
# @param [OCI::Database::Models::CreateCloudExadataInfrastructureDetails] create_cloud_exadata_infrastructure_details Request to create a cloud Exadata infrastructure resource in an [Exadata Cloud Service](https://docs.cloud.oracle.com/Content/Database/Concepts/exaoverview.htm) instance.
|
|
949
|
+
#
|
|
425
950
|
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::CloudExadataInfrastructure#lifecycle_state}
|
|
426
951
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#create_cloud_exadata_infrastructure}
|
|
427
952
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
@@ -460,7 +985,8 @@ module OCI
|
|
|
460
985
|
# Calls {OCI::Database::DatabaseClient#create_cloud_vm_cluster} and then waits for the {OCI::Database::Models::CloudVmCluster} acted upon
|
|
461
986
|
# to enter the given state(s).
|
|
462
987
|
#
|
|
463
|
-
# @param [OCI::Database::Models::CreateCloudVmClusterDetails] create_cloud_vm_cluster_details Request to create a cloud VM cluster.
|
|
988
|
+
# @param [OCI::Database::Models::CreateCloudVmClusterDetails] create_cloud_vm_cluster_details Request to create a cloud VM cluster. Applies to Exadata Cloud Service instances only. See [The New Exadata Cloud Service Resource Model](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaflexsystem.htm#exaflexsystem_topic-resource_model) for information on this resource type.
|
|
989
|
+
#
|
|
464
990
|
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::CloudVmCluster#lifecycle_state}
|
|
465
991
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#create_cloud_vm_cluster}
|
|
466
992
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
@@ -775,7 +1301,9 @@ module OCI
|
|
|
775
1301
|
# Calls {OCI::Database::DatabaseClient#create_vm_cluster} and then waits for the {OCI::Database::Models::VmCluster} acted upon
|
|
776
1302
|
# to enter the given state(s).
|
|
777
1303
|
#
|
|
778
|
-
# @param [OCI::Database::Models::CreateVmClusterDetails] create_vm_cluster_details Request to create
|
|
1304
|
+
# @param [OCI::Database::Models::CreateVmClusterDetails] create_vm_cluster_details Request to create a VM cluster. Applies to Exadata Cloud@Customer instances only.
|
|
1305
|
+
# See {#create_cloud_vm_cluster_details create_cloud_vm_cluster_details} for details on creating a cloud VM cluster in an Exadata Cloud Service instance.
|
|
1306
|
+
#
|
|
779
1307
|
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::VmCluster#lifecycle_state}
|
|
780
1308
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#create_vm_cluster}
|
|
781
1309
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
@@ -892,72 +1420,41 @@ module OCI
|
|
|
892
1420
|
# rubocop:disable Layout/EmptyLines
|
|
893
1421
|
|
|
894
1422
|
|
|
895
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
896
|
-
# to enter the given state(s).
|
|
897
|
-
#
|
|
898
|
-
# @param [String] autonomous_data_warehouse_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
899
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousDataWarehouse#lifecycle_state}
|
|
900
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_autonomous_data_warehouse}
|
|
901
|
-
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
902
|
-
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
903
|
-
# * max_wait_seconds The maximum time to wait, in seconds
|
|
904
|
-
#
|
|
905
|
-
# @return [OCI::Response] A {OCI::Response} object with data of type nil
|
|
906
|
-
def delete_autonomous_data_warehouse_and_wait_for_state(autonomous_data_warehouse_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
907
|
-
initial_get_result = @service_client.get_autonomous_data_warehouse(autonomous_data_warehouse_id)
|
|
908
|
-
operation_result = @service_client.delete_autonomous_data_warehouse(autonomous_data_warehouse_id, base_operation_opts)
|
|
909
|
-
|
|
910
|
-
return operation_result if wait_for_states.empty?
|
|
911
|
-
|
|
912
|
-
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
913
|
-
|
|
914
|
-
begin
|
|
915
|
-
waiter_result = initial_get_result.wait_until(
|
|
916
|
-
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
917
|
-
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
918
|
-
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
|
|
919
|
-
succeed_on_not_found: true
|
|
920
|
-
)
|
|
921
|
-
result_to_return = waiter_result
|
|
922
|
-
|
|
923
|
-
return result_to_return
|
|
924
|
-
rescue StandardError
|
|
925
|
-
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
926
|
-
end
|
|
927
|
-
end
|
|
928
|
-
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
929
|
-
# rubocop:enable Layout/EmptyLines
|
|
930
|
-
|
|
931
|
-
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
932
|
-
# rubocop:disable Layout/EmptyLines
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
# Calls {OCI::Database::DatabaseClient#delete_autonomous_database} and then waits for the {OCI::Database::Models::AutonomousDatabase} acted upon
|
|
1423
|
+
# Calls {OCI::Database::DatabaseClient#delete_autonomous_database} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
936
1424
|
# to enter the given state(s).
|
|
937
1425
|
#
|
|
938
1426
|
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
939
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1427
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
940
1428
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_autonomous_database}
|
|
941
1429
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
942
1430
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
943
1431
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
944
1432
|
#
|
|
945
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1433
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
946
1434
|
def delete_autonomous_database_and_wait_for_state(autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
947
|
-
initial_get_result = @service_client.get_autonomous_database(autonomous_database_id)
|
|
948
1435
|
operation_result = @service_client.delete_autonomous_database(autonomous_database_id, base_operation_opts)
|
|
1436
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
949
1437
|
|
|
950
|
-
return operation_result if wait_for_states.empty?
|
|
1438
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
951
1439
|
|
|
952
1440
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1441
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
953
1442
|
|
|
954
1443
|
begin
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1444
|
+
if use_util
|
|
1445
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1446
|
+
@service_client,
|
|
1447
|
+
wait_for_resource_id,
|
|
1448
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1449
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1450
|
+
)
|
|
1451
|
+
else
|
|
1452
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1453
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1454
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1455
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1456
|
+
)
|
|
1457
|
+
end
|
|
961
1458
|
result_to_return = waiter_result
|
|
962
1459
|
|
|
963
1460
|
return result_to_return
|
|
@@ -972,32 +1469,41 @@ module OCI
|
|
|
972
1469
|
# rubocop:disable Layout/EmptyLines
|
|
973
1470
|
|
|
974
1471
|
|
|
975
|
-
# Calls {OCI::Database::DatabaseClient#delete_autonomous_vm_cluster} and then waits for the {OCI::Database::Models::
|
|
1472
|
+
# Calls {OCI::Database::DatabaseClient#delete_autonomous_vm_cluster} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
976
1473
|
# to enter the given state(s).
|
|
977
1474
|
#
|
|
978
1475
|
# @param [String] autonomous_vm_cluster_id The autonomous VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
979
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1476
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
980
1477
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_autonomous_vm_cluster}
|
|
981
1478
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
982
1479
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
983
1480
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
984
1481
|
#
|
|
985
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1482
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
986
1483
|
def delete_autonomous_vm_cluster_and_wait_for_state(autonomous_vm_cluster_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
987
|
-
initial_get_result = @service_client.get_autonomous_vm_cluster(autonomous_vm_cluster_id)
|
|
988
1484
|
operation_result = @service_client.delete_autonomous_vm_cluster(autonomous_vm_cluster_id, base_operation_opts)
|
|
1485
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
989
1486
|
|
|
990
|
-
return operation_result if wait_for_states.empty?
|
|
1487
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
991
1488
|
|
|
992
1489
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1490
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
993
1491
|
|
|
994
1492
|
begin
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1493
|
+
if use_util
|
|
1494
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1495
|
+
@service_client,
|
|
1496
|
+
wait_for_resource_id,
|
|
1497
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1498
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1499
|
+
)
|
|
1500
|
+
else
|
|
1501
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1502
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1503
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1504
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1505
|
+
)
|
|
1506
|
+
end
|
|
1001
1507
|
result_to_return = waiter_result
|
|
1002
1508
|
|
|
1003
1509
|
return result_to_return
|
|
@@ -1012,32 +1518,41 @@ module OCI
|
|
|
1012
1518
|
# rubocop:disable Layout/EmptyLines
|
|
1013
1519
|
|
|
1014
1520
|
|
|
1015
|
-
# Calls {OCI::Database::DatabaseClient#delete_backup} and then waits for the {OCI::Database::Models::
|
|
1521
|
+
# Calls {OCI::Database::DatabaseClient#delete_backup} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1016
1522
|
# to enter the given state(s).
|
|
1017
1523
|
#
|
|
1018
1524
|
# @param [String] backup_id The backup [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1019
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1525
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1020
1526
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_backup}
|
|
1021
1527
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1022
1528
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1023
1529
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1024
1530
|
#
|
|
1025
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1531
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1026
1532
|
def delete_backup_and_wait_for_state(backup_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1027
|
-
initial_get_result = @service_client.get_backup(backup_id)
|
|
1028
1533
|
operation_result = @service_client.delete_backup(backup_id, base_operation_opts)
|
|
1534
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1029
1535
|
|
|
1030
|
-
return operation_result if wait_for_states.empty?
|
|
1536
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1031
1537
|
|
|
1032
1538
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1539
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1033
1540
|
|
|
1034
1541
|
begin
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1542
|
+
if use_util
|
|
1543
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1544
|
+
@service_client,
|
|
1545
|
+
wait_for_resource_id,
|
|
1546
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1547
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1548
|
+
)
|
|
1549
|
+
else
|
|
1550
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1551
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1552
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1553
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1554
|
+
)
|
|
1555
|
+
end
|
|
1041
1556
|
result_to_return = waiter_result
|
|
1042
1557
|
|
|
1043
1558
|
return result_to_return
|
|
@@ -1092,32 +1607,41 @@ module OCI
|
|
|
1092
1607
|
# rubocop:disable Layout/EmptyLines
|
|
1093
1608
|
|
|
1094
1609
|
|
|
1095
|
-
# Calls {OCI::Database::DatabaseClient#delete_cloud_exadata_infrastructure} and then waits for the {OCI::Database::Models::
|
|
1610
|
+
# Calls {OCI::Database::DatabaseClient#delete_cloud_exadata_infrastructure} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1096
1611
|
# to enter the given state(s).
|
|
1097
1612
|
#
|
|
1098
1613
|
# @param [String] cloud_exadata_infrastructure_id The cloud Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1099
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1614
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1100
1615
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_cloud_exadata_infrastructure}
|
|
1101
1616
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1102
1617
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1103
1618
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1104
1619
|
#
|
|
1105
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1620
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1106
1621
|
def delete_cloud_exadata_infrastructure_and_wait_for_state(cloud_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1107
|
-
initial_get_result = @service_client.get_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id)
|
|
1108
1622
|
operation_result = @service_client.delete_cloud_exadata_infrastructure(cloud_exadata_infrastructure_id, base_operation_opts)
|
|
1623
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1109
1624
|
|
|
1110
|
-
return operation_result if wait_for_states.empty?
|
|
1625
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1111
1626
|
|
|
1112
1627
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1628
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1113
1629
|
|
|
1114
1630
|
begin
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1631
|
+
if use_util
|
|
1632
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1633
|
+
@service_client,
|
|
1634
|
+
wait_for_resource_id,
|
|
1635
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1636
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1637
|
+
)
|
|
1638
|
+
else
|
|
1639
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1640
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1641
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1642
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1643
|
+
)
|
|
1644
|
+
end
|
|
1121
1645
|
result_to_return = waiter_result
|
|
1122
1646
|
|
|
1123
1647
|
return result_to_return
|
|
@@ -1132,32 +1656,41 @@ module OCI
|
|
|
1132
1656
|
# rubocop:disable Layout/EmptyLines
|
|
1133
1657
|
|
|
1134
1658
|
|
|
1135
|
-
# Calls {OCI::Database::DatabaseClient#delete_cloud_vm_cluster} and then waits for the {OCI::Database::Models::
|
|
1659
|
+
# Calls {OCI::Database::DatabaseClient#delete_cloud_vm_cluster} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1136
1660
|
# to enter the given state(s).
|
|
1137
1661
|
#
|
|
1138
1662
|
# @param [String] cloud_vm_cluster_id The cloud VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1139
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1663
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1140
1664
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_cloud_vm_cluster}
|
|
1141
1665
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1142
1666
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1143
1667
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1144
1668
|
#
|
|
1145
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1669
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1146
1670
|
def delete_cloud_vm_cluster_and_wait_for_state(cloud_vm_cluster_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1147
|
-
initial_get_result = @service_client.get_cloud_vm_cluster(cloud_vm_cluster_id)
|
|
1148
1671
|
operation_result = @service_client.delete_cloud_vm_cluster(cloud_vm_cluster_id, base_operation_opts)
|
|
1672
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1149
1673
|
|
|
1150
|
-
return operation_result if wait_for_states.empty?
|
|
1674
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1151
1675
|
|
|
1152
1676
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1677
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1153
1678
|
|
|
1154
1679
|
begin
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1680
|
+
if use_util
|
|
1681
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1682
|
+
@service_client,
|
|
1683
|
+
wait_for_resource_id,
|
|
1684
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1685
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1686
|
+
)
|
|
1687
|
+
else
|
|
1688
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1689
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1690
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1691
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1692
|
+
)
|
|
1693
|
+
end
|
|
1161
1694
|
result_to_return = waiter_result
|
|
1162
1695
|
|
|
1163
1696
|
return result_to_return
|
|
@@ -1172,32 +1705,41 @@ module OCI
|
|
|
1172
1705
|
# rubocop:disable Layout/EmptyLines
|
|
1173
1706
|
|
|
1174
1707
|
|
|
1175
|
-
# Calls {OCI::Database::DatabaseClient#delete_database} and then waits for the {OCI::Database::Models::
|
|
1708
|
+
# Calls {OCI::Database::DatabaseClient#delete_database} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1176
1709
|
# to enter the given state(s).
|
|
1177
1710
|
#
|
|
1178
1711
|
# @param [String] database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1179
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1712
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1180
1713
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_database}
|
|
1181
1714
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1182
1715
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1183
1716
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1184
1717
|
#
|
|
1185
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1718
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1186
1719
|
def delete_database_and_wait_for_state(database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1187
|
-
initial_get_result = @service_client.get_database(database_id)
|
|
1188
1720
|
operation_result = @service_client.delete_database(database_id, base_operation_opts)
|
|
1721
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1189
1722
|
|
|
1190
|
-
return operation_result if wait_for_states.empty?
|
|
1723
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1191
1724
|
|
|
1192
1725
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1726
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1193
1727
|
|
|
1194
1728
|
begin
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1729
|
+
if use_util
|
|
1730
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1731
|
+
@service_client,
|
|
1732
|
+
wait_for_resource_id,
|
|
1733
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1734
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1735
|
+
)
|
|
1736
|
+
else
|
|
1737
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1738
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1739
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1740
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1741
|
+
)
|
|
1742
|
+
end
|
|
1201
1743
|
result_to_return = waiter_result
|
|
1202
1744
|
|
|
1203
1745
|
return result_to_return
|
|
@@ -1212,32 +1754,41 @@ module OCI
|
|
|
1212
1754
|
# rubocop:disable Layout/EmptyLines
|
|
1213
1755
|
|
|
1214
1756
|
|
|
1215
|
-
# Calls {OCI::Database::DatabaseClient#delete_database_software_image} and then waits for the {OCI::Database::Models::
|
|
1757
|
+
# Calls {OCI::Database::DatabaseClient#delete_database_software_image} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1216
1758
|
# to enter the given state(s).
|
|
1217
1759
|
#
|
|
1218
1760
|
# @param [String] database_software_image_id The DB system [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1219
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1761
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1220
1762
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_database_software_image}
|
|
1221
1763
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1222
1764
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1223
1765
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1224
1766
|
#
|
|
1225
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1767
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1226
1768
|
def delete_database_software_image_and_wait_for_state(database_software_image_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1227
|
-
initial_get_result = @service_client.get_database_software_image(database_software_image_id)
|
|
1228
1769
|
operation_result = @service_client.delete_database_software_image(database_software_image_id, base_operation_opts)
|
|
1770
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1229
1771
|
|
|
1230
|
-
return operation_result if wait_for_states.empty?
|
|
1772
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1231
1773
|
|
|
1232
1774
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1775
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1233
1776
|
|
|
1234
1777
|
begin
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1778
|
+
if use_util
|
|
1779
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1780
|
+
@service_client,
|
|
1781
|
+
wait_for_resource_id,
|
|
1782
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1783
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1784
|
+
)
|
|
1785
|
+
else
|
|
1786
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1787
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1788
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1789
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1790
|
+
)
|
|
1791
|
+
end
|
|
1241
1792
|
result_to_return = waiter_result
|
|
1242
1793
|
|
|
1243
1794
|
return result_to_return
|
|
@@ -1252,20 +1803,118 @@ module OCI
|
|
|
1252
1803
|
# rubocop:disable Layout/EmptyLines
|
|
1253
1804
|
|
|
1254
1805
|
|
|
1255
|
-
# Calls {OCI::Database::DatabaseClient#delete_db_home} and then waits for the {OCI::Database::Models::
|
|
1806
|
+
# Calls {OCI::Database::DatabaseClient#delete_db_home} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1256
1807
|
# to enter the given state(s).
|
|
1257
1808
|
#
|
|
1258
1809
|
# @param [String] db_home_id The Database Home [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1259
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1810
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1260
1811
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_db_home}
|
|
1261
1812
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1262
1813
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1263
1814
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1264
1815
|
#
|
|
1265
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1816
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1266
1817
|
def delete_db_home_and_wait_for_state(db_home_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1267
|
-
initial_get_result = @service_client.get_db_home(db_home_id)
|
|
1268
1818
|
operation_result = @service_client.delete_db_home(db_home_id, base_operation_opts)
|
|
1819
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1820
|
+
|
|
1821
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1822
|
+
|
|
1823
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1824
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1825
|
+
|
|
1826
|
+
begin
|
|
1827
|
+
if use_util
|
|
1828
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1829
|
+
@service_client,
|
|
1830
|
+
wait_for_resource_id,
|
|
1831
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1832
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1833
|
+
)
|
|
1834
|
+
else
|
|
1835
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1836
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1837
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1838
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1839
|
+
)
|
|
1840
|
+
end
|
|
1841
|
+
result_to_return = waiter_result
|
|
1842
|
+
|
|
1843
|
+
return result_to_return
|
|
1844
|
+
rescue StandardError
|
|
1845
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
1846
|
+
end
|
|
1847
|
+
end
|
|
1848
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1849
|
+
# rubocop:enable Layout/EmptyLines
|
|
1850
|
+
|
|
1851
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1852
|
+
# rubocop:disable Layout/EmptyLines
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
# Calls {OCI::Database::DatabaseClient#delete_exadata_infrastructure} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1856
|
+
# to enter the given state(s).
|
|
1857
|
+
#
|
|
1858
|
+
# @param [String] exadata_infrastructure_id The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1859
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1860
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_exadata_infrastructure}
|
|
1861
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1862
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1863
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1864
|
+
#
|
|
1865
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1866
|
+
def delete_exadata_infrastructure_and_wait_for_state(exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1867
|
+
operation_result = @service_client.delete_exadata_infrastructure(exadata_infrastructure_id, base_operation_opts)
|
|
1868
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1869
|
+
|
|
1870
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1871
|
+
|
|
1872
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1873
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1874
|
+
|
|
1875
|
+
begin
|
|
1876
|
+
if use_util
|
|
1877
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1878
|
+
@service_client,
|
|
1879
|
+
wait_for_resource_id,
|
|
1880
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1881
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1882
|
+
)
|
|
1883
|
+
else
|
|
1884
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1885
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1886
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1887
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1888
|
+
)
|
|
1889
|
+
end
|
|
1890
|
+
result_to_return = waiter_result
|
|
1891
|
+
|
|
1892
|
+
return result_to_return
|
|
1893
|
+
rescue StandardError
|
|
1894
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
1895
|
+
end
|
|
1896
|
+
end
|
|
1897
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1898
|
+
# rubocop:enable Layout/EmptyLines
|
|
1899
|
+
|
|
1900
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1901
|
+
# rubocop:disable Layout/EmptyLines
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
# Calls {OCI::Database::DatabaseClient#delete_key_store} and then waits for the {OCI::Database::Models::KeyStore} acted upon
|
|
1905
|
+
# to enter the given state(s).
|
|
1906
|
+
#
|
|
1907
|
+
# @param [String] key_store_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the key store.
|
|
1908
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::KeyStore#lifecycle_state}
|
|
1909
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_key_store}
|
|
1910
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1911
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1912
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1913
|
+
#
|
|
1914
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type nil
|
|
1915
|
+
def delete_key_store_and_wait_for_state(key_store_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1916
|
+
initial_get_result = @service_client.get_key_store(key_store_id)
|
|
1917
|
+
operation_result = @service_client.delete_key_store(key_store_id, base_operation_opts)
|
|
1269
1918
|
|
|
1270
1919
|
return operation_result if wait_for_states.empty?
|
|
1271
1920
|
|
|
@@ -1292,32 +1941,140 @@ module OCI
|
|
|
1292
1941
|
# rubocop:disable Layout/EmptyLines
|
|
1293
1942
|
|
|
1294
1943
|
|
|
1295
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
1944
|
+
# Calls {OCI::Database::DatabaseClient#delete_vm_cluster} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1945
|
+
# to enter the given state(s).
|
|
1946
|
+
#
|
|
1947
|
+
# @param [String] vm_cluster_id The VM cluster [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1948
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1949
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_vm_cluster}
|
|
1950
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1951
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1952
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1953
|
+
#
|
|
1954
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
1955
|
+
def delete_vm_cluster_and_wait_for_state(vm_cluster_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1956
|
+
operation_result = @service_client.delete_vm_cluster(vm_cluster_id, base_operation_opts)
|
|
1957
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1958
|
+
|
|
1959
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1960
|
+
|
|
1961
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1962
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1963
|
+
|
|
1964
|
+
begin
|
|
1965
|
+
if use_util
|
|
1966
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
1967
|
+
@service_client,
|
|
1968
|
+
wait_for_resource_id,
|
|
1969
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1970
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1971
|
+
)
|
|
1972
|
+
else
|
|
1973
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
1974
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
1975
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1976
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1977
|
+
)
|
|
1978
|
+
end
|
|
1979
|
+
result_to_return = waiter_result
|
|
1980
|
+
|
|
1981
|
+
return result_to_return
|
|
1982
|
+
rescue StandardError
|
|
1983
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
1984
|
+
end
|
|
1985
|
+
end
|
|
1986
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1987
|
+
# rubocop:enable Layout/EmptyLines
|
|
1988
|
+
|
|
1989
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1990
|
+
# rubocop:disable Layout/EmptyLines
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
# Calls {OCI::Database::DatabaseClient#delete_vm_cluster_network} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1296
1994
|
# to enter the given state(s).
|
|
1297
1995
|
#
|
|
1298
1996
|
# @param [String] exadata_infrastructure_id The Exadata infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1299
|
-
# @param [
|
|
1300
|
-
# @param [
|
|
1997
|
+
# @param [String] vm_cluster_network_id The VM cluster network [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1998
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
1999
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#delete_vm_cluster_network}
|
|
1301
2000
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1302
2001
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1303
2002
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1304
2003
|
#
|
|
1305
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1306
|
-
def
|
|
1307
|
-
|
|
1308
|
-
|
|
2004
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2005
|
+
def delete_vm_cluster_network_and_wait_for_state(exadata_infrastructure_id, vm_cluster_network_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2006
|
+
operation_result = @service_client.delete_vm_cluster_network(exadata_infrastructure_id, vm_cluster_network_id, base_operation_opts)
|
|
2007
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1309
2008
|
|
|
1310
|
-
return operation_result if wait_for_states.empty?
|
|
2009
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2010
|
+
|
|
2011
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2012
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2013
|
+
|
|
2014
|
+
begin
|
|
2015
|
+
if use_util
|
|
2016
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2017
|
+
@service_client,
|
|
2018
|
+
wait_for_resource_id,
|
|
2019
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2020
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2021
|
+
)
|
|
2022
|
+
else
|
|
2023
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2024
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2025
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2026
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2027
|
+
)
|
|
2028
|
+
end
|
|
2029
|
+
result_to_return = waiter_result
|
|
2030
|
+
|
|
2031
|
+
return result_to_return
|
|
2032
|
+
rescue StandardError
|
|
2033
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
2034
|
+
end
|
|
2035
|
+
end
|
|
2036
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2037
|
+
# rubocop:enable Layout/EmptyLines
|
|
2038
|
+
|
|
2039
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2040
|
+
# rubocop:disable Layout/EmptyLines
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
# Calls {OCI::Database::DatabaseClient#deregister_autonomous_database_data_safe} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2044
|
+
# to enter the given state(s).
|
|
2045
|
+
#
|
|
2046
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2047
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2048
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#deregister_autonomous_database_data_safe}
|
|
2049
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2050
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2051
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2052
|
+
#
|
|
2053
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2054
|
+
def deregister_autonomous_database_data_safe_and_wait_for_state(autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2055
|
+
operation_result = @service_client.deregister_autonomous_database_data_safe(autonomous_database_id, base_operation_opts)
|
|
2056
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2057
|
+
|
|
2058
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1311
2059
|
|
|
1312
2060
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2061
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1313
2062
|
|
|
1314
2063
|
begin
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
2064
|
+
if use_util
|
|
2065
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2066
|
+
@service_client,
|
|
2067
|
+
wait_for_resource_id,
|
|
2068
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2069
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2070
|
+
)
|
|
2071
|
+
else
|
|
2072
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2073
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2074
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2075
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2076
|
+
)
|
|
2077
|
+
end
|
|
1321
2078
|
result_to_return = waiter_result
|
|
1322
2079
|
|
|
1323
2080
|
return result_to_return
|
|
@@ -1332,32 +2089,41 @@ module OCI
|
|
|
1332
2089
|
# rubocop:disable Layout/EmptyLines
|
|
1333
2090
|
|
|
1334
2091
|
|
|
1335
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
2092
|
+
# Calls {OCI::Database::DatabaseClient#disable_autonomous_database_operations_insights} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1336
2093
|
# to enter the given state(s).
|
|
1337
2094
|
#
|
|
1338
|
-
# @param [String]
|
|
1339
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1340
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
2095
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2096
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2097
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#disable_autonomous_database_operations_insights}
|
|
1341
2098
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1342
2099
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1343
2100
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1344
2101
|
#
|
|
1345
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1346
|
-
def
|
|
1347
|
-
|
|
1348
|
-
|
|
2102
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2103
|
+
def disable_autonomous_database_operations_insights_and_wait_for_state(autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2104
|
+
operation_result = @service_client.disable_autonomous_database_operations_insights(autonomous_database_id, base_operation_opts)
|
|
2105
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1349
2106
|
|
|
1350
|
-
return operation_result if wait_for_states.empty?
|
|
2107
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1351
2108
|
|
|
1352
2109
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2110
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1353
2111
|
|
|
1354
2112
|
begin
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
2113
|
+
if use_util
|
|
2114
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2115
|
+
@service_client,
|
|
2116
|
+
wait_for_resource_id,
|
|
2117
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2118
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2119
|
+
)
|
|
2120
|
+
else
|
|
2121
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2122
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2123
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2124
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2125
|
+
)
|
|
2126
|
+
end
|
|
1361
2127
|
result_to_return = waiter_result
|
|
1362
2128
|
|
|
1363
2129
|
return result_to_return
|
|
@@ -1372,32 +2138,41 @@ module OCI
|
|
|
1372
2138
|
# rubocop:disable Layout/EmptyLines
|
|
1373
2139
|
|
|
1374
2140
|
|
|
1375
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
2141
|
+
# Calls {OCI::Database::DatabaseClient#enable_autonomous_database_operations_insights} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1376
2142
|
# to enter the given state(s).
|
|
1377
2143
|
#
|
|
1378
|
-
# @param [String]
|
|
1379
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1380
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
2144
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2145
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2146
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#enable_autonomous_database_operations_insights}
|
|
1381
2147
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1382
2148
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1383
2149
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1384
2150
|
#
|
|
1385
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1386
|
-
def
|
|
1387
|
-
|
|
1388
|
-
|
|
2151
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2152
|
+
def enable_autonomous_database_operations_insights_and_wait_for_state(autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2153
|
+
operation_result = @service_client.enable_autonomous_database_operations_insights(autonomous_database_id, base_operation_opts)
|
|
2154
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1389
2155
|
|
|
1390
|
-
return operation_result if wait_for_states.empty?
|
|
2156
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1391
2157
|
|
|
1392
2158
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2159
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1393
2160
|
|
|
1394
2161
|
begin
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
2162
|
+
if use_util
|
|
2163
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2164
|
+
@service_client,
|
|
2165
|
+
wait_for_resource_id,
|
|
2166
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2167
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2168
|
+
)
|
|
2169
|
+
else
|
|
2170
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2171
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2172
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2173
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2174
|
+
)
|
|
2175
|
+
end
|
|
1401
2176
|
result_to_return = waiter_result
|
|
1402
2177
|
|
|
1403
2178
|
return result_to_return
|
|
@@ -1610,6 +2385,95 @@ module OCI
|
|
|
1610
2385
|
# rubocop:disable Layout/EmptyLines
|
|
1611
2386
|
|
|
1612
2387
|
|
|
2388
|
+
# Calls {OCI::Database::DatabaseClient#migrate_vault_key} and then waits for the {OCI::Database::Models::Database} acted upon
|
|
2389
|
+
# to enter the given state(s).
|
|
2390
|
+
#
|
|
2391
|
+
# @param [String] database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2392
|
+
# @param [OCI::Database::Models::MigrateVaultKeyDetails] migrate_vault_key_details Request to change the source of the encryption key for the database.
|
|
2393
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::Database#lifecycle_state}
|
|
2394
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#migrate_vault_key}
|
|
2395
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2396
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2397
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2398
|
+
#
|
|
2399
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::Database}
|
|
2400
|
+
def migrate_vault_key_and_wait_for_state(database_id, migrate_vault_key_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2401
|
+
operation_result = @service_client.migrate_vault_key(database_id, migrate_vault_key_details, base_operation_opts)
|
|
2402
|
+
|
|
2403
|
+
return operation_result if wait_for_states.empty?
|
|
2404
|
+
|
|
2405
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2406
|
+
wait_for_resource_id = operation_result.data.id
|
|
2407
|
+
|
|
2408
|
+
begin
|
|
2409
|
+
waiter_result = @service_client.get_database(wait_for_resource_id).wait_until(
|
|
2410
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
2411
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2412
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2413
|
+
)
|
|
2414
|
+
result_to_return = waiter_result
|
|
2415
|
+
|
|
2416
|
+
return result_to_return
|
|
2417
|
+
rescue StandardError
|
|
2418
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
2419
|
+
end
|
|
2420
|
+
end
|
|
2421
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2422
|
+
# rubocop:enable Layout/EmptyLines
|
|
2423
|
+
|
|
2424
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2425
|
+
# rubocop:disable Layout/EmptyLines
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
# Calls {OCI::Database::DatabaseClient#register_autonomous_database_data_safe} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2429
|
+
# to enter the given state(s).
|
|
2430
|
+
#
|
|
2431
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2432
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2433
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#register_autonomous_database_data_safe}
|
|
2434
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2435
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2436
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2437
|
+
#
|
|
2438
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2439
|
+
def register_autonomous_database_data_safe_and_wait_for_state(autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2440
|
+
operation_result = @service_client.register_autonomous_database_data_safe(autonomous_database_id, base_operation_opts)
|
|
2441
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2442
|
+
|
|
2443
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2444
|
+
|
|
2445
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2446
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2447
|
+
|
|
2448
|
+
begin
|
|
2449
|
+
if use_util
|
|
2450
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2451
|
+
@service_client,
|
|
2452
|
+
wait_for_resource_id,
|
|
2453
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2454
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2455
|
+
)
|
|
2456
|
+
else
|
|
2457
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2458
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2459
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2460
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2461
|
+
)
|
|
2462
|
+
end
|
|
2463
|
+
result_to_return = waiter_result
|
|
2464
|
+
|
|
2465
|
+
return result_to_return
|
|
2466
|
+
rescue StandardError
|
|
2467
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
2468
|
+
end
|
|
2469
|
+
end
|
|
2470
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2471
|
+
# rubocop:enable Layout/EmptyLines
|
|
2472
|
+
|
|
2473
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2474
|
+
# rubocop:disable Layout/EmptyLines
|
|
2475
|
+
|
|
2476
|
+
|
|
1613
2477
|
# Calls {OCI::Database::DatabaseClient#reinstate_autonomous_container_database_dataguard_association} and then waits for the {OCI::Database::Models::AutonomousContainerDatabaseDataguardAssociation} acted upon
|
|
1614
2478
|
# to enter the given state(s).
|
|
1615
2479
|
#
|
|
@@ -1769,46 +2633,6 @@ module OCI
|
|
|
1769
2633
|
# rubocop:disable Layout/EmptyLines
|
|
1770
2634
|
|
|
1771
2635
|
|
|
1772
|
-
# Calls {OCI::Database::DatabaseClient#restore_autonomous_data_warehouse} and then waits for the {OCI::Database::Models::AutonomousDataWarehouse} acted upon
|
|
1773
|
-
# to enter the given state(s).
|
|
1774
|
-
#
|
|
1775
|
-
# @param [String] autonomous_data_warehouse_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
1776
|
-
# @param [OCI::Database::Models::RestoreAutonomousDataWarehouseDetails] restore_autonomous_data_warehouse_details Request to perform an Autonomous Data Warehouse restore.
|
|
1777
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousDataWarehouse#lifecycle_state}
|
|
1778
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#restore_autonomous_data_warehouse}
|
|
1779
|
-
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1780
|
-
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1781
|
-
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1782
|
-
#
|
|
1783
|
-
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousDataWarehouse}
|
|
1784
|
-
def restore_autonomous_data_warehouse_and_wait_for_state(autonomous_data_warehouse_id, restore_autonomous_data_warehouse_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
1785
|
-
operation_result = @service_client.restore_autonomous_data_warehouse(autonomous_data_warehouse_id, restore_autonomous_data_warehouse_details, base_operation_opts)
|
|
1786
|
-
|
|
1787
|
-
return operation_result if wait_for_states.empty?
|
|
1788
|
-
|
|
1789
|
-
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1790
|
-
wait_for_resource_id = operation_result.data.id
|
|
1791
|
-
|
|
1792
|
-
begin
|
|
1793
|
-
waiter_result = @service_client.get_autonomous_data_warehouse(wait_for_resource_id).wait_until(
|
|
1794
|
-
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
1795
|
-
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
1796
|
-
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
1797
|
-
)
|
|
1798
|
-
result_to_return = waiter_result
|
|
1799
|
-
|
|
1800
|
-
return result_to_return
|
|
1801
|
-
rescue StandardError
|
|
1802
|
-
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
1803
|
-
end
|
|
1804
|
-
end
|
|
1805
|
-
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1806
|
-
# rubocop:enable Layout/EmptyLines
|
|
1807
|
-
|
|
1808
|
-
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
1809
|
-
# rubocop:disable Layout/EmptyLines
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
2636
|
# Calls {OCI::Database::DatabaseClient#restore_autonomous_database} and then waits for the {OCI::Database::Models::AutonomousDatabase} acted upon
|
|
1813
2637
|
# to enter the given state(s).
|
|
1814
2638
|
#
|
|
@@ -1967,31 +2791,41 @@ module OCI
|
|
|
1967
2791
|
# rubocop:disable Layout/EmptyLines
|
|
1968
2792
|
|
|
1969
2793
|
|
|
1970
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
2794
|
+
# Calls {OCI::Database::DatabaseClient#rotate_ords_certs} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
1971
2795
|
# to enter the given state(s).
|
|
1972
2796
|
#
|
|
1973
|
-
# @param [String]
|
|
1974
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
1975
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
2797
|
+
# @param [String] autonomous_exadata_infrastructure_id The Autonomous Exadata Infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2798
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2799
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#rotate_ords_certs}
|
|
1976
2800
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
1977
2801
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
1978
2802
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
1979
2803
|
#
|
|
1980
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
1981
|
-
def
|
|
1982
|
-
operation_result = @service_client.
|
|
2804
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2805
|
+
def rotate_ords_certs_and_wait_for_state(autonomous_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2806
|
+
operation_result = @service_client.rotate_ords_certs(autonomous_exadata_infrastructure_id, base_operation_opts)
|
|
2807
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
1983
2808
|
|
|
1984
|
-
return operation_result if wait_for_states.empty?
|
|
2809
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
1985
2810
|
|
|
1986
2811
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
1987
|
-
wait_for_resource_id = operation_result.
|
|
2812
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
1988
2813
|
|
|
1989
2814
|
begin
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
2815
|
+
if use_util
|
|
2816
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2817
|
+
@service_client,
|
|
2818
|
+
wait_for_resource_id,
|
|
2819
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2820
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2821
|
+
)
|
|
2822
|
+
else
|
|
2823
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2824
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2825
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2826
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2827
|
+
)
|
|
2828
|
+
end
|
|
1995
2829
|
result_to_return = waiter_result
|
|
1996
2830
|
|
|
1997
2831
|
return result_to_return
|
|
@@ -2006,19 +2840,68 @@ module OCI
|
|
|
2006
2840
|
# rubocop:disable Layout/EmptyLines
|
|
2007
2841
|
|
|
2008
2842
|
|
|
2009
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
2843
|
+
# Calls {OCI::Database::DatabaseClient#rotate_ssl_certs} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2010
2844
|
# to enter the given state(s).
|
|
2011
2845
|
#
|
|
2012
|
-
# @param [String]
|
|
2013
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
2014
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
2846
|
+
# @param [String] autonomous_exadata_infrastructure_id The Autonomous Exadata Infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2847
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2848
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#rotate_ssl_certs}
|
|
2015
2849
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2016
2850
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2017
2851
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2018
2852
|
#
|
|
2019
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
2020
|
-
def
|
|
2021
|
-
operation_result = @service_client.
|
|
2853
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2854
|
+
def rotate_ssl_certs_and_wait_for_state(autonomous_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2855
|
+
operation_result = @service_client.rotate_ssl_certs(autonomous_exadata_infrastructure_id, base_operation_opts)
|
|
2856
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2857
|
+
|
|
2858
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2859
|
+
|
|
2860
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2861
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2862
|
+
|
|
2863
|
+
begin
|
|
2864
|
+
if use_util
|
|
2865
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
2866
|
+
@service_client,
|
|
2867
|
+
wait_for_resource_id,
|
|
2868
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2869
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2870
|
+
)
|
|
2871
|
+
else
|
|
2872
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
2873
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
2874
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2875
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
2876
|
+
)
|
|
2877
|
+
end
|
|
2878
|
+
result_to_return = waiter_result
|
|
2879
|
+
|
|
2880
|
+
return result_to_return
|
|
2881
|
+
rescue StandardError
|
|
2882
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
2883
|
+
end
|
|
2884
|
+
end
|
|
2885
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2886
|
+
# rubocop:enable Layout/EmptyLines
|
|
2887
|
+
|
|
2888
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
2889
|
+
# rubocop:disable Layout/EmptyLines
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
# Calls {OCI::Database::DatabaseClient#rotate_vault_key} and then waits for the {OCI::Database::Models::Database} acted upon
|
|
2893
|
+
# to enter the given state(s).
|
|
2894
|
+
#
|
|
2895
|
+
# @param [String] database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2896
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::Database#lifecycle_state}
|
|
2897
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#rotate_vault_key}
|
|
2898
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2899
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2900
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2901
|
+
#
|
|
2902
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::Database}
|
|
2903
|
+
def rotate_vault_key_and_wait_for_state(database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2904
|
+
operation_result = @service_client.rotate_vault_key(database_id, base_operation_opts)
|
|
2022
2905
|
|
|
2023
2906
|
return operation_result if wait_for_states.empty?
|
|
2024
2907
|
|
|
@@ -2026,7 +2909,7 @@ module OCI
|
|
|
2026
2909
|
wait_for_resource_id = operation_result.data.id
|
|
2027
2910
|
|
|
2028
2911
|
begin
|
|
2029
|
-
waiter_result = @service_client.
|
|
2912
|
+
waiter_result = @service_client.get_database(wait_for_resource_id).wait_until(
|
|
2030
2913
|
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
2031
2914
|
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2032
2915
|
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
@@ -2045,19 +2928,19 @@ module OCI
|
|
|
2045
2928
|
# rubocop:disable Layout/EmptyLines
|
|
2046
2929
|
|
|
2047
2930
|
|
|
2048
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
2931
|
+
# Calls {OCI::Database::DatabaseClient#start_autonomous_database} and then waits for the {OCI::Database::Models::AutonomousDatabase} acted upon
|
|
2049
2932
|
# to enter the given state(s).
|
|
2050
2933
|
#
|
|
2051
|
-
# @param [String]
|
|
2052
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
2053
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
2934
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2935
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousDatabase#lifecycle_state}
|
|
2936
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#start_autonomous_database}
|
|
2054
2937
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2055
2938
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2056
2939
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2057
2940
|
#
|
|
2058
|
-
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::
|
|
2059
|
-
def
|
|
2060
|
-
operation_result = @service_client.
|
|
2941
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousDatabase}
|
|
2942
|
+
def start_autonomous_database_and_wait_for_state(autonomous_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2943
|
+
operation_result = @service_client.start_autonomous_database(autonomous_database_id, base_operation_opts)
|
|
2061
2944
|
|
|
2062
2945
|
return operation_result if wait_for_states.empty?
|
|
2063
2946
|
|
|
@@ -2065,7 +2948,7 @@ module OCI
|
|
|
2065
2948
|
wait_for_resource_id = operation_result.data.id
|
|
2066
2949
|
|
|
2067
2950
|
begin
|
|
2068
|
-
waiter_result = @service_client.
|
|
2951
|
+
waiter_result = @service_client.get_autonomous_database(wait_for_resource_id).wait_until(
|
|
2069
2952
|
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
2070
2953
|
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2071
2954
|
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
@@ -2243,32 +3126,41 @@ module OCI
|
|
|
2243
3126
|
# rubocop:disable Layout/EmptyLines
|
|
2244
3127
|
|
|
2245
3128
|
|
|
2246
|
-
# Calls {OCI::Database::DatabaseClient#terminate_autonomous_container_database} and then waits for the {OCI::Database::Models::
|
|
3129
|
+
# Calls {OCI::Database::DatabaseClient#terminate_autonomous_container_database} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2247
3130
|
# to enter the given state(s).
|
|
2248
3131
|
#
|
|
2249
3132
|
# @param [String] autonomous_container_database_id The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2250
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
3133
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2251
3134
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#terminate_autonomous_container_database}
|
|
2252
3135
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2253
3136
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2254
3137
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2255
3138
|
#
|
|
2256
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
3139
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2257
3140
|
def terminate_autonomous_container_database_and_wait_for_state(autonomous_container_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2258
|
-
initial_get_result = @service_client.get_autonomous_container_database(autonomous_container_database_id)
|
|
2259
3141
|
operation_result = @service_client.terminate_autonomous_container_database(autonomous_container_database_id, base_operation_opts)
|
|
3142
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2260
3143
|
|
|
2261
|
-
return operation_result if wait_for_states.empty?
|
|
3144
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2262
3145
|
|
|
2263
3146
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
3147
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2264
3148
|
|
|
2265
3149
|
begin
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
3150
|
+
if use_util
|
|
3151
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
3152
|
+
@service_client,
|
|
3153
|
+
wait_for_resource_id,
|
|
3154
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3155
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3156
|
+
)
|
|
3157
|
+
else
|
|
3158
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
3159
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
3160
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3161
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3162
|
+
)
|
|
3163
|
+
end
|
|
2272
3164
|
result_to_return = waiter_result
|
|
2273
3165
|
|
|
2274
3166
|
return result_to_return
|
|
@@ -2283,32 +3175,41 @@ module OCI
|
|
|
2283
3175
|
# rubocop:disable Layout/EmptyLines
|
|
2284
3176
|
|
|
2285
3177
|
|
|
2286
|
-
# Calls {OCI::Database::DatabaseClient#terminate_autonomous_exadata_infrastructure} and then waits for the {OCI::Database::Models::
|
|
3178
|
+
# Calls {OCI::Database::DatabaseClient#terminate_autonomous_exadata_infrastructure} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2287
3179
|
# to enter the given state(s).
|
|
2288
3180
|
#
|
|
2289
3181
|
# @param [String] autonomous_exadata_infrastructure_id The Autonomous Exadata Infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2290
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
3182
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2291
3183
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#terminate_autonomous_exadata_infrastructure}
|
|
2292
3184
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2293
3185
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2294
3186
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2295
3187
|
#
|
|
2296
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
3188
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2297
3189
|
def terminate_autonomous_exadata_infrastructure_and_wait_for_state(autonomous_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2298
|
-
initial_get_result = @service_client.get_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id)
|
|
2299
3190
|
operation_result = @service_client.terminate_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id, base_operation_opts)
|
|
3191
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2300
3192
|
|
|
2301
|
-
return operation_result if wait_for_states.empty?
|
|
3193
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2302
3194
|
|
|
2303
3195
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
3196
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2304
3197
|
|
|
2305
3198
|
begin
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
3199
|
+
if use_util
|
|
3200
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
3201
|
+
@service_client,
|
|
3202
|
+
wait_for_resource_id,
|
|
3203
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3204
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3205
|
+
)
|
|
3206
|
+
else
|
|
3207
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
3208
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
3209
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3210
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3211
|
+
)
|
|
3212
|
+
end
|
|
2312
3213
|
result_to_return = waiter_result
|
|
2313
3214
|
|
|
2314
3215
|
return result_to_return
|
|
@@ -2323,32 +3224,41 @@ module OCI
|
|
|
2323
3224
|
# rubocop:disable Layout/EmptyLines
|
|
2324
3225
|
|
|
2325
3226
|
|
|
2326
|
-
# Calls {OCI::Database::DatabaseClient#terminate_db_system} and then waits for the {OCI::Database::Models::
|
|
3227
|
+
# Calls {OCI::Database::DatabaseClient#terminate_db_system} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2327
3228
|
# to enter the given state(s).
|
|
2328
3229
|
#
|
|
2329
3230
|
# @param [String] db_system_id The DB system [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2330
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
3231
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
2331
3232
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#terminate_db_system}
|
|
2332
3233
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2333
3234
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2334
3235
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2335
3236
|
#
|
|
2336
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
3237
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
2337
3238
|
def terminate_db_system_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
2338
|
-
initial_get_result = @service_client.get_db_system(db_system_id)
|
|
2339
3239
|
operation_result = @service_client.terminate_db_system(db_system_id, base_operation_opts)
|
|
3240
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2340
3241
|
|
|
2341
|
-
return operation_result if wait_for_states.empty?
|
|
3242
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2342
3243
|
|
|
2343
3244
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
3245
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2344
3246
|
|
|
2345
3247
|
begin
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
3248
|
+
if use_util
|
|
3249
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
3250
|
+
@service_client,
|
|
3251
|
+
wait_for_resource_id,
|
|
3252
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3253
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3254
|
+
)
|
|
3255
|
+
else
|
|
3256
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
3257
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
3258
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3259
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3260
|
+
)
|
|
3261
|
+
end
|
|
2352
3262
|
result_to_return = waiter_result
|
|
2353
3263
|
|
|
2354
3264
|
return result_to_return
|
|
@@ -2403,20 +3313,20 @@ module OCI
|
|
|
2403
3313
|
# rubocop:disable Layout/EmptyLines
|
|
2404
3314
|
|
|
2405
3315
|
|
|
2406
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
3316
|
+
# Calls {OCI::Database::DatabaseClient#update_autonomous_database} and then waits for the {OCI::Database::Models::AutonomousDatabase} acted upon
|
|
2407
3317
|
# to enter the given state(s).
|
|
2408
3318
|
#
|
|
2409
|
-
# @param [String]
|
|
2410
|
-
# @param [OCI::Database::Models::
|
|
2411
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
2412
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
3319
|
+
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
3320
|
+
# @param [OCI::Database::Models::UpdateAutonomousDatabaseDetails] update_autonomous_database_details Request to update the properties of an Autonomous Database.
|
|
3321
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousDatabase#lifecycle_state}
|
|
3322
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#update_autonomous_database}
|
|
2413
3323
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2414
3324
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2415
3325
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2416
3326
|
#
|
|
2417
|
-
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::
|
|
2418
|
-
def
|
|
2419
|
-
operation_result = @service_client.
|
|
3327
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousDatabase}
|
|
3328
|
+
def update_autonomous_database_and_wait_for_state(autonomous_database_id, update_autonomous_database_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
3329
|
+
operation_result = @service_client.update_autonomous_database(autonomous_database_id, update_autonomous_database_details, base_operation_opts)
|
|
2420
3330
|
|
|
2421
3331
|
return operation_result if wait_for_states.empty?
|
|
2422
3332
|
|
|
@@ -2424,7 +3334,7 @@ module OCI
|
|
|
2424
3334
|
wait_for_resource_id = operation_result.data.id
|
|
2425
3335
|
|
|
2426
3336
|
begin
|
|
2427
|
-
waiter_result = @service_client.
|
|
3337
|
+
waiter_result = @service_client.get_autonomous_database(wait_for_resource_id).wait_until(
|
|
2428
3338
|
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
2429
3339
|
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
2430
3340
|
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
@@ -2443,32 +3353,91 @@ module OCI
|
|
|
2443
3353
|
# rubocop:disable Layout/EmptyLines
|
|
2444
3354
|
|
|
2445
3355
|
|
|
2446
|
-
# Calls {OCI::Database::DatabaseClient#
|
|
3356
|
+
# Calls {OCI::Database::DatabaseClient#update_autonomous_database_regional_wallet} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
3357
|
+
# to enter the given state(s).
|
|
3358
|
+
#
|
|
3359
|
+
# @param [OCI::Database::Models::UpdateAutonomousDatabaseWalletDetails] update_autonomous_database_wallet_details Request to update the properties of Autonomous Database regional wallet.
|
|
3360
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
3361
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#update_autonomous_database_regional_wallet}
|
|
3362
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
3363
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
3364
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
3365
|
+
#
|
|
3366
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
3367
|
+
def update_autonomous_database_regional_wallet_and_wait_for_state(update_autonomous_database_wallet_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
3368
|
+
operation_result = @service_client.update_autonomous_database_regional_wallet(update_autonomous_database_wallet_details, base_operation_opts)
|
|
3369
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
3370
|
+
|
|
3371
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
3372
|
+
|
|
3373
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
3374
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
3375
|
+
|
|
3376
|
+
begin
|
|
3377
|
+
if use_util
|
|
3378
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
3379
|
+
@service_client,
|
|
3380
|
+
wait_for_resource_id,
|
|
3381
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3382
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3383
|
+
)
|
|
3384
|
+
else
|
|
3385
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
3386
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
3387
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3388
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3389
|
+
)
|
|
3390
|
+
end
|
|
3391
|
+
result_to_return = waiter_result
|
|
3392
|
+
|
|
3393
|
+
return result_to_return
|
|
3394
|
+
rescue StandardError
|
|
3395
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
3396
|
+
end
|
|
3397
|
+
end
|
|
3398
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
3399
|
+
# rubocop:enable Layout/EmptyLines
|
|
3400
|
+
|
|
3401
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
3402
|
+
# rubocop:disable Layout/EmptyLines
|
|
3403
|
+
|
|
3404
|
+
|
|
3405
|
+
# Calls {OCI::Database::DatabaseClient#update_autonomous_database_wallet} and then waits for the {OCI::Database::Models::WorkRequest}
|
|
2447
3406
|
# to enter the given state(s).
|
|
2448
3407
|
#
|
|
2449
3408
|
# @param [String] autonomous_database_id The database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
|
2450
|
-
# @param [OCI::Database::Models::
|
|
2451
|
-
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::
|
|
2452
|
-
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#
|
|
3409
|
+
# @param [OCI::Database::Models::UpdateAutonomousDatabaseWalletDetails] update_autonomous_database_wallet_details Request to update the properties of an Autonomous Database wallet.
|
|
3410
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::WorkRequest#status}
|
|
3411
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#update_autonomous_database_wallet}
|
|
2453
3412
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
2454
3413
|
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
2455
3414
|
# * max_wait_seconds The maximum time to wait, in seconds
|
|
2456
3415
|
#
|
|
2457
|
-
# @return [OCI::Response] A {OCI::Response} object
|
|
2458
|
-
def
|
|
2459
|
-
operation_result = @service_client.
|
|
3416
|
+
# @return [OCI::Response] A {OCI::Response} object containing the completed {OCI::Database::Models::WorkRequest}
|
|
3417
|
+
def update_autonomous_database_wallet_and_wait_for_state(autonomous_database_id, update_autonomous_database_wallet_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
3418
|
+
operation_result = @service_client.update_autonomous_database_wallet(autonomous_database_id, update_autonomous_database_wallet_details, base_operation_opts)
|
|
3419
|
+
use_util = OCI::Database::Util.respond_to?(:wait_on_work_request)
|
|
2460
3420
|
|
|
2461
|
-
return operation_result if wait_for_states.empty?
|
|
3421
|
+
return operation_result if wait_for_states.empty? && !use_util
|
|
2462
3422
|
|
|
2463
3423
|
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
2464
|
-
wait_for_resource_id = operation_result.
|
|
3424
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
|
2465
3425
|
|
|
2466
3426
|
begin
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
3427
|
+
if use_util
|
|
3428
|
+
waiter_result = OCI::Database::Util.wait_on_work_request(
|
|
3429
|
+
@service_client,
|
|
3430
|
+
wait_for_resource_id,
|
|
3431
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3432
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3433
|
+
)
|
|
3434
|
+
else
|
|
3435
|
+
waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
|
|
3436
|
+
eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
|
|
3437
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
3438
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
3439
|
+
)
|
|
3440
|
+
end
|
|
2472
3441
|
result_to_return = waiter_result
|
|
2473
3442
|
|
|
2474
3443
|
return result_to_return
|