oci 2.4.6 → 2.4.7
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 +3 -1
- data/lib/oci.rb +2 -0
- data/lib/oci/database/database.rb +1 -0
- data/lib/oci/database/models/database.rb +18 -4
- data/lib/oci/database/models/database_connection_strings.rb +182 -0
- data/lib/oci/database/models/database_summary.rb +18 -4
- data/lib/oci/dns/dns.rb +23 -0
- data/lib/oci/dns/dns_client.rb +802 -75
- data/lib/oci/dns/dns_client_composite_operations.rb +238 -0
- data/lib/oci/dns/models/create_steering_policy_attachment_details.rb +205 -0
- data/lib/oci/dns/models/create_steering_policy_details.rb +333 -0
- data/lib/oci/dns/models/steering_policy.rb +418 -0
- data/lib/oci/dns/models/steering_policy_answer.rb +205 -0
- data/lib/oci/dns/models/steering_policy_attachment.rb +308 -0
- data/lib/oci/dns/models/steering_policy_attachment_summary.rb +304 -0
- data/lib/oci/dns/models/steering_policy_filter_answer_data.rb +168 -0
- data/lib/oci/dns/models/steering_policy_filter_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_filter_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_health_rule.rb +160 -0
- data/lib/oci/dns/models/steering_policy_health_rule_case.rb +152 -0
- data/lib/oci/dns/models/steering_policy_limit_rule.rb +179 -0
- data/lib/oci/dns/models/steering_policy_limit_rule_case.rb +162 -0
- data/lib/oci/dns/models/steering_policy_priority_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_priority_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_priority_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_rule.rb +237 -0
- data/lib/oci/dns/models/steering_policy_summary.rb +391 -0
- data/lib/oci/dns/models/steering_policy_weighted_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule_case.rb +165 -0
- data/lib/oci/dns/models/update_steering_policy_attachment_details.rb +156 -0
- data/lib/oci/dns/models/update_steering_policy_details.rb +319 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +87 -16
- data/lib/oci/email/email_client_composite_operations.rb +40 -0
- data/lib/oci/email/models/create_sender_details.rb +40 -6
- data/lib/oci/email/models/create_suppression_details.rb +2 -2
- data/lib/oci/email/models/sender.rb +53 -5
- data/lib/oci/email/models/sender_summary.rb +38 -4
- data/lib/oci/email/models/suppression.rb +20 -3
- data/lib/oci/email/models/update_sender_details.rb +174 -0
- data/lib/oci/healthchecks/health_checks_client.rb +1137 -0
- data/lib/oci/healthchecks/health_checks_client_composite_operations.rb +24 -0
- data/lib/oci/healthchecks/healthchecks.rb +41 -0
- data/lib/oci/healthchecks/models/connection.rb +159 -0
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +359 -0
- data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +278 -0
- data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +229 -0
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +310 -0
- data/lib/oci/healthchecks/models/dns.rb +165 -0
- data/lib/oci/healthchecks/models/geolocation.rb +239 -0
- data/lib/oci/healthchecks/models/health_checks_vantage_point_summary.rb +211 -0
- data/lib/oci/healthchecks/models/http_monitor.rb +395 -0
- data/lib/oci/healthchecks/models/http_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/http_probe.rb +314 -0
- data/lib/oci/healthchecks/models/http_probe_method.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_result_summary.rb +542 -0
- data/lib/oci/healthchecks/models/ping_monitor.rb +340 -0
- data/lib/oci/healthchecks/models/ping_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/ping_probe.rb +259 -0
- data/lib/oci/healthchecks/models/ping_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/ping_probe_result_summary.rb +418 -0
- data/lib/oci/healthchecks/models/routing.rb +192 -0
- data/lib/oci/healthchecks/models/tcp_connection.rb +189 -0
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +339 -0
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +292 -0
- data/lib/oci/healthchecks/util.rb +2 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule.rb +283 -0
- data/lib/oci/waas/models/access_rule_criteria.rb +206 -0
- data/lib/oci/waas/models/address_rate_limiting.rb +195 -0
- data/lib/oci/waas/models/block_challenge_settings.rb +288 -0
- data/lib/oci/waas/models/captcha.rb +231 -0
- data/lib/oci/waas/models/certificate.rb +383 -0
- data/lib/oci/waas/models/certificate_extensions.rb +170 -0
- data/lib/oci/waas/models/certificate_public_key_info.rb +170 -0
- data/lib/oci/waas/models/certificate_subject_name.rb +218 -0
- data/lib/oci/waas/models/certificate_summary.rb +274 -0
- data/lib/oci/waas/models/create_certificate_details.rb +241 -0
- data/lib/oci/waas/models/create_waas_policy_details.rb +257 -0
- data/lib/oci/waas/models/device_fingerprint_challenge.rb +268 -0
- data/lib/oci/waas/models/edge_subnet.rb +173 -0
- data/lib/oci/waas/models/good_bot.rb +183 -0
- data/lib/oci/waas/models/header.rb +159 -0
- data/lib/oci/waas/models/human_interaction_challenge.rb +282 -0
- data/lib/oci/waas/models/js_challenge.rb +240 -0
- data/lib/oci/waas/models/lifecycle_states.rb +14 -0
- data/lib/oci/waas/models/origin.rb +191 -0
- data/lib/oci/waas/models/policy_config.rb +181 -0
- data/lib/oci/waas/models/protection_rule.rb +237 -0
- data/lib/oci/waas/models/protection_rule_action.rb +185 -0
- data/lib/oci/waas/models/protection_rule_exclusion.rb +182 -0
- data/lib/oci/waas/models/protection_settings.rb +404 -0
- data/lib/oci/waas/models/recommendation.rb +210 -0
- data/lib/oci/waas/models/threat_feed.rb +202 -0
- data/lib/oci/waas/models/threat_feed_action.rb +175 -0
- data/lib/oci/waas/models/update_certificate_details.rb +183 -0
- data/lib/oci/waas/models/update_waas_policy_details.rb +233 -0
- data/lib/oci/waas/models/waas_policy.rb +331 -0
- data/lib/oci/waas/models/waas_policy_summary.rb +271 -0
- data/lib/oci/waas/models/waf_blocked_request.rb +219 -0
- data/lib/oci/waas/models/waf_config.rb +295 -0
- data/lib/oci/waas/models/waf_config_details.rb +253 -0
- data/lib/oci/waas/models/waf_log.rb +510 -0
- data/lib/oci/waas/models/waf_meter_datum.rb +279 -0
- data/lib/oci/waas/models/waf_request.rb +177 -0
- data/lib/oci/waas/models/waf_traffic_datum.rb +223 -0
- data/lib/oci/waas/models/whitelist.rb +159 -0
- data/lib/oci/waas/models/work_request.rb +322 -0
- data/lib/oci/waas/models/work_request_error.rb +170 -0
- data/lib/oci/waas/models/work_request_log_entry.rb +159 -0
- data/lib/oci/waas/models/work_request_operation_types.rb +12 -0
- data/lib/oci/waas/models/work_request_resource.rb +217 -0
- data/lib/oci/waas/models/work_request_status_values.rb +14 -0
- data/lib/oci/waas/models/work_request_summary.rb +302 -0
- data/lib/oci/waas/util.rb +2 -0
- data/lib/oci/waas/waas.rb +66 -0
- data/lib/oci/waas/waas_client.rb +3044 -0
- data/lib/oci/waas/waas_client_composite_operations.rb +990 -0
- metadata +105 -2
|
@@ -24,6 +24,84 @@ module OCI
|
|
|
24
24
|
# rubocop:disable Layout/EmptyLines
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
# Calls {OCI::Dns::DnsClient#create_steering_policy} and then waits for the {OCI::Dns::Models::SteeringPolicy} acted upon
|
|
28
|
+
# to enter the given state(s).
|
|
29
|
+
#
|
|
30
|
+
# @param [OCI::Dns::Models::CreateSteeringPolicyDetails] create_steering_policy_details Details for creating a new steering policy.
|
|
31
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Dns::Models::SteeringPolicy#lifecycle_state}
|
|
32
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Dns::DnsClient#create_steering_policy}
|
|
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::Dns::Models::SteeringPolicy}
|
|
38
|
+
def create_steering_policy_and_wait_for_state(create_steering_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
39
|
+
operation_result = @service_client.create_steering_policy(create_steering_policy_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_steering_policy(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
|
+
|
|
66
|
+
# Calls {OCI::Dns::DnsClient#create_steering_policy_attachment} and then waits for the {OCI::Dns::Models::SteeringPolicyAttachment} acted upon
|
|
67
|
+
# to enter the given state(s).
|
|
68
|
+
#
|
|
69
|
+
# @param [OCI::Dns::Models::CreateSteeringPolicyAttachmentDetails] create_steering_policy_attachment_details Details for creating a new steering policy attachment.
|
|
70
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Dns::Models::SteeringPolicyAttachment#lifecycle_state}
|
|
71
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Dns::DnsClient#create_steering_policy_attachment}
|
|
72
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
73
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
74
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
75
|
+
#
|
|
76
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Dns::Models::SteeringPolicyAttachment}
|
|
77
|
+
def create_steering_policy_attachment_and_wait_for_state(create_steering_policy_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
78
|
+
operation_result = @service_client.create_steering_policy_attachment(create_steering_policy_attachment_details, base_operation_opts)
|
|
79
|
+
|
|
80
|
+
return operation_result if wait_for_states.empty?
|
|
81
|
+
|
|
82
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
83
|
+
wait_for_resource_id = operation_result.data.id
|
|
84
|
+
|
|
85
|
+
begin
|
|
86
|
+
waiter_result = @service_client.get_steering_policy_attachment(wait_for_resource_id).wait_until(
|
|
87
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
88
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
89
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
90
|
+
)
|
|
91
|
+
result_to_return = waiter_result
|
|
92
|
+
|
|
93
|
+
return result_to_return
|
|
94
|
+
rescue StandardError
|
|
95
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
99
|
+
# rubocop:enable Layout/EmptyLines
|
|
100
|
+
|
|
101
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
102
|
+
# rubocop:disable Layout/EmptyLines
|
|
103
|
+
|
|
104
|
+
|
|
27
105
|
# Calls {OCI::Dns::DnsClient#create_zone} and then waits for the {OCI::Dns::Models::Zone} acted upon
|
|
28
106
|
# to enter the given state(s).
|
|
29
107
|
#
|
|
@@ -63,6 +141,86 @@ module OCI
|
|
|
63
141
|
# rubocop:disable Layout/EmptyLines
|
|
64
142
|
|
|
65
143
|
|
|
144
|
+
# Calls {OCI::Dns::DnsClient#delete_steering_policy} and then waits for the {OCI::Dns::Models::SteeringPolicy} acted upon
|
|
145
|
+
# to enter the given state(s).
|
|
146
|
+
#
|
|
147
|
+
# @param [String] steering_policy_id The OCID of the target steering policy.
|
|
148
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Dns::Models::SteeringPolicy#lifecycle_state}
|
|
149
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Dns::DnsClient#delete_steering_policy}
|
|
150
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
151
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
152
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
153
|
+
#
|
|
154
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type nil
|
|
155
|
+
def delete_steering_policy_and_wait_for_state(steering_policy_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
156
|
+
initial_get_result = @service_client.get_steering_policy(steering_policy_id)
|
|
157
|
+
operation_result = @service_client.delete_steering_policy(steering_policy_id, base_operation_opts)
|
|
158
|
+
|
|
159
|
+
return operation_result if wait_for_states.empty?
|
|
160
|
+
|
|
161
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
162
|
+
|
|
163
|
+
begin
|
|
164
|
+
waiter_result = initial_get_result.wait_until(
|
|
165
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
166
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
167
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
|
|
168
|
+
succeed_on_not_found: true
|
|
169
|
+
)
|
|
170
|
+
result_to_return = waiter_result
|
|
171
|
+
|
|
172
|
+
return result_to_return
|
|
173
|
+
rescue StandardError
|
|
174
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
178
|
+
# rubocop:enable Layout/EmptyLines
|
|
179
|
+
|
|
180
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
181
|
+
# rubocop:disable Layout/EmptyLines
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
# Calls {OCI::Dns::DnsClient#delete_steering_policy_attachment} and then waits for the {OCI::Dns::Models::SteeringPolicyAttachment} acted upon
|
|
185
|
+
# to enter the given state(s).
|
|
186
|
+
#
|
|
187
|
+
# @param [String] steering_policy_attachment_id The OCID of the target steering policy attachment.
|
|
188
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Dns::Models::SteeringPolicyAttachment#lifecycle_state}
|
|
189
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Dns::DnsClient#delete_steering_policy_attachment}
|
|
190
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
191
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
192
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
193
|
+
#
|
|
194
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type nil
|
|
195
|
+
def delete_steering_policy_attachment_and_wait_for_state(steering_policy_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
196
|
+
initial_get_result = @service_client.get_steering_policy_attachment(steering_policy_attachment_id)
|
|
197
|
+
operation_result = @service_client.delete_steering_policy_attachment(steering_policy_attachment_id, base_operation_opts)
|
|
198
|
+
|
|
199
|
+
return operation_result if wait_for_states.empty?
|
|
200
|
+
|
|
201
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
202
|
+
|
|
203
|
+
begin
|
|
204
|
+
waiter_result = initial_get_result.wait_until(
|
|
205
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
206
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
207
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200,
|
|
208
|
+
succeed_on_not_found: true
|
|
209
|
+
)
|
|
210
|
+
result_to_return = waiter_result
|
|
211
|
+
|
|
212
|
+
return result_to_return
|
|
213
|
+
rescue StandardError
|
|
214
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
218
|
+
# rubocop:enable Layout/EmptyLines
|
|
219
|
+
|
|
220
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
221
|
+
# rubocop:disable Layout/EmptyLines
|
|
222
|
+
|
|
223
|
+
|
|
66
224
|
# Calls {OCI::Dns::DnsClient#delete_zone} and then waits for the {OCI::Dns::Models::Zone} acted upon
|
|
67
225
|
# to enter the given state(s).
|
|
68
226
|
#
|
|
@@ -103,6 +261,86 @@ module OCI
|
|
|
103
261
|
# rubocop:disable Layout/EmptyLines
|
|
104
262
|
|
|
105
263
|
|
|
264
|
+
# Calls {OCI::Dns::DnsClient#update_steering_policy} and then waits for the {OCI::Dns::Models::SteeringPolicy} acted upon
|
|
265
|
+
# to enter the given state(s).
|
|
266
|
+
#
|
|
267
|
+
# @param [String] steering_policy_id The OCID of the target steering policy.
|
|
268
|
+
# @param [OCI::Dns::Models::UpdateSteeringPolicyDetails] update_steering_policy_details New data for the steering policy.
|
|
269
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Dns::Models::SteeringPolicy#lifecycle_state}
|
|
270
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Dns::DnsClient#update_steering_policy}
|
|
271
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
272
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
273
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
274
|
+
#
|
|
275
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Dns::Models::SteeringPolicy}
|
|
276
|
+
def update_steering_policy_and_wait_for_state(steering_policy_id, update_steering_policy_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
277
|
+
operation_result = @service_client.update_steering_policy(steering_policy_id, update_steering_policy_details, base_operation_opts)
|
|
278
|
+
|
|
279
|
+
return operation_result if wait_for_states.empty?
|
|
280
|
+
|
|
281
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
282
|
+
wait_for_resource_id = operation_result.data.id
|
|
283
|
+
|
|
284
|
+
begin
|
|
285
|
+
waiter_result = @service_client.get_steering_policy(wait_for_resource_id).wait_until(
|
|
286
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
287
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
288
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
289
|
+
)
|
|
290
|
+
result_to_return = waiter_result
|
|
291
|
+
|
|
292
|
+
return result_to_return
|
|
293
|
+
rescue StandardError
|
|
294
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
298
|
+
# rubocop:enable Layout/EmptyLines
|
|
299
|
+
|
|
300
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
301
|
+
# rubocop:disable Layout/EmptyLines
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
# Calls {OCI::Dns::DnsClient#update_steering_policy_attachment} and then waits for the {OCI::Dns::Models::SteeringPolicyAttachment} acted upon
|
|
305
|
+
# to enter the given state(s).
|
|
306
|
+
#
|
|
307
|
+
# @param [String] steering_policy_attachment_id The OCID of the target steering policy attachment.
|
|
308
|
+
# @param [OCI::Dns::Models::UpdateSteeringPolicyAttachmentDetails] update_steering_policy_attachment_details New data for the steering policy attachment.
|
|
309
|
+
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Dns::Models::SteeringPolicyAttachment#lifecycle_state}
|
|
310
|
+
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Dns::DnsClient#update_steering_policy_attachment}
|
|
311
|
+
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
|
312
|
+
# * max_interval_seconds: The maximum interval between queries, in seconds.
|
|
313
|
+
# * max_wait_seconds The maximum time to wait, in seconds
|
|
314
|
+
#
|
|
315
|
+
# @return [OCI::Response] A {OCI::Response} object with data of type {OCI::Dns::Models::SteeringPolicyAttachment}
|
|
316
|
+
def update_steering_policy_attachment_and_wait_for_state(steering_policy_attachment_id, update_steering_policy_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
|
|
317
|
+
operation_result = @service_client.update_steering_policy_attachment(steering_policy_attachment_id, update_steering_policy_attachment_details, base_operation_opts)
|
|
318
|
+
|
|
319
|
+
return operation_result if wait_for_states.empty?
|
|
320
|
+
|
|
321
|
+
lowered_wait_for_states = wait_for_states.map(&:downcase)
|
|
322
|
+
wait_for_resource_id = operation_result.data.id
|
|
323
|
+
|
|
324
|
+
begin
|
|
325
|
+
waiter_result = @service_client.get_steering_policy_attachment(wait_for_resource_id).wait_until(
|
|
326
|
+
eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) },
|
|
327
|
+
max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
|
|
328
|
+
max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
|
|
329
|
+
)
|
|
330
|
+
result_to_return = waiter_result
|
|
331
|
+
|
|
332
|
+
return result_to_return
|
|
333
|
+
rescue StandardError
|
|
334
|
+
raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
338
|
+
# rubocop:enable Layout/EmptyLines
|
|
339
|
+
|
|
340
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/ParameterLists, Metrics/PerceivedComplexity
|
|
341
|
+
# rubocop:disable Layout/EmptyLines
|
|
342
|
+
|
|
343
|
+
|
|
106
344
|
# Calls {OCI::Dns::DnsClient#update_zone} and then waits for the {OCI::Dns::Models::Zone} acted upon
|
|
107
345
|
# to enter the given state(s).
|
|
108
346
|
#
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
6
|
+
module OCI
|
|
7
|
+
# The body for defining an attachment between a steering policy and a domain.
|
|
8
|
+
# An attachment occludes all records at its domain that are of a covered rtype, constructing
|
|
9
|
+
# DNS responses from its steering policy rather than from those domain records.
|
|
10
|
+
# The attachment will cover every rtype that matches the rtype of an answer in its policy, and
|
|
11
|
+
# will cover all address rtypes (e.g., A and AAAA) if the policy includes at least one CNAME
|
|
12
|
+
# answer.
|
|
13
|
+
# A domain can have at most one attachment covering any given rtype.
|
|
14
|
+
#
|
|
15
|
+
class Dns::Models::CreateSteeringPolicyAttachmentDetails # rubocop:disable Metrics/LineLength
|
|
16
|
+
# **[Required]** The OCID of the attached steering policy.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :steering_policy_id
|
|
19
|
+
|
|
20
|
+
# **[Required]** The OCID of the attached zone.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :zone_id
|
|
23
|
+
|
|
24
|
+
# **[Required]** The attached domain within the attached zone.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :domain_name
|
|
27
|
+
|
|
28
|
+
# A user-friendly name for the steering policy attachment.
|
|
29
|
+
# Does not have to be unique, and it's changeable.
|
|
30
|
+
# Avoid entering confidential information.
|
|
31
|
+
#
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :display_name
|
|
34
|
+
|
|
35
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
|
+
def self.attribute_map
|
|
37
|
+
{
|
|
38
|
+
# rubocop:disable Style/SymbolLiteral
|
|
39
|
+
'steering_policy_id': :'steeringPolicyId',
|
|
40
|
+
'zone_id': :'zoneId',
|
|
41
|
+
'domain_name': :'domainName',
|
|
42
|
+
'display_name': :'displayName'
|
|
43
|
+
# rubocop:enable Style/SymbolLiteral
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.swagger_types
|
|
49
|
+
{
|
|
50
|
+
# rubocop:disable Style/SymbolLiteral
|
|
51
|
+
'steering_policy_id': :'String',
|
|
52
|
+
'zone_id': :'String',
|
|
53
|
+
'domain_name': :'String',
|
|
54
|
+
'display_name': :'String'
|
|
55
|
+
# rubocop:enable Style/SymbolLiteral
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
60
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
# @option attributes [String] :steering_policy_id The value to assign to the {#steering_policy_id} property
|
|
66
|
+
# @option attributes [String] :zone_id The value to assign to the {#zone_id} property
|
|
67
|
+
# @option attributes [String] :domain_name The value to assign to the {#domain_name} property
|
|
68
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
return unless attributes.is_a?(Hash)
|
|
71
|
+
|
|
72
|
+
# convert string to symbol for hash key
|
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
74
|
+
|
|
75
|
+
self.steering_policy_id = attributes[:'steeringPolicyId'] if attributes[:'steeringPolicyId']
|
|
76
|
+
|
|
77
|
+
raise 'You cannot provide both :steeringPolicyId and :steering_policy_id' if attributes.key?(:'steeringPolicyId') && attributes.key?(:'steering_policy_id')
|
|
78
|
+
|
|
79
|
+
self.steering_policy_id = attributes[:'steering_policy_id'] if attributes[:'steering_policy_id']
|
|
80
|
+
|
|
81
|
+
self.zone_id = attributes[:'zoneId'] if attributes[:'zoneId']
|
|
82
|
+
|
|
83
|
+
raise 'You cannot provide both :zoneId and :zone_id' if attributes.key?(:'zoneId') && attributes.key?(:'zone_id')
|
|
84
|
+
|
|
85
|
+
self.zone_id = attributes[:'zone_id'] if attributes[:'zone_id']
|
|
86
|
+
|
|
87
|
+
self.domain_name = attributes[:'domainName'] if attributes[:'domainName']
|
|
88
|
+
|
|
89
|
+
raise 'You cannot provide both :domainName and :domain_name' if attributes.key?(:'domainName') && attributes.key?(:'domain_name')
|
|
90
|
+
|
|
91
|
+
self.domain_name = attributes[:'domain_name'] if attributes[:'domain_name']
|
|
92
|
+
|
|
93
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
94
|
+
|
|
95
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
96
|
+
|
|
97
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
98
|
+
end
|
|
99
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
100
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
101
|
+
|
|
102
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] other the other object to be compared
|
|
107
|
+
def ==(other)
|
|
108
|
+
return true if equal?(other)
|
|
109
|
+
|
|
110
|
+
self.class == other.class &&
|
|
111
|
+
steering_policy_id == other.steering_policy_id &&
|
|
112
|
+
zone_id == other.zone_id &&
|
|
113
|
+
domain_name == other.domain_name &&
|
|
114
|
+
display_name == other.display_name
|
|
115
|
+
end
|
|
116
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
117
|
+
|
|
118
|
+
# @see the `==` method
|
|
119
|
+
# @param [Object] other the other object to be compared
|
|
120
|
+
def eql?(other)
|
|
121
|
+
self == other
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Fixnum] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[steering_policy_id, zone_id, domain_name, display_name].hash
|
|
131
|
+
end
|
|
132
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
133
|
+
|
|
134
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
# Builds the object from hash
|
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
139
|
+
# @return [Object] Returns the model itself
|
|
140
|
+
def build_from_hash(attributes)
|
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
|
142
|
+
|
|
143
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
144
|
+
if type =~ /^Array<(.*)>/i
|
|
145
|
+
# check to ensure the input is an array given that the the attribute
|
|
146
|
+
# is documented as an array but the input is not
|
|
147
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
148
|
+
public_method("#{key}=").call(
|
|
149
|
+
attributes[self.class.attribute_map[key]]
|
|
150
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
154
|
+
public_method("#{key}=").call(
|
|
155
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
156
|
+
)
|
|
157
|
+
end
|
|
158
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
self
|
|
162
|
+
end
|
|
163
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
164
|
+
|
|
165
|
+
# Returns the string representation of the object
|
|
166
|
+
# @return [String] String presentation of the object
|
|
167
|
+
def to_s
|
|
168
|
+
to_hash.to_s
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Returns the object in the form of hash
|
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
|
173
|
+
def to_hash
|
|
174
|
+
hash = {}
|
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
176
|
+
value = public_method(attr).call
|
|
177
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
178
|
+
|
|
179
|
+
hash[param] = _to_hash(value)
|
|
180
|
+
end
|
|
181
|
+
hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
private
|
|
185
|
+
|
|
186
|
+
# Outputs non-array value in the form of hash
|
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
188
|
+
# @param [Object] value Any valid value
|
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
|
190
|
+
def _to_hash(value)
|
|
191
|
+
if value.is_a?(Array)
|
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
|
193
|
+
elsif value.is_a?(Hash)
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
196
|
+
end
|
|
197
|
+
elsif value.respond_to? :to_hash
|
|
198
|
+
value.to_hash
|
|
199
|
+
else
|
|
200
|
+
value
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|