oci 2.5.9 → 2.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/oci/autoscaling/auto_scaling_client.rb +73 -0
- data/lib/oci/autoscaling/autoscaling.rb +1 -0
- data/lib/oci/autoscaling/models/change_auto_scaling_compartment_details.rb +154 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +0 -1
- data/lib/oci/container_engine/models/work_request_error.rb +0 -1
- data/lib/oci/core/blockstorage_client.rb +342 -0
- data/lib/oci/core/compute_client.rb +77 -5
- data/lib/oci/core/compute_client_composite_operations.rb +3 -3
- data/lib/oci/core/compute_management_client.rb +211 -0
- data/lib/oci/core/core.rb +27 -0
- data/lib/oci/core/models/add_network_security_group_security_rules_details.rb +153 -0
- data/lib/oci/core/models/add_security_rule_details.rb +388 -0
- data/lib/oci/core/models/added_network_security_group_security_rules.rb +153 -0
- data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_boot_volume_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_image_compartment_details.rb +154 -0
- data/lib/oci/core/models/change_instance_configuration_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_instance_pool_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_nat_gateway_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_route_table_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_security_list_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_service_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_subnet_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_vcn_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_volume_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +153 -0
- data/lib/oci/core/models/change_volume_group_compartment_details.rb +153 -0
- data/lib/oci/core/models/create_network_security_group_details.rb +223 -0
- data/lib/oci/core/models/create_vnic_details.rb +18 -1
- data/lib/oci/core/models/image.rb +2 -1
- data/lib/oci/core/models/instance_configuration.rb +3 -1
- data/lib/oci/core/models/instance_configuration_create_vnic_details.rb +18 -1
- data/lib/oci/core/models/instance_configuration_instance_source_via_image_details.rb +15 -1
- data/lib/oci/core/models/instance_configuration_summary.rb +3 -3
- data/lib/oci/core/models/instance_pool.rb +4 -1
- data/lib/oci/core/models/instance_pool_summary.rb +3 -3
- data/lib/oci/core/models/network_security_group.rb +324 -0
- data/lib/oci/core/models/network_security_group_vnic.rb +188 -0
- data/lib/oci/core/models/remove_network_security_group_security_rules_details.rb +154 -0
- data/lib/oci/core/models/security_list.rb +5 -0
- data/lib/oci/core/models/security_rule.rb +455 -0
- data/lib/oci/core/models/update_network_security_group_details.rb +189 -0
- data/lib/oci/core/models/update_network_security_group_security_rules_details.rb +153 -0
- data/lib/oci/core/models/update_security_rule_details.rb +404 -0
- data/lib/oci/core/models/update_vnic_details.rb +20 -1
- data/lib/oci/core/models/updated_network_security_group_security_rules.rb +153 -0
- data/lib/oci/core/models/vnic.rb +18 -1
- data/lib/oci/core/virtual_network_client.rb +1228 -132
- data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
- data/lib/oci/database/database.rb +19 -0
- data/lib/oci/database/database_client.rb +1066 -46
- data/lib/oci/database/database_client_composite_operations.rb +317 -0
- data/lib/oci/database/models/autonomous_container_database.rb +416 -0
- data/lib/oci/database/models/autonomous_container_database_backup_config.rb +157 -0
- data/lib/oci/database/models/autonomous_container_database_summary.rb +420 -0
- data/lib/oci/database/models/autonomous_database.rb +58 -1
- data/lib/oci/database/models/autonomous_database_backup.rb +16 -1
- data/lib/oci/database/models/autonomous_database_backup_summary.rb +16 -1
- data/lib/oci/database/models/autonomous_database_connection_strings.rb +11 -1
- data/lib/oci/database/models/autonomous_database_connection_urls.rb +170 -0
- data/lib/oci/database/models/autonomous_database_summary.rb +58 -1
- data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +224 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure.rb +419 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_maintenance_window.rb +186 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_shape_summary.rb +224 -0
- data/lib/oci/database/models/autonomous_exadata_infrastructure_summary.rb +436 -0
- data/lib/oci/database/models/backup.rb +1 -0
- data/lib/oci/database/models/backup_summary.rb +1 -0
- data/lib/oci/database/models/create_autonomous_container_database_details.rb +284 -0
- data/lib/oci/database/models/create_autonomous_database_base.rb +46 -1
- data/lib/oci/database/models/create_autonomous_database_clone_details.rb +13 -1
- data/lib/oci/database/models/create_autonomous_database_details.rb +13 -1
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +34 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
- data/lib/oci/database/models/day_of_week.rb +174 -0
- data/lib/oci/database/models/db_system.rb +34 -1
- data/lib/oci/database/models/db_system_summary.rb +34 -1
- data/lib/oci/database/models/launch_autonomous_exadata_infrastructure_details.rb +304 -0
- data/lib/oci/database/models/launch_db_system_base.rb +35 -2
- data/lib/oci/database/models/launch_db_system_details.rb +11 -2
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +11 -2
- data/lib/oci/database/models/maintenance_run.rb +392 -0
- data/lib/oci/database/models/maintenance_run_summary.rb +395 -0
- data/lib/oci/database/models/maintenance_window.rb +226 -0
- data/lib/oci/database/models/month.rb +179 -0
- data/lib/oci/database/models/restore_autonomous_database_details.rb +30 -4
- data/lib/oci/database/models/update_autonomous_container_database_details.rb +230 -0
- data/lib/oci/database/models/update_autonomous_database_details.rb +18 -1
- data/lib/oci/database/models/update_autonomous_exadata_infrastructure_details.rb +203 -0
- data/lib/oci/database/models/update_db_system_details.rb +37 -4
- data/lib/oci/database/models/update_maintenance_run_details.rb +154 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +62 -0
- data/lib/oci/email/models/change_sender_compartment_details.rb +157 -0
- data/lib/oci/key_management/key_management.rb +1 -0
- data/lib/oci/key_management/kms_crypto_client.rb +4 -4
- data/lib/oci/key_management/kms_management_client.rb +161 -10
- data/lib/oci/key_management/kms_management_client_composite_operations.rb +79 -0
- data/lib/oci/key_management/kms_vault_client.rb +16 -11
- data/lib/oci/key_management/models/key.rb +17 -1
- data/lib/oci/key_management/models/schedule_key_deletion_details.rb +156 -0
- data/lib/oci/load_balancer/load_balancer.rb +1 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +64 -0
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
- data/lib/oci/load_balancer/models/load_balancer.rb +16 -1
- data/lib/oci/load_balancer/models/remove_http_request_header_rule.rb +1 -1
- data/lib/oci/load_balancer/models/remove_http_response_header_rule.rb +1 -1
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +9 -5
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -0
- data/lib/oci/load_balancer/models/update_network_security_groups_details.rb +154 -0
- data/lib/oci/monitoring/models/metric.rb +1 -0
- data/lib/oci/object_storage/models/work_request_error.rb +1 -0
- data/lib/oci/resource_manager/models/change_stack_compartment_details.rb +155 -0
- data/lib/oci/resource_manager/models/work_request.rb +293 -0
- data/lib/oci/resource_manager/models/work_request_error.rb +170 -0
- data/lib/oci/resource_manager/models/work_request_log_entry.rb +159 -0
- data/lib/oci/resource_manager/models/work_request_resource.rb +217 -0
- data/lib/oci/resource_manager/models/work_request_summary.rb +254 -0
- data/lib/oci/resource_manager/resource_manager.rb +6 -0
- data/lib/oci/resource_manager/resource_manager_client.rb +338 -0
- data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +50 -0
- data/lib/oci/streaming/stream_admin_client.rb +2 -2
- data/lib/oci/streaming/stream_client.rb +1 -1
- data/lib/oci/version.rb +1 -1
- metadata +58 -2
@@ -24,6 +24,45 @@ module OCI
|
|
24
24
|
# rubocop:disable Layout/EmptyLines
|
25
25
|
|
26
26
|
|
27
|
+
# Calls {OCI::Database::DatabaseClient#create_autonomous_container_database} and then waits for the {OCI::Database::Models::AutonomousContainerDatabase} acted upon
|
28
|
+
# to enter the given state(s).
|
29
|
+
#
|
30
|
+
# @param [OCI::Database::Models::CreateAutonomousContainerDatabaseDetails] create_autonomous_container_database_details Request to create an Autonomous Container Database in a specified Autonomous Exadata Infrastructure.
|
31
|
+
# @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}
|
32
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#create_autonomous_container_database}
|
33
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
34
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
35
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
36
|
+
#
|
37
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousContainerDatabase}
|
38
|
+
def create_autonomous_container_database_and_wait_for_state(create_autonomous_container_database_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
39
|
+
operation_result = @service_client.create_autonomous_container_database(create_autonomous_container_database_details, base_operation_opts)
|
40
|
+
|
41
|
+
return operation_result if wait_for_states.empty?
|
42
|
+
|
43
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
44
|
+
wait_for_resource_id = operation_result.data.id
|
45
|
+
|
46
|
+
begin
|
47
|
+
waiter_result = @service_client.get_autonomous_container_database(wait_for_resource_id).wait_until(
|
48
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
49
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
50
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
51
|
+
)
|
52
|
+
result_to_return = waiter_result
|
53
|
+
|
54
|
+
return result_to_return
|
55
|
+
rescue StandardError
|
56
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
57
|
+
end
|
58
|
+
end
|
59
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
60
|
+
# rubocop:enable Layout/EmptyLines
|
61
|
+
|
62
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
63
|
+
# rubocop:disable Layout/EmptyLines
|
64
|
+
|
65
|
+
|
27
66
|
# Calls {OCI::Database::DatabaseClient#create_autonomous_data_warehouse} and then waits for the {OCI::Database::Models::AutonomousDataWarehouse} acted upon
|
28
67
|
# to enter the given state(s).
|
29
68
|
#
|
@@ -540,6 +579,45 @@ module OCI
|
|
540
579
|
# rubocop:disable Layout/EmptyLines
|
541
580
|
|
542
581
|
|
582
|
+
# Calls {OCI::Database::DatabaseClient#launch_autonomous_exadata_infrastructure} and then waits for the {OCI::Database::Models::AutonomousExadataInfrastructure} acted upon
|
583
|
+
# to enter the given state(s).
|
584
|
+
#
|
585
|
+
# @param [OCI::Database::Models::LaunchAutonomousExadataInfrastructureDetails] launch_autonomous_exadata_infrastructure_details Request to launch a Autonomous Exadata Infrastructure.
|
586
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousExadataInfrastructure#lifecycle_state}
|
587
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#launch_autonomous_exadata_infrastructure}
|
588
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
589
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
590
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
591
|
+
#
|
592
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousExadataInfrastructure}
|
593
|
+
def launch_autonomous_exadata_infrastructure_and_wait_for_state(launch_autonomous_exadata_infrastructure_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
594
|
+
operation_result = @service_client.launch_autonomous_exadata_infrastructure(launch_autonomous_exadata_infrastructure_details, base_operation_opts)
|
595
|
+
|
596
|
+
return operation_result if wait_for_states.empty?
|
597
|
+
|
598
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
599
|
+
wait_for_resource_id = operation_result.data.id
|
600
|
+
|
601
|
+
begin
|
602
|
+
waiter_result = @service_client.get_autonomous_exadata_infrastructure(wait_for_resource_id).wait_until(
|
603
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
604
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
605
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
606
|
+
)
|
607
|
+
result_to_return = waiter_result
|
608
|
+
|
609
|
+
return result_to_return
|
610
|
+
rescue StandardError
|
611
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
612
|
+
end
|
613
|
+
end
|
614
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
615
|
+
# rubocop:enable Layout/EmptyLines
|
616
|
+
|
617
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
618
|
+
# rubocop:disable Layout/EmptyLines
|
619
|
+
|
620
|
+
|
543
621
|
# Calls {OCI::Database::DatabaseClient#launch_db_system} and then waits for the {OCI::Database::Models::DbSystem} acted upon
|
544
622
|
# to enter the given state(s).
|
545
623
|
#
|
@@ -620,6 +698,45 @@ module OCI
|
|
620
698
|
# rubocop:disable Layout/EmptyLines
|
621
699
|
|
622
700
|
|
701
|
+
# Calls {OCI::Database::DatabaseClient#restart_autonomous_container_database} and then waits for the {OCI::Database::Models::AutonomousContainerDatabase} acted upon
|
702
|
+
# to enter the given state(s).
|
703
|
+
#
|
704
|
+
# @param [String] autonomous_container_database_id The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
705
|
+
# @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}
|
706
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#restart_autonomous_container_database}
|
707
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
708
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
709
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
710
|
+
#
|
711
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousContainerDatabase}
|
712
|
+
def restart_autonomous_container_database_and_wait_for_state(autonomous_container_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
713
|
+
operation_result = @service_client.restart_autonomous_container_database(autonomous_container_database_id, base_operation_opts)
|
714
|
+
|
715
|
+
return operation_result if wait_for_states.empty?
|
716
|
+
|
717
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
718
|
+
wait_for_resource_id = operation_result.data.id
|
719
|
+
|
720
|
+
begin
|
721
|
+
waiter_result = @service_client.get_autonomous_container_database(wait_for_resource_id).wait_until(
|
722
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
723
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
724
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
725
|
+
)
|
726
|
+
result_to_return = waiter_result
|
727
|
+
|
728
|
+
return result_to_return
|
729
|
+
rescue StandardError
|
730
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
731
|
+
end
|
732
|
+
end
|
733
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
734
|
+
# rubocop:enable Layout/EmptyLines
|
735
|
+
|
736
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
737
|
+
# rubocop:disable Layout/EmptyLines
|
738
|
+
|
739
|
+
|
623
740
|
# Calls {OCI::Database::DatabaseClient#restore_autonomous_data_warehouse} and then waits for the {OCI::Database::Models::AutonomousDataWarehouse} acted upon
|
624
741
|
# to enter the given state(s).
|
625
742
|
#
|
@@ -937,6 +1054,86 @@ module OCI
|
|
937
1054
|
# rubocop:disable Layout/EmptyLines
|
938
1055
|
|
939
1056
|
|
1057
|
+
# Calls {OCI::Database::DatabaseClient#terminate_autonomous_container_database} and then waits for the {OCI::Database::Models::AutonomousContainerDatabase} acted upon
|
1058
|
+
# to enter the given state(s).
|
1059
|
+
#
|
1060
|
+
# @param [String] autonomous_container_database_id The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
1061
|
+
# @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}
|
1062
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#terminate_autonomous_container_database}
|
1063
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
1064
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
1065
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
1066
|
+
#
|
1067
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type nil
|
1068
|
+
def terminate_autonomous_container_database_and_wait_for_state(autonomous_container_database_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
1069
|
+
initial_get_result = @service_client.get_autonomous_container_database(autonomous_container_database_id)
|
1070
|
+
operation_result = @service_client.terminate_autonomous_container_database(autonomous_container_database_id, base_operation_opts)
|
1071
|
+
|
1072
|
+
return operation_result if wait_for_states.empty?
|
1073
|
+
|
1074
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
1075
|
+
|
1076
|
+
begin
|
1077
|
+
waiter_result = initial_get_result.wait_until(
|
1078
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
1079
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
1080
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
|
1081
|
+
succeed_on_not_found: true
|
1082
|
+
)
|
1083
|
+
result_to_return = waiter_result
|
1084
|
+
|
1085
|
+
return result_to_return
|
1086
|
+
rescue StandardError
|
1087
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
1088
|
+
end
|
1089
|
+
end
|
1090
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1091
|
+
# rubocop:enable Layout/EmptyLines
|
1092
|
+
|
1093
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1094
|
+
# rubocop:disable Layout/EmptyLines
|
1095
|
+
|
1096
|
+
|
1097
|
+
# Calls {OCI::Database::DatabaseClient#terminate_autonomous_exadata_infrastructure} and then waits for the {OCI::Database::Models::AutonomousExadataInfrastructure} acted upon
|
1098
|
+
# to enter the given state(s).
|
1099
|
+
#
|
1100
|
+
# @param [String] autonomous_exadata_infrastructure_id The Autonomous Exadata Infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
1101
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousExadataInfrastructure#lifecycle_state}
|
1102
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#terminate_autonomous_exadata_infrastructure}
|
1103
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
1104
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
1105
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
1106
|
+
#
|
1107
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type nil
|
1108
|
+
def terminate_autonomous_exadata_infrastructure_and_wait_for_state(autonomous_exadata_infrastructure_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
1109
|
+
initial_get_result = @service_client.get_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id)
|
1110
|
+
operation_result = @service_client.terminate_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id, base_operation_opts)
|
1111
|
+
|
1112
|
+
return operation_result if wait_for_states.empty?
|
1113
|
+
|
1114
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
1115
|
+
|
1116
|
+
begin
|
1117
|
+
waiter_result = initial_get_result.wait_until(
|
1118
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
1119
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
1120
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
|
1121
|
+
succeed_on_not_found: true
|
1122
|
+
)
|
1123
|
+
result_to_return = waiter_result
|
1124
|
+
|
1125
|
+
return result_to_return
|
1126
|
+
rescue StandardError
|
1127
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
1128
|
+
end
|
1129
|
+
end
|
1130
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1131
|
+
# rubocop:enable Layout/EmptyLines
|
1132
|
+
|
1133
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1134
|
+
# rubocop:disable Layout/EmptyLines
|
1135
|
+
|
1136
|
+
|
940
1137
|
# Calls {OCI::Database::DatabaseClient#terminate_db_system} and then waits for the {OCI::Database::Models::DbSystem} acted upon
|
941
1138
|
# to enter the given state(s).
|
942
1139
|
#
|
@@ -977,6 +1174,46 @@ module OCI
|
|
977
1174
|
# rubocop:disable Layout/EmptyLines
|
978
1175
|
|
979
1176
|
|
1177
|
+
# Calls {OCI::Database::DatabaseClient#update_autonomous_container_database} and then waits for the {OCI::Database::Models::AutonomousContainerDatabase} acted upon
|
1178
|
+
# to enter the given state(s).
|
1179
|
+
#
|
1180
|
+
# @param [String] autonomous_container_database_id The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
1181
|
+
# @param [OCI::Database::Models::UpdateAutonomousContainerDatabaseDetails] update_autonomous_container_database_details Request to update the properties of an Autonomous Container Database.
|
1182
|
+
# @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}
|
1183
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#update_autonomous_container_database}
|
1184
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
1185
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
1186
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
1187
|
+
#
|
1188
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousContainerDatabase}
|
1189
|
+
def update_autonomous_container_database_and_wait_for_state(autonomous_container_database_id, update_autonomous_container_database_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
1190
|
+
operation_result = @service_client.update_autonomous_container_database(autonomous_container_database_id, update_autonomous_container_database_details, base_operation_opts)
|
1191
|
+
|
1192
|
+
return operation_result if wait_for_states.empty?
|
1193
|
+
|
1194
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
1195
|
+
wait_for_resource_id = operation_result.data.id
|
1196
|
+
|
1197
|
+
begin
|
1198
|
+
waiter_result = @service_client.get_autonomous_container_database(wait_for_resource_id).wait_until(
|
1199
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
1200
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
1201
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
1202
|
+
)
|
1203
|
+
result_to_return = waiter_result
|
1204
|
+
|
1205
|
+
return result_to_return
|
1206
|
+
rescue StandardError
|
1207
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
1208
|
+
end
|
1209
|
+
end
|
1210
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1211
|
+
# rubocop:enable Layout/EmptyLines
|
1212
|
+
|
1213
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1214
|
+
# rubocop:disable Layout/EmptyLines
|
1215
|
+
|
1216
|
+
|
980
1217
|
# Calls {OCI::Database::DatabaseClient#update_autonomous_data_warehouse} and then waits for the {OCI::Database::Models::AutonomousDataWarehouse} acted upon
|
981
1218
|
# to enter the given state(s).
|
982
1219
|
#
|
@@ -1057,6 +1294,46 @@ module OCI
|
|
1057
1294
|
# rubocop:disable Layout/EmptyLines
|
1058
1295
|
|
1059
1296
|
|
1297
|
+
# Calls {OCI::Database::DatabaseClient#update_autonomous_exadata_infrastructure} and then waits for the {OCI::Database::Models::AutonomousExadataInfrastructure} acted upon
|
1298
|
+
# to enter the given state(s).
|
1299
|
+
#
|
1300
|
+
# @param [String] autonomous_exadata_infrastructure_id The Autonomous Exadata Infrastructure [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
|
1301
|
+
# @param [OCI::Database::Models::UpdateAutonomousExadataInfrastructureDetails] update_autonomous_exadata_infrastructures_details Request to update the properties of a Autonomous Exadata Infrastructure.
|
1302
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousExadataInfrastructure#lifecycle_state}
|
1303
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#update_autonomous_exadata_infrastructure}
|
1304
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
1305
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
1306
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
1307
|
+
#
|
1308
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::AutonomousExadataInfrastructure}
|
1309
|
+
def update_autonomous_exadata_infrastructure_and_wait_for_state(autonomous_exadata_infrastructure_id, update_autonomous_exadata_infrastructures_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
1310
|
+
operation_result = @service_client.update_autonomous_exadata_infrastructure(autonomous_exadata_infrastructure_id, update_autonomous_exadata_infrastructures_details, base_operation_opts)
|
1311
|
+
|
1312
|
+
return operation_result if wait_for_states.empty?
|
1313
|
+
|
1314
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
1315
|
+
wait_for_resource_id = operation_result.data.id
|
1316
|
+
|
1317
|
+
begin
|
1318
|
+
waiter_result = @service_client.get_autonomous_exadata_infrastructure(wait_for_resource_id).wait_until(
|
1319
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
1320
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
1321
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
1322
|
+
)
|
1323
|
+
result_to_return = waiter_result
|
1324
|
+
|
1325
|
+
return result_to_return
|
1326
|
+
rescue StandardError
|
1327
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
1328
|
+
end
|
1329
|
+
end
|
1330
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1331
|
+
# rubocop:enable Layout/EmptyLines
|
1332
|
+
|
1333
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1334
|
+
# rubocop:disable Layout/EmptyLines
|
1335
|
+
|
1336
|
+
|
1060
1337
|
# Calls {OCI::Database::DatabaseClient#update_database} and then waits for the {OCI::Database::Models::Database} acted upon
|
1061
1338
|
# to enter the given state(s).
|
1062
1339
|
#
|
@@ -1212,6 +1489,46 @@ module OCI
|
|
1212
1489
|
end
|
1213
1490
|
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1214
1491
|
# rubocop:enable Layout/EmptyLines
|
1492
|
+
|
1493
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1494
|
+
# rubocop:disable Layout/EmptyLines
|
1495
|
+
|
1496
|
+
|
1497
|
+
# Calls {OCI::Database::DatabaseClient#update_maintenance_run} and then waits for the {OCI::Database::Models::MaintenanceRun} acted upon
|
1498
|
+
# to enter the given state(s).
|
1499
|
+
#
|
1500
|
+
# @param [String] maintenance_run_id The Maintenance Run OCID.
|
1501
|
+
# @param [OCI::Database::Models::UpdateMaintenanceRunDetails] update_maintenance_run_details Request to update the properties of a Maintenance Run.
|
1502
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::MaintenanceRun#lifecycle_state}
|
1503
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#update_maintenance_run}
|
1504
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
1505
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
1506
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
1507
|
+
#
|
1508
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Database::Models::MaintenanceRun}
|
1509
|
+
def update_maintenance_run_and_wait_for_state(maintenance_run_id, update_maintenance_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
1510
|
+
operation_result = @service_client.update_maintenance_run(maintenance_run_id, update_maintenance_run_details, base_operation_opts)
|
1511
|
+
|
1512
|
+
return operation_result if wait_for_states.empty?
|
1513
|
+
|
1514
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
1515
|
+
wait_for_resource_id = operation_result.data.id
|
1516
|
+
|
1517
|
+
begin
|
1518
|
+
waiter_result = @service_client.get_maintenance_run(wait_for_resource_id).wait_until(
|
1519
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
1520
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
1521
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
1522
|
+
)
|
1523
|
+
result_to_return = waiter_result
|
1524
|
+
|
1525
|
+
return result_to_return
|
1526
|
+
rescue StandardError
|
1527
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
1528
|
+
end
|
1529
|
+
end
|
1530
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
1531
|
+
# rubocop:enable Layout/EmptyLines
|
1215
1532
|
end
|
1216
1533
|
end
|
1217
1534
|
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,416 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# AutonomousContainerDatabase model.
|
9
|
+
class Database::Models::AutonomousContainerDatabase
|
10
|
+
SERVICE_LEVEL_AGREEMENT_TYPE_ENUM = [
|
11
|
+
SERVICE_LEVEL_AGREEMENT_TYPE_STANDARD = 'STANDARD'.freeze,
|
12
|
+
SERVICE_LEVEL_AGREEMENT_TYPE_MISSION_CRITICAL = 'MISSION_CRITICAL'.freeze,
|
13
|
+
SERVICE_LEVEL_AGREEMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
14
|
+
].freeze
|
15
|
+
|
16
|
+
LIFECYCLE_STATE_ENUM = [
|
17
|
+
LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze,
|
18
|
+
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze,
|
19
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
20
|
+
LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze,
|
21
|
+
LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze,
|
22
|
+
LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
|
23
|
+
LIFECYCLE_STATE_BACKUP_IN_PROGRESS = 'BACKUP_IN_PROGRESS'.freeze,
|
24
|
+
LIFECYCLE_STATE_RESTORING = 'RESTORING'.freeze,
|
25
|
+
LIFECYCLE_STATE_RESTORE_FAILED = 'RESTORE_FAILED'.freeze,
|
26
|
+
LIFECYCLE_STATE_RESTARTING = 'RESTARTING'.freeze,
|
27
|
+
LIFECYCLE_STATE_MAINTENANCE_IN_PROGRESS = 'MAINTENANCE_IN_PROGRESS'.freeze,
|
28
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
29
|
+
].freeze
|
30
|
+
|
31
|
+
PATCH_MODEL_ENUM = [
|
32
|
+
PATCH_MODEL_RELEASE_UPDATES = 'RELEASE_UPDATES'.freeze,
|
33
|
+
PATCH_MODEL_RELEASE_UPDATE_REVISIONS = 'RELEASE_UPDATE_REVISIONS'.freeze,
|
34
|
+
PATCH_MODEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
35
|
+
].freeze
|
36
|
+
|
37
|
+
# **[Required]** The OCID of the Autonomous Container Database.
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :id
|
40
|
+
|
41
|
+
# **[Required]** The OCID of the compartment.
|
42
|
+
# @return [String]
|
43
|
+
attr_accessor :compartment_id
|
44
|
+
|
45
|
+
# **[Required]** The user-provided name for the Autonomous Container Database.
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :display_name
|
48
|
+
|
49
|
+
# **[Required]** The service level agreement type of the container database. The default is STANDARD.
|
50
|
+
# @return [String]
|
51
|
+
attr_reader :service_level_agreement_type
|
52
|
+
|
53
|
+
# **[Required]** The OCID of the Autonomous Exadata Infrastructure.
|
54
|
+
# @return [String]
|
55
|
+
attr_accessor :autonomous_exadata_infrastructure_id
|
56
|
+
|
57
|
+
# **[Required]** The current state of the Autonomous Container Database.
|
58
|
+
# @return [String]
|
59
|
+
attr_reader :lifecycle_state
|
60
|
+
|
61
|
+
# Additional information about the current lifecycleState.
|
62
|
+
# @return [String]
|
63
|
+
attr_accessor :lifecycle_details
|
64
|
+
|
65
|
+
# The date and time the Autonomous was created.
|
66
|
+
# @return [DateTime]
|
67
|
+
attr_accessor :time_created
|
68
|
+
|
69
|
+
# **[Required]** Database Patch model preference.
|
70
|
+
# @return [String]
|
71
|
+
attr_reader :patch_model
|
72
|
+
|
73
|
+
# The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the last maintenance run.
|
74
|
+
# @return [String]
|
75
|
+
attr_accessor :last_maintenance_run_id
|
76
|
+
|
77
|
+
# The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the next maintenance run.
|
78
|
+
# @return [String]
|
79
|
+
attr_accessor :next_maintenance_run_id
|
80
|
+
|
81
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
82
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
83
|
+
#
|
84
|
+
# Example: `{\"Department\": \"Finance\"}`
|
85
|
+
#
|
86
|
+
# @return [Hash<String, String>]
|
87
|
+
attr_accessor :freeform_tags
|
88
|
+
|
89
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
90
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
91
|
+
#
|
92
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
93
|
+
#
|
94
|
+
# @return [Hash<String, Hash<String, Object>>]
|
95
|
+
attr_accessor :defined_tags
|
96
|
+
|
97
|
+
# The availability domain of the Autonomous Container Database.
|
98
|
+
# @return [String]
|
99
|
+
attr_accessor :availability_domain
|
100
|
+
|
101
|
+
# @return [OCI::Database::Models::AutonomousContainerDatabaseBackupConfig]
|
102
|
+
attr_accessor :backup_config
|
103
|
+
|
104
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
105
|
+
def self.attribute_map
|
106
|
+
{
|
107
|
+
# rubocop:disable Style/SymbolLiteral
|
108
|
+
'id': :'id',
|
109
|
+
'compartment_id': :'compartmentId',
|
110
|
+
'display_name': :'displayName',
|
111
|
+
'service_level_agreement_type': :'serviceLevelAgreementType',
|
112
|
+
'autonomous_exadata_infrastructure_id': :'autonomousExadataInfrastructureId',
|
113
|
+
'lifecycle_state': :'lifecycleState',
|
114
|
+
'lifecycle_details': :'lifecycleDetails',
|
115
|
+
'time_created': :'timeCreated',
|
116
|
+
'patch_model': :'patchModel',
|
117
|
+
'last_maintenance_run_id': :'lastMaintenanceRunId',
|
118
|
+
'next_maintenance_run_id': :'nextMaintenanceRunId',
|
119
|
+
'freeform_tags': :'freeformTags',
|
120
|
+
'defined_tags': :'definedTags',
|
121
|
+
'availability_domain': :'availabilityDomain',
|
122
|
+
'backup_config': :'backupConfig'
|
123
|
+
# rubocop:enable Style/SymbolLiteral
|
124
|
+
}
|
125
|
+
end
|
126
|
+
|
127
|
+
# Attribute type mapping.
|
128
|
+
def self.swagger_types
|
129
|
+
{
|
130
|
+
# rubocop:disable Style/SymbolLiteral
|
131
|
+
'id': :'String',
|
132
|
+
'compartment_id': :'String',
|
133
|
+
'display_name': :'String',
|
134
|
+
'service_level_agreement_type': :'String',
|
135
|
+
'autonomous_exadata_infrastructure_id': :'String',
|
136
|
+
'lifecycle_state': :'String',
|
137
|
+
'lifecycle_details': :'String',
|
138
|
+
'time_created': :'DateTime',
|
139
|
+
'patch_model': :'String',
|
140
|
+
'last_maintenance_run_id': :'String',
|
141
|
+
'next_maintenance_run_id': :'String',
|
142
|
+
'freeform_tags': :'Hash<String, String>',
|
143
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
144
|
+
'availability_domain': :'String',
|
145
|
+
'backup_config': :'OCI::Database::Models::AutonomousContainerDatabaseBackupConfig'
|
146
|
+
# rubocop:enable Style/SymbolLiteral
|
147
|
+
}
|
148
|
+
end
|
149
|
+
|
150
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
151
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
152
|
+
|
153
|
+
|
154
|
+
# Initializes the object
|
155
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
156
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
157
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
158
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
159
|
+
# @option attributes [String] :service_level_agreement_type The value to assign to the {#service_level_agreement_type} property
|
160
|
+
# @option attributes [String] :autonomous_exadata_infrastructure_id The value to assign to the {#autonomous_exadata_infrastructure_id} property
|
161
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
162
|
+
# @option attributes [String] :lifecycle_details The value to assign to the {#lifecycle_details} property
|
163
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
164
|
+
# @option attributes [String] :patch_model The value to assign to the {#patch_model} property
|
165
|
+
# @option attributes [String] :last_maintenance_run_id The value to assign to the {#last_maintenance_run_id} property
|
166
|
+
# @option attributes [String] :next_maintenance_run_id The value to assign to the {#next_maintenance_run_id} property
|
167
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
168
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
169
|
+
# @option attributes [String] :availability_domain The value to assign to the {#availability_domain} property
|
170
|
+
# @option attributes [OCI::Database::Models::AutonomousContainerDatabaseBackupConfig] :backup_config The value to assign to the {#backup_config} property
|
171
|
+
def initialize(attributes = {})
|
172
|
+
return unless attributes.is_a?(Hash)
|
173
|
+
|
174
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
175
|
+
|
176
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
177
|
+
|
178
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
179
|
+
|
180
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
181
|
+
|
182
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
183
|
+
|
184
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
185
|
+
|
186
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
187
|
+
|
188
|
+
self.service_level_agreement_type = attributes[:'serviceLevelAgreementType'] if attributes[:'serviceLevelAgreementType']
|
189
|
+
|
190
|
+
raise 'You cannot provide both :serviceLevelAgreementType and :service_level_agreement_type' if attributes.key?(:'serviceLevelAgreementType') && attributes.key?(:'service_level_agreement_type')
|
191
|
+
|
192
|
+
self.service_level_agreement_type = attributes[:'service_level_agreement_type'] if attributes[:'service_level_agreement_type']
|
193
|
+
|
194
|
+
self.autonomous_exadata_infrastructure_id = attributes[:'autonomousExadataInfrastructureId'] if attributes[:'autonomousExadataInfrastructureId']
|
195
|
+
|
196
|
+
raise 'You cannot provide both :autonomousExadataInfrastructureId and :autonomous_exadata_infrastructure_id' if attributes.key?(:'autonomousExadataInfrastructureId') && attributes.key?(:'autonomous_exadata_infrastructure_id')
|
197
|
+
|
198
|
+
self.autonomous_exadata_infrastructure_id = attributes[:'autonomous_exadata_infrastructure_id'] if attributes[:'autonomous_exadata_infrastructure_id']
|
199
|
+
|
200
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
201
|
+
|
202
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
203
|
+
|
204
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
205
|
+
|
206
|
+
self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails']
|
207
|
+
|
208
|
+
raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details')
|
209
|
+
|
210
|
+
self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details']
|
211
|
+
|
212
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
213
|
+
|
214
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
215
|
+
|
216
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
217
|
+
|
218
|
+
self.patch_model = attributes[:'patchModel'] if attributes[:'patchModel']
|
219
|
+
|
220
|
+
raise 'You cannot provide both :patchModel and :patch_model' if attributes.key?(:'patchModel') && attributes.key?(:'patch_model')
|
221
|
+
|
222
|
+
self.patch_model = attributes[:'patch_model'] if attributes[:'patch_model']
|
223
|
+
|
224
|
+
self.last_maintenance_run_id = attributes[:'lastMaintenanceRunId'] if attributes[:'lastMaintenanceRunId']
|
225
|
+
|
226
|
+
raise 'You cannot provide both :lastMaintenanceRunId and :last_maintenance_run_id' if attributes.key?(:'lastMaintenanceRunId') && attributes.key?(:'last_maintenance_run_id')
|
227
|
+
|
228
|
+
self.last_maintenance_run_id = attributes[:'last_maintenance_run_id'] if attributes[:'last_maintenance_run_id']
|
229
|
+
|
230
|
+
self.next_maintenance_run_id = attributes[:'nextMaintenanceRunId'] if attributes[:'nextMaintenanceRunId']
|
231
|
+
|
232
|
+
raise 'You cannot provide both :nextMaintenanceRunId and :next_maintenance_run_id' if attributes.key?(:'nextMaintenanceRunId') && attributes.key?(:'next_maintenance_run_id')
|
233
|
+
|
234
|
+
self.next_maintenance_run_id = attributes[:'next_maintenance_run_id'] if attributes[:'next_maintenance_run_id']
|
235
|
+
|
236
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
237
|
+
|
238
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
239
|
+
|
240
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
241
|
+
|
242
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
243
|
+
|
244
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
245
|
+
|
246
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
247
|
+
|
248
|
+
self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']
|
249
|
+
|
250
|
+
raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain')
|
251
|
+
|
252
|
+
self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain']
|
253
|
+
|
254
|
+
self.backup_config = attributes[:'backupConfig'] if attributes[:'backupConfig']
|
255
|
+
|
256
|
+
raise 'You cannot provide both :backupConfig and :backup_config' if attributes.key?(:'backupConfig') && attributes.key?(:'backup_config')
|
257
|
+
|
258
|
+
self.backup_config = attributes[:'backup_config'] if attributes[:'backup_config']
|
259
|
+
end
|
260
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
261
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
262
|
+
|
263
|
+
# Custom attribute writer method checking allowed values (enum).
|
264
|
+
# @param [Object] service_level_agreement_type Object to be assigned
|
265
|
+
def service_level_agreement_type=(service_level_agreement_type)
|
266
|
+
# rubocop:disable Style/ConditionalAssignment
|
267
|
+
if service_level_agreement_type && !SERVICE_LEVEL_AGREEMENT_TYPE_ENUM.include?(service_level_agreement_type)
|
268
|
+
OCI.logger.debug("Unknown value for 'service_level_agreement_type' [" + service_level_agreement_type + "]. Mapping to 'SERVICE_LEVEL_AGREEMENT_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
269
|
+
@service_level_agreement_type = SERVICE_LEVEL_AGREEMENT_TYPE_UNKNOWN_ENUM_VALUE
|
270
|
+
else
|
271
|
+
@service_level_agreement_type = service_level_agreement_type
|
272
|
+
end
|
273
|
+
# rubocop:enable Style/ConditionalAssignment
|
274
|
+
end
|
275
|
+
|
276
|
+
# Custom attribute writer method checking allowed values (enum).
|
277
|
+
# @param [Object] lifecycle_state Object to be assigned
|
278
|
+
def lifecycle_state=(lifecycle_state)
|
279
|
+
# rubocop:disable Style/ConditionalAssignment
|
280
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
281
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
282
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
283
|
+
else
|
284
|
+
@lifecycle_state = lifecycle_state
|
285
|
+
end
|
286
|
+
# rubocop:enable Style/ConditionalAssignment
|
287
|
+
end
|
288
|
+
|
289
|
+
# Custom attribute writer method checking allowed values (enum).
|
290
|
+
# @param [Object] patch_model Object to be assigned
|
291
|
+
def patch_model=(patch_model)
|
292
|
+
# rubocop:disable Style/ConditionalAssignment
|
293
|
+
if patch_model && !PATCH_MODEL_ENUM.include?(patch_model)
|
294
|
+
OCI.logger.debug("Unknown value for 'patch_model' [" + patch_model + "]. Mapping to 'PATCH_MODEL_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
295
|
+
@patch_model = PATCH_MODEL_UNKNOWN_ENUM_VALUE
|
296
|
+
else
|
297
|
+
@patch_model = patch_model
|
298
|
+
end
|
299
|
+
# rubocop:enable Style/ConditionalAssignment
|
300
|
+
end
|
301
|
+
|
302
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
303
|
+
|
304
|
+
|
305
|
+
# Checks equality by comparing each attribute.
|
306
|
+
# @param [Object] other the other object to be compared
|
307
|
+
def ==(other)
|
308
|
+
return true if equal?(other)
|
309
|
+
|
310
|
+
self.class == other.class &&
|
311
|
+
id == other.id &&
|
312
|
+
compartment_id == other.compartment_id &&
|
313
|
+
display_name == other.display_name &&
|
314
|
+
service_level_agreement_type == other.service_level_agreement_type &&
|
315
|
+
autonomous_exadata_infrastructure_id == other.autonomous_exadata_infrastructure_id &&
|
316
|
+
lifecycle_state == other.lifecycle_state &&
|
317
|
+
lifecycle_details == other.lifecycle_details &&
|
318
|
+
time_created == other.time_created &&
|
319
|
+
patch_model == other.patch_model &&
|
320
|
+
last_maintenance_run_id == other.last_maintenance_run_id &&
|
321
|
+
next_maintenance_run_id == other.next_maintenance_run_id &&
|
322
|
+
freeform_tags == other.freeform_tags &&
|
323
|
+
defined_tags == other.defined_tags &&
|
324
|
+
availability_domain == other.availability_domain &&
|
325
|
+
backup_config == other.backup_config
|
326
|
+
end
|
327
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
328
|
+
|
329
|
+
# @see the `==` method
|
330
|
+
# @param [Object] other the other object to be compared
|
331
|
+
def eql?(other)
|
332
|
+
self == other
|
333
|
+
end
|
334
|
+
|
335
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
336
|
+
|
337
|
+
|
338
|
+
# Calculates hash code according to all attributes.
|
339
|
+
# @return [Fixnum] Hash code
|
340
|
+
def hash
|
341
|
+
[id, compartment_id, display_name, service_level_agreement_type, autonomous_exadata_infrastructure_id, lifecycle_state, lifecycle_details, time_created, patch_model, last_maintenance_run_id, next_maintenance_run_id, freeform_tags, defined_tags, availability_domain, backup_config].hash
|
342
|
+
end
|
343
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
344
|
+
|
345
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
346
|
+
|
347
|
+
|
348
|
+
# Builds the object from hash
|
349
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
350
|
+
# @return [Object] Returns the model itself
|
351
|
+
def build_from_hash(attributes)
|
352
|
+
return nil unless attributes.is_a?(Hash)
|
353
|
+
|
354
|
+
self.class.swagger_types.each_pair do |key, type|
|
355
|
+
if type =~ /^Array<(.*)>/i
|
356
|
+
# check to ensure the input is an array given that the the attribute
|
357
|
+
# is documented as an array but the input is not
|
358
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
359
|
+
public_method("#{key}=").call(
|
360
|
+
attributes[self.class.attribute_map[key]]
|
361
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
362
|
+
)
|
363
|
+
end
|
364
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
365
|
+
public_method("#{key}=").call(
|
366
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
367
|
+
)
|
368
|
+
end
|
369
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
370
|
+
end
|
371
|
+
|
372
|
+
self
|
373
|
+
end
|
374
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
375
|
+
|
376
|
+
# Returns the string representation of the object
|
377
|
+
# @return [String] String presentation of the object
|
378
|
+
def to_s
|
379
|
+
to_hash.to_s
|
380
|
+
end
|
381
|
+
|
382
|
+
# Returns the object in the form of hash
|
383
|
+
# @return [Hash] Returns the object in the form of hash
|
384
|
+
def to_hash
|
385
|
+
hash = {}
|
386
|
+
self.class.attribute_map.each_pair do |attr, param|
|
387
|
+
value = public_method(attr).call
|
388
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
389
|
+
|
390
|
+
hash[param] = _to_hash(value)
|
391
|
+
end
|
392
|
+
hash
|
393
|
+
end
|
394
|
+
|
395
|
+
private
|
396
|
+
|
397
|
+
# Outputs non-array value in the form of hash
|
398
|
+
# For object, use to_hash. Otherwise, just return the value
|
399
|
+
# @param [Object] value Any valid value
|
400
|
+
# @return [Hash] Returns the value in the form of hash
|
401
|
+
def _to_hash(value)
|
402
|
+
if value.is_a?(Array)
|
403
|
+
value.compact.map { |v| _to_hash(v) }
|
404
|
+
elsif value.is_a?(Hash)
|
405
|
+
{}.tap do |hash|
|
406
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
407
|
+
end
|
408
|
+
elsif value.respond_to? :to_hash
|
409
|
+
value.to_hash
|
410
|
+
else
|
411
|
+
value
|
412
|
+
end
|
413
|
+
end
|
414
|
+
end
|
415
|
+
end
|
416
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|