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
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 1.11.0 / 2022-07-01
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
* Fix additionalProperties on SyntheticsAPITestResultData by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/935
|
|
7
|
+
* Fix synthetics vitals type by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/936
|
|
8
|
+
* Remove include_percentiles default by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/961
|
|
9
|
+
* Mark message as required for Synthetics tests by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/956
|
|
10
|
+
### Added
|
|
11
|
+
* Add include descendants to monthly and hourly usage attribution APIs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/931
|
|
12
|
+
* Add v2 endpoints for Opsgenie Integration by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/918
|
|
13
|
+
* Add distribution points intake endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/916
|
|
14
|
+
* Add height and width params to graph snapshot by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/945
|
|
15
|
+
* Add support for defining histogram requests in Distribution widgets by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/929
|
|
16
|
+
* Add DowngradeOrg endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/947
|
|
17
|
+
* Add new options for new value detection type on security monitoring rules by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/939
|
|
18
|
+
* Add ci execution rule in Synthetics options by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/940
|
|
19
|
+
* Add SLO Search API endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/856
|
|
20
|
+
* New usage metering endpoint for estimated cost by org by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/964
|
|
21
|
+
* Add estimated indexed spans usage attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/963
|
|
22
|
+
* Handle raw json for additionalProperties in typescript by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/937
|
|
23
|
+
* Add Application Security Monitoring Hosts Attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/965
|
|
24
|
+
* Add support for security monitoring rule dynamic criticality by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/951
|
|
25
|
+
* Update IP ranges with synthetics private locations section by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/968
|
|
26
|
+
* Add new products to billable summary by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/971
|
|
27
|
+
### Changed
|
|
28
|
+
* Remove unstable/beta note since Metrics Without Limits is GA by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/928
|
|
29
|
+
* Remove unstable marker on security list signal endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/944
|
|
30
|
+
* Update metric intake v2 accept response by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/969
|
|
31
|
+
|
|
32
|
+
## New Contributors
|
|
33
|
+
* @jybp made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/959
|
|
34
|
+
|
|
35
|
+
**Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v1.10.0...v1.11.0
|
|
36
|
+
|
|
3
37
|
## 1.10.0 / 2022-05-30
|
|
4
38
|
|
|
5
39
|
### Fixed
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Create a distribution widget using a histogram request containing a formulas and functions APM Stats query
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
title: "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_APM_Stats",
|
|
8
|
+
description: "",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::DistributionWidgetDefinition.new({
|
|
12
|
+
title: "APM Stats - Request latency HOP",
|
|
13
|
+
title_size: "16",
|
|
14
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
15
|
+
show_legend: false,
|
|
16
|
+
type: DatadogAPIClient::V1::DistributionWidgetDefinitionType::DISTRIBUTION,
|
|
17
|
+
xaxis: DatadogAPIClient::V1::DistributionWidgetXAxis.new({
|
|
18
|
+
max: "auto",
|
|
19
|
+
include_zero: true,
|
|
20
|
+
scale: "linear",
|
|
21
|
+
min: "auto",
|
|
22
|
+
}),
|
|
23
|
+
yaxis: DatadogAPIClient::V1::DistributionWidgetYAxis.new({
|
|
24
|
+
max: "auto",
|
|
25
|
+
include_zero: true,
|
|
26
|
+
scale: "linear",
|
|
27
|
+
min: "auto",
|
|
28
|
+
}),
|
|
29
|
+
requests: [
|
|
30
|
+
DatadogAPIClient::V1::DistributionWidgetRequest.new({
|
|
31
|
+
query: DatadogAPIClient::V1::FormulaAndFunctionApmResourceStatsQueryDefinition.new({
|
|
32
|
+
primary_tag_value: "*",
|
|
33
|
+
stat: DatadogAPIClient::V1::FormulaAndFunctionApmResourceStatName::LATENCY_DISTRIBUTION,
|
|
34
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionApmResourceStatsDataSource::APM_RESOURCE_STATS,
|
|
35
|
+
name: "query1",
|
|
36
|
+
service: "azure-bill-import",
|
|
37
|
+
group_by: [
|
|
38
|
+
"resource_name",
|
|
39
|
+
],
|
|
40
|
+
env: "staging",
|
|
41
|
+
primary_tag_name: "datacenter",
|
|
42
|
+
operation_name: "universal.http.client",
|
|
43
|
+
}),
|
|
44
|
+
request_type: DatadogAPIClient::V1::DistributionWidgetHistogramRequestType::HISTOGRAM,
|
|
45
|
+
style: DatadogAPIClient::V1::WidgetStyle.new({
|
|
46
|
+
palette: "dog_classic",
|
|
47
|
+
}),
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
}),
|
|
51
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
52
|
+
x: 8,
|
|
53
|
+
y: 0,
|
|
54
|
+
width: 4,
|
|
55
|
+
height: 2,
|
|
56
|
+
}),
|
|
57
|
+
}),
|
|
58
|
+
],
|
|
59
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
60
|
+
})
|
|
61
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Create a distribution widget using a histogram request containing a formulas and functions metrics query
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
title: "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_metrics_q",
|
|
8
|
+
widgets: [
|
|
9
|
+
DatadogAPIClient::V1::Widget.new({
|
|
10
|
+
definition: DatadogAPIClient::V1::DistributionWidgetDefinition.new({
|
|
11
|
+
title: "Metrics HOP",
|
|
12
|
+
title_size: "16",
|
|
13
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
14
|
+
show_legend: false,
|
|
15
|
+
type: DatadogAPIClient::V1::DistributionWidgetDefinitionType::DISTRIBUTION,
|
|
16
|
+
xaxis: DatadogAPIClient::V1::DistributionWidgetXAxis.new({
|
|
17
|
+
max: "auto",
|
|
18
|
+
include_zero: true,
|
|
19
|
+
scale: "linear",
|
|
20
|
+
min: "auto",
|
|
21
|
+
}),
|
|
22
|
+
yaxis: DatadogAPIClient::V1::DistributionWidgetYAxis.new({
|
|
23
|
+
max: "auto",
|
|
24
|
+
include_zero: true,
|
|
25
|
+
scale: "linear",
|
|
26
|
+
min: "auto",
|
|
27
|
+
}),
|
|
28
|
+
requests: [
|
|
29
|
+
DatadogAPIClient::V1::DistributionWidgetRequest.new({
|
|
30
|
+
query: DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({
|
|
31
|
+
query: "histogram:trace.Load{*}",
|
|
32
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS,
|
|
33
|
+
name: "query1",
|
|
34
|
+
}),
|
|
35
|
+
request_type: DatadogAPIClient::V1::DistributionWidgetHistogramRequestType::HISTOGRAM,
|
|
36
|
+
style: DatadogAPIClient::V1::WidgetStyle.new({
|
|
37
|
+
palette: "dog_classic",
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
43
|
+
x: 0,
|
|
44
|
+
y: 0,
|
|
45
|
+
width: 4,
|
|
46
|
+
height: 2,
|
|
47
|
+
}),
|
|
48
|
+
}),
|
|
49
|
+
],
|
|
50
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
51
|
+
})
|
|
52
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Create a distribution widget using a histogram request containing a formulas and functions events query
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
title: "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu",
|
|
8
|
+
description: "Example-Create_a_distribution_widget_using_a_histogram_request_containing_a_formulas_and_functions_events_qu",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::DistributionWidgetDefinition.new({
|
|
12
|
+
title: "Events Platform - Request latency HOP",
|
|
13
|
+
title_size: "16",
|
|
14
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
15
|
+
show_legend: false,
|
|
16
|
+
type: DatadogAPIClient::V1::DistributionWidgetDefinitionType::DISTRIBUTION,
|
|
17
|
+
xaxis: DatadogAPIClient::V1::DistributionWidgetXAxis.new({
|
|
18
|
+
max: "auto",
|
|
19
|
+
include_zero: true,
|
|
20
|
+
scale: "linear",
|
|
21
|
+
min: "auto",
|
|
22
|
+
}),
|
|
23
|
+
yaxis: DatadogAPIClient::V1::DistributionWidgetYAxis.new({
|
|
24
|
+
max: "auto",
|
|
25
|
+
include_zero: true,
|
|
26
|
+
scale: "linear",
|
|
27
|
+
min: "auto",
|
|
28
|
+
}),
|
|
29
|
+
requests: [
|
|
30
|
+
DatadogAPIClient::V1::DistributionWidgetRequest.new({
|
|
31
|
+
query: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition.new({
|
|
32
|
+
search: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch.new({
|
|
33
|
+
query: "",
|
|
34
|
+
}),
|
|
35
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionEventsDataSource::EVENTS,
|
|
36
|
+
compute: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute.new({
|
|
37
|
+
metric: "@duration",
|
|
38
|
+
aggregation: DatadogAPIClient::V1::FormulaAndFunctionEventAggregation::MIN,
|
|
39
|
+
}),
|
|
40
|
+
name: "query1",
|
|
41
|
+
indexes: [
|
|
42
|
+
"*",
|
|
43
|
+
],
|
|
44
|
+
group_by: [],
|
|
45
|
+
}),
|
|
46
|
+
request_type: DatadogAPIClient::V1::DistributionWidgetHistogramRequestType::HISTOGRAM,
|
|
47
|
+
}),
|
|
48
|
+
],
|
|
49
|
+
}),
|
|
50
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
51
|
+
x: 0,
|
|
52
|
+
y: 0,
|
|
53
|
+
width: 4,
|
|
54
|
+
height: 2,
|
|
55
|
+
}),
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
59
|
+
})
|
|
60
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Submit distribution points returns "Payload accepted" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::MetricsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::DistributionPointsPayload.new({
|
|
7
|
+
series: [
|
|
8
|
+
DatadogAPIClient::V1::DistributionPointsSeries.new({
|
|
9
|
+
metric: "system.load.1.dist",
|
|
10
|
+
points: [
|
|
11
|
+
[
|
|
12
|
+
Time.now,
|
|
13
|
+
[
|
|
14
|
+
1.0,
|
|
15
|
+
2.0,
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
],
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
p api_instance.submit_distribution_points(body)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Submit deflate distribution points returns "Payload accepted" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::MetricsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::DistributionPointsPayload.new({
|
|
7
|
+
series: [
|
|
8
|
+
DatadogAPIClient::V1::DistributionPointsSeries.new({
|
|
9
|
+
metric: "system.load.1.dist",
|
|
10
|
+
points: [
|
|
11
|
+
[
|
|
12
|
+
Time.now,
|
|
13
|
+
[
|
|
14
|
+
1.0,
|
|
15
|
+
2.0,
|
|
16
|
+
],
|
|
17
|
+
],
|
|
18
|
+
],
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
opts = {
|
|
23
|
+
content_encoding: DistributionPointsContentEncoding::DEFLATE,
|
|
24
|
+
}
|
|
25
|
+
p api_instance.submit_distribution_points(body, opts)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Search for SLOs returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
DatadogAPIClient::V2.configure do |config|
|
|
5
|
+
config.unstable_operations[:search_slo] = true
|
|
6
|
+
end
|
|
7
|
+
api_instance = DatadogAPIClient::V1::ServiceLevelObjectivesAPI.new
|
|
8
|
+
|
|
9
|
+
# there is a valid "slo" in the system
|
|
10
|
+
SLO_DATA_0_NAME = ENV["SLO_DATA_0_NAME"]
|
|
11
|
+
opts = {
|
|
12
|
+
query: SLO_DATA_0_NAME,
|
|
13
|
+
page_size: 20,
|
|
14
|
+
page_number: 0,
|
|
15
|
+
}
|
|
16
|
+
p api_instance.search_slo(opts)
|
|
@@ -23,6 +23,9 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
|
23
23
|
message: "Notification message",
|
|
24
24
|
name: "Example test name",
|
|
25
25
|
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
|
|
26
|
+
ci: DatadogAPIClient::V1::SyntheticsTestCiOptions.new({
|
|
27
|
+
execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
|
|
28
|
+
}),
|
|
26
29
|
device_ids: [
|
|
27
30
|
DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
|
|
28
31
|
],
|
|
@@ -46,6 +46,9 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
|
|
|
46
46
|
client_token_id: 123456,
|
|
47
47
|
}),
|
|
48
48
|
tick_every: 300,
|
|
49
|
+
ci: DatadogAPIClient::V1::SyntheticsTestCiOptions.new({
|
|
50
|
+
execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::SKIPPED,
|
|
51
|
+
}),
|
|
49
52
|
}),
|
|
50
53
|
tags: [
|
|
51
54
|
"testing:browser",
|
|
@@ -41,6 +41,9 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
|
|
|
41
41
|
message: "",
|
|
42
42
|
name: "Example test name",
|
|
43
43
|
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
|
|
44
|
+
ci: DatadogAPIClient::V1::SyntheticsTestCiOptions.new({
|
|
45
|
+
execution_rule: DatadogAPIClient::V1::SyntheticsTestExecutionRule::BLOCKING,
|
|
46
|
+
}),
|
|
44
47
|
device_ids: [
|
|
45
48
|
DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
|
|
46
49
|
],
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Create a tag configuration returns "Created" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:create_tag_configuration] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
|
|
9
6
|
body = DatadogAPIClient::V2::MetricTagConfigurationCreateRequest.new({
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# Delete a tag configuration returns "No Content" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:delete_tag_configuration] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
api_instance.delete_tag_configuration("ExampleDeleteatagconfigurationreturnsNoContentresponse")
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# List tag configuration by name returns "Success" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:list_tag_configuration_by_name] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
|
|
9
6
|
# there is a valid "metric_tag_configuration" in the system
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# List tag configurations returns "Success" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:list_tag_configurations] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
p api_instance.list_tag_configurations()
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# List tag configurations with configured filter returns "Success" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:list_tag_configurations] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
opts = {
|
|
9
6
|
filter_configured: true,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# List tag configurations with a tag filter returns "Success" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:list_tag_configurations] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
opts = {
|
|
9
6
|
filter_tags: "ExampleListtagconfigurationswithatagfilterreturnsSuccessresponse",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Update a tag configuration returns "OK" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:update_tag_configuration] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
5
|
|
|
9
6
|
# there is a valid "metric_tag_configuration" in the system
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Create a new service object returns "CREATED" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::OpsgenieIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::OpsgenieServiceCreateRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::OpsgenieServiceCreateData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::OpsgenieServiceCreateAttributes.new({
|
|
9
|
+
name: "Example-Create_a_new_service_object_returns_CREATED_response",
|
|
10
|
+
opsgenie_api_key: "00000000-0000-0000-0000-000000000000",
|
|
11
|
+
region: DatadogAPIClient::V2::OpsgenieServiceRegionType::US,
|
|
12
|
+
}),
|
|
13
|
+
type: DatadogAPIClient::V2::OpsgenieServiceType::OPSGENIE_SERVICE,
|
|
14
|
+
}),
|
|
15
|
+
})
|
|
16
|
+
p api_instance.create_opsgenie_service(body)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Delete a single service object returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::OpsgenieIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "opsgenie_service" in the system
|
|
7
|
+
OPSGENIE_SERVICE_DATA_ID = ENV["OPSGENIE_SERVICE_DATA_ID"]
|
|
8
|
+
api_instance.delete_opsgenie_service(OPSGENIE_SERVICE_DATA_ID)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Get a single service object returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::OpsgenieIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "opsgenie_service" in the system
|
|
7
|
+
OPSGENIE_SERVICE_DATA_ID = ENV["OPSGENIE_SERVICE_DATA_ID"]
|
|
8
|
+
p api_instance.get_opsgenie_service(OPSGENIE_SERVICE_DATA_ID)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Update a single service object returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::OpsgenieIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "opsgenie_service" in the system
|
|
7
|
+
OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME = ENV["OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME"]
|
|
8
|
+
OPSGENIE_SERVICE_DATA_ID = ENV["OPSGENIE_SERVICE_DATA_ID"]
|
|
9
|
+
|
|
10
|
+
body = DatadogAPIClient::V2::OpsgenieServiceUpdateRequest.new({
|
|
11
|
+
data: DatadogAPIClient::V2::OpsgenieServiceUpdateData.new({
|
|
12
|
+
attributes: DatadogAPIClient::V2::OpsgenieServiceUpdateAttributes.new({
|
|
13
|
+
name: "fake-opsgenie-service-name--updated",
|
|
14
|
+
opsgenie_api_key: "00000000-0000-0000-0000-000000000000",
|
|
15
|
+
region: DatadogAPIClient::V2::OpsgenieServiceRegionType::EU,
|
|
16
|
+
}),
|
|
17
|
+
id: OPSGENIE_SERVICE_DATA_ID,
|
|
18
|
+
type: DatadogAPIClient::V2::OpsgenieServiceType::OPSGENIE_SERVICE,
|
|
19
|
+
}),
|
|
20
|
+
})
|
|
21
|
+
p api_instance.update_opsgenie_service(OPSGENIE_SERVICE_DATA_ID, body)
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# Get a quick list of security signals returns "OK" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:list_security_monitoring_signals] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
|
8
5
|
p api_instance.list_security_monitoring_signals()
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Get a list of security signals returns "OK" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
|
-
DatadogAPIClient::V2.configure do |config|
|
|
5
|
-
config.unstable_operations[:search_security_monitoring_signals] = true
|
|
6
|
-
end
|
|
7
4
|
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
|
|
8
5
|
|
|
9
6
|
body = DatadogAPIClient::V2::SecurityMonitoringSignalListRequest.new({
|
|
@@ -17,6 +17,7 @@ body = DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload.new({
|
|
|
17
17
|
],
|
|
18
18
|
has_extended_title: true,
|
|
19
19
|
options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({
|
|
20
|
+
decrease_criticality_based_on_env: false,
|
|
20
21
|
detection_method: DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod::THRESHOLD,
|
|
21
22
|
evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::ZERO_MINUTES,
|
|
22
23
|
hardcoded_evaluator_type: DatadogAPIClient::V2::SecurityMonitoringRuleHardcodedEvaluatorType::LOG4SHELL,
|
|
@@ -28,6 +29,8 @@ body = DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload.new({
|
|
|
28
29
|
new_value_options: DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions.new({
|
|
29
30
|
forget_after: DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter::ONE_DAY,
|
|
30
31
|
learning_duration: DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration::ZERO_DAYS,
|
|
32
|
+
learning_method: DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningMethod::DURATION,
|
|
33
|
+
learning_threshold: DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningThreshold::ZERO_OCCURRENCES,
|
|
31
34
|
}),
|
|
32
35
|
}),
|
|
33
36
|
queries: [
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Get estimated cost across multi-org account with month returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
|
5
|
+
opts = {
|
|
6
|
+
start_month: (Time.now + -5 * 86400),
|
|
7
|
+
end_month: (Time.now + -3 * 86400),
|
|
8
|
+
}
|
|
9
|
+
p api_instance.get_estimated_cost_by_org(opts)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Get estimated cost across multi-org account with date returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
|
|
5
|
+
opts = {
|
|
6
|
+
start_date: (Time.now + -5 * 86400),
|
|
7
|
+
end_date: (Time.now + -3 * 86400),
|
|
8
|
+
}
|
|
9
|
+
p api_instance.get_estimated_cost_by_org(opts)
|
|
@@ -334,6 +334,87 @@ module DatadogAPIClient::V1
|
|
|
334
334
|
return data, status_code, headers
|
|
335
335
|
end
|
|
336
336
|
|
|
337
|
+
# Submit distribution points.
|
|
338
|
+
#
|
|
339
|
+
# @see #submit_distribution_points_with_http_info
|
|
340
|
+
def submit_distribution_points(body, opts = {})
|
|
341
|
+
data, _status_code, _headers = submit_distribution_points_with_http_info(body, opts)
|
|
342
|
+
data
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Submit distribution points.
|
|
346
|
+
#
|
|
347
|
+
# The distribution points end-point allows you to post distribution data that can be graphed on Datadog’s dashboards.
|
|
348
|
+
#
|
|
349
|
+
# @param body [DistributionPointsPayload]
|
|
350
|
+
# @param opts [Hash] the optional parameters
|
|
351
|
+
# @option opts [DistributionPointsContentEncoding] :content_encoding HTTP header used to compress the media-type.
|
|
352
|
+
# @return [Array<(IntakePayloadAccepted, Integer, Hash)>] IntakePayloadAccepted data, response status code and response headers
|
|
353
|
+
def submit_distribution_points_with_http_info(body, opts = {})
|
|
354
|
+
|
|
355
|
+
if @api_client.config.unstable_operations.has_key?(:submit_distribution_points)
|
|
356
|
+
unstable_enabled = @api_client.config.unstable_operations[:submit_distribution_points]
|
|
357
|
+
if unstable_enabled
|
|
358
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "submit_distribution_points")
|
|
359
|
+
else
|
|
360
|
+
raise APIError.new(message: format("Unstable operation '%s' is disabled", "submit_distribution_points"))
|
|
361
|
+
end
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
if @api_client.config.debugging
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: MetricsAPI.submit_distribution_points ...'
|
|
366
|
+
end
|
|
367
|
+
allowable_values = ['deflate']
|
|
368
|
+
if @api_client.config.client_side_validation && opts[:'content_encoding'] && !allowable_values.include?(opts[:'content_encoding'])
|
|
369
|
+
fail ArgumentError, "invalid value for \"content_encoding\", must be one of #{allowable_values}"
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'body' is set
|
|
372
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling MetricsAPI.submit_distribution_points"
|
|
374
|
+
end
|
|
375
|
+
# resource path
|
|
376
|
+
local_var_path = '/api/v1/distribution_points'
|
|
377
|
+
|
|
378
|
+
# query parameters
|
|
379
|
+
query_params = opts[:query_params] || {}
|
|
380
|
+
|
|
381
|
+
# header parameters
|
|
382
|
+
header_params = opts[:header_params] || {}
|
|
383
|
+
# HTTP header 'Accept' (if needed)
|
|
384
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/json', 'application/json'])
|
|
385
|
+
# HTTP header 'Content-Type'
|
|
386
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['text/json'])
|
|
387
|
+
header_params['Content-Encoding'] = opts[:'content_encoding'] if !opts[:'content_encoding'].nil?
|
|
388
|
+
|
|
389
|
+
# form parameters
|
|
390
|
+
form_params = opts[:form_params] || {}
|
|
391
|
+
|
|
392
|
+
# http body (model)
|
|
393
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
394
|
+
|
|
395
|
+
# return_type
|
|
396
|
+
return_type = opts[:debug_return_type] || 'IntakePayloadAccepted'
|
|
397
|
+
|
|
398
|
+
# auth_names
|
|
399
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth]
|
|
400
|
+
|
|
401
|
+
new_options = opts.merge(
|
|
402
|
+
:operation => :submit_distribution_points,
|
|
403
|
+
:header_params => header_params,
|
|
404
|
+
:query_params => query_params,
|
|
405
|
+
:form_params => form_params,
|
|
406
|
+
:body => post_body,
|
|
407
|
+
:auth_names => auth_names,
|
|
408
|
+
:return_type => return_type
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
412
|
+
if @api_client.config.debugging
|
|
413
|
+
@api_client.config.logger.debug "API called: MetricsAPI#submit_distribution_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
414
|
+
end
|
|
415
|
+
return data, status_code, headers
|
|
416
|
+
end
|
|
417
|
+
|
|
337
418
|
# Submit metrics.
|
|
338
419
|
#
|
|
339
420
|
# @see #submit_metrics_with_http_info
|