incident_io_api 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/incident_io/api/alert_grouping_preferences_v3_api.rb +367 -0
- data/lib/incident_io/api/alert_rules_v3_api.rb +367 -0
- data/lib/incident_io/api/catalog_v3_api.rb +68 -0
- data/lib/incident_io/api/team_grouping_preferences_v3_api.rb +364 -0
- data/lib/incident_io/models/alert_grouping_conditional_branch_v3.rb +204 -0
- data/lib/incident_io/models/alert_grouping_default_branch_v3.rb +165 -0
- data/lib/incident_io/models/alert_grouping_preference_v3.rb +368 -0
- data/lib/incident_io/models/alert_grouping_preferences_create_payload_v3.rb +225 -0
- data/lib/incident_io/models/alert_grouping_preferences_create_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_grouping_preferences_list_result_v3.rb +192 -0
- data/lib/incident_io/models/alert_grouping_preferences_show_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_grouping_preferences_update_payload_v3.rb +198 -0
- data/lib/incident_io/models/alert_grouping_preferences_update_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_grouping_settings_v3.rb +246 -0
- data/lib/incident_io/models/alert_rule_action_v3.rb +240 -0
- data/lib/incident_io/models/alert_rule_block_v3.rb +222 -0
- data/lib/incident_io/models/alert_rule_branch_v3.rb +254 -0
- data/lib/incident_io/models/alert_rule_create_incident_action_v3.rb +177 -0
- data/lib/incident_io/models/alert_rule_escalate_action_v3.rb +215 -0
- data/lib/incident_io/models/alert_rule_nested_branch_v3.rb +242 -0
- data/lib/incident_io/models/alert_rule_post_action_v3.rb +202 -0
- data/lib/incident_io/models/alert_rule_set_v3.rb +351 -0
- data/lib/incident_io/models/alert_rules_create_payload_v3.rb +225 -0
- data/lib/incident_io/models/alert_rules_create_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_rules_list_result_v3.rb +192 -0
- data/lib/incident_io/models/alert_rules_show_result_v3.rb +164 -0
- data/lib/incident_io/models/alert_rules_update_payload_v3.rb +198 -0
- data/lib/incident_io/models/alert_rules_update_result_v3.rb +164 -0
- data/lib/incident_io/models/catalog_bulk_archive_entries_payload_v3.rb +212 -0
- data/lib/incident_io/models/team_grouping_preference_v3.rb +300 -0
- data/lib/incident_io/models/team_grouping_preferences_create_payload_v3.rb +191 -0
- data/lib/incident_io/models/team_grouping_preferences_create_result_v3.rb +164 -0
- data/lib/incident_io/models/team_grouping_preferences_list_result_v3.rb +192 -0
- data/lib/incident_io/models/team_grouping_preferences_show_result_v3.rb +164 -0
- data/lib/incident_io/models/team_grouping_preferences_update_payload_v3.rb +191 -0
- data/lib/incident_io/models/team_grouping_preferences_update_result_v3.rb +164 -0
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +35 -0
- metadata +37 -2
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#incident.io
|
|
3
|
+
|
|
4
|
+
#Ruby client for the incident.io API.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.25.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module IncidentIo
|
|
16
|
+
class AlertRulesV3Api
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Alert Rules V3
|
|
23
|
+
# Create a team's set of alert rules, or the organisation's required or default rules when it has none. A second set of the same kind, or for the same team, is refused. To manage existing required or default rules, import them or update them by ID.
|
|
24
|
+
# @param alert_rules_create_payload_v3 [AlertRulesCreatePayloadV3]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AlertRulesCreateResultV3]
|
|
27
|
+
def alert_rules_v3_create(alert_rules_create_payload_v3, opts = {})
|
|
28
|
+
data, _status_code, _headers = alert_rules_v3_create_with_http_info(alert_rules_create_payload_v3, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Alert Rules V3
|
|
33
|
+
# Create a team's set of alert rules, or the organisation's required or default rules when it has none. A second set of the same kind, or for the same team, is refused. To manage existing required or default rules, import them or update them by ID.
|
|
34
|
+
# @param alert_rules_create_payload_v3 [AlertRulesCreatePayloadV3]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AlertRulesCreateResultV3, Integer, Hash)>] AlertRulesCreateResultV3 data, response status code and response headers
|
|
37
|
+
def alert_rules_v3_create_with_http_info(alert_rules_create_payload_v3, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AlertRulesV3Api.alert_rules_v3_create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'alert_rules_create_payload_v3' is set
|
|
42
|
+
if @api_client.config.client_side_validation && alert_rules_create_payload_v3.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'alert_rules_create_payload_v3' when calling AlertRulesV3Api.alert_rules_v3_create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v3/alert_rules'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(alert_rules_create_payload_v3)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'AlertRulesCreateResultV3'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"AlertRulesV3Api.alert_rules_v3_create",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: AlertRulesV3Api#alert_rules_v3_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Delete Alert Rules V3
|
|
91
|
+
# Remove a team's set of alert rules. The organisation's required and default rules can't be removed: deleting one empties its rules instead, written as its next version, and releases it from Terraform management.
|
|
92
|
+
# @param id [String] Unique identifier of the set of rules
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def alert_rules_v3_delete(id, opts = {})
|
|
96
|
+
alert_rules_v3_delete_with_http_info(id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete Alert Rules V3
|
|
101
|
+
# Remove a team's set of alert rules. The organisation's required and default rules can't be removed: deleting one empties its rules instead, written as its next version, and releases it from Terraform management.
|
|
102
|
+
# @param id [String] Unique identifier of the set of rules
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def alert_rules_v3_delete_with_http_info(id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: AlertRulesV3Api.alert_rules_v3_delete ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertRulesV3Api.alert_rules_v3_delete"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/v3/alert_rules/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
|
|
124
|
+
# form parameters
|
|
125
|
+
form_params = opts[:form_params] || {}
|
|
126
|
+
|
|
127
|
+
# http body (model)
|
|
128
|
+
post_body = opts[:debug_body]
|
|
129
|
+
|
|
130
|
+
# return_type
|
|
131
|
+
return_type = opts[:debug_return_type]
|
|
132
|
+
|
|
133
|
+
# auth_names
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
135
|
+
|
|
136
|
+
new_options = opts.merge(
|
|
137
|
+
:operation => :"AlertRulesV3Api.alert_rules_v3_delete",
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: AlertRulesV3Api#alert_rules_v3_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
return data, status_code, headers
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# List Alert Rules V3
|
|
154
|
+
# List the sets of alert rules in your account.
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [Integer] :page_size Number of sets to return per page (default to 25)
|
|
157
|
+
# @option opts [String] :after The ID of the last set on the previous page
|
|
158
|
+
# @option opts [String] :kind Return only sets of this kind
|
|
159
|
+
# @option opts [String] :team_id Return only this team's rules
|
|
160
|
+
# @return [AlertRulesListResultV3]
|
|
161
|
+
def alert_rules_v3_list(opts = {})
|
|
162
|
+
data, _status_code, _headers = alert_rules_v3_list_with_http_info(opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# List Alert Rules V3
|
|
167
|
+
# List the sets of alert rules in your account.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [Integer] :page_size Number of sets to return per page (default to 25)
|
|
170
|
+
# @option opts [String] :after The ID of the last set on the previous page
|
|
171
|
+
# @option opts [String] :kind Return only sets of this kind
|
|
172
|
+
# @option opts [String] :team_id Return only this team's rules
|
|
173
|
+
# @return [Array<(AlertRulesListResultV3, Integer, Hash)>] AlertRulesListResultV3 data, response status code and response headers
|
|
174
|
+
def alert_rules_v3_list_with_http_info(opts = {})
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: AlertRulesV3Api.alert_rules_v3_list ...'
|
|
177
|
+
end
|
|
178
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250
|
|
179
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AlertRulesV3Api.alert_rules_v3_list, must be smaller than or equal to 250.'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
|
183
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AlertRulesV3Api.alert_rules_v3_list, must be greater than or equal to 1.'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# resource path
|
|
187
|
+
local_var_path = '/v3/alert_rules'
|
|
188
|
+
|
|
189
|
+
# query parameters
|
|
190
|
+
query_params = opts[:query_params] || {}
|
|
191
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
192
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
193
|
+
query_params[:'kind'] = opts[:'kind'] if !opts[:'kind'].nil?
|
|
194
|
+
query_params[:'team_id'] = opts[:'team_id'] if !opts[:'team_id'].nil?
|
|
195
|
+
|
|
196
|
+
# header parameters
|
|
197
|
+
header_params = opts[:header_params] || {}
|
|
198
|
+
# HTTP header 'Accept' (if needed)
|
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
200
|
+
|
|
201
|
+
# form parameters
|
|
202
|
+
form_params = opts[:form_params] || {}
|
|
203
|
+
|
|
204
|
+
# http body (model)
|
|
205
|
+
post_body = opts[:debug_body]
|
|
206
|
+
|
|
207
|
+
# return_type
|
|
208
|
+
return_type = opts[:debug_return_type] || 'AlertRulesListResultV3'
|
|
209
|
+
|
|
210
|
+
# auth_names
|
|
211
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
212
|
+
|
|
213
|
+
new_options = opts.merge(
|
|
214
|
+
:operation => :"AlertRulesV3Api.alert_rules_v3_list",
|
|
215
|
+
:header_params => header_params,
|
|
216
|
+
:query_params => query_params,
|
|
217
|
+
:form_params => form_params,
|
|
218
|
+
:body => post_body,
|
|
219
|
+
:auth_names => auth_names,
|
|
220
|
+
:return_type => return_type
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug "API called: AlertRulesV3Api#alert_rules_v3_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
226
|
+
end
|
|
227
|
+
return data, status_code, headers
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Show Alert Rules V3
|
|
231
|
+
# Load one set of alert rules in your account.
|
|
232
|
+
# @param id [String] Unique identifier of the set of rules
|
|
233
|
+
# @param [Hash] opts the optional parameters
|
|
234
|
+
# @return [AlertRulesShowResultV3]
|
|
235
|
+
def alert_rules_v3_show(id, opts = {})
|
|
236
|
+
data, _status_code, _headers = alert_rules_v3_show_with_http_info(id, opts)
|
|
237
|
+
data
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Show Alert Rules V3
|
|
241
|
+
# Load one set of alert rules in your account.
|
|
242
|
+
# @param id [String] Unique identifier of the set of rules
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [Array<(AlertRulesShowResultV3, Integer, Hash)>] AlertRulesShowResultV3 data, response status code and response headers
|
|
245
|
+
def alert_rules_v3_show_with_http_info(id, opts = {})
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: AlertRulesV3Api.alert_rules_v3_show ...'
|
|
248
|
+
end
|
|
249
|
+
# verify the required parameter 'id' is set
|
|
250
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertRulesV3Api.alert_rules_v3_show"
|
|
252
|
+
end
|
|
253
|
+
# resource path
|
|
254
|
+
local_var_path = '/v3/alert_rules/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
255
|
+
|
|
256
|
+
# query parameters
|
|
257
|
+
query_params = opts[:query_params] || {}
|
|
258
|
+
|
|
259
|
+
# header parameters
|
|
260
|
+
header_params = opts[:header_params] || {}
|
|
261
|
+
# HTTP header 'Accept' (if needed)
|
|
262
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
263
|
+
|
|
264
|
+
# form parameters
|
|
265
|
+
form_params = opts[:form_params] || {}
|
|
266
|
+
|
|
267
|
+
# http body (model)
|
|
268
|
+
post_body = opts[:debug_body]
|
|
269
|
+
|
|
270
|
+
# return_type
|
|
271
|
+
return_type = opts[:debug_return_type] || 'AlertRulesShowResultV3'
|
|
272
|
+
|
|
273
|
+
# auth_names
|
|
274
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
275
|
+
|
|
276
|
+
new_options = opts.merge(
|
|
277
|
+
:operation => :"AlertRulesV3Api.alert_rules_v3_show",
|
|
278
|
+
:header_params => header_params,
|
|
279
|
+
:query_params => query_params,
|
|
280
|
+
:form_params => form_params,
|
|
281
|
+
:body => post_body,
|
|
282
|
+
:auth_names => auth_names,
|
|
283
|
+
:return_type => return_type
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
287
|
+
if @api_client.config.debugging
|
|
288
|
+
@api_client.config.logger.debug "API called: AlertRulesV3Api#alert_rules_v3_show\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
289
|
+
end
|
|
290
|
+
return data, status_code, headers
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Update Alert Rules V3
|
|
294
|
+
# Replace a set of alert rules and write its next version. The whole set is replaced: a block or branch left out is removed. The set's kind and team cannot change.
|
|
295
|
+
# @param id [String] Unique identifier of the set of rules
|
|
296
|
+
# @param alert_rules_update_payload_v3 [AlertRulesUpdatePayloadV3]
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @return [AlertRulesUpdateResultV3]
|
|
299
|
+
def alert_rules_v3_update(id, alert_rules_update_payload_v3, opts = {})
|
|
300
|
+
data, _status_code, _headers = alert_rules_v3_update_with_http_info(id, alert_rules_update_payload_v3, opts)
|
|
301
|
+
data
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Update Alert Rules V3
|
|
305
|
+
# Replace a set of alert rules and write its next version. The whole set is replaced: a block or branch left out is removed. The set's kind and team cannot change.
|
|
306
|
+
# @param id [String] Unique identifier of the set of rules
|
|
307
|
+
# @param alert_rules_update_payload_v3 [AlertRulesUpdatePayloadV3]
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @return [Array<(AlertRulesUpdateResultV3, Integer, Hash)>] AlertRulesUpdateResultV3 data, response status code and response headers
|
|
310
|
+
def alert_rules_v3_update_with_http_info(id, alert_rules_update_payload_v3, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: AlertRulesV3Api.alert_rules_v3_update ...'
|
|
313
|
+
end
|
|
314
|
+
# verify the required parameter 'id' is set
|
|
315
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
316
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AlertRulesV3Api.alert_rules_v3_update"
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'alert_rules_update_payload_v3' is set
|
|
319
|
+
if @api_client.config.client_side_validation && alert_rules_update_payload_v3.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'alert_rules_update_payload_v3' when calling AlertRulesV3Api.alert_rules_v3_update"
|
|
321
|
+
end
|
|
322
|
+
# resource path
|
|
323
|
+
local_var_path = '/v3/alert_rules/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
324
|
+
|
|
325
|
+
# query parameters
|
|
326
|
+
query_params = opts[:query_params] || {}
|
|
327
|
+
|
|
328
|
+
# header parameters
|
|
329
|
+
header_params = opts[:header_params] || {}
|
|
330
|
+
# HTTP header 'Accept' (if needed)
|
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
332
|
+
# HTTP header 'Content-Type'
|
|
333
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
334
|
+
if !content_type.nil?
|
|
335
|
+
header_params['Content-Type'] = content_type
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# form parameters
|
|
339
|
+
form_params = opts[:form_params] || {}
|
|
340
|
+
|
|
341
|
+
# http body (model)
|
|
342
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(alert_rules_update_payload_v3)
|
|
343
|
+
|
|
344
|
+
# return_type
|
|
345
|
+
return_type = opts[:debug_return_type] || 'AlertRulesUpdateResultV3'
|
|
346
|
+
|
|
347
|
+
# auth_names
|
|
348
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
349
|
+
|
|
350
|
+
new_options = opts.merge(
|
|
351
|
+
:operation => :"AlertRulesV3Api.alert_rules_v3_update",
|
|
352
|
+
:header_params => header_params,
|
|
353
|
+
:query_params => query_params,
|
|
354
|
+
:form_params => form_params,
|
|
355
|
+
:body => post_body,
|
|
356
|
+
:auth_names => auth_names,
|
|
357
|
+
:return_type => return_type
|
|
358
|
+
)
|
|
359
|
+
|
|
360
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
361
|
+
if @api_client.config.debugging
|
|
362
|
+
@api_client.config.logger.debug "API called: AlertRulesV3Api#alert_rules_v3_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
363
|
+
end
|
|
364
|
+
return data, status_code, headers
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
end
|
|
@@ -19,6 +19,74 @@ module IncidentIo
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# BulkArchiveEntries Catalog V3
|
|
23
|
+
# Archive up to 250 entries of one catalog type in a single request. This has the same effect as deleting each entry individually. This operation is atomic: if the request fails, no entries are archived. Entries that don't exist, are already archived, or belong to a different catalog type are skipped and don't fail the request. If any of the entries set attributes that you don't have permission to clear, the request fails with a 403 that lists those entries, and no entries are archived.
|
|
24
|
+
# @param catalog_bulk_archive_entries_payload_v3 [CatalogBulkArchiveEntriesPayloadV3]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def catalog_v3_bulk_archive_entries(catalog_bulk_archive_entries_payload_v3, opts = {})
|
|
28
|
+
catalog_v3_bulk_archive_entries_with_http_info(catalog_bulk_archive_entries_payload_v3, opts)
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# BulkArchiveEntries Catalog V3
|
|
33
|
+
# Archive up to 250 entries of one catalog type in a single request. This has the same effect as deleting each entry individually. This operation is atomic: if the request fails, no entries are archived. Entries that don't exist, are already archived, or belong to a different catalog type are skipped and don't fail the request. If any of the entries set attributes that you don't have permission to clear, the request fails with a 403 that lists those entries, and no entries are archived.
|
|
34
|
+
# @param catalog_bulk_archive_entries_payload_v3 [CatalogBulkArchiveEntriesPayloadV3]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def catalog_v3_bulk_archive_entries_with_http_info(catalog_bulk_archive_entries_payload_v3, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: CatalogV3Api.catalog_v3_bulk_archive_entries ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'catalog_bulk_archive_entries_payload_v3' is set
|
|
42
|
+
if @api_client.config.client_side_validation && catalog_bulk_archive_entries_payload_v3.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'catalog_bulk_archive_entries_payload_v3' when calling CatalogV3Api.catalog_v3_bulk_archive_entries"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v3/catalog_entries/actions/bulk_archive'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_bulk_archive_entries_payload_v3)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type]
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"CatalogV3Api.catalog_v3_bulk_archive_entries",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: CatalogV3Api#catalog_v3_bulk_archive_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
22
90
|
# BulkUpdateEntries Catalog V3
|
|
23
91
|
# Update multiple catalog entries in a single operation. You can update up to 250 entries at once. This operation is atomic - either all entries are updated successfully, or none are updated.
|
|
24
92
|
# @param catalog_bulk_update_entries_payload_v3 [CatalogBulkUpdateEntriesPayloadV3]
|