statuscake-rb 1.0.0.pre.beta.4
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 +7 -0
- data/lib/statuscake/api/contact_groups_api.rb +411 -0
- data/lib/statuscake/api/locations_api.rb +166 -0
- data/lib/statuscake/api/maintenance_windows_api.rb +444 -0
- data/lib/statuscake/api/pagespeed_api.rb +550 -0
- data/lib/statuscake/api/ssl_api.rb +458 -0
- data/lib/statuscake/api/uptime_api.rb +881 -0
- data/lib/statuscake/api_client.rb +407 -0
- data/lib/statuscake/api_error.rb +75 -0
- data/lib/statuscake/configuration.rb +296 -0
- data/lib/statuscake/models/api_error.rb +249 -0
- data/lib/statuscake/models/api_response.rb +241 -0
- data/lib/statuscake/models/api_response_data.rb +243 -0
- data/lib/statuscake/models/contact_group.rb +318 -0
- data/lib/statuscake/models/contact_group_response.rb +241 -0
- data/lib/statuscake/models/contact_groups.rb +258 -0
- data/lib/statuscake/models/links.rb +242 -0
- data/lib/statuscake/models/maintenance_window.rb +364 -0
- data/lib/statuscake/models/maintenance_window_repeat_interval.rb +59 -0
- data/lib/statuscake/models/maintenance_window_response.rb +241 -0
- data/lib/statuscake/models/maintenance_window_state.rb +57 -0
- data/lib/statuscake/models/maintenance_windows.rb +258 -0
- data/lib/statuscake/models/monitoring_location.rb +306 -0
- data/lib/statuscake/models/monitoring_location_status.rb +56 -0
- data/lib/statuscake/models/monitoring_locations.rb +244 -0
- data/lib/statuscake/models/pagespeed_test.rb +444 -0
- data/lib/statuscake/models/pagespeed_test_check_rate.rb +61 -0
- data/lib/statuscake/models/pagespeed_test_history.rb +269 -0
- data/lib/statuscake/models/pagespeed_test_history_result.rb +373 -0
- data/lib/statuscake/models/pagespeed_test_region.rb +64 -0
- data/lib/statuscake/models/pagespeed_test_response.rb +241 -0
- data/lib/statuscake/models/pagespeed_test_stats.rb +354 -0
- data/lib/statuscake/models/pagespeed_test_throttling.rb +60 -0
- data/lib/statuscake/models/pagespeed_tests.rb +258 -0
- data/lib/statuscake/models/pagination.rb +363 -0
- data/lib/statuscake/models/ssl_test.rb +594 -0
- data/lib/statuscake/models/ssl_test_check_rate.rb +60 -0
- data/lib/statuscake/models/ssl_test_flags.rb +347 -0
- data/lib/statuscake/models/ssl_test_mixed_content.rb +257 -0
- data/lib/statuscake/models/ssl_test_response.rb +241 -0
- data/lib/statuscake/models/ssl_tests.rb +258 -0
- data/lib/statuscake/models/uptime_test.rb +811 -0
- data/lib/statuscake/models/uptime_test_alert.rb +300 -0
- data/lib/statuscake/models/uptime_test_alerts.rb +269 -0
- data/lib/statuscake/models/uptime_test_check_rate.rb +62 -0
- data/lib/statuscake/models/uptime_test_history.rb +269 -0
- data/lib/statuscake/models/uptime_test_history_result.rb +302 -0
- data/lib/statuscake/models/uptime_test_overview.rb +388 -0
- data/lib/statuscake/models/uptime_test_period.rb +291 -0
- data/lib/statuscake/models/uptime_test_periods.rb +269 -0
- data/lib/statuscake/models/uptime_test_processing_state.rb +58 -0
- data/lib/statuscake/models/uptime_test_response.rb +241 -0
- data/lib/statuscake/models/uptime_test_status.rb +56 -0
- data/lib/statuscake/models/uptime_test_type.rb +61 -0
- data/lib/statuscake/models/uptime_tests.rb +258 -0
- data/lib/statuscake/version.rb +32 -0
- data/lib/statuscake.rb +107 -0
- metadata +221 -0
@@ -0,0 +1,458 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# StatusCake API
|
4
|
+
#
|
5
|
+
# Copyright (c) 2022
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to
|
9
|
+
# deal in the Software without restriction, including without limitation the
|
10
|
+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
11
|
+
# sell copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
23
|
+
# IN THE SOFTWARE.
|
24
|
+
#
|
25
|
+
# API version: 1.0.0
|
26
|
+
# Contact: support@statuscake.com
|
27
|
+
#
|
28
|
+
# Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
29
|
+
|
30
|
+
require 'cgi'
|
31
|
+
|
32
|
+
module StatusCake
|
33
|
+
# :nodoc
|
34
|
+
class SslApi
|
35
|
+
attr_accessor :api_client
|
36
|
+
|
37
|
+
def initialize(api_client = ApiClient.default)
|
38
|
+
@api_client = api_client
|
39
|
+
end
|
40
|
+
|
41
|
+
# Create an SSL check
|
42
|
+
# Creates an SSL check with the given parameters.
|
43
|
+
# @param website_url [String] URL of the server under test. Must begin with https://
|
44
|
+
# @param check_rate [SSLTestCheckRate]
|
45
|
+
# @param alert_at [Array<Integer>] List representing when alerts should be sent (days). Must be exactly 3 numerical values
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @option opts [Boolean] :alert_broken Whether to enable alerts when SSL certificate issues are found (default to false)
|
48
|
+
# @option opts [Boolean] :alert_expiry Whether to enable alerts when the SSL certificate is to expire (default to false)
|
49
|
+
# @option opts [Boolean] :alert_mixed Whether to enable alerts when mixed content is found (default to false)
|
50
|
+
# @option opts [Boolean] :alert_reminder Whether to enable alert reminders (default to false)
|
51
|
+
# @option opts [Array<String>] :contact_groups List of contact group IDs
|
52
|
+
# @option opts [Boolean] :follow_redirects Whether to follow redirects when testing. Disabled by default (default to false)
|
53
|
+
# @option opts [String] :hostname Hostname of the server under test
|
54
|
+
# @option opts [Boolean] :paused Whether the check should be run (default to false)
|
55
|
+
# @option opts [String] :user_agent Custom user agent string set when testing
|
56
|
+
# @return [APIResponse]
|
57
|
+
def create_ssl_test(website_url, check_rate, alert_at, opts = {})
|
58
|
+
data, _status_code, _headers = create_ssl_test_with_http_info(website_url, check_rate, alert_at, opts)
|
59
|
+
data
|
60
|
+
end
|
61
|
+
|
62
|
+
# Create an SSL check
|
63
|
+
# Creates an SSL check with the given parameters.
|
64
|
+
# @param website_url [String] URL of the server under test. Must begin with https://
|
65
|
+
# @param check_rate [SSLTestCheckRate]
|
66
|
+
# @param alert_at [Array<Integer>] List representing when alerts should be sent (days). Must be exactly 3 numerical values
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @option opts [Boolean] :alert_broken Whether to enable alerts when SSL certificate issues are found (default to false)
|
69
|
+
# @option opts [Boolean] :alert_expiry Whether to enable alerts when the SSL certificate is to expire (default to false)
|
70
|
+
# @option opts [Boolean] :alert_mixed Whether to enable alerts when mixed content is found (default to false)
|
71
|
+
# @option opts [Boolean] :alert_reminder Whether to enable alert reminders (default to false)
|
72
|
+
# @option opts [Array<String>] :contact_groups List of contact group IDs
|
73
|
+
# @option opts [Boolean] :follow_redirects Whether to follow redirects when testing. Disabled by default (default to false)
|
74
|
+
# @option opts [String] :hostname Hostname of the server under test
|
75
|
+
# @option opts [Boolean] :paused Whether the check should be run (default to false)
|
76
|
+
# @option opts [String] :user_agent Custom user agent string set when testing
|
77
|
+
# @return [Array<(APIResponse, Integer, Hash)>] APIResponse data, response status code and response headers
|
78
|
+
def create_ssl_test_with_http_info(website_url, check_rate, alert_at, opts = {})
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug 'Calling API: SslApi.create_ssl_test ...'
|
81
|
+
end
|
82
|
+
# verify the required parameter 'website_url' is set
|
83
|
+
if @api_client.config.client_side_validation && website_url.nil?
|
84
|
+
raise ArgumentError, "Missing the required parameter 'website_url' when calling SslApi.create_ssl_test"
|
85
|
+
end
|
86
|
+
# verify the required parameter 'check_rate' is set
|
87
|
+
if @api_client.config.client_side_validation && check_rate.nil?
|
88
|
+
raise ArgumentError, "Missing the required parameter 'check_rate' when calling SslApi.create_ssl_test"
|
89
|
+
end
|
90
|
+
# verify the required parameter 'alert_at' is set
|
91
|
+
if @api_client.config.client_side_validation && alert_at.nil?
|
92
|
+
raise ArgumentError, "Missing the required parameter 'alert_at' when calling SslApi.create_ssl_test"
|
93
|
+
end
|
94
|
+
# resource path
|
95
|
+
local_var_path = '/ssl'
|
96
|
+
|
97
|
+
# query parameters
|
98
|
+
query_params = opts[:query_params] || {}
|
99
|
+
|
100
|
+
# header parameters
|
101
|
+
header_params = opts[:header_params] || {}
|
102
|
+
# HTTP header 'Accept' (if needed)
|
103
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
104
|
+
# HTTP header 'Content-Type'
|
105
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
106
|
+
unless content_type.nil?
|
107
|
+
header_params['Content-Type'] = content_type
|
108
|
+
end
|
109
|
+
|
110
|
+
# form parameters
|
111
|
+
form_params = opts[:form_params] || {}
|
112
|
+
form_params['website_url'] = website_url
|
113
|
+
form_params['check_rate'] = check_rate
|
114
|
+
form_params['alert_at'] = @api_client.build_collection_param(alert_at, :csv)
|
115
|
+
form_params['alert_broken'] = opts[:'alert_broken'] unless opts[:'alert_broken'].nil?
|
116
|
+
form_params['alert_expiry'] = opts[:'alert_expiry'] unless opts[:'alert_expiry'].nil?
|
117
|
+
form_params['alert_mixed'] = opts[:'alert_mixed'] unless opts[:'alert_mixed'].nil?
|
118
|
+
form_params['alert_reminder'] = opts[:'alert_reminder'] unless opts[:'alert_reminder'].nil?
|
119
|
+
form_params['contact_groups'] = @api_client.build_collection_param(opts[:'contact_groups'], :csv) unless opts[:'contact_groups'].nil?
|
120
|
+
form_params['follow_redirects'] = opts[:'follow_redirects'] unless opts[:'follow_redirects'].nil?
|
121
|
+
form_params['hostname'] = opts[:'hostname'] unless opts[:'hostname'].nil?
|
122
|
+
form_params['paused'] = opts[:'paused'] unless opts[:'paused'].nil?
|
123
|
+
form_params['user_agent'] = opts[:'user_agent'] unless opts[:'user_agent'].nil?
|
124
|
+
|
125
|
+
# http body (model)
|
126
|
+
post_body = opts[:debug_body]
|
127
|
+
|
128
|
+
# return_type
|
129
|
+
return_type = opts[:debug_return_type] || 'APIResponse'
|
130
|
+
|
131
|
+
# auth_names
|
132
|
+
auth_names = opts[:debug_auth_names] || []
|
133
|
+
|
134
|
+
new_options = opts.merge(
|
135
|
+
:operation => :'SslApi.create_ssl_test',
|
136
|
+
:header_params => header_params,
|
137
|
+
:query_params => query_params,
|
138
|
+
:form_params => form_params,
|
139
|
+
:body => post_body,
|
140
|
+
:auth_names => auth_names,
|
141
|
+
:return_type => return_type,
|
142
|
+
)
|
143
|
+
|
144
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
145
|
+
if @api_client.config.debugging
|
146
|
+
@api_client.config.logger.debug "API called: SslApi#create_ssl_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
147
|
+
end
|
148
|
+
|
149
|
+
[data, status_code, headers]
|
150
|
+
end
|
151
|
+
|
152
|
+
# Delete an SSL check
|
153
|
+
# Deletes an SSL check with the given id.
|
154
|
+
# @param test_id [String] Pagespeed check ID
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @return [nil]
|
157
|
+
def delete_ssl_test(test_id, opts = {})
|
158
|
+
delete_ssl_test_with_http_info(test_id, opts)
|
159
|
+
nil
|
160
|
+
end
|
161
|
+
|
162
|
+
# Delete an SSL check
|
163
|
+
# Deletes an SSL check with the given id.
|
164
|
+
# @param test_id [String] Pagespeed check ID
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
167
|
+
def delete_ssl_test_with_http_info(test_id, opts = {})
|
168
|
+
if @api_client.config.debugging
|
169
|
+
@api_client.config.logger.debug 'Calling API: SslApi.delete_ssl_test ...'
|
170
|
+
end
|
171
|
+
# verify the required parameter 'test_id' is set
|
172
|
+
if @api_client.config.client_side_validation && test_id.nil?
|
173
|
+
raise ArgumentError, "Missing the required parameter 'test_id' when calling SslApi.delete_ssl_test"
|
174
|
+
end
|
175
|
+
# resource path
|
176
|
+
local_var_path = '/ssl/{test_id}'.sub('{' + 'test_id' + '}', CGI.escape(test_id.to_s))
|
177
|
+
|
178
|
+
# query parameters
|
179
|
+
query_params = opts[:query_params] || {}
|
180
|
+
|
181
|
+
# header parameters
|
182
|
+
header_params = opts[:header_params] || {}
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = opts[:form_params] || {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = opts[:debug_body]
|
191
|
+
|
192
|
+
# return_type
|
193
|
+
return_type = opts[:debug_return_type]
|
194
|
+
|
195
|
+
# auth_names
|
196
|
+
auth_names = opts[:debug_auth_names] || []
|
197
|
+
|
198
|
+
new_options = opts.merge(
|
199
|
+
:operation => :'SslApi.delete_ssl_test',
|
200
|
+
:header_params => header_params,
|
201
|
+
:query_params => query_params,
|
202
|
+
:form_params => form_params,
|
203
|
+
:body => post_body,
|
204
|
+
:auth_names => auth_names,
|
205
|
+
:return_type => return_type,
|
206
|
+
)
|
207
|
+
|
208
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug "API called: SslApi#delete_ssl_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
211
|
+
end
|
212
|
+
|
213
|
+
[data, status_code, headers]
|
214
|
+
end
|
215
|
+
|
216
|
+
# Retrieve an SSL check
|
217
|
+
# Returns an SSL check with the given id.
|
218
|
+
# @param test_id [String] SSL check ID
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [SSLTestResponse]
|
221
|
+
def get_ssl_test(test_id, opts = {})
|
222
|
+
data, _status_code, _headers = get_ssl_test_with_http_info(test_id, opts)
|
223
|
+
data
|
224
|
+
end
|
225
|
+
|
226
|
+
# Retrieve an SSL check
|
227
|
+
# Returns an SSL check with the given id.
|
228
|
+
# @param test_id [String] SSL check ID
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @return [Array<(SSLTestResponse, Integer, Hash)>] SSLTestResponse data, response status code and response headers
|
231
|
+
def get_ssl_test_with_http_info(test_id, opts = {})
|
232
|
+
if @api_client.config.debugging
|
233
|
+
@api_client.config.logger.debug 'Calling API: SslApi.get_ssl_test ...'
|
234
|
+
end
|
235
|
+
# verify the required parameter 'test_id' is set
|
236
|
+
if @api_client.config.client_side_validation && test_id.nil?
|
237
|
+
raise ArgumentError, "Missing the required parameter 'test_id' when calling SslApi.get_ssl_test"
|
238
|
+
end
|
239
|
+
# resource path
|
240
|
+
local_var_path = '/ssl/{test_id}'.sub('{' + 'test_id' + '}', CGI.escape(test_id.to_s))
|
241
|
+
|
242
|
+
# query parameters
|
243
|
+
query_params = opts[:query_params] || {}
|
244
|
+
|
245
|
+
# header parameters
|
246
|
+
header_params = opts[:header_params] || {}
|
247
|
+
# HTTP header 'Accept' (if needed)
|
248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
249
|
+
|
250
|
+
# form parameters
|
251
|
+
form_params = opts[:form_params] || {}
|
252
|
+
|
253
|
+
# http body (model)
|
254
|
+
post_body = opts[:debug_body]
|
255
|
+
|
256
|
+
# return_type
|
257
|
+
return_type = opts[:debug_return_type] || 'SSLTestResponse'
|
258
|
+
|
259
|
+
# auth_names
|
260
|
+
auth_names = opts[:debug_auth_names] || []
|
261
|
+
|
262
|
+
new_options = opts.merge(
|
263
|
+
:operation => :'SslApi.get_ssl_test',
|
264
|
+
:header_params => header_params,
|
265
|
+
:query_params => query_params,
|
266
|
+
:form_params => form_params,
|
267
|
+
:body => post_body,
|
268
|
+
:auth_names => auth_names,
|
269
|
+
:return_type => return_type,
|
270
|
+
)
|
271
|
+
|
272
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
273
|
+
if @api_client.config.debugging
|
274
|
+
@api_client.config.logger.debug "API called: SslApi#get_ssl_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
275
|
+
end
|
276
|
+
|
277
|
+
[data, status_code, headers]
|
278
|
+
end
|
279
|
+
|
280
|
+
# Get all SSL checks
|
281
|
+
# Returns a list of SSL checks for an account.
|
282
|
+
# @param [Hash] opts the optional parameters
|
283
|
+
# @option opts [Integer] :page Page of results (default to 1)
|
284
|
+
# @option opts [Integer] :limit The number of SSL checks to return per page (default to 25)
|
285
|
+
# @return [SSLTests]
|
286
|
+
def list_ssl_tests(opts = {})
|
287
|
+
data, _status_code, _headers = list_ssl_tests_with_http_info(opts)
|
288
|
+
data
|
289
|
+
end
|
290
|
+
|
291
|
+
# Get all SSL checks
|
292
|
+
# Returns a list of SSL checks for an account.
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @option opts [Integer] :page Page of results (default to 1)
|
295
|
+
# @option opts [Integer] :limit The number of SSL checks to return per page (default to 25)
|
296
|
+
# @return [Array<(SSLTests, Integer, Hash)>] SSLTests data, response status code and response headers
|
297
|
+
def list_ssl_tests_with_http_info(opts = {})
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug 'Calling API: SslApi.list_ssl_tests ...'
|
300
|
+
end
|
301
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
302
|
+
raise ArgumentError, 'invalid value for "opts[:"page"]" when calling SslApi.list_ssl_tests, must be greater than or equal to 1.'
|
303
|
+
end
|
304
|
+
|
305
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
306
|
+
raise ArgumentError, 'invalid value for "opts[:"limit"]" when calling SslApi.list_ssl_tests, must be smaller than or equal to 100.'
|
307
|
+
end
|
308
|
+
|
309
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
310
|
+
raise ArgumentError, 'invalid value for "opts[:"limit"]" when calling SslApi.list_ssl_tests, must be greater than or equal to 1.'
|
311
|
+
end
|
312
|
+
|
313
|
+
# resource path
|
314
|
+
local_var_path = '/ssl'
|
315
|
+
|
316
|
+
# query parameters
|
317
|
+
query_params = opts[:query_params] || {}
|
318
|
+
query_params[:'page'] = opts[:'page'] unless opts[:'page'].nil?
|
319
|
+
query_params[:'limit'] = opts[:'limit'] unless opts[:'limit'].nil?
|
320
|
+
|
321
|
+
# header parameters
|
322
|
+
header_params = opts[:header_params] || {}
|
323
|
+
# HTTP header 'Accept' (if needed)
|
324
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
325
|
+
|
326
|
+
# form parameters
|
327
|
+
form_params = opts[:form_params] || {}
|
328
|
+
|
329
|
+
# http body (model)
|
330
|
+
post_body = opts[:debug_body]
|
331
|
+
|
332
|
+
# return_type
|
333
|
+
return_type = opts[:debug_return_type] || 'SSLTests'
|
334
|
+
|
335
|
+
# auth_names
|
336
|
+
auth_names = opts[:debug_auth_names] || []
|
337
|
+
|
338
|
+
new_options = opts.merge(
|
339
|
+
:operation => :'SslApi.list_ssl_tests',
|
340
|
+
:header_params => header_params,
|
341
|
+
:query_params => query_params,
|
342
|
+
:form_params => form_params,
|
343
|
+
:body => post_body,
|
344
|
+
:auth_names => auth_names,
|
345
|
+
:return_type => return_type,
|
346
|
+
)
|
347
|
+
|
348
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug "API called: SslApi#list_ssl_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
351
|
+
end
|
352
|
+
|
353
|
+
[data, status_code, headers]
|
354
|
+
end
|
355
|
+
|
356
|
+
# Update an SSL check
|
357
|
+
# Updates an SSL check with the given parameters.
|
358
|
+
# @param test_id [String] SSL check ID
|
359
|
+
# @param [Hash] opts the optional parameters
|
360
|
+
# @option opts [SSLTestCheckRate] :check_rate
|
361
|
+
# @option opts [Array<Integer>] :alert_at List representing when alerts should be sent (days). Must be exactly 3 numerical values
|
362
|
+
# @option opts [Boolean] :alert_broken Whether to enable alerts when SSL certificate issues are found
|
363
|
+
# @option opts [Boolean] :alert_expiry Whether to enable alerts when the SSL certificate is to expire
|
364
|
+
# @option opts [Boolean] :alert_mixed Whether to enable alerts when mixed content is found
|
365
|
+
# @option opts [Boolean] :alert_reminder Whether to enable alert reminders
|
366
|
+
# @option opts [Array<String>] :contact_groups List of contact group IDs
|
367
|
+
# @option opts [Boolean] :follow_redirects Whether to follow redirects when testing. Disabled by default
|
368
|
+
# @option opts [String] :hostname Hostname of the server under test
|
369
|
+
# @option opts [Boolean] :paused Whether the check should be run
|
370
|
+
# @option opts [String] :user_agent Custom user agent string set when testing
|
371
|
+
# @return [nil]
|
372
|
+
def update_ssl_test(test_id, opts = {})
|
373
|
+
update_ssl_test_with_http_info(test_id, opts)
|
374
|
+
nil
|
375
|
+
end
|
376
|
+
|
377
|
+
# Update an SSL check
|
378
|
+
# Updates an SSL check with the given parameters.
|
379
|
+
# @param test_id [String] SSL check ID
|
380
|
+
# @param [Hash] opts the optional parameters
|
381
|
+
# @option opts [SSLTestCheckRate] :check_rate
|
382
|
+
# @option opts [Array<Integer>] :alert_at List representing when alerts should be sent (days). Must be exactly 3 numerical values
|
383
|
+
# @option opts [Boolean] :alert_broken Whether to enable alerts when SSL certificate issues are found
|
384
|
+
# @option opts [Boolean] :alert_expiry Whether to enable alerts when the SSL certificate is to expire
|
385
|
+
# @option opts [Boolean] :alert_mixed Whether to enable alerts when mixed content is found
|
386
|
+
# @option opts [Boolean] :alert_reminder Whether to enable alert reminders
|
387
|
+
# @option opts [Array<String>] :contact_groups List of contact group IDs
|
388
|
+
# @option opts [Boolean] :follow_redirects Whether to follow redirects when testing. Disabled by default
|
389
|
+
# @option opts [String] :hostname Hostname of the server under test
|
390
|
+
# @option opts [Boolean] :paused Whether the check should be run
|
391
|
+
# @option opts [String] :user_agent Custom user agent string set when testing
|
392
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
393
|
+
def update_ssl_test_with_http_info(test_id, opts = {})
|
394
|
+
if @api_client.config.debugging
|
395
|
+
@api_client.config.logger.debug 'Calling API: SslApi.update_ssl_test ...'
|
396
|
+
end
|
397
|
+
# verify the required parameter 'test_id' is set
|
398
|
+
if @api_client.config.client_side_validation && test_id.nil?
|
399
|
+
raise ArgumentError, "Missing the required parameter 'test_id' when calling SslApi.update_ssl_test"
|
400
|
+
end
|
401
|
+
# resource path
|
402
|
+
local_var_path = '/ssl/{test_id}'.sub('{' + 'test_id' + '}', CGI.escape(test_id.to_s))
|
403
|
+
|
404
|
+
# query parameters
|
405
|
+
query_params = opts[:query_params] || {}
|
406
|
+
|
407
|
+
# header parameters
|
408
|
+
header_params = opts[:header_params] || {}
|
409
|
+
# HTTP header 'Accept' (if needed)
|
410
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
411
|
+
# HTTP header 'Content-Type'
|
412
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
413
|
+
unless content_type.nil?
|
414
|
+
header_params['Content-Type'] = content_type
|
415
|
+
end
|
416
|
+
|
417
|
+
# form parameters
|
418
|
+
form_params = opts[:form_params] || {}
|
419
|
+
form_params['check_rate'] = opts[:'check_rate'] unless opts[:'check_rate'].nil?
|
420
|
+
form_params['alert_at'] = @api_client.build_collection_param(opts[:'alert_at'], :csv) unless opts[:'alert_at'].nil?
|
421
|
+
form_params['alert_broken'] = opts[:'alert_broken'] unless opts[:'alert_broken'].nil?
|
422
|
+
form_params['alert_expiry'] = opts[:'alert_expiry'] unless opts[:'alert_expiry'].nil?
|
423
|
+
form_params['alert_mixed'] = opts[:'alert_mixed'] unless opts[:'alert_mixed'].nil?
|
424
|
+
form_params['alert_reminder'] = opts[:'alert_reminder'] unless opts[:'alert_reminder'].nil?
|
425
|
+
form_params['contact_groups'] = @api_client.build_collection_param(opts[:'contact_groups'], :csv) unless opts[:'contact_groups'].nil?
|
426
|
+
form_params['follow_redirects'] = opts[:'follow_redirects'] unless opts[:'follow_redirects'].nil?
|
427
|
+
form_params['hostname'] = opts[:'hostname'] unless opts[:'hostname'].nil?
|
428
|
+
form_params['paused'] = opts[:'paused'] unless opts[:'paused'].nil?
|
429
|
+
form_params['user_agent'] = opts[:'user_agent'] unless opts[:'user_agent'].nil?
|
430
|
+
|
431
|
+
# http body (model)
|
432
|
+
post_body = opts[:debug_body]
|
433
|
+
|
434
|
+
# return_type
|
435
|
+
return_type = opts[:debug_return_type]
|
436
|
+
|
437
|
+
# auth_names
|
438
|
+
auth_names = opts[:debug_auth_names] || []
|
439
|
+
|
440
|
+
new_options = opts.merge(
|
441
|
+
:operation => :'SslApi.update_ssl_test',
|
442
|
+
:header_params => header_params,
|
443
|
+
:query_params => query_params,
|
444
|
+
:form_params => form_params,
|
445
|
+
:body => post_body,
|
446
|
+
:auth_names => auth_names,
|
447
|
+
:return_type => return_type,
|
448
|
+
)
|
449
|
+
|
450
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
451
|
+
if @api_client.config.debugging
|
452
|
+
@api_client.config.logger.debug "API called: SslApi#update_ssl_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
453
|
+
end
|
454
|
+
|
455
|
+
[data, status_code, headers]
|
456
|
+
end
|
457
|
+
end
|
458
|
+
end
|