incident_io_api 4.0.0 → 4.2.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/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/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/models/webhooks_private_alert_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_alert_resolved_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_escalation_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_escalation_status_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_action_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_action_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_follow_up_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_follow_up_created_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_follow_up_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_follow_up_updated_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_incident_created_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_incident_updated_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_membership_granted_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_membership_revoked_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_private_incident_postmortem_document_status_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_alert_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_alert_resolved_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_escalation_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_escalation_status_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_action_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_action_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_follow_up_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_follow_up_created_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_follow_up_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_follow_up_updated_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_incident_created_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_incident_status_updated_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_incident_updated_v2_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_public_incident_postmortem_document_status_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_schedule_created_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_schedule_deleted_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_schedule_shift_change_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_schedule_updated_v1_response_body.rb +1 -1
- data/lib/incident_io/models/webhooks_status_page_incident_update_shared_v1_response_body.rb +1 -1
- data/lib/incident_io/version.rb +1 -1
- data/lib/incident_io.rb +34 -0
- metadata +36 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2f76fbf0a9ca1dc721304e6e5b123af09007ae5961e3e782a7e0fad4e7fa82a0
|
|
4
|
+
data.tar.gz: 27f32bae25df4d5e81494ab546fc13978802e801ef91ab3682947ad1dd170409
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be61d98c0a9ccb5b881c8a2223cc68fe11ca9d81f07fee354b3cc55e58f7f3f91a72ba6a425539138e6c8afb57834a8babb0da6107abe42b3c920ae1d54cd9a6
|
|
7
|
+
data.tar.gz: 289e1cc3d94bf0c0c4e197303e3beca530a7d8bf0adeedac3ccd9dc7142dbd56626101593d86631b195e7748ba652904208fbe6b9464b2ed1ac7030e6b6a61ab
|
|
@@ -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 AlertGroupingPreferencesV3Api
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Alert Grouping Preferences V3
|
|
23
|
+
# Create a team's grouping preference, or the organisation's default when it has none. A team can have only one preference. To manage an existing default, import it or update it by ID.
|
|
24
|
+
# @param alert_grouping_preferences_create_payload_v3 [AlertGroupingPreferencesCreatePayloadV3]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AlertGroupingPreferencesCreateResultV3]
|
|
27
|
+
def alert_grouping_preferences_v3_create(alert_grouping_preferences_create_payload_v3, opts = {})
|
|
28
|
+
data, _status_code, _headers = alert_grouping_preferences_v3_create_with_http_info(alert_grouping_preferences_create_payload_v3, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Alert Grouping Preferences V3
|
|
33
|
+
# Create a team's grouping preference, or the organisation's default when it has none. A team can have only one preference. To manage an existing default, import it or update it by ID.
|
|
34
|
+
# @param alert_grouping_preferences_create_payload_v3 [AlertGroupingPreferencesCreatePayloadV3]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AlertGroupingPreferencesCreateResultV3, Integer, Hash)>] AlertGroupingPreferencesCreateResultV3 data, response status code and response headers
|
|
37
|
+
def alert_grouping_preferences_v3_create_with_http_info(alert_grouping_preferences_create_payload_v3, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'alert_grouping_preferences_create_payload_v3' is set
|
|
42
|
+
if @api_client.config.client_side_validation && alert_grouping_preferences_create_payload_v3.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'alert_grouping_preferences_create_payload_v3' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v3/alert_grouping_preferences'
|
|
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_grouping_preferences_create_payload_v3)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'AlertGroupingPreferencesCreateResultV3'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_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: AlertGroupingPreferencesV3Api#alert_grouping_preferences_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 Grouping Preferences V3
|
|
91
|
+
# Delete a team's grouping preference, so its alerts group by each route's own settings again. The organisation's default can't be removed: deleting it turns its grouping off and hands it back to the dashboard, where its earlier settings can be restored from its history.
|
|
92
|
+
# @param id [String] Unique identifier of the preference
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def alert_grouping_preferences_v3_delete(id, opts = {})
|
|
96
|
+
alert_grouping_preferences_v3_delete_with_http_info(id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Delete Alert Grouping Preferences V3
|
|
101
|
+
# Delete a team's grouping preference, so its alerts group by each route's own settings again. The organisation's default can't be removed: deleting it turns its grouping off and hands it back to the dashboard, where its earlier settings can be restored from its history.
|
|
102
|
+
# @param id [String] Unique identifier of the preference
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def alert_grouping_preferences_v3_delete_with_http_info(id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_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 AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_delete"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/v3/alert_grouping_preferences/{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 => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_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: AlertGroupingPreferencesV3Api#alert_grouping_preferences_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 Grouping Preferences V3
|
|
154
|
+
# List the alert grouping preferences in your account.
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [Integer] :page_size Number of preferences to return per page (default to 25)
|
|
157
|
+
# @option opts [String] :after The ID of the last preference on the previous page
|
|
158
|
+
# @option opts [String] :kind Return only preferences of this kind
|
|
159
|
+
# @option opts [String] :team_id Return only this team's preference
|
|
160
|
+
# @return [AlertGroupingPreferencesListResultV3]
|
|
161
|
+
def alert_grouping_preferences_v3_list(opts = {})
|
|
162
|
+
data, _status_code, _headers = alert_grouping_preferences_v3_list_with_http_info(opts)
|
|
163
|
+
data
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# List Alert Grouping Preferences V3
|
|
167
|
+
# List the alert grouping preferences in your account.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [Integer] :page_size Number of preferences to return per page (default to 25)
|
|
170
|
+
# @option opts [String] :after The ID of the last preference on the previous page
|
|
171
|
+
# @option opts [String] :kind Return only preferences of this kind
|
|
172
|
+
# @option opts [String] :team_id Return only this team's preference
|
|
173
|
+
# @return [Array<(AlertGroupingPreferencesListResultV3, Integer, Hash)>] AlertGroupingPreferencesListResultV3 data, response status code and response headers
|
|
174
|
+
def alert_grouping_preferences_v3_list_with_http_info(opts = {})
|
|
175
|
+
if @api_client.config.debugging
|
|
176
|
+
@api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_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 AlertGroupingPreferencesV3Api.alert_grouping_preferences_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 AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_list, must be greater than or equal to 1.'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# resource path
|
|
187
|
+
local_var_path = '/v3/alert_grouping_preferences'
|
|
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] || 'AlertGroupingPreferencesListResultV3'
|
|
209
|
+
|
|
210
|
+
# auth_names
|
|
211
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
212
|
+
|
|
213
|
+
new_options = opts.merge(
|
|
214
|
+
:operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_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: AlertGroupingPreferencesV3Api#alert_grouping_preferences_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 Grouping Preferences V3
|
|
231
|
+
# Load one alert grouping preference in your account.
|
|
232
|
+
# @param id [String] Unique identifier of the preference
|
|
233
|
+
# @param [Hash] opts the optional parameters
|
|
234
|
+
# @return [AlertGroupingPreferencesShowResultV3]
|
|
235
|
+
def alert_grouping_preferences_v3_show(id, opts = {})
|
|
236
|
+
data, _status_code, _headers = alert_grouping_preferences_v3_show_with_http_info(id, opts)
|
|
237
|
+
data
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Show Alert Grouping Preferences V3
|
|
241
|
+
# Load one alert grouping preference in your account.
|
|
242
|
+
# @param id [String] Unique identifier of the preference
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [Array<(AlertGroupingPreferencesShowResultV3, Integer, Hash)>] AlertGroupingPreferencesShowResultV3 data, response status code and response headers
|
|
245
|
+
def alert_grouping_preferences_v3_show_with_http_info(id, opts = {})
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_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 AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_show"
|
|
252
|
+
end
|
|
253
|
+
# resource path
|
|
254
|
+
local_var_path = '/v3/alert_grouping_preferences/{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] || 'AlertGroupingPreferencesShowResultV3'
|
|
272
|
+
|
|
273
|
+
# auth_names
|
|
274
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
275
|
+
|
|
276
|
+
new_options = opts.merge(
|
|
277
|
+
:operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_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: AlertGroupingPreferencesV3Api#alert_grouping_preferences_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 Grouping Preferences V3
|
|
294
|
+
# Update an alert grouping preference and write its next version. Its kind and team cannot change: to move a team's preference, delete it and create another.
|
|
295
|
+
# @param id [String] Unique identifier of the preference
|
|
296
|
+
# @param alert_grouping_preferences_update_payload_v3 [AlertGroupingPreferencesUpdatePayloadV3]
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @return [AlertGroupingPreferencesUpdateResultV3]
|
|
299
|
+
def alert_grouping_preferences_v3_update(id, alert_grouping_preferences_update_payload_v3, opts = {})
|
|
300
|
+
data, _status_code, _headers = alert_grouping_preferences_v3_update_with_http_info(id, alert_grouping_preferences_update_payload_v3, opts)
|
|
301
|
+
data
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Update Alert Grouping Preferences V3
|
|
305
|
+
# Update an alert grouping preference and write its next version. Its kind and team cannot change: to move a team's preference, delete it and create another.
|
|
306
|
+
# @param id [String] Unique identifier of the preference
|
|
307
|
+
# @param alert_grouping_preferences_update_payload_v3 [AlertGroupingPreferencesUpdatePayloadV3]
|
|
308
|
+
# @param [Hash] opts the optional parameters
|
|
309
|
+
# @return [Array<(AlertGroupingPreferencesUpdateResultV3, Integer, Hash)>] AlertGroupingPreferencesUpdateResultV3 data, response status code and response headers
|
|
310
|
+
def alert_grouping_preferences_v3_update_with_http_info(id, alert_grouping_preferences_update_payload_v3, opts = {})
|
|
311
|
+
if @api_client.config.debugging
|
|
312
|
+
@api_client.config.logger.debug 'Calling API: AlertGroupingPreferencesV3Api.alert_grouping_preferences_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 AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_update"
|
|
317
|
+
end
|
|
318
|
+
# verify the required parameter 'alert_grouping_preferences_update_payload_v3' is set
|
|
319
|
+
if @api_client.config.client_side_validation && alert_grouping_preferences_update_payload_v3.nil?
|
|
320
|
+
fail ArgumentError, "Missing the required parameter 'alert_grouping_preferences_update_payload_v3' when calling AlertGroupingPreferencesV3Api.alert_grouping_preferences_v3_update"
|
|
321
|
+
end
|
|
322
|
+
# resource path
|
|
323
|
+
local_var_path = '/v3/alert_grouping_preferences/{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_grouping_preferences_update_payload_v3)
|
|
343
|
+
|
|
344
|
+
# return_type
|
|
345
|
+
return_type = opts[:debug_return_type] || 'AlertGroupingPreferencesUpdateResultV3'
|
|
346
|
+
|
|
347
|
+
# auth_names
|
|
348
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
349
|
+
|
|
350
|
+
new_options = opts.merge(
|
|
351
|
+
:operation => :"AlertGroupingPreferencesV3Api.alert_grouping_preferences_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: AlertGroupingPreferencesV3Api#alert_grouping_preferences_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
|