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
|
@@ -0,0 +1,1137 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'uri'
|
|
4
|
+
require 'logger'
|
|
5
|
+
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
7
|
+
module OCI
|
|
8
|
+
# API for the Health Checks service. Use this API to manage endpoint probes and monitors.
|
|
9
|
+
# For more information, see
|
|
10
|
+
# [Overview of the Health Checks Service](/iaas/Content/HealthChecks/Concepts/healthchecks.htm).
|
|
11
|
+
class Healthchecks::HealthChecksClient
|
|
12
|
+
# Client used to make HTTP requests.
|
|
13
|
+
# @return [OCI::ApiClient]
|
|
14
|
+
attr_reader :api_client
|
|
15
|
+
|
|
16
|
+
# Fully qualified endpoint URL
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_reader :endpoint
|
|
19
|
+
|
|
20
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
|
21
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
|
22
|
+
# will not perform any retries
|
|
23
|
+
# @return [OCI::Retry::RetryConfig]
|
|
24
|
+
attr_reader :retry_config
|
|
25
|
+
|
|
26
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_reader :region
|
|
29
|
+
|
|
30
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Creates a new HealthChecksClient.
|
|
34
|
+
# Notes:
|
|
35
|
+
# If a config is not specified, then the global OCI.config will be used.
|
|
36
|
+
# This client is not thread-safe
|
|
37
|
+
#
|
|
38
|
+
# A region must be specified in either the config or the region parameter. If specified in both,
|
|
39
|
+
# then the region parameter will be used.
|
|
40
|
+
#
|
|
41
|
+
# @param [Config] config A Config object.
|
|
42
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
|
43
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
|
44
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
|
45
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
|
46
|
+
# so that the instance principals signer can be provided to the client
|
|
47
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
|
48
|
+
# the details for the proxy can be provided in this parameter
|
|
49
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
|
50
|
+
# apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
|
51
|
+
# will not perform any retries
|
|
52
|
+
def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
|
53
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
|
54
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
|
55
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
|
56
|
+
# pass it to this constructor.
|
|
57
|
+
#
|
|
58
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
|
59
|
+
# so try and load the config from the default file.
|
|
60
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
|
61
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
|
62
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
|
63
|
+
|
|
64
|
+
if signer.nil?
|
|
65
|
+
signer = OCI::Signer.new(
|
|
66
|
+
config.user,
|
|
67
|
+
config.fingerprint,
|
|
68
|
+
config.tenancy,
|
|
69
|
+
config.key_file,
|
|
70
|
+
pass_phrase: config.pass_phrase,
|
|
71
|
+
private_key_content: config.key_content
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
|
76
|
+
@retry_config = retry_config
|
|
77
|
+
|
|
78
|
+
region ||= config.region
|
|
79
|
+
region ||= signer.region if signer.respond_to?(:region)
|
|
80
|
+
self.region = region
|
|
81
|
+
end
|
|
82
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
|
83
|
+
|
|
84
|
+
# Set the region that will be used to determine the service endpoint.
|
|
85
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
|
86
|
+
# but may be an arbitrary string.
|
|
87
|
+
def region=(new_region)
|
|
88
|
+
@region = new_region
|
|
89
|
+
|
|
90
|
+
raise 'A region must be specified.' unless @region
|
|
91
|
+
|
|
92
|
+
@endpoint = OCI::Regions.get_service_endpoint(@region, :HealthChecksClient) + '/20180501'
|
|
93
|
+
logger.info "HealthChecksClient endpoint set to '#{endpoint}'." if logger
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @return [Logger] The logger for this client. May be nil.
|
|
97
|
+
def logger
|
|
98
|
+
@api_client.config.logger
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
102
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
103
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# Creates an HTTP monitor. Vantage points will be automatically selected if not specified,
|
|
107
|
+
# and probes will be initiated from each vantage point to each of the targets at the frequency
|
|
108
|
+
# specified by `intervalInSeconds`.
|
|
109
|
+
#
|
|
110
|
+
# @param [OCI::Healthchecks::Models::CreateHttpMonitorDetails] create_http_monitor_details The configuration details for creating an HTTP monitor.
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
113
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
114
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
115
|
+
# particular request, please provide the request ID.
|
|
116
|
+
#
|
|
117
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request that can be retried in case of a timeout or
|
|
118
|
+
# server error without risk of executing the same action again. Retry tokens expire after 24
|
|
119
|
+
# hours.
|
|
120
|
+
#
|
|
121
|
+
# *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting
|
|
122
|
+
# operations, such as a resource being deleted or purged from the system.
|
|
123
|
+
#
|
|
124
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::HttpMonitor HttpMonitor}
|
|
125
|
+
def create_http_monitor(create_http_monitor_details, opts = {})
|
|
126
|
+
logger.debug 'Calling operation HealthChecksClient#create_http_monitor.' if logger
|
|
127
|
+
|
|
128
|
+
raise "Missing the required parameter 'create_http_monitor_details' when calling create_http_monitor." if create_http_monitor_details.nil?
|
|
129
|
+
|
|
130
|
+
path = '/httpMonitors'
|
|
131
|
+
operation_signing_strategy = :standard
|
|
132
|
+
|
|
133
|
+
# rubocop:disable Style/NegatedIf
|
|
134
|
+
# Query Params
|
|
135
|
+
query_params = {}
|
|
136
|
+
|
|
137
|
+
# Header Params
|
|
138
|
+
header_params = {}
|
|
139
|
+
header_params[:accept] = 'application/json'
|
|
140
|
+
header_params[:'content-type'] = 'application/json'
|
|
141
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
142
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
143
|
+
# rubocop:enable Style/NegatedIf
|
|
144
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
145
|
+
|
|
146
|
+
post_body = @api_client.object_to_http_body(create_http_monitor_details)
|
|
147
|
+
|
|
148
|
+
# rubocop:disable Metrics/BlockLength
|
|
149
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#create_http_monitor') do
|
|
150
|
+
@api_client.call_api(
|
|
151
|
+
:POST,
|
|
152
|
+
path,
|
|
153
|
+
endpoint,
|
|
154
|
+
header_params: header_params,
|
|
155
|
+
query_params: query_params,
|
|
156
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
157
|
+
body: post_body,
|
|
158
|
+
return_type: 'OCI::Healthchecks::Models::HttpMonitor'
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
# rubocop:enable Metrics/BlockLength
|
|
162
|
+
end
|
|
163
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
164
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
165
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
166
|
+
|
|
167
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
168
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
169
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
# Creates an on-demand HTTP probe. The location response header contains the URL for
|
|
173
|
+
# fetching the probe results.
|
|
174
|
+
#
|
|
175
|
+
# *Note:* On-demand probe configurations are not saved.
|
|
176
|
+
#
|
|
177
|
+
# @param [OCI::Healthchecks::Models::CreateOnDemandHttpProbeDetails] create_on_demand_http_probe_details The configuration of the HTTP probe.
|
|
178
|
+
# @param [Hash] opts the optional parameters
|
|
179
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
180
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
181
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
182
|
+
# particular request, please provide the request ID.
|
|
183
|
+
#
|
|
184
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::HttpProbe HttpProbe}
|
|
185
|
+
def create_on_demand_http_probe(create_on_demand_http_probe_details, opts = {})
|
|
186
|
+
logger.debug 'Calling operation HealthChecksClient#create_on_demand_http_probe.' if logger
|
|
187
|
+
|
|
188
|
+
raise "Missing the required parameter 'create_on_demand_http_probe_details' when calling create_on_demand_http_probe." if create_on_demand_http_probe_details.nil?
|
|
189
|
+
|
|
190
|
+
path = '/httpProbeResults'
|
|
191
|
+
operation_signing_strategy = :standard
|
|
192
|
+
|
|
193
|
+
# rubocop:disable Style/NegatedIf
|
|
194
|
+
# Query Params
|
|
195
|
+
query_params = {}
|
|
196
|
+
|
|
197
|
+
# Header Params
|
|
198
|
+
header_params = {}
|
|
199
|
+
header_params[:accept] = 'application/json'
|
|
200
|
+
header_params[:'content-type'] = 'application/json'
|
|
201
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
202
|
+
# rubocop:enable Style/NegatedIf
|
|
203
|
+
|
|
204
|
+
post_body = @api_client.object_to_http_body(create_on_demand_http_probe_details)
|
|
205
|
+
|
|
206
|
+
# rubocop:disable Metrics/BlockLength
|
|
207
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#create_on_demand_http_probe') do
|
|
208
|
+
@api_client.call_api(
|
|
209
|
+
:POST,
|
|
210
|
+
path,
|
|
211
|
+
endpoint,
|
|
212
|
+
header_params: header_params,
|
|
213
|
+
query_params: query_params,
|
|
214
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
215
|
+
body: post_body,
|
|
216
|
+
return_type: 'OCI::Healthchecks::Models::HttpProbe'
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
# rubocop:enable Metrics/BlockLength
|
|
220
|
+
end
|
|
221
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
222
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
223
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
224
|
+
|
|
225
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
226
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
227
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
# Creates an on-demand ping probe. The location response header contains the URL for
|
|
231
|
+
# fetching probe results.
|
|
232
|
+
#
|
|
233
|
+
# *Note:* The on-demand probe configuration is not saved.
|
|
234
|
+
#
|
|
235
|
+
# @param [OCI::Healthchecks::Models::CreateOnDemandPingProbeDetails] create_on_demand_ping_probe_details Configuration details for creating an on-demand ping probe.
|
|
236
|
+
# @param [Hash] opts the optional parameters
|
|
237
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
238
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
239
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
240
|
+
# particular request, please provide the request ID.
|
|
241
|
+
#
|
|
242
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::PingProbe PingProbe}
|
|
243
|
+
def create_on_demand_ping_probe(create_on_demand_ping_probe_details, opts = {})
|
|
244
|
+
logger.debug 'Calling operation HealthChecksClient#create_on_demand_ping_probe.' if logger
|
|
245
|
+
|
|
246
|
+
raise "Missing the required parameter 'create_on_demand_ping_probe_details' when calling create_on_demand_ping_probe." if create_on_demand_ping_probe_details.nil?
|
|
247
|
+
|
|
248
|
+
path = '/pingProbeResults'
|
|
249
|
+
operation_signing_strategy = :standard
|
|
250
|
+
|
|
251
|
+
# rubocop:disable Style/NegatedIf
|
|
252
|
+
# Query Params
|
|
253
|
+
query_params = {}
|
|
254
|
+
|
|
255
|
+
# Header Params
|
|
256
|
+
header_params = {}
|
|
257
|
+
header_params[:accept] = 'application/json'
|
|
258
|
+
header_params[:'content-type'] = 'application/json'
|
|
259
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
260
|
+
# rubocop:enable Style/NegatedIf
|
|
261
|
+
|
|
262
|
+
post_body = @api_client.object_to_http_body(create_on_demand_ping_probe_details)
|
|
263
|
+
|
|
264
|
+
# rubocop:disable Metrics/BlockLength
|
|
265
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#create_on_demand_ping_probe') do
|
|
266
|
+
@api_client.call_api(
|
|
267
|
+
:POST,
|
|
268
|
+
path,
|
|
269
|
+
endpoint,
|
|
270
|
+
header_params: header_params,
|
|
271
|
+
query_params: query_params,
|
|
272
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
273
|
+
body: post_body,
|
|
274
|
+
return_type: 'OCI::Healthchecks::Models::PingProbe'
|
|
275
|
+
)
|
|
276
|
+
end
|
|
277
|
+
# rubocop:enable Metrics/BlockLength
|
|
278
|
+
end
|
|
279
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
280
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
281
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
282
|
+
|
|
283
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
284
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
285
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# Creates a ping monitor. Vantage points will be automatically selected if not specified,
|
|
289
|
+
# and probes will be initiated from each vantage point to each of the targets at the frequency
|
|
290
|
+
# specified by `intervalInSeconds`.
|
|
291
|
+
#
|
|
292
|
+
# @param [OCI::Healthchecks::Models::CreatePingMonitorDetails] create_ping_monitor_details The configuration details for creating a ping monitor.
|
|
293
|
+
# @param [Hash] opts the optional parameters
|
|
294
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
295
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
296
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
297
|
+
# particular request, please provide the request ID.
|
|
298
|
+
#
|
|
299
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request that can be retried in case of a timeout or
|
|
300
|
+
# server error without risk of executing the same action again. Retry tokens expire after 24
|
|
301
|
+
# hours.
|
|
302
|
+
#
|
|
303
|
+
# *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting
|
|
304
|
+
# operations, such as a resource being deleted or purged from the system.
|
|
305
|
+
#
|
|
306
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::PingMonitor PingMonitor}
|
|
307
|
+
def create_ping_monitor(create_ping_monitor_details, opts = {})
|
|
308
|
+
logger.debug 'Calling operation HealthChecksClient#create_ping_monitor.' if logger
|
|
309
|
+
|
|
310
|
+
raise "Missing the required parameter 'create_ping_monitor_details' when calling create_ping_monitor." if create_ping_monitor_details.nil?
|
|
311
|
+
|
|
312
|
+
path = '/pingMonitors'
|
|
313
|
+
operation_signing_strategy = :standard
|
|
314
|
+
|
|
315
|
+
# rubocop:disable Style/NegatedIf
|
|
316
|
+
# Query Params
|
|
317
|
+
query_params = {}
|
|
318
|
+
|
|
319
|
+
# Header Params
|
|
320
|
+
header_params = {}
|
|
321
|
+
header_params[:accept] = 'application/json'
|
|
322
|
+
header_params[:'content-type'] = 'application/json'
|
|
323
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
324
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
325
|
+
# rubocop:enable Style/NegatedIf
|
|
326
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
327
|
+
|
|
328
|
+
post_body = @api_client.object_to_http_body(create_ping_monitor_details)
|
|
329
|
+
|
|
330
|
+
# rubocop:disable Metrics/BlockLength
|
|
331
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#create_ping_monitor') do
|
|
332
|
+
@api_client.call_api(
|
|
333
|
+
:POST,
|
|
334
|
+
path,
|
|
335
|
+
endpoint,
|
|
336
|
+
header_params: header_params,
|
|
337
|
+
query_params: query_params,
|
|
338
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
339
|
+
body: post_body,
|
|
340
|
+
return_type: 'OCI::Healthchecks::Models::PingMonitor'
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
# rubocop:enable Metrics/BlockLength
|
|
344
|
+
end
|
|
345
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
346
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
347
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
348
|
+
|
|
349
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
350
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
351
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
# Deletes the HTTP monitor and its configuration. All future probes of this
|
|
355
|
+
# monitor are stopped. Results associated with the monitor are not deleted.
|
|
356
|
+
#
|
|
357
|
+
# @param [String] monitor_id The OCID of a monitor.
|
|
358
|
+
# @param [Hash] opts the optional parameters
|
|
359
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
360
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
361
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
362
|
+
# particular request, please provide the request ID.
|
|
363
|
+
#
|
|
364
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource,
|
|
365
|
+
# set the `if-match` parameter to the value of the etag from a previous GET
|
|
366
|
+
# or POST response for that resource. The resource will be updated or deleted
|
|
367
|
+
# only if the etag you provide matches the resource's current etag value.
|
|
368
|
+
#
|
|
369
|
+
# @return [Response] A Response object with data of type nil
|
|
370
|
+
def delete_http_monitor(monitor_id, opts = {})
|
|
371
|
+
logger.debug 'Calling operation HealthChecksClient#delete_http_monitor.' if logger
|
|
372
|
+
|
|
373
|
+
raise "Missing the required parameter 'monitor_id' when calling delete_http_monitor." if monitor_id.nil?
|
|
374
|
+
raise "Parameter value for 'monitor_id' must not be blank" if OCI::Internal::Util.blank_string?(monitor_id)
|
|
375
|
+
|
|
376
|
+
path = '/httpMonitors/{monitorId}'.sub('{monitorId}', monitor_id.to_s)
|
|
377
|
+
operation_signing_strategy = :standard
|
|
378
|
+
|
|
379
|
+
# rubocop:disable Style/NegatedIf
|
|
380
|
+
# Query Params
|
|
381
|
+
query_params = {}
|
|
382
|
+
|
|
383
|
+
# Header Params
|
|
384
|
+
header_params = {}
|
|
385
|
+
header_params[:accept] = 'application/json'
|
|
386
|
+
header_params[:'content-type'] = 'application/json'
|
|
387
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
388
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
389
|
+
# rubocop:enable Style/NegatedIf
|
|
390
|
+
|
|
391
|
+
post_body = nil
|
|
392
|
+
|
|
393
|
+
# rubocop:disable Metrics/BlockLength
|
|
394
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#delete_http_monitor') do
|
|
395
|
+
@api_client.call_api(
|
|
396
|
+
:DELETE,
|
|
397
|
+
path,
|
|
398
|
+
endpoint,
|
|
399
|
+
header_params: header_params,
|
|
400
|
+
query_params: query_params,
|
|
401
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
402
|
+
body: post_body
|
|
403
|
+
)
|
|
404
|
+
end
|
|
405
|
+
# rubocop:enable Metrics/BlockLength
|
|
406
|
+
end
|
|
407
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
408
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
409
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
410
|
+
|
|
411
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
412
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
413
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
# Deletes the ping monitor and its configuration. All future probes of this
|
|
417
|
+
# monitor are stopped. Results associated with the monitor are not deleted.
|
|
418
|
+
#
|
|
419
|
+
# @param [String] monitor_id The OCID of a monitor.
|
|
420
|
+
# @param [Hash] opts the optional parameters
|
|
421
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
422
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
423
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
424
|
+
# particular request, please provide the request ID.
|
|
425
|
+
#
|
|
426
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource,
|
|
427
|
+
# set the `if-match` parameter to the value of the etag from a previous GET
|
|
428
|
+
# or POST response for that resource. The resource will be updated or deleted
|
|
429
|
+
# only if the etag you provide matches the resource's current etag value.
|
|
430
|
+
#
|
|
431
|
+
# @return [Response] A Response object with data of type nil
|
|
432
|
+
def delete_ping_monitor(monitor_id, opts = {})
|
|
433
|
+
logger.debug 'Calling operation HealthChecksClient#delete_ping_monitor.' if logger
|
|
434
|
+
|
|
435
|
+
raise "Missing the required parameter 'monitor_id' when calling delete_ping_monitor." if monitor_id.nil?
|
|
436
|
+
raise "Parameter value for 'monitor_id' must not be blank" if OCI::Internal::Util.blank_string?(monitor_id)
|
|
437
|
+
|
|
438
|
+
path = '/pingMonitors/{monitorId}'.sub('{monitorId}', monitor_id.to_s)
|
|
439
|
+
operation_signing_strategy = :standard
|
|
440
|
+
|
|
441
|
+
# rubocop:disable Style/NegatedIf
|
|
442
|
+
# Query Params
|
|
443
|
+
query_params = {}
|
|
444
|
+
|
|
445
|
+
# Header Params
|
|
446
|
+
header_params = {}
|
|
447
|
+
header_params[:accept] = 'application/json'
|
|
448
|
+
header_params[:'content-type'] = 'application/json'
|
|
449
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
450
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
451
|
+
# rubocop:enable Style/NegatedIf
|
|
452
|
+
|
|
453
|
+
post_body = nil
|
|
454
|
+
|
|
455
|
+
# rubocop:disable Metrics/BlockLength
|
|
456
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#delete_ping_monitor') do
|
|
457
|
+
@api_client.call_api(
|
|
458
|
+
:DELETE,
|
|
459
|
+
path,
|
|
460
|
+
endpoint,
|
|
461
|
+
header_params: header_params,
|
|
462
|
+
query_params: query_params,
|
|
463
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
464
|
+
body: post_body
|
|
465
|
+
)
|
|
466
|
+
end
|
|
467
|
+
# rubocop:enable Metrics/BlockLength
|
|
468
|
+
end
|
|
469
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
470
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
471
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
472
|
+
|
|
473
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
474
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
475
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
# Gets the configuration for the specified monitor.
|
|
479
|
+
#
|
|
480
|
+
# @param [String] monitor_id The OCID of a monitor.
|
|
481
|
+
# @param [Hash] opts the optional parameters
|
|
482
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
483
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
484
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
485
|
+
# particular request, please provide the request ID.
|
|
486
|
+
#
|
|
487
|
+
# @option opts [String] :if_none_match The `If-None-Match` header field makes the request method conditional on
|
|
488
|
+
# the absence of any current representation of the target resource, when
|
|
489
|
+
# the field-value is `*`, or having a selected representation with an
|
|
490
|
+
# entity-tag that does not match any of those listed in the field-value.
|
|
491
|
+
#
|
|
492
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::HttpMonitor HttpMonitor}
|
|
493
|
+
def get_http_monitor(monitor_id, opts = {})
|
|
494
|
+
logger.debug 'Calling operation HealthChecksClient#get_http_monitor.' if logger
|
|
495
|
+
|
|
496
|
+
raise "Missing the required parameter 'monitor_id' when calling get_http_monitor." if monitor_id.nil?
|
|
497
|
+
raise "Parameter value for 'monitor_id' must not be blank" if OCI::Internal::Util.blank_string?(monitor_id)
|
|
498
|
+
|
|
499
|
+
path = '/httpMonitors/{monitorId}'.sub('{monitorId}', monitor_id.to_s)
|
|
500
|
+
operation_signing_strategy = :standard
|
|
501
|
+
|
|
502
|
+
# rubocop:disable Style/NegatedIf
|
|
503
|
+
# Query Params
|
|
504
|
+
query_params = {}
|
|
505
|
+
|
|
506
|
+
# Header Params
|
|
507
|
+
header_params = {}
|
|
508
|
+
header_params[:accept] = 'application/json'
|
|
509
|
+
header_params[:'content-type'] = 'application/json'
|
|
510
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
511
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
512
|
+
# rubocop:enable Style/NegatedIf
|
|
513
|
+
|
|
514
|
+
post_body = nil
|
|
515
|
+
|
|
516
|
+
# rubocop:disable Metrics/BlockLength
|
|
517
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#get_http_monitor') do
|
|
518
|
+
@api_client.call_api(
|
|
519
|
+
:GET,
|
|
520
|
+
path,
|
|
521
|
+
endpoint,
|
|
522
|
+
header_params: header_params,
|
|
523
|
+
query_params: query_params,
|
|
524
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
525
|
+
body: post_body,
|
|
526
|
+
return_type: 'OCI::Healthchecks::Models::HttpMonitor'
|
|
527
|
+
)
|
|
528
|
+
end
|
|
529
|
+
# rubocop:enable Metrics/BlockLength
|
|
530
|
+
end
|
|
531
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
532
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
533
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
534
|
+
|
|
535
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
536
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
537
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
# Gets the configuration for the specified ping monitor.
|
|
541
|
+
#
|
|
542
|
+
# @param [String] monitor_id The OCID of a monitor.
|
|
543
|
+
# @param [Hash] opts the optional parameters
|
|
544
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
545
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
546
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
547
|
+
# particular request, please provide the request ID.
|
|
548
|
+
#
|
|
549
|
+
# @option opts [String] :if_none_match The `If-None-Match` header field makes the request method conditional on
|
|
550
|
+
# the absence of any current representation of the target resource, when
|
|
551
|
+
# the field-value is `*`, or having a selected representation with an
|
|
552
|
+
# entity-tag that does not match any of those listed in the field-value.
|
|
553
|
+
#
|
|
554
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::PingMonitor PingMonitor}
|
|
555
|
+
def get_ping_monitor(monitor_id, opts = {})
|
|
556
|
+
logger.debug 'Calling operation HealthChecksClient#get_ping_monitor.' if logger
|
|
557
|
+
|
|
558
|
+
raise "Missing the required parameter 'monitor_id' when calling get_ping_monitor." if monitor_id.nil?
|
|
559
|
+
raise "Parameter value for 'monitor_id' must not be blank" if OCI::Internal::Util.blank_string?(monitor_id)
|
|
560
|
+
|
|
561
|
+
path = '/pingMonitors/{monitorId}'.sub('{monitorId}', monitor_id.to_s)
|
|
562
|
+
operation_signing_strategy = :standard
|
|
563
|
+
|
|
564
|
+
# rubocop:disable Style/NegatedIf
|
|
565
|
+
# Query Params
|
|
566
|
+
query_params = {}
|
|
567
|
+
|
|
568
|
+
# Header Params
|
|
569
|
+
header_params = {}
|
|
570
|
+
header_params[:accept] = 'application/json'
|
|
571
|
+
header_params[:'content-type'] = 'application/json'
|
|
572
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
573
|
+
header_params[:'if-none-match'] = opts[:if_none_match] if opts[:if_none_match]
|
|
574
|
+
# rubocop:enable Style/NegatedIf
|
|
575
|
+
|
|
576
|
+
post_body = nil
|
|
577
|
+
|
|
578
|
+
# rubocop:disable Metrics/BlockLength
|
|
579
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#get_ping_monitor') do
|
|
580
|
+
@api_client.call_api(
|
|
581
|
+
:GET,
|
|
582
|
+
path,
|
|
583
|
+
endpoint,
|
|
584
|
+
header_params: header_params,
|
|
585
|
+
query_params: query_params,
|
|
586
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
587
|
+
body: post_body,
|
|
588
|
+
return_type: 'OCI::Healthchecks::Models::PingMonitor'
|
|
589
|
+
)
|
|
590
|
+
end
|
|
591
|
+
# rubocop:enable Metrics/BlockLength
|
|
592
|
+
end
|
|
593
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
594
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
595
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
596
|
+
|
|
597
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
598
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
599
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
# Gets information about all vantage points available to the user.
|
|
603
|
+
#
|
|
604
|
+
# @param [Hash] opts the optional parameters
|
|
605
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
606
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
607
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
608
|
+
# particular request, please provide the request ID.
|
|
609
|
+
#
|
|
610
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
|
611
|
+
#
|
|
612
|
+
# @option opts [String] :page The value of the `opc-next-page` response header
|
|
613
|
+
# from the previous \"List\" call.
|
|
614
|
+
#
|
|
615
|
+
# @option opts [String] :sort_by The field to sort by when listing vantage points.
|
|
616
|
+
# Allowed values are: name, displayName
|
|
617
|
+
# @option opts [String] :sort_order Controls the sort order of results. (default to ASC)
|
|
618
|
+
# Allowed values are: ASC, DESC
|
|
619
|
+
# @option opts [String] :name Filters results that exactly match the `name` field.
|
|
620
|
+
# @option opts [String] :display_name Filters results that exactly match the `displayName` field.
|
|
621
|
+
# @return [Response] A Response object with data of type Array<{OCI::Healthchecks::Models::HealthChecksVantagePointSummary HealthChecksVantagePointSummary}>
|
|
622
|
+
def list_health_checks_vantage_points(opts = {})
|
|
623
|
+
logger.debug 'Calling operation HealthChecksClient#list_health_checks_vantage_points.' if logger
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
if opts[:sort_by] && !%w[name displayName].include?(opts[:sort_by])
|
|
627
|
+
raise 'Invalid value for "sort_by", must be one of name, displayName.'
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
631
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
path = '/vantagePoints'
|
|
635
|
+
operation_signing_strategy = :standard
|
|
636
|
+
|
|
637
|
+
# rubocop:disable Style/NegatedIf
|
|
638
|
+
# Query Params
|
|
639
|
+
query_params = {}
|
|
640
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
641
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
642
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
643
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
644
|
+
query_params[:name] = opts[:name] if opts[:name]
|
|
645
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
|
646
|
+
|
|
647
|
+
# Header Params
|
|
648
|
+
header_params = {}
|
|
649
|
+
header_params[:accept] = 'application/json'
|
|
650
|
+
header_params[:'content-type'] = 'application/json'
|
|
651
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
652
|
+
# rubocop:enable Style/NegatedIf
|
|
653
|
+
|
|
654
|
+
post_body = nil
|
|
655
|
+
|
|
656
|
+
# rubocop:disable Metrics/BlockLength
|
|
657
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#list_health_checks_vantage_points') do
|
|
658
|
+
@api_client.call_api(
|
|
659
|
+
:GET,
|
|
660
|
+
path,
|
|
661
|
+
endpoint,
|
|
662
|
+
header_params: header_params,
|
|
663
|
+
query_params: query_params,
|
|
664
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
665
|
+
body: post_body,
|
|
666
|
+
return_type: 'Array<OCI::Healthchecks::Models::HealthChecksVantagePointSummary>'
|
|
667
|
+
)
|
|
668
|
+
end
|
|
669
|
+
# rubocop:enable Metrics/BlockLength
|
|
670
|
+
end
|
|
671
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
672
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
673
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
674
|
+
|
|
675
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
676
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
677
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
# Gets a list of HTTP monitors.
|
|
681
|
+
#
|
|
682
|
+
# @param [String] compartment_id Filters results by compartment.
|
|
683
|
+
# @param [Hash] opts the optional parameters
|
|
684
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
685
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
686
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
687
|
+
# particular request, please provide the request ID.
|
|
688
|
+
#
|
|
689
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
|
690
|
+
#
|
|
691
|
+
# @option opts [String] :page The value of the `opc-next-page` response header
|
|
692
|
+
# from the previous \"List\" call.
|
|
693
|
+
#
|
|
694
|
+
# @option opts [String] :sort_by The field to sort by when listing monitors.
|
|
695
|
+
# Allowed values are: id, displayName
|
|
696
|
+
# @option opts [String] :sort_order Controls the sort order of results. (default to ASC)
|
|
697
|
+
# Allowed values are: ASC, DESC
|
|
698
|
+
# @option opts [String] :display_name Filters results that exactly match the `displayName` field.
|
|
699
|
+
# @return [Response] A Response object with data of type Array<{OCI::Healthchecks::Models::HttpMonitorSummary HttpMonitorSummary}>
|
|
700
|
+
def list_http_monitors(compartment_id, opts = {})
|
|
701
|
+
logger.debug 'Calling operation HealthChecksClient#list_http_monitors.' if logger
|
|
702
|
+
|
|
703
|
+
raise "Missing the required parameter 'compartment_id' when calling list_http_monitors." if compartment_id.nil?
|
|
704
|
+
|
|
705
|
+
if opts[:sort_by] && !%w[id displayName].include?(opts[:sort_by])
|
|
706
|
+
raise 'Invalid value for "sort_by", must be one of id, displayName.'
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
710
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
path = '/httpMonitors'
|
|
714
|
+
operation_signing_strategy = :standard
|
|
715
|
+
|
|
716
|
+
# rubocop:disable Style/NegatedIf
|
|
717
|
+
# Query Params
|
|
718
|
+
query_params = {}
|
|
719
|
+
query_params[:compartmentId] = compartment_id
|
|
720
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
721
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
722
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
723
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
724
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
|
725
|
+
|
|
726
|
+
# Header Params
|
|
727
|
+
header_params = {}
|
|
728
|
+
header_params[:accept] = 'application/json'
|
|
729
|
+
header_params[:'content-type'] = 'application/json'
|
|
730
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
731
|
+
# rubocop:enable Style/NegatedIf
|
|
732
|
+
|
|
733
|
+
post_body = nil
|
|
734
|
+
|
|
735
|
+
# rubocop:disable Metrics/BlockLength
|
|
736
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#list_http_monitors') do
|
|
737
|
+
@api_client.call_api(
|
|
738
|
+
:GET,
|
|
739
|
+
path,
|
|
740
|
+
endpoint,
|
|
741
|
+
header_params: header_params,
|
|
742
|
+
query_params: query_params,
|
|
743
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
744
|
+
body: post_body,
|
|
745
|
+
return_type: 'Array<OCI::Healthchecks::Models::HttpMonitorSummary>'
|
|
746
|
+
)
|
|
747
|
+
end
|
|
748
|
+
# rubocop:enable Metrics/BlockLength
|
|
749
|
+
end
|
|
750
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
751
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
752
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
753
|
+
|
|
754
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
755
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
756
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
# Gets the HTTP probe results for the specified probe or monitor, where
|
|
760
|
+
# the `probeConfigurationId` is the OCID of either a monitor or an
|
|
761
|
+
# on-demand probe.
|
|
762
|
+
#
|
|
763
|
+
# @param [String] probe_configuration_id The OCID of a monitor or on-demand probe.
|
|
764
|
+
# @param [Hash] opts the optional parameters
|
|
765
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
766
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
767
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
768
|
+
# particular request, please provide the request ID.
|
|
769
|
+
#
|
|
770
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
|
771
|
+
#
|
|
772
|
+
# @option opts [String] :page The value of the `opc-next-page` response header
|
|
773
|
+
# from the previous \"List\" call.
|
|
774
|
+
#
|
|
775
|
+
# @option opts [Float] :start_time_greater_than_or_equal_to Returns results with a `startTime` equal to or greater than the specified value.
|
|
776
|
+
# @option opts [Float] :start_time_less_than_or_equal_to Returns results with a `startTime` equal to or less than the specified value.
|
|
777
|
+
# @option opts [String] :sort_order Controls the sort order of results. (default to ASC)
|
|
778
|
+
# Allowed values are: ASC, DESC
|
|
779
|
+
# @option opts [String] :target Filters results that match the `target`.
|
|
780
|
+
# @return [Response] A Response object with data of type Array<{OCI::Healthchecks::Models::HttpProbeResultSummary HttpProbeResultSummary}>
|
|
781
|
+
def list_http_probe_results(probe_configuration_id, opts = {})
|
|
782
|
+
logger.debug 'Calling operation HealthChecksClient#list_http_probe_results.' if logger
|
|
783
|
+
|
|
784
|
+
raise "Missing the required parameter 'probe_configuration_id' when calling list_http_probe_results." if probe_configuration_id.nil?
|
|
785
|
+
|
|
786
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
787
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
788
|
+
end
|
|
789
|
+
raise "Parameter value for 'probe_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(probe_configuration_id)
|
|
790
|
+
|
|
791
|
+
path = '/httpProbeResults/{probeConfigurationId}'.sub('{probeConfigurationId}', probe_configuration_id.to_s)
|
|
792
|
+
operation_signing_strategy = :standard
|
|
793
|
+
|
|
794
|
+
# rubocop:disable Style/NegatedIf
|
|
795
|
+
# Query Params
|
|
796
|
+
query_params = {}
|
|
797
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
798
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
799
|
+
query_params[:startTimeGreaterThanOrEqualTo] = opts[:start_time_greater_than_or_equal_to] if opts[:start_time_greater_than_or_equal_to]
|
|
800
|
+
query_params[:startTimeLessThanOrEqualTo] = opts[:start_time_less_than_or_equal_to] if opts[:start_time_less_than_or_equal_to]
|
|
801
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
802
|
+
query_params[:target] = opts[:target] if opts[:target]
|
|
803
|
+
|
|
804
|
+
# Header Params
|
|
805
|
+
header_params = {}
|
|
806
|
+
header_params[:accept] = 'application/json'
|
|
807
|
+
header_params[:'content-type'] = 'application/json'
|
|
808
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
809
|
+
# rubocop:enable Style/NegatedIf
|
|
810
|
+
|
|
811
|
+
post_body = nil
|
|
812
|
+
|
|
813
|
+
# rubocop:disable Metrics/BlockLength
|
|
814
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#list_http_probe_results') do
|
|
815
|
+
@api_client.call_api(
|
|
816
|
+
:GET,
|
|
817
|
+
path,
|
|
818
|
+
endpoint,
|
|
819
|
+
header_params: header_params,
|
|
820
|
+
query_params: query_params,
|
|
821
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
822
|
+
body: post_body,
|
|
823
|
+
return_type: 'Array<OCI::Healthchecks::Models::HttpProbeResultSummary>'
|
|
824
|
+
)
|
|
825
|
+
end
|
|
826
|
+
# rubocop:enable Metrics/BlockLength
|
|
827
|
+
end
|
|
828
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
829
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
830
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
831
|
+
|
|
832
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
833
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
834
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
# Gets a list of configured ping monitors.
|
|
838
|
+
#
|
|
839
|
+
# Results are paginated based on `page` and `limit`. The `opc-next-page` header provides
|
|
840
|
+
# a URL for fetching the next page.
|
|
841
|
+
#
|
|
842
|
+
# @param [String] compartment_id Filters results by compartment.
|
|
843
|
+
# @param [Hash] opts the optional parameters
|
|
844
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
845
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
846
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
847
|
+
# particular request, please provide the request ID.
|
|
848
|
+
#
|
|
849
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
|
850
|
+
#
|
|
851
|
+
# @option opts [String] :page The value of the `opc-next-page` response header
|
|
852
|
+
# from the previous \"List\" call.
|
|
853
|
+
#
|
|
854
|
+
# @option opts [String] :sort_by The field to sort by when listing monitors.
|
|
855
|
+
# Allowed values are: id, displayName
|
|
856
|
+
# @option opts [String] :sort_order Controls the sort order of results. (default to ASC)
|
|
857
|
+
# Allowed values are: ASC, DESC
|
|
858
|
+
# @option opts [String] :display_name Filters results that exactly match the `displayName` field.
|
|
859
|
+
# @return [Response] A Response object with data of type Array<{OCI::Healthchecks::Models::PingMonitorSummary PingMonitorSummary}>
|
|
860
|
+
def list_ping_monitors(compartment_id, opts = {})
|
|
861
|
+
logger.debug 'Calling operation HealthChecksClient#list_ping_monitors.' if logger
|
|
862
|
+
|
|
863
|
+
raise "Missing the required parameter 'compartment_id' when calling list_ping_monitors." if compartment_id.nil?
|
|
864
|
+
|
|
865
|
+
if opts[:sort_by] && !%w[id displayName].include?(opts[:sort_by])
|
|
866
|
+
raise 'Invalid value for "sort_by", must be one of id, displayName.'
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
870
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
871
|
+
end
|
|
872
|
+
|
|
873
|
+
path = '/pingMonitors'
|
|
874
|
+
operation_signing_strategy = :standard
|
|
875
|
+
|
|
876
|
+
# rubocop:disable Style/NegatedIf
|
|
877
|
+
# Query Params
|
|
878
|
+
query_params = {}
|
|
879
|
+
query_params[:compartmentId] = compartment_id
|
|
880
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
881
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
882
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
883
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
884
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
|
885
|
+
|
|
886
|
+
# Header Params
|
|
887
|
+
header_params = {}
|
|
888
|
+
header_params[:accept] = 'application/json'
|
|
889
|
+
header_params[:'content-type'] = 'application/json'
|
|
890
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
891
|
+
# rubocop:enable Style/NegatedIf
|
|
892
|
+
|
|
893
|
+
post_body = nil
|
|
894
|
+
|
|
895
|
+
# rubocop:disable Metrics/BlockLength
|
|
896
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#list_ping_monitors') do
|
|
897
|
+
@api_client.call_api(
|
|
898
|
+
:GET,
|
|
899
|
+
path,
|
|
900
|
+
endpoint,
|
|
901
|
+
header_params: header_params,
|
|
902
|
+
query_params: query_params,
|
|
903
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
904
|
+
body: post_body,
|
|
905
|
+
return_type: 'Array<OCI::Healthchecks::Models::PingMonitorSummary>'
|
|
906
|
+
)
|
|
907
|
+
end
|
|
908
|
+
# rubocop:enable Metrics/BlockLength
|
|
909
|
+
end
|
|
910
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
911
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
912
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
913
|
+
|
|
914
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
915
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
916
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
# Returns the results for the specified probe, where the `probeConfigurationId`
|
|
920
|
+
# is the OCID of either a monitor or an on-demand probe.
|
|
921
|
+
#
|
|
922
|
+
# Results are paginated based on `page` and `limit`. The `opc-next-page` header provides
|
|
923
|
+
# a URL for fetching the next page. Use `sortOrder` to set the order of the
|
|
924
|
+
# results. If `sortOrder` is unspecified, results are sorted in ascending order by
|
|
925
|
+
# `startTime`.
|
|
926
|
+
#
|
|
927
|
+
# @param [String] probe_configuration_id The OCID of a monitor or on-demand probe.
|
|
928
|
+
# @param [Hash] opts the optional parameters
|
|
929
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
930
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
931
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
932
|
+
# particular request, please provide the request ID.
|
|
933
|
+
#
|
|
934
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
|
935
|
+
#
|
|
936
|
+
# @option opts [String] :page The value of the `opc-next-page` response header
|
|
937
|
+
# from the previous \"List\" call.
|
|
938
|
+
#
|
|
939
|
+
# @option opts [Float] :start_time_greater_than_or_equal_to Returns results with a `startTime` equal to or greater than the specified value.
|
|
940
|
+
# @option opts [Float] :start_time_less_than_or_equal_to Returns results with a `startTime` equal to or less than the specified value.
|
|
941
|
+
# @option opts [String] :sort_order Controls the sort order of results. (default to ASC)
|
|
942
|
+
# Allowed values are: ASC, DESC
|
|
943
|
+
# @option opts [String] :target Filters results that match the `target`.
|
|
944
|
+
# @return [Response] A Response object with data of type Array<{OCI::Healthchecks::Models::PingProbeResultSummary PingProbeResultSummary}>
|
|
945
|
+
def list_ping_probe_results(probe_configuration_id, opts = {})
|
|
946
|
+
logger.debug 'Calling operation HealthChecksClient#list_ping_probe_results.' if logger
|
|
947
|
+
|
|
948
|
+
raise "Missing the required parameter 'probe_configuration_id' when calling list_ping_probe_results." if probe_configuration_id.nil?
|
|
949
|
+
|
|
950
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
951
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
952
|
+
end
|
|
953
|
+
raise "Parameter value for 'probe_configuration_id' must not be blank" if OCI::Internal::Util.blank_string?(probe_configuration_id)
|
|
954
|
+
|
|
955
|
+
path = '/pingProbeResults/{probeConfigurationId}'.sub('{probeConfigurationId}', probe_configuration_id.to_s)
|
|
956
|
+
operation_signing_strategy = :standard
|
|
957
|
+
|
|
958
|
+
# rubocop:disable Style/NegatedIf
|
|
959
|
+
# Query Params
|
|
960
|
+
query_params = {}
|
|
961
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
962
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
963
|
+
query_params[:startTimeGreaterThanOrEqualTo] = opts[:start_time_greater_than_or_equal_to] if opts[:start_time_greater_than_or_equal_to]
|
|
964
|
+
query_params[:startTimeLessThanOrEqualTo] = opts[:start_time_less_than_or_equal_to] if opts[:start_time_less_than_or_equal_to]
|
|
965
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
966
|
+
query_params[:target] = opts[:target] if opts[:target]
|
|
967
|
+
|
|
968
|
+
# Header Params
|
|
969
|
+
header_params = {}
|
|
970
|
+
header_params[:accept] = 'application/json'
|
|
971
|
+
header_params[:'content-type'] = 'application/json'
|
|
972
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
973
|
+
# rubocop:enable Style/NegatedIf
|
|
974
|
+
|
|
975
|
+
post_body = nil
|
|
976
|
+
|
|
977
|
+
# rubocop:disable Metrics/BlockLength
|
|
978
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#list_ping_probe_results') do
|
|
979
|
+
@api_client.call_api(
|
|
980
|
+
:GET,
|
|
981
|
+
path,
|
|
982
|
+
endpoint,
|
|
983
|
+
header_params: header_params,
|
|
984
|
+
query_params: query_params,
|
|
985
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
986
|
+
body: post_body,
|
|
987
|
+
return_type: 'Array<OCI::Healthchecks::Models::PingProbeResultSummary>'
|
|
988
|
+
)
|
|
989
|
+
end
|
|
990
|
+
# rubocop:enable Metrics/BlockLength
|
|
991
|
+
end
|
|
992
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
993
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
994
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
995
|
+
|
|
996
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
997
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
998
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
# Updates the configuration of the specified HTTP monitor. Only the fields
|
|
1002
|
+
# specified in the request body will be updated; all other configuration
|
|
1003
|
+
# properties will remain unchanged.
|
|
1004
|
+
#
|
|
1005
|
+
# @param [String] monitor_id The OCID of a monitor.
|
|
1006
|
+
# @param [OCI::Healthchecks::Models::UpdateHttpMonitorDetails] update_http_monitor_details The configuration details to update for the HTTP monitor.
|
|
1007
|
+
# @param [Hash] opts the optional parameters
|
|
1008
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1009
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1010
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
1011
|
+
# particular request, please provide the request ID.
|
|
1012
|
+
#
|
|
1013
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource,
|
|
1014
|
+
# set the `if-match` parameter to the value of the etag from a previous GET
|
|
1015
|
+
# or POST response for that resource. The resource will be updated or deleted
|
|
1016
|
+
# only if the etag you provide matches the resource's current etag value.
|
|
1017
|
+
#
|
|
1018
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::HttpMonitor HttpMonitor}
|
|
1019
|
+
def update_http_monitor(monitor_id, update_http_monitor_details, opts = {})
|
|
1020
|
+
logger.debug 'Calling operation HealthChecksClient#update_http_monitor.' if logger
|
|
1021
|
+
|
|
1022
|
+
raise "Missing the required parameter 'monitor_id' when calling update_http_monitor." if monitor_id.nil?
|
|
1023
|
+
raise "Missing the required parameter 'update_http_monitor_details' when calling update_http_monitor." if update_http_monitor_details.nil?
|
|
1024
|
+
raise "Parameter value for 'monitor_id' must not be blank" if OCI::Internal::Util.blank_string?(monitor_id)
|
|
1025
|
+
|
|
1026
|
+
path = '/httpMonitors/{monitorId}'.sub('{monitorId}', monitor_id.to_s)
|
|
1027
|
+
operation_signing_strategy = :standard
|
|
1028
|
+
|
|
1029
|
+
# rubocop:disable Style/NegatedIf
|
|
1030
|
+
# Query Params
|
|
1031
|
+
query_params = {}
|
|
1032
|
+
|
|
1033
|
+
# Header Params
|
|
1034
|
+
header_params = {}
|
|
1035
|
+
header_params[:accept] = 'application/json'
|
|
1036
|
+
header_params[:'content-type'] = 'application/json'
|
|
1037
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1038
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
1039
|
+
# rubocop:enable Style/NegatedIf
|
|
1040
|
+
|
|
1041
|
+
post_body = @api_client.object_to_http_body(update_http_monitor_details)
|
|
1042
|
+
|
|
1043
|
+
# rubocop:disable Metrics/BlockLength
|
|
1044
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#update_http_monitor') do
|
|
1045
|
+
@api_client.call_api(
|
|
1046
|
+
:PUT,
|
|
1047
|
+
path,
|
|
1048
|
+
endpoint,
|
|
1049
|
+
header_params: header_params,
|
|
1050
|
+
query_params: query_params,
|
|
1051
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1052
|
+
body: post_body,
|
|
1053
|
+
return_type: 'OCI::Healthchecks::Models::HttpMonitor'
|
|
1054
|
+
)
|
|
1055
|
+
end
|
|
1056
|
+
# rubocop:enable Metrics/BlockLength
|
|
1057
|
+
end
|
|
1058
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1059
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1060
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1061
|
+
|
|
1062
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1063
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1064
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
# Updates the configuration of the specified ping monitor. Only the fields
|
|
1068
|
+
# specified in the request body will be updated; all other configuration properties
|
|
1069
|
+
# will remain unchanged.
|
|
1070
|
+
#
|
|
1071
|
+
# @param [String] monitor_id The OCID of a monitor.
|
|
1072
|
+
# @param [OCI::Healthchecks::Models::UpdatePingMonitorDetails] update_ping_monitor_details Details for updating a Ping monitor.
|
|
1073
|
+
# @param [Hash] opts the optional parameters
|
|
1074
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1075
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1076
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
|
1077
|
+
# particular request, please provide the request ID.
|
|
1078
|
+
#
|
|
1079
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource,
|
|
1080
|
+
# set the `if-match` parameter to the value of the etag from a previous GET
|
|
1081
|
+
# or POST response for that resource. The resource will be updated or deleted
|
|
1082
|
+
# only if the etag you provide matches the resource's current etag value.
|
|
1083
|
+
#
|
|
1084
|
+
# @return [Response] A Response object with data of type {OCI::Healthchecks::Models::PingMonitor PingMonitor}
|
|
1085
|
+
def update_ping_monitor(monitor_id, update_ping_monitor_details, opts = {})
|
|
1086
|
+
logger.debug 'Calling operation HealthChecksClient#update_ping_monitor.' if logger
|
|
1087
|
+
|
|
1088
|
+
raise "Missing the required parameter 'monitor_id' when calling update_ping_monitor." if monitor_id.nil?
|
|
1089
|
+
raise "Missing the required parameter 'update_ping_monitor_details' when calling update_ping_monitor." if update_ping_monitor_details.nil?
|
|
1090
|
+
raise "Parameter value for 'monitor_id' must not be blank" if OCI::Internal::Util.blank_string?(monitor_id)
|
|
1091
|
+
|
|
1092
|
+
path = '/pingMonitors/{monitorId}'.sub('{monitorId}', monitor_id.to_s)
|
|
1093
|
+
operation_signing_strategy = :standard
|
|
1094
|
+
|
|
1095
|
+
# rubocop:disable Style/NegatedIf
|
|
1096
|
+
# Query Params
|
|
1097
|
+
query_params = {}
|
|
1098
|
+
|
|
1099
|
+
# Header Params
|
|
1100
|
+
header_params = {}
|
|
1101
|
+
header_params[:accept] = 'application/json'
|
|
1102
|
+
header_params[:'content-type'] = 'application/json'
|
|
1103
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1104
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
1105
|
+
# rubocop:enable Style/NegatedIf
|
|
1106
|
+
|
|
1107
|
+
post_body = @api_client.object_to_http_body(update_ping_monitor_details)
|
|
1108
|
+
|
|
1109
|
+
# rubocop:disable Metrics/BlockLength
|
|
1110
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'HealthChecksClient#update_ping_monitor') do
|
|
1111
|
+
@api_client.call_api(
|
|
1112
|
+
:PUT,
|
|
1113
|
+
path,
|
|
1114
|
+
endpoint,
|
|
1115
|
+
header_params: header_params,
|
|
1116
|
+
query_params: query_params,
|
|
1117
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1118
|
+
body: post_body,
|
|
1119
|
+
return_type: 'OCI::Healthchecks::Models::PingMonitor'
|
|
1120
|
+
)
|
|
1121
|
+
end
|
|
1122
|
+
# rubocop:enable Metrics/BlockLength
|
|
1123
|
+
end
|
|
1124
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1125
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1126
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1127
|
+
|
|
1128
|
+
private
|
|
1129
|
+
|
|
1130
|
+
def applicable_retry_config(opts = {})
|
|
1131
|
+
return @retry_config unless opts.key?(:retry_config)
|
|
1132
|
+
|
|
1133
|
+
opts[:retry_config]
|
|
1134
|
+
end
|
|
1135
|
+
end
|
|
1136
|
+
end
|
|
1137
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|