datadog_api_client 1.10.0 → 1.11.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 +715 -44
- data/.generator/schemas/v2/openapi.yaml +458 -44
- data/.generator/src/generator/formatter.py +14 -0
- data/.github/workflows/test_integration.yml +0 -7
- data/CHANGELOG.md +34 -0
- data/examples/v1/dashboards/CreateDashboard_1442588603.rb +61 -0
- data/examples/v1/dashboards/CreateDashboard_252716965.rb +52 -0
- data/examples/v1/dashboards/CreateDashboard_3882428227.rb +60 -0
- data/examples/v1/metrics/SubmitDistributionPoints.rb +22 -0
- data/examples/v1/metrics/SubmitDistributionPoints_3109558960.rb +25 -0
- data/examples/v1/organizations/DowngradeOrg.rb +5 -0
- data/examples/v1/organizations/UpdateOrg.rb +1 -0
- data/examples/v1/service-level-objectives/SearchSLO.rb +16 -0
- data/examples/v1/snapshots/GetGraphSnapshot.rb +2 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +3 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +3 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -0
- data/examples/v2/metrics/CreateTagConfiguration.rb +0 -3
- data/examples/v2/metrics/DeleteTagConfiguration.rb +0 -3
- data/examples/v2/metrics/ListTagConfigurationByName.rb +0 -3
- data/examples/v2/metrics/ListTagConfigurations.rb +0 -3
- data/examples/v2/metrics/ListTagConfigurations_103226315.rb +0 -3
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -3
- data/examples/v2/metrics/UpdateTagConfiguration.rb +0 -3
- data/examples/v2/opsgenie-integration/CreateOpsgenieService.rb +16 -0
- data/examples/v2/opsgenie-integration/DeleteOpsgenieService.rb +8 -0
- data/examples/v2/opsgenie-integration/GetOpsgenieService.rb +8 -0
- data/examples/v2/opsgenie-integration/ListOpsgenieServices.rb +5 -0
- data/examples/v2/opsgenie-integration/UpdateOpsgenieService.rb +21 -0
- data/examples/v2/security-monitoring/ListSecurityMonitoringSignals.rb +0 -3
- data/examples/v2/security-monitoring/SearchSecurityMonitoringSignals.rb +0 -3
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +3 -0
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +5 -0
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_1171921972.rb +9 -0
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_627383212.rb +9 -0
- data/lib/datadog_api_client/v1/api/metrics_api.rb +81 -0
- data/lib/datadog_api_client/v1/api/organizations_api.rb +74 -1
- data/lib/datadog_api_client/v1/api/security_monitoring_api.rb +2 -2
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +78 -4
- data/lib/datadog_api_client/v1/api/snapshots_api.rb +4 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +9 -5
- data/lib/datadog_api_client/v1/configuration.rb +51 -0
- data/lib/datadog_api_client/v1/models/distribution_point_item.rb +63 -0
- data/lib/datadog_api_client/v1/models/distribution_points_content_encoding.rb +26 -0
- data/lib/datadog_api_client/v1/models/distribution_points_payload.rb +124 -0
- data/lib/datadog_api_client/v1/models/distribution_points_series.rb +179 -0
- data/lib/datadog_api_client/v1/models/distribution_points_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_query.rb +64 -0
- data/lib/datadog_api_client/v1/models/distribution_widget_histogram_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/distribution_widget_request.rb +21 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stat_name.rb +1 -0
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
- data/lib/datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations.rb +125 -0
- data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/org_downgraded_response.rb +111 -0
- data/lib/datadog_api_client/v1/models/organization.rb +14 -4
- data/lib/datadog_api_client/v1/models/search_slo_response.rb +131 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data.rb +121 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +123 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets.rb +197 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int.rb +121 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string.rb +121 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +151 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_meta.rb +111 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_meta_page.rb +181 -0
- data/lib/datadog_api_client/v1/models/service_level_objective.rb +3 -3
- data/lib/datadog_api_client/v1/models/service_level_objective_query.rb +1 -1
- data/lib/datadog_api_client/v1/models/service_level_objective_request.rb +3 -3
- data/lib/datadog_api_client/v1/models/slo_history_metrics.rb +1 -1
- data/lib/datadog_api_client/v1/models/slo_response_data.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_test.rb +11 -0
- data/lib/datadog_api_client/v1/models/synthetics_browser_test.rb +11 -0
- data/lib/datadog_api_client/v1/models/synthetics_core_web_vitals.rb +2 -2
- data/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb +111 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +4 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
- data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_billable_summary_keys.rb +474 -4
- data/lib/datadog_api_client/v1.rb +19 -0
- data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +0 -2
- data/lib/datadog_api_client/v2/api/opsgenie_integration_api.rb +395 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +76 -0
- data/lib/datadog_api_client/v2/configuration.rb +0 -7
- data/lib/datadog_api_client/v2/models/intake_payload_accepted.rb +10 -8
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +0 -2
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +0 -2
- data/lib/datadog_api_client/v2/models/opsgenie_service_create_attributes.rb +174 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_create_data.rb +145 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_create_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_region_type.rb +28 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_response.rb +122 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_response_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_response_data.rb +166 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_update_attributes.rb +142 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_update_data.rb +166 -0
- data/lib/datadog_api_client/v2/models/opsgenie_service_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/opsgenie_services_response.rb +124 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +30 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_method.rb +27 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_threshold.rb +27 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +13 -1
- data/lib/datadog_api_client/v2.rb +15 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +51 -2
|
@@ -86,8 +86,15 @@ require 'datadog_api_client/v1/models/dashboard_template_variable'
|
|
|
86
86
|
require 'datadog_api_client/v1/models/dashboard_template_variable_preset'
|
|
87
87
|
require 'datadog_api_client/v1/models/dashboard_template_variable_preset_value'
|
|
88
88
|
require 'datadog_api_client/v1/models/deleted_monitor'
|
|
89
|
+
require 'datadog_api_client/v1/models/distribution_point_item'
|
|
90
|
+
require 'datadog_api_client/v1/models/distribution_points_content_encoding'
|
|
91
|
+
require 'datadog_api_client/v1/models/distribution_points_payload'
|
|
92
|
+
require 'datadog_api_client/v1/models/distribution_points_series'
|
|
93
|
+
require 'datadog_api_client/v1/models/distribution_points_type'
|
|
89
94
|
require 'datadog_api_client/v1/models/distribution_widget_definition'
|
|
90
95
|
require 'datadog_api_client/v1/models/distribution_widget_definition_type'
|
|
96
|
+
require 'datadog_api_client/v1/models/distribution_widget_histogram_request_query'
|
|
97
|
+
require 'datadog_api_client/v1/models/distribution_widget_histogram_request_type'
|
|
91
98
|
require 'datadog_api_client/v1/models/distribution_widget_request'
|
|
92
99
|
require 'datadog_api_client/v1/models/distribution_widget_x_axis'
|
|
93
100
|
require 'datadog_api_client/v1/models/distribution_widget_y_axis'
|
|
@@ -182,6 +189,7 @@ require 'datadog_api_client/v1/models/ip_prefixes_apm'
|
|
|
182
189
|
require 'datadog_api_client/v1/models/ip_prefixes_logs'
|
|
183
190
|
require 'datadog_api_client/v1/models/ip_prefixes_process'
|
|
184
191
|
require 'datadog_api_client/v1/models/ip_prefixes_synthetics'
|
|
192
|
+
require 'datadog_api_client/v1/models/ip_prefixes_synthetics_private_locations'
|
|
185
193
|
require 'datadog_api_client/v1/models/ip_prefixes_webhooks'
|
|
186
194
|
require 'datadog_api_client/v1/models/ip_ranges'
|
|
187
195
|
require 'datadog_api_client/v1/models/list_stream_column'
|
|
@@ -356,6 +364,7 @@ require 'datadog_api_client/v1/models/organization_settings_saml_autocreate_user
|
|
|
356
364
|
require 'datadog_api_client/v1/models/organization_settings_saml_idp_initiated_login'
|
|
357
365
|
require 'datadog_api_client/v1/models/organization_settings_saml_strict_mode'
|
|
358
366
|
require 'datadog_api_client/v1/models/organization_subscription'
|
|
367
|
+
require 'datadog_api_client/v1/models/org_downgraded_response'
|
|
359
368
|
require 'datadog_api_client/v1/models/pager_duty_service'
|
|
360
369
|
require 'datadog_api_client/v1/models/pager_duty_service_key'
|
|
361
370
|
require 'datadog_api_client/v1/models/pager_duty_service_name'
|
|
@@ -374,6 +383,15 @@ require 'datadog_api_client/v1/models/scatter_plot_widget_definition'
|
|
|
374
383
|
require 'datadog_api_client/v1/models/scatter_plot_widget_definition_requests'
|
|
375
384
|
require 'datadog_api_client/v1/models/scatter_plot_widget_definition_type'
|
|
376
385
|
require 'datadog_api_client/v1/models/scatterplot_widget_formula'
|
|
386
|
+
require 'datadog_api_client/v1/models/search_slo_response'
|
|
387
|
+
require 'datadog_api_client/v1/models/search_slo_response_data'
|
|
388
|
+
require 'datadog_api_client/v1/models/search_slo_response_data_attributes'
|
|
389
|
+
require 'datadog_api_client/v1/models/search_slo_response_data_attributes_facets'
|
|
390
|
+
require 'datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_int'
|
|
391
|
+
require 'datadog_api_client/v1/models/search_slo_response_data_attributes_facets_object_string'
|
|
392
|
+
require 'datadog_api_client/v1/models/search_slo_response_links'
|
|
393
|
+
require 'datadog_api_client/v1/models/search_slo_response_meta'
|
|
394
|
+
require 'datadog_api_client/v1/models/search_slo_response_meta_page'
|
|
377
395
|
require 'datadog_api_client/v1/models/series'
|
|
378
396
|
require 'datadog_api_client/v1/models/service_check'
|
|
379
397
|
require 'datadog_api_client/v1/models/service_check_status'
|
|
@@ -527,6 +545,7 @@ require 'datadog_api_client/v1/models/synthetics_step'
|
|
|
527
545
|
require 'datadog_api_client/v1/models/synthetics_step_detail'
|
|
528
546
|
require 'datadog_api_client/v1/models/synthetics_step_detail_warning'
|
|
529
547
|
require 'datadog_api_client/v1/models/synthetics_step_type'
|
|
548
|
+
require 'datadog_api_client/v1/models/synthetics_test_ci_options'
|
|
530
549
|
require 'datadog_api_client/v1/models/synthetics_test_config'
|
|
531
550
|
require 'datadog_api_client/v1/models/synthetics_test_details'
|
|
532
551
|
require 'datadog_api_client/v1/models/synthetics_test_details_sub_type'
|
|
@@ -222,7 +222,7 @@ module DatadogAPIClient::V2
|
|
|
222
222
|
return_type = opts[:debug_return_type] || 'File'
|
|
223
223
|
|
|
224
224
|
# auth_names
|
|
225
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
|
225
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
226
226
|
|
|
227
227
|
new_options = opts.merge(
|
|
228
228
|
:operation => :download_cloud_workload_policy_file,
|
|
@@ -664,8 +664,6 @@ module DatadogAPIClient::V2
|
|
|
664
664
|
#
|
|
665
665
|
# View distinct metrics volumes for the given metric name.
|
|
666
666
|
#
|
|
667
|
-
# Custom distribution metrics will return both ingested and indexed custom metric volumes.
|
|
668
|
-
# For Metrics without Limits™ beta customers, all metrics will return both ingested/indexed volumes.
|
|
669
667
|
# Custom metrics generated in-app from other products will return `null` for ingested volumes.
|
|
670
668
|
#
|
|
671
669
|
# @param metric_name [String] The name of the metric.
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Datadog API V2 Collection
|
|
3
|
+
|
|
4
|
+
#Collection of all Datadog Public endpoints.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@datadoghq.com
|
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
|
9
|
+
|
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
|
13
|
+
|
|
14
|
+
=end
|
|
15
|
+
|
|
16
|
+
require 'cgi'
|
|
17
|
+
|
|
18
|
+
module DatadogAPIClient::V2
|
|
19
|
+
class OpsgenieIntegrationAPI
|
|
20
|
+
attr_accessor :api_client
|
|
21
|
+
|
|
22
|
+
def initialize(api_client = APIClient.default)
|
|
23
|
+
@api_client = api_client
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create a new service object.
|
|
27
|
+
#
|
|
28
|
+
# @see #create_opsgenie_service_with_http_info
|
|
29
|
+
def create_opsgenie_service(body, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_opsgenie_service_with_http_info(body, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Create a new service object.
|
|
35
|
+
#
|
|
36
|
+
# Create a new service object in the Opsgenie integration.
|
|
37
|
+
#
|
|
38
|
+
# @param body [OpsgenieServiceCreateRequest] Opsgenie service payload
|
|
39
|
+
# @param opts [Hash] the optional parameters
|
|
40
|
+
# @return [Array<(OpsgenieServiceResponse, Integer, Hash)>] OpsgenieServiceResponse data, response status code and response headers
|
|
41
|
+
def create_opsgenie_service_with_http_info(body, opts = {})
|
|
42
|
+
|
|
43
|
+
if @api_client.config.unstable_operations.has_key?(:create_opsgenie_service)
|
|
44
|
+
unstable_enabled = @api_client.config.unstable_operations[:create_opsgenie_service]
|
|
45
|
+
if unstable_enabled
|
|
46
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "create_opsgenie_service")
|
|
47
|
+
else
|
|
48
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_opsgenie_service"))
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
if @api_client.config.debugging
|
|
53
|
+
@api_client.config.logger.debug 'Calling API: OpsgenieIntegrationAPI.create_opsgenie_service ...'
|
|
54
|
+
end
|
|
55
|
+
# verify the required parameter 'body' is set
|
|
56
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OpsgenieIntegrationAPI.create_opsgenie_service"
|
|
58
|
+
end
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/api/v2/integration/opsgenie/services'
|
|
61
|
+
|
|
62
|
+
# query parameters
|
|
63
|
+
query_params = opts[:query_params] || {}
|
|
64
|
+
|
|
65
|
+
# header parameters
|
|
66
|
+
header_params = opts[:header_params] || {}
|
|
67
|
+
# HTTP header 'Accept' (if needed)
|
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
69
|
+
# HTTP header 'Content-Type'
|
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
71
|
+
|
|
72
|
+
# form parameters
|
|
73
|
+
form_params = opts[:form_params] || {}
|
|
74
|
+
|
|
75
|
+
# http body (model)
|
|
76
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
77
|
+
|
|
78
|
+
# return_type
|
|
79
|
+
return_type = opts[:debug_return_type] || 'OpsgenieServiceResponse'
|
|
80
|
+
|
|
81
|
+
# auth_names
|
|
82
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
83
|
+
|
|
84
|
+
new_options = opts.merge(
|
|
85
|
+
:operation => :create_opsgenie_service,
|
|
86
|
+
:header_params => header_params,
|
|
87
|
+
:query_params => query_params,
|
|
88
|
+
:form_params => form_params,
|
|
89
|
+
:body => post_body,
|
|
90
|
+
:auth_names => auth_names,
|
|
91
|
+
:return_type => return_type
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
95
|
+
if @api_client.config.debugging
|
|
96
|
+
@api_client.config.logger.debug "API called: OpsgenieIntegrationAPI#create_opsgenie_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
97
|
+
end
|
|
98
|
+
return data, status_code, headers
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete a single service object.
|
|
102
|
+
#
|
|
103
|
+
# @see #delete_opsgenie_service_with_http_info
|
|
104
|
+
def delete_opsgenie_service(integration_service_id, opts = {})
|
|
105
|
+
delete_opsgenie_service_with_http_info(integration_service_id, opts)
|
|
106
|
+
nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Delete a single service object.
|
|
110
|
+
#
|
|
111
|
+
# Delete a single service object in the Datadog Opsgenie integration.
|
|
112
|
+
#
|
|
113
|
+
# @param integration_service_id [String] The UUID of the service.
|
|
114
|
+
# @param opts [Hash] the optional parameters
|
|
115
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
116
|
+
def delete_opsgenie_service_with_http_info(integration_service_id, opts = {})
|
|
117
|
+
|
|
118
|
+
if @api_client.config.unstable_operations.has_key?(:delete_opsgenie_service)
|
|
119
|
+
unstable_enabled = @api_client.config.unstable_operations[:delete_opsgenie_service]
|
|
120
|
+
if unstable_enabled
|
|
121
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "delete_opsgenie_service")
|
|
122
|
+
else
|
|
123
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_opsgenie_service"))
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if @api_client.config.debugging
|
|
128
|
+
@api_client.config.logger.debug 'Calling API: OpsgenieIntegrationAPI.delete_opsgenie_service ...'
|
|
129
|
+
end
|
|
130
|
+
# verify the required parameter 'integration_service_id' is set
|
|
131
|
+
if @api_client.config.client_side_validation && integration_service_id.nil?
|
|
132
|
+
fail ArgumentError, "Missing the required parameter 'integration_service_id' when calling OpsgenieIntegrationAPI.delete_opsgenie_service"
|
|
133
|
+
end
|
|
134
|
+
# resource path
|
|
135
|
+
local_var_path = '/api/v2/integration/opsgenie/services/{integration_service_id}'.sub('{integration_service_id}', CGI.escape(integration_service_id.to_s).gsub('%2F', '/'))
|
|
136
|
+
|
|
137
|
+
# query parameters
|
|
138
|
+
query_params = opts[:query_params] || {}
|
|
139
|
+
|
|
140
|
+
# header parameters
|
|
141
|
+
header_params = opts[:header_params] || {}
|
|
142
|
+
# HTTP header 'Accept' (if needed)
|
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
144
|
+
|
|
145
|
+
# form parameters
|
|
146
|
+
form_params = opts[:form_params] || {}
|
|
147
|
+
|
|
148
|
+
# http body (model)
|
|
149
|
+
post_body = opts[:debug_body]
|
|
150
|
+
|
|
151
|
+
# return_type
|
|
152
|
+
return_type = opts[:debug_return_type]
|
|
153
|
+
|
|
154
|
+
# auth_names
|
|
155
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
156
|
+
|
|
157
|
+
new_options = opts.merge(
|
|
158
|
+
:operation => :delete_opsgenie_service,
|
|
159
|
+
:header_params => header_params,
|
|
160
|
+
:query_params => query_params,
|
|
161
|
+
:form_params => form_params,
|
|
162
|
+
:body => post_body,
|
|
163
|
+
:auth_names => auth_names,
|
|
164
|
+
:return_type => return_type
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
168
|
+
if @api_client.config.debugging
|
|
169
|
+
@api_client.config.logger.debug "API called: OpsgenieIntegrationAPI#delete_opsgenie_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
170
|
+
end
|
|
171
|
+
return data, status_code, headers
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Get a single service object.
|
|
175
|
+
#
|
|
176
|
+
# @see #get_opsgenie_service_with_http_info
|
|
177
|
+
def get_opsgenie_service(integration_service_id, opts = {})
|
|
178
|
+
data, _status_code, _headers = get_opsgenie_service_with_http_info(integration_service_id, opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Get a single service object.
|
|
183
|
+
#
|
|
184
|
+
# Get a single service from the Datadog Opsgenie integration.
|
|
185
|
+
#
|
|
186
|
+
# @param integration_service_id [String] The UUID of the service.
|
|
187
|
+
# @param opts [Hash] the optional parameters
|
|
188
|
+
# @return [Array<(OpsgenieServiceResponse, Integer, Hash)>] OpsgenieServiceResponse data, response status code and response headers
|
|
189
|
+
def get_opsgenie_service_with_http_info(integration_service_id, opts = {})
|
|
190
|
+
|
|
191
|
+
if @api_client.config.unstable_operations.has_key?(:get_opsgenie_service)
|
|
192
|
+
unstable_enabled = @api_client.config.unstable_operations[:get_opsgenie_service]
|
|
193
|
+
if unstable_enabled
|
|
194
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "get_opsgenie_service")
|
|
195
|
+
else
|
|
196
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_opsgenie_service"))
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @api_client.config.debugging
|
|
201
|
+
@api_client.config.logger.debug 'Calling API: OpsgenieIntegrationAPI.get_opsgenie_service ...'
|
|
202
|
+
end
|
|
203
|
+
# verify the required parameter 'integration_service_id' is set
|
|
204
|
+
if @api_client.config.client_side_validation && integration_service_id.nil?
|
|
205
|
+
fail ArgumentError, "Missing the required parameter 'integration_service_id' when calling OpsgenieIntegrationAPI.get_opsgenie_service"
|
|
206
|
+
end
|
|
207
|
+
# resource path
|
|
208
|
+
local_var_path = '/api/v2/integration/opsgenie/services/{integration_service_id}'.sub('{integration_service_id}', CGI.escape(integration_service_id.to_s).gsub('%2F', '/'))
|
|
209
|
+
|
|
210
|
+
# query parameters
|
|
211
|
+
query_params = opts[:query_params] || {}
|
|
212
|
+
|
|
213
|
+
# header parameters
|
|
214
|
+
header_params = opts[:header_params] || {}
|
|
215
|
+
# HTTP header 'Accept' (if needed)
|
|
216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
217
|
+
|
|
218
|
+
# form parameters
|
|
219
|
+
form_params = opts[:form_params] || {}
|
|
220
|
+
|
|
221
|
+
# http body (model)
|
|
222
|
+
post_body = opts[:debug_body]
|
|
223
|
+
|
|
224
|
+
# return_type
|
|
225
|
+
return_type = opts[:debug_return_type] || 'OpsgenieServiceResponse'
|
|
226
|
+
|
|
227
|
+
# auth_names
|
|
228
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
229
|
+
|
|
230
|
+
new_options = opts.merge(
|
|
231
|
+
:operation => :get_opsgenie_service,
|
|
232
|
+
:header_params => header_params,
|
|
233
|
+
:query_params => query_params,
|
|
234
|
+
:form_params => form_params,
|
|
235
|
+
:body => post_body,
|
|
236
|
+
:auth_names => auth_names,
|
|
237
|
+
:return_type => return_type
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
241
|
+
if @api_client.config.debugging
|
|
242
|
+
@api_client.config.logger.debug "API called: OpsgenieIntegrationAPI#get_opsgenie_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
243
|
+
end
|
|
244
|
+
return data, status_code, headers
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Get all service objects.
|
|
248
|
+
#
|
|
249
|
+
# @see #list_opsgenie_services_with_http_info
|
|
250
|
+
def list_opsgenie_services(opts = {})
|
|
251
|
+
data, _status_code, _headers = list_opsgenie_services_with_http_info(opts)
|
|
252
|
+
data
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Get all service objects.
|
|
256
|
+
#
|
|
257
|
+
# Get a list of all services from the Datadog Opsgenie integration.
|
|
258
|
+
#
|
|
259
|
+
# @param opts [Hash] the optional parameters
|
|
260
|
+
# @return [Array<(OpsgenieServicesResponse, Integer, Hash)>] OpsgenieServicesResponse data, response status code and response headers
|
|
261
|
+
def list_opsgenie_services_with_http_info(opts = {})
|
|
262
|
+
|
|
263
|
+
if @api_client.config.unstable_operations.has_key?(:list_opsgenie_services)
|
|
264
|
+
unstable_enabled = @api_client.config.unstable_operations[:list_opsgenie_services]
|
|
265
|
+
if unstable_enabled
|
|
266
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "list_opsgenie_services")
|
|
267
|
+
else
|
|
268
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_opsgenie_services"))
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if @api_client.config.debugging
|
|
273
|
+
@api_client.config.logger.debug 'Calling API: OpsgenieIntegrationAPI.list_opsgenie_services ...'
|
|
274
|
+
end
|
|
275
|
+
# resource path
|
|
276
|
+
local_var_path = '/api/v2/integration/opsgenie/services'
|
|
277
|
+
|
|
278
|
+
# query parameters
|
|
279
|
+
query_params = opts[:query_params] || {}
|
|
280
|
+
|
|
281
|
+
# header parameters
|
|
282
|
+
header_params = opts[:header_params] || {}
|
|
283
|
+
# HTTP header 'Accept' (if needed)
|
|
284
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
285
|
+
|
|
286
|
+
# form parameters
|
|
287
|
+
form_params = opts[:form_params] || {}
|
|
288
|
+
|
|
289
|
+
# http body (model)
|
|
290
|
+
post_body = opts[:debug_body]
|
|
291
|
+
|
|
292
|
+
# return_type
|
|
293
|
+
return_type = opts[:debug_return_type] || 'OpsgenieServicesResponse'
|
|
294
|
+
|
|
295
|
+
# auth_names
|
|
296
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
297
|
+
|
|
298
|
+
new_options = opts.merge(
|
|
299
|
+
:operation => :list_opsgenie_services,
|
|
300
|
+
:header_params => header_params,
|
|
301
|
+
:query_params => query_params,
|
|
302
|
+
:form_params => form_params,
|
|
303
|
+
:body => post_body,
|
|
304
|
+
:auth_names => auth_names,
|
|
305
|
+
:return_type => return_type
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
309
|
+
if @api_client.config.debugging
|
|
310
|
+
@api_client.config.logger.debug "API called: OpsgenieIntegrationAPI#list_opsgenie_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
311
|
+
end
|
|
312
|
+
return data, status_code, headers
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
# Update a single service object.
|
|
316
|
+
#
|
|
317
|
+
# @see #update_opsgenie_service_with_http_info
|
|
318
|
+
def update_opsgenie_service(integration_service_id, body, opts = {})
|
|
319
|
+
data, _status_code, _headers = update_opsgenie_service_with_http_info(integration_service_id, body, opts)
|
|
320
|
+
data
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Update a single service object.
|
|
324
|
+
#
|
|
325
|
+
# Update a single service object in the Datadog Opsgenie integration.
|
|
326
|
+
#
|
|
327
|
+
# @param integration_service_id [String] The UUID of the service.
|
|
328
|
+
# @param body [OpsgenieServiceUpdateRequest] Opsgenie service payload.
|
|
329
|
+
# @param opts [Hash] the optional parameters
|
|
330
|
+
# @return [Array<(OpsgenieServiceResponse, Integer, Hash)>] OpsgenieServiceResponse data, response status code and response headers
|
|
331
|
+
def update_opsgenie_service_with_http_info(integration_service_id, body, opts = {})
|
|
332
|
+
|
|
333
|
+
if @api_client.config.unstable_operations.has_key?(:update_opsgenie_service)
|
|
334
|
+
unstable_enabled = @api_client.config.unstable_operations[:update_opsgenie_service]
|
|
335
|
+
if unstable_enabled
|
|
336
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "update_opsgenie_service")
|
|
337
|
+
else
|
|
338
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_opsgenie_service"))
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug 'Calling API: OpsgenieIntegrationAPI.update_opsgenie_service ...'
|
|
344
|
+
end
|
|
345
|
+
# verify the required parameter 'integration_service_id' is set
|
|
346
|
+
if @api_client.config.client_side_validation && integration_service_id.nil?
|
|
347
|
+
fail ArgumentError, "Missing the required parameter 'integration_service_id' when calling OpsgenieIntegrationAPI.update_opsgenie_service"
|
|
348
|
+
end
|
|
349
|
+
# verify the required parameter 'body' is set
|
|
350
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
351
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OpsgenieIntegrationAPI.update_opsgenie_service"
|
|
352
|
+
end
|
|
353
|
+
# resource path
|
|
354
|
+
local_var_path = '/api/v2/integration/opsgenie/services/{integration_service_id}'.sub('{integration_service_id}', CGI.escape(integration_service_id.to_s).gsub('%2F', '/'))
|
|
355
|
+
|
|
356
|
+
# query parameters
|
|
357
|
+
query_params = opts[:query_params] || {}
|
|
358
|
+
|
|
359
|
+
# header parameters
|
|
360
|
+
header_params = opts[:header_params] || {}
|
|
361
|
+
# HTTP header 'Accept' (if needed)
|
|
362
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
363
|
+
# HTTP header 'Content-Type'
|
|
364
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
365
|
+
|
|
366
|
+
# form parameters
|
|
367
|
+
form_params = opts[:form_params] || {}
|
|
368
|
+
|
|
369
|
+
# http body (model)
|
|
370
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
371
|
+
|
|
372
|
+
# return_type
|
|
373
|
+
return_type = opts[:debug_return_type] || 'OpsgenieServiceResponse'
|
|
374
|
+
|
|
375
|
+
# auth_names
|
|
376
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
377
|
+
|
|
378
|
+
new_options = opts.merge(
|
|
379
|
+
:operation => :update_opsgenie_service,
|
|
380
|
+
:header_params => header_params,
|
|
381
|
+
:query_params => query_params,
|
|
382
|
+
:form_params => form_params,
|
|
383
|
+
:body => post_body,
|
|
384
|
+
:auth_names => auth_names,
|
|
385
|
+
:return_type => return_type
|
|
386
|
+
)
|
|
387
|
+
|
|
388
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
389
|
+
if @api_client.config.debugging
|
|
390
|
+
@api_client.config.logger.debug "API called: OpsgenieIntegrationAPI#update_opsgenie_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
391
|
+
end
|
|
392
|
+
return data, status_code, headers
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
end
|
|
@@ -99,6 +99,82 @@ module DatadogAPIClient::V2
|
|
|
99
99
|
return data, status_code, headers
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
+
# Get estimated cost across multi-org account.
|
|
103
|
+
#
|
|
104
|
+
# @see #get_estimated_cost_by_org_with_http_info
|
|
105
|
+
def get_estimated_cost_by_org(opts = {})
|
|
106
|
+
data, _status_code, _headers = get_estimated_cost_by_org_with_http_info(opts)
|
|
107
|
+
data
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Get estimated cost across multi-org account.
|
|
111
|
+
#
|
|
112
|
+
# Get estimated cost across multi-org account.
|
|
113
|
+
#
|
|
114
|
+
# @param opts [Hash] the optional parameters
|
|
115
|
+
# @option opts [Time] :start_month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost beginning this month. Either start_month or start_date should be specified, but not both.
|
|
116
|
+
# @option opts [Time] :end_month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for cost ending this month.
|
|
117
|
+
# @option opts [Time] :start_date Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` for cost beginning this day. Either start_month or start_date should be specified, but not both.
|
|
118
|
+
# @option opts [Time] :end_date Datetime in ISO-8601 format, UTC, precise to day: `[YYYY-MM-DD]` for cost ending this day.
|
|
119
|
+
# @return [Array<(CostByOrgResponse, Integer, Hash)>] CostByOrgResponse data, response status code and response headers
|
|
120
|
+
def get_estimated_cost_by_org_with_http_info(opts = {})
|
|
121
|
+
|
|
122
|
+
if @api_client.config.unstable_operations.has_key?(:get_estimated_cost_by_org)
|
|
123
|
+
unstable_enabled = @api_client.config.unstable_operations[:get_estimated_cost_by_org]
|
|
124
|
+
if unstable_enabled
|
|
125
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "get_estimated_cost_by_org")
|
|
126
|
+
else
|
|
127
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_estimated_cost_by_org"))
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @api_client.config.debugging
|
|
132
|
+
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_estimated_cost_by_org ...'
|
|
133
|
+
end
|
|
134
|
+
# resource path
|
|
135
|
+
local_var_path = '/api/v2/usage/estimated_cost_by_org'
|
|
136
|
+
|
|
137
|
+
# query parameters
|
|
138
|
+
query_params = opts[:query_params] || {}
|
|
139
|
+
query_params[:'start_month'] = opts[:'start_month'] if !opts[:'start_month'].nil?
|
|
140
|
+
query_params[:'end_month'] = opts[:'end_month'] if !opts[:'end_month'].nil?
|
|
141
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
142
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
143
|
+
|
|
144
|
+
# header parameters
|
|
145
|
+
header_params = opts[:header_params] || {}
|
|
146
|
+
# HTTP header 'Accept' (if needed)
|
|
147
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339'])
|
|
148
|
+
|
|
149
|
+
# form parameters
|
|
150
|
+
form_params = opts[:form_params] || {}
|
|
151
|
+
|
|
152
|
+
# http body (model)
|
|
153
|
+
post_body = opts[:debug_body]
|
|
154
|
+
|
|
155
|
+
# return_type
|
|
156
|
+
return_type = opts[:debug_return_type] || 'CostByOrgResponse'
|
|
157
|
+
|
|
158
|
+
# auth_names
|
|
159
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
160
|
+
|
|
161
|
+
new_options = opts.merge(
|
|
162
|
+
:operation => :get_estimated_cost_by_org,
|
|
163
|
+
:header_params => header_params,
|
|
164
|
+
:query_params => query_params,
|
|
165
|
+
:form_params => form_params,
|
|
166
|
+
:body => post_body,
|
|
167
|
+
:auth_names => auth_names,
|
|
168
|
+
:return_type => return_type
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug "API called: UsageMeteringAPI#get_estimated_cost_by_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
174
|
+
end
|
|
175
|
+
return data, status_code, headers
|
|
176
|
+
end
|
|
177
|
+
|
|
102
178
|
# Get hourly usage for Application Security.
|
|
103
179
|
#
|
|
104
180
|
# @see #get_usage_application_security_monitoring_with_http_info
|
|
@@ -163,13 +163,6 @@ module DatadogAPIClient::V2
|
|
|
163
163
|
delete_incident: false,
|
|
164
164
|
get_incident: false,
|
|
165
165
|
update_incident: false,
|
|
166
|
-
list_tag_configurations: false,
|
|
167
|
-
delete_tag_configuration: false,
|
|
168
|
-
list_tag_configuration_by_name: false,
|
|
169
|
-
update_tag_configuration: false,
|
|
170
|
-
create_tag_configuration: false,
|
|
171
|
-
list_security_monitoring_signals: false,
|
|
172
|
-
search_security_monitoring_signals: false,
|
|
173
166
|
list_incident_services: false,
|
|
174
167
|
create_incident_service: false,
|
|
175
168
|
delete_incident_service: false,
|
|
@@ -25,14 +25,14 @@ module DatadogAPIClient::V2
|
|
|
25
25
|
# @!visibility private
|
|
26
26
|
attr_accessor :_unparsed
|
|
27
27
|
|
|
28
|
-
#
|
|
29
|
-
attr_accessor :
|
|
28
|
+
# A list of errors.
|
|
29
|
+
attr_accessor :errors
|
|
30
30
|
|
|
31
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
32
|
# @!visibility private
|
|
33
33
|
def self.attribute_map
|
|
34
34
|
{
|
|
35
|
-
:'
|
|
35
|
+
:'errors' => :'errors'
|
|
36
36
|
}
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ module DatadogAPIClient::V2
|
|
|
46
46
|
# @!visibility private
|
|
47
47
|
def self.openapi_types
|
|
48
48
|
{
|
|
49
|
-
:'
|
|
49
|
+
:'errors' => :'Array<String>'
|
|
50
50
|
}
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -73,8 +73,10 @@ module DatadogAPIClient::V2
|
|
|
73
73
|
h[k.to_sym] = v
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
|
|
76
|
+
if attributes.key?(:'errors')
|
|
77
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
78
|
+
self.errors = value
|
|
79
|
+
end
|
|
78
80
|
end
|
|
79
81
|
end
|
|
80
82
|
|
|
@@ -91,7 +93,7 @@ module DatadogAPIClient::V2
|
|
|
91
93
|
def ==(o)
|
|
92
94
|
return true if self.equal?(o)
|
|
93
95
|
self.class == o.class &&
|
|
94
|
-
|
|
96
|
+
errors == o.errors
|
|
95
97
|
end
|
|
96
98
|
|
|
97
99
|
# @see the `==` method
|
|
@@ -105,7 +107,7 @@ module DatadogAPIClient::V2
|
|
|
105
107
|
# @return [Integer] Hash code
|
|
106
108
|
# @!visibility private
|
|
107
109
|
def hash
|
|
108
|
-
[
|
|
110
|
+
[errors].hash
|
|
109
111
|
end
|
|
110
112
|
end
|
|
111
113
|
end
|