datadog_api_client 2.37.0 → 2.38.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/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +20 -1
- data/.generator/schemas/v2/openapi.yaml +1083 -74
- data/CHANGELOG.md +20 -0
- data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
- data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
- data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
- data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
- data/examples/v2/events/CreateEvent.rb +4 -2
- data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
- data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
- data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
- data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
- data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
- data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
- data/lib/datadog_api_client/configuration.rb +59 -0
- data/lib/datadog_api_client/inflector.rb +29 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
- data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
- data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/events_api.rb +8 -4
- data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -0
- data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
- data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
- data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
- data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
- data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
- data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
- data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
- data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
- data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
- data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
- data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
- data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +41 -1
@@ -163,6 +163,79 @@ module DatadogAPIClient::V2
|
|
163
163
|
return data, status_code, headers
|
164
164
|
end
|
165
165
|
|
166
|
+
# Create a monitor user template.
|
167
|
+
#
|
168
|
+
# @see #create_monitor_user_template_with_http_info
|
169
|
+
def create_monitor_user_template(body, opts = {})
|
170
|
+
data, _status_code, _headers = create_monitor_user_template_with_http_info(body, opts)
|
171
|
+
data
|
172
|
+
end
|
173
|
+
|
174
|
+
# Create a monitor user template.
|
175
|
+
#
|
176
|
+
# Create a new monitor user template.
|
177
|
+
#
|
178
|
+
# @param body [MonitorUserTemplateCreateRequest]
|
179
|
+
# @param opts [Hash] the optional parameters
|
180
|
+
# @return [Array<(MonitorUserTemplateCreateResponse, Integer, Hash)>] MonitorUserTemplateCreateResponse data, response status code and response headers
|
181
|
+
def create_monitor_user_template_with_http_info(body, opts = {})
|
182
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_monitor_user_template".to_sym]
|
183
|
+
if unstable_enabled
|
184
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_monitor_user_template")
|
185
|
+
else
|
186
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_monitor_user_template"))
|
187
|
+
end
|
188
|
+
|
189
|
+
if @api_client.config.debugging
|
190
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.create_monitor_user_template ...'
|
191
|
+
end
|
192
|
+
# verify the required parameter 'body' is set
|
193
|
+
if @api_client.config.client_side_validation && body.nil?
|
194
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.create_monitor_user_template"
|
195
|
+
end
|
196
|
+
# resource path
|
197
|
+
local_var_path = '/api/v2/monitor/template'
|
198
|
+
|
199
|
+
# query parameters
|
200
|
+
query_params = opts[:query_params] || {}
|
201
|
+
|
202
|
+
# header parameters
|
203
|
+
header_params = opts[:header_params] || {}
|
204
|
+
# HTTP header 'Accept' (if needed)
|
205
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
206
|
+
# HTTP header 'Content-Type'
|
207
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
208
|
+
|
209
|
+
# form parameters
|
210
|
+
form_params = opts[:form_params] || {}
|
211
|
+
|
212
|
+
# http body (model)
|
213
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
214
|
+
|
215
|
+
# return_type
|
216
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateCreateResponse'
|
217
|
+
|
218
|
+
# auth_names
|
219
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
220
|
+
|
221
|
+
new_options = opts.merge(
|
222
|
+
:operation => :create_monitor_user_template,
|
223
|
+
:header_params => header_params,
|
224
|
+
:query_params => query_params,
|
225
|
+
:form_params => form_params,
|
226
|
+
:body => post_body,
|
227
|
+
:auth_names => auth_names,
|
228
|
+
:return_type => return_type,
|
229
|
+
:api_version => "V2"
|
230
|
+
)
|
231
|
+
|
232
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
233
|
+
if @api_client.config.debugging
|
234
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#create_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
235
|
+
end
|
236
|
+
return data, status_code, headers
|
237
|
+
end
|
238
|
+
|
166
239
|
# Delete a monitor configuration policy.
|
167
240
|
#
|
168
241
|
# @see #delete_monitor_config_policy_with_http_info
|
@@ -299,6 +372,77 @@ module DatadogAPIClient::V2
|
|
299
372
|
return data, status_code, headers
|
300
373
|
end
|
301
374
|
|
375
|
+
# Delete a monitor user template.
|
376
|
+
#
|
377
|
+
# @see #delete_monitor_user_template_with_http_info
|
378
|
+
def delete_monitor_user_template(template_id, opts = {})
|
379
|
+
delete_monitor_user_template_with_http_info(template_id, opts)
|
380
|
+
nil
|
381
|
+
end
|
382
|
+
|
383
|
+
# Delete a monitor user template.
|
384
|
+
#
|
385
|
+
# Delete an existing monitor user template by its ID.
|
386
|
+
#
|
387
|
+
# @param template_id [String] ID of the monitor user template.
|
388
|
+
# @param opts [Hash] the optional parameters
|
389
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
390
|
+
def delete_monitor_user_template_with_http_info(template_id, opts = {})
|
391
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_monitor_user_template".to_sym]
|
392
|
+
if unstable_enabled
|
393
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_monitor_user_template")
|
394
|
+
else
|
395
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_monitor_user_template"))
|
396
|
+
end
|
397
|
+
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.delete_monitor_user_template ...'
|
400
|
+
end
|
401
|
+
# verify the required parameter 'template_id' is set
|
402
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
403
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.delete_monitor_user_template"
|
404
|
+
end
|
405
|
+
# resource path
|
406
|
+
local_var_path = '/api/v2/monitor/template/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
407
|
+
|
408
|
+
# query parameters
|
409
|
+
query_params = opts[:query_params] || {}
|
410
|
+
|
411
|
+
# header parameters
|
412
|
+
header_params = opts[:header_params] || {}
|
413
|
+
# HTTP header 'Accept' (if needed)
|
414
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
415
|
+
|
416
|
+
# form parameters
|
417
|
+
form_params = opts[:form_params] || {}
|
418
|
+
|
419
|
+
# http body (model)
|
420
|
+
post_body = opts[:debug_body]
|
421
|
+
|
422
|
+
# return_type
|
423
|
+
return_type = opts[:debug_return_type]
|
424
|
+
|
425
|
+
# auth_names
|
426
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
427
|
+
|
428
|
+
new_options = opts.merge(
|
429
|
+
:operation => :delete_monitor_user_template,
|
430
|
+
:header_params => header_params,
|
431
|
+
:query_params => query_params,
|
432
|
+
:form_params => form_params,
|
433
|
+
:body => post_body,
|
434
|
+
:auth_names => auth_names,
|
435
|
+
:return_type => return_type,
|
436
|
+
:api_version => "V2"
|
437
|
+
)
|
438
|
+
|
439
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
440
|
+
if @api_client.config.debugging
|
441
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#delete_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
442
|
+
end
|
443
|
+
return data, status_code, headers
|
444
|
+
end
|
445
|
+
|
302
446
|
# Get a monitor configuration policy.
|
303
447
|
#
|
304
448
|
# @see #get_monitor_config_policy_with_http_info
|
@@ -505,6 +649,79 @@ module DatadogAPIClient::V2
|
|
505
649
|
return data, status_code, headers
|
506
650
|
end
|
507
651
|
|
652
|
+
# Get a monitor user template.
|
653
|
+
#
|
654
|
+
# @see #get_monitor_user_template_with_http_info
|
655
|
+
def get_monitor_user_template(template_id, opts = {})
|
656
|
+
data, _status_code, _headers = get_monitor_user_template_with_http_info(template_id, opts)
|
657
|
+
data
|
658
|
+
end
|
659
|
+
|
660
|
+
# Get a monitor user template.
|
661
|
+
#
|
662
|
+
# Retrieve a monitor user template by its ID.
|
663
|
+
#
|
664
|
+
# @param template_id [String] ID of the monitor user template.
|
665
|
+
# @param opts [Hash] the optional parameters
|
666
|
+
# @option opts [Boolean] :with_all_versions Whether to include all versions of the template in the response in the versions field.
|
667
|
+
# @return [Array<(MonitorUserTemplateResponse, Integer, Hash)>] MonitorUserTemplateResponse data, response status code and response headers
|
668
|
+
def get_monitor_user_template_with_http_info(template_id, opts = {})
|
669
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_monitor_user_template".to_sym]
|
670
|
+
if unstable_enabled
|
671
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_monitor_user_template")
|
672
|
+
else
|
673
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_monitor_user_template"))
|
674
|
+
end
|
675
|
+
|
676
|
+
if @api_client.config.debugging
|
677
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.get_monitor_user_template ...'
|
678
|
+
end
|
679
|
+
# verify the required parameter 'template_id' is set
|
680
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
681
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.get_monitor_user_template"
|
682
|
+
end
|
683
|
+
# resource path
|
684
|
+
local_var_path = '/api/v2/monitor/template/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
685
|
+
|
686
|
+
# query parameters
|
687
|
+
query_params = opts[:query_params] || {}
|
688
|
+
query_params[:'with_all_versions'] = opts[:'with_all_versions'] if !opts[:'with_all_versions'].nil?
|
689
|
+
|
690
|
+
# header parameters
|
691
|
+
header_params = opts[:header_params] || {}
|
692
|
+
# HTTP header 'Accept' (if needed)
|
693
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
694
|
+
|
695
|
+
# form parameters
|
696
|
+
form_params = opts[:form_params] || {}
|
697
|
+
|
698
|
+
# http body (model)
|
699
|
+
post_body = opts[:debug_body]
|
700
|
+
|
701
|
+
# return_type
|
702
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateResponse'
|
703
|
+
|
704
|
+
# auth_names
|
705
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
706
|
+
|
707
|
+
new_options = opts.merge(
|
708
|
+
:operation => :get_monitor_user_template,
|
709
|
+
:header_params => header_params,
|
710
|
+
:query_params => query_params,
|
711
|
+
:form_params => form_params,
|
712
|
+
:body => post_body,
|
713
|
+
:auth_names => auth_names,
|
714
|
+
:return_type => return_type,
|
715
|
+
:api_version => "V2"
|
716
|
+
)
|
717
|
+
|
718
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
719
|
+
if @api_client.config.debugging
|
720
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#get_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
721
|
+
end
|
722
|
+
return data, status_code, headers
|
723
|
+
end
|
724
|
+
|
508
725
|
# Get all monitor configuration policies.
|
509
726
|
#
|
510
727
|
# @see #list_monitor_config_policies_with_http_info
|
@@ -565,6 +782,72 @@ module DatadogAPIClient::V2
|
|
565
782
|
return data, status_code, headers
|
566
783
|
end
|
567
784
|
|
785
|
+
# Get all monitor user templates.
|
786
|
+
#
|
787
|
+
# @see #list_monitor_user_templates_with_http_info
|
788
|
+
def list_monitor_user_templates(opts = {})
|
789
|
+
data, _status_code, _headers = list_monitor_user_templates_with_http_info(opts)
|
790
|
+
data
|
791
|
+
end
|
792
|
+
|
793
|
+
# Get all monitor user templates.
|
794
|
+
#
|
795
|
+
# Retrieve all monitor user templates.
|
796
|
+
#
|
797
|
+
# @param opts [Hash] the optional parameters
|
798
|
+
# @return [Array<(MonitorUserTemplateListResponse, Integer, Hash)>] MonitorUserTemplateListResponse data, response status code and response headers
|
799
|
+
def list_monitor_user_templates_with_http_info(opts = {})
|
800
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_monitor_user_templates".to_sym]
|
801
|
+
if unstable_enabled
|
802
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_monitor_user_templates")
|
803
|
+
else
|
804
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_monitor_user_templates"))
|
805
|
+
end
|
806
|
+
|
807
|
+
if @api_client.config.debugging
|
808
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.list_monitor_user_templates ...'
|
809
|
+
end
|
810
|
+
# resource path
|
811
|
+
local_var_path = '/api/v2/monitor/template'
|
812
|
+
|
813
|
+
# query parameters
|
814
|
+
query_params = opts[:query_params] || {}
|
815
|
+
|
816
|
+
# header parameters
|
817
|
+
header_params = opts[:header_params] || {}
|
818
|
+
# HTTP header 'Accept' (if needed)
|
819
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
820
|
+
|
821
|
+
# form parameters
|
822
|
+
form_params = opts[:form_params] || {}
|
823
|
+
|
824
|
+
# http body (model)
|
825
|
+
post_body = opts[:debug_body]
|
826
|
+
|
827
|
+
# return_type
|
828
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateListResponse'
|
829
|
+
|
830
|
+
# auth_names
|
831
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
832
|
+
|
833
|
+
new_options = opts.merge(
|
834
|
+
:operation => :list_monitor_user_templates,
|
835
|
+
:header_params => header_params,
|
836
|
+
:query_params => query_params,
|
837
|
+
:form_params => form_params,
|
838
|
+
:body => post_body,
|
839
|
+
:auth_names => auth_names,
|
840
|
+
:return_type => return_type,
|
841
|
+
:api_version => "V2"
|
842
|
+
)
|
843
|
+
|
844
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
845
|
+
if @api_client.config.debugging
|
846
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#list_monitor_user_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
847
|
+
end
|
848
|
+
return data, status_code, headers
|
849
|
+
end
|
850
|
+
|
568
851
|
# Edit a monitor configuration policy.
|
569
852
|
#
|
570
853
|
# @see #update_monitor_config_policy_with_http_info
|
@@ -714,5 +997,234 @@ module DatadogAPIClient::V2
|
|
714
997
|
end
|
715
998
|
return data, status_code, headers
|
716
999
|
end
|
1000
|
+
|
1001
|
+
# Update a monitor user template to a new version.
|
1002
|
+
#
|
1003
|
+
# @see #update_monitor_user_template_with_http_info
|
1004
|
+
def update_monitor_user_template(template_id, body, opts = {})
|
1005
|
+
data, _status_code, _headers = update_monitor_user_template_with_http_info(template_id, body, opts)
|
1006
|
+
data
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
# Update a monitor user template to a new version.
|
1010
|
+
#
|
1011
|
+
# Creates a new version of an existing monitor user template.
|
1012
|
+
#
|
1013
|
+
# @param template_id [String] ID of the monitor user template.
|
1014
|
+
# @param body [MonitorUserTemplateUpdateRequest]
|
1015
|
+
# @param opts [Hash] the optional parameters
|
1016
|
+
# @return [Array<(MonitorUserTemplateResponse, Integer, Hash)>] MonitorUserTemplateResponse data, response status code and response headers
|
1017
|
+
def update_monitor_user_template_with_http_info(template_id, body, opts = {})
|
1018
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_monitor_user_template".to_sym]
|
1019
|
+
if unstable_enabled
|
1020
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_monitor_user_template")
|
1021
|
+
else
|
1022
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_monitor_user_template"))
|
1023
|
+
end
|
1024
|
+
|
1025
|
+
if @api_client.config.debugging
|
1026
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.update_monitor_user_template ...'
|
1027
|
+
end
|
1028
|
+
# verify the required parameter 'template_id' is set
|
1029
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
1030
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.update_monitor_user_template"
|
1031
|
+
end
|
1032
|
+
# verify the required parameter 'body' is set
|
1033
|
+
if @api_client.config.client_side_validation && body.nil?
|
1034
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.update_monitor_user_template"
|
1035
|
+
end
|
1036
|
+
# resource path
|
1037
|
+
local_var_path = '/api/v2/monitor/template/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
1038
|
+
|
1039
|
+
# query parameters
|
1040
|
+
query_params = opts[:query_params] || {}
|
1041
|
+
|
1042
|
+
# header parameters
|
1043
|
+
header_params = opts[:header_params] || {}
|
1044
|
+
# HTTP header 'Accept' (if needed)
|
1045
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1046
|
+
# HTTP header 'Content-Type'
|
1047
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1048
|
+
|
1049
|
+
# form parameters
|
1050
|
+
form_params = opts[:form_params] || {}
|
1051
|
+
|
1052
|
+
# http body (model)
|
1053
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1054
|
+
|
1055
|
+
# return_type
|
1056
|
+
return_type = opts[:debug_return_type] || 'MonitorUserTemplateResponse'
|
1057
|
+
|
1058
|
+
# auth_names
|
1059
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1060
|
+
|
1061
|
+
new_options = opts.merge(
|
1062
|
+
:operation => :update_monitor_user_template,
|
1063
|
+
:header_params => header_params,
|
1064
|
+
:query_params => query_params,
|
1065
|
+
:form_params => form_params,
|
1066
|
+
:body => post_body,
|
1067
|
+
:auth_names => auth_names,
|
1068
|
+
:return_type => return_type,
|
1069
|
+
:api_version => "V2"
|
1070
|
+
)
|
1071
|
+
|
1072
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
1073
|
+
if @api_client.config.debugging
|
1074
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#update_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1075
|
+
end
|
1076
|
+
return data, status_code, headers
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
# Validate an existing monitor user template.
|
1080
|
+
#
|
1081
|
+
# @see #validate_existing_monitor_user_template_with_http_info
|
1082
|
+
def validate_existing_monitor_user_template(template_id, body, opts = {})
|
1083
|
+
validate_existing_monitor_user_template_with_http_info(template_id, body, opts)
|
1084
|
+
nil
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Validate an existing monitor user template.
|
1088
|
+
#
|
1089
|
+
# Validate the structure and content of an existing monitor user template being updated to a new version.
|
1090
|
+
#
|
1091
|
+
# @param template_id [String] ID of the monitor user template.
|
1092
|
+
# @param body [MonitorUserTemplateUpdateRequest]
|
1093
|
+
# @param opts [Hash] the optional parameters
|
1094
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1095
|
+
def validate_existing_monitor_user_template_with_http_info(template_id, body, opts = {})
|
1096
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.validate_existing_monitor_user_template".to_sym]
|
1097
|
+
if unstable_enabled
|
1098
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.validate_existing_monitor_user_template")
|
1099
|
+
else
|
1100
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.validate_existing_monitor_user_template"))
|
1101
|
+
end
|
1102
|
+
|
1103
|
+
if @api_client.config.debugging
|
1104
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.validate_existing_monitor_user_template ...'
|
1105
|
+
end
|
1106
|
+
# verify the required parameter 'template_id' is set
|
1107
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
1108
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling MonitorsAPI.validate_existing_monitor_user_template"
|
1109
|
+
end
|
1110
|
+
# verify the required parameter 'body' is set
|
1111
|
+
if @api_client.config.client_side_validation && body.nil?
|
1112
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.validate_existing_monitor_user_template"
|
1113
|
+
end
|
1114
|
+
# resource path
|
1115
|
+
local_var_path = '/api/v2/monitor/template/{template_id}/validate'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/'))
|
1116
|
+
|
1117
|
+
# query parameters
|
1118
|
+
query_params = opts[:query_params] || {}
|
1119
|
+
|
1120
|
+
# header parameters
|
1121
|
+
header_params = opts[:header_params] || {}
|
1122
|
+
# HTTP header 'Accept' (if needed)
|
1123
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1124
|
+
# HTTP header 'Content-Type'
|
1125
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1126
|
+
|
1127
|
+
# form parameters
|
1128
|
+
form_params = opts[:form_params] || {}
|
1129
|
+
|
1130
|
+
# http body (model)
|
1131
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1132
|
+
|
1133
|
+
# return_type
|
1134
|
+
return_type = opts[:debug_return_type]
|
1135
|
+
|
1136
|
+
# auth_names
|
1137
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1138
|
+
|
1139
|
+
new_options = opts.merge(
|
1140
|
+
:operation => :validate_existing_monitor_user_template,
|
1141
|
+
:header_params => header_params,
|
1142
|
+
:query_params => query_params,
|
1143
|
+
:form_params => form_params,
|
1144
|
+
:body => post_body,
|
1145
|
+
:auth_names => auth_names,
|
1146
|
+
:return_type => return_type,
|
1147
|
+
:api_version => "V2"
|
1148
|
+
)
|
1149
|
+
|
1150
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
1151
|
+
if @api_client.config.debugging
|
1152
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#validate_existing_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1153
|
+
end
|
1154
|
+
return data, status_code, headers
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# Validate a monitor user template.
|
1158
|
+
#
|
1159
|
+
# @see #validate_monitor_user_template_with_http_info
|
1160
|
+
def validate_monitor_user_template(body, opts = {})
|
1161
|
+
validate_monitor_user_template_with_http_info(body, opts)
|
1162
|
+
nil
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
# Validate a monitor user template.
|
1166
|
+
#
|
1167
|
+
# Validate the structure and content of a monitor user template.
|
1168
|
+
#
|
1169
|
+
# @param body [MonitorUserTemplateCreateRequest]
|
1170
|
+
# @param opts [Hash] the optional parameters
|
1171
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1172
|
+
def validate_monitor_user_template_with_http_info(body, opts = {})
|
1173
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.validate_monitor_user_template".to_sym]
|
1174
|
+
if unstable_enabled
|
1175
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.validate_monitor_user_template")
|
1176
|
+
else
|
1177
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.validate_monitor_user_template"))
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
if @api_client.config.debugging
|
1181
|
+
@api_client.config.logger.debug 'Calling API: MonitorsAPI.validate_monitor_user_template ...'
|
1182
|
+
end
|
1183
|
+
# verify the required parameter 'body' is set
|
1184
|
+
if @api_client.config.client_side_validation && body.nil?
|
1185
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MonitorsAPI.validate_monitor_user_template"
|
1186
|
+
end
|
1187
|
+
# resource path
|
1188
|
+
local_var_path = '/api/v2/monitor/template/validate'
|
1189
|
+
|
1190
|
+
# query parameters
|
1191
|
+
query_params = opts[:query_params] || {}
|
1192
|
+
|
1193
|
+
# header parameters
|
1194
|
+
header_params = opts[:header_params] || {}
|
1195
|
+
# HTTP header 'Accept' (if needed)
|
1196
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1197
|
+
# HTTP header 'Content-Type'
|
1198
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1199
|
+
|
1200
|
+
# form parameters
|
1201
|
+
form_params = opts[:form_params] || {}
|
1202
|
+
|
1203
|
+
# http body (model)
|
1204
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1205
|
+
|
1206
|
+
# return_type
|
1207
|
+
return_type = opts[:debug_return_type]
|
1208
|
+
|
1209
|
+
# auth_names
|
1210
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1211
|
+
|
1212
|
+
new_options = opts.merge(
|
1213
|
+
:operation => :validate_monitor_user_template,
|
1214
|
+
:header_params => header_params,
|
1215
|
+
:query_params => query_params,
|
1216
|
+
:form_params => form_params,
|
1217
|
+
:body => post_body,
|
1218
|
+
:auth_names => auth_names,
|
1219
|
+
:return_type => return_type,
|
1220
|
+
:api_version => "V2"
|
1221
|
+
)
|
1222
|
+
|
1223
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
1224
|
+
if @api_client.config.debugging
|
1225
|
+
@api_client.config.logger.debug "API called: MonitorsAPI#validate_monitor_user_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1226
|
+
end
|
1227
|
+
return data, status_code, headers
|
1228
|
+
end
|
717
1229
|
end
|
718
1230
|
end
|
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
|
|
33
33
|
|
34
34
|
# Cancel a workflow instance.
|
35
35
|
#
|
36
|
-
# Cancels a specific execution of a given workflow. This API requires
|
36
|
+
# Cancels a specific execution of a given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
37
37
|
#
|
38
38
|
# @param workflow_id [String] The ID of the workflow.
|
39
39
|
# @param instance_id [String] The ID of the workflow instance.
|
@@ -103,7 +103,7 @@ module DatadogAPIClient::V2
|
|
103
103
|
|
104
104
|
# Create a Workflow.
|
105
105
|
#
|
106
|
-
# Create a new workflow, returning the workflow ID. This API requires
|
106
|
+
# Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
107
107
|
#
|
108
108
|
# @param body [CreateWorkflowRequest]
|
109
109
|
# @param opts [Hash] the optional parameters
|
@@ -170,7 +170,7 @@ module DatadogAPIClient::V2
|
|
170
170
|
|
171
171
|
# Execute a workflow.
|
172
172
|
#
|
173
|
-
# Execute the given workflow. This API requires
|
173
|
+
# Execute the given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
174
174
|
#
|
175
175
|
# @param workflow_id [String] The ID of the workflow.
|
176
176
|
# @param body [WorkflowInstanceCreateRequest]
|
@@ -242,7 +242,7 @@ module DatadogAPIClient::V2
|
|
242
242
|
|
243
243
|
# Delete an existing Workflow.
|
244
244
|
#
|
245
|
-
# Delete a workflow by ID. This API requires
|
245
|
+
# Delete a workflow by ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
246
246
|
#
|
247
247
|
# @param workflow_id [String] The ID of the workflow.
|
248
248
|
# @param opts [Hash] the optional parameters
|
@@ -307,7 +307,7 @@ module DatadogAPIClient::V2
|
|
307
307
|
|
308
308
|
# Get an existing Workflow.
|
309
309
|
#
|
310
|
-
# Get a workflow by ID.
|
310
|
+
# Get a workflow by ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
311
311
|
#
|
312
312
|
# @param workflow_id [String] The ID of the workflow.
|
313
313
|
# @param opts [Hash] the optional parameters
|
@@ -372,7 +372,7 @@ module DatadogAPIClient::V2
|
|
372
372
|
|
373
373
|
# Get a workflow instance.
|
374
374
|
#
|
375
|
-
# Get a specific execution of a given workflow. This API requires
|
375
|
+
# Get a specific execution of a given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
376
376
|
#
|
377
377
|
# @param workflow_id [String] The ID of the workflow.
|
378
378
|
# @param instance_id [String] The ID of the workflow instance.
|
@@ -442,7 +442,7 @@ module DatadogAPIClient::V2
|
|
442
442
|
|
443
443
|
# List workflow instances.
|
444
444
|
#
|
445
|
-
# List all instances of a given workflow. This API requires
|
445
|
+
# List all instances of a given workflow. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
446
446
|
#
|
447
447
|
# @param workflow_id [String] The ID of the workflow.
|
448
448
|
# @param opts [Hash] the optional parameters
|
@@ -511,7 +511,7 @@ module DatadogAPIClient::V2
|
|
511
511
|
|
512
512
|
# Update an existing Workflow.
|
513
513
|
#
|
514
|
-
# Update a workflow by ID. This API requires
|
514
|
+
# Update a workflow by ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key).
|
515
515
|
#
|
516
516
|
# @param workflow_id [String] The ID of the workflow.
|
517
517
|
# @param body [UpdateWorkflowRequest]
|