datadog_api_client 2.6.0 → 2.7.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 +233 -14
- data/.generator/schemas/v2/openapi.yaml +1403 -151
- data/CHANGELOG.md +27 -0
- data/examples/v1/dashboards/CreateDashboard_1039800684.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_2432046716.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_2610827685.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2843286292.rb +43 -0
- data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +1 -0
- data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/service-level-objectives/CreateSLO.rb +2 -2
- data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +16 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +74 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +16 -0
- data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +16 -0
- data/examples/v2/cloudflare-integration/DeleteCloudflareAccount.rb +5 -0
- data/examples/v2/cloudflare-integration/GetCloudflareAccount.rb +8 -0
- data/examples/v2/cloudflare-integration/ListCloudflareAccounts.rb +5 -0
- data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +18 -0
- data/examples/v2/fastly-integration/CreateFastlyAccount.rb +16 -0
- data/examples/v2/fastly-integration/CreateFastlyService.rb +18 -0
- data/examples/v2/fastly-integration/DeleteFastlyAccount.rb +5 -0
- data/examples/v2/fastly-integration/DeleteFastlyService.rb +5 -0
- data/examples/v2/fastly-integration/GetFastlyAccount.rb +8 -0
- data/examples/v2/fastly-integration/GetFastlyService.rb +5 -0
- data/examples/v2/fastly-integration/ListFastlyAccounts.rb +5 -0
- data/examples/v2/fastly-integration/ListFastlyServices.rb +5 -0
- data/examples/v2/fastly-integration/UpdateFastlyAccount.rb +17 -0
- data/examples/v2/fastly-integration/UpdateFastlyService.rb +18 -0
- data/examples/v2/metrics/QueryScalarData.rb +5 -6
- data/examples/v2/metrics/QueryScalarData_3112571352.rb +35 -0
- data/examples/v2/metrics/QueryTimeseriesData.rb +5 -6
- data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +35 -0
- data/examples/v2/monitors/CreateMonitorConfigPolicy.rb +22 -0
- data/examples/v2/monitors/DeleteMonitorConfigPolicy.rb +8 -0
- data/examples/v2/monitors/GetMonitorConfigPolicy.rb +8 -0
- data/examples/v2/monitors/ListMonitorConfigPolicies.rb +5 -0
- data/examples/v2/monitors/UpdateMonitorConfigPolicy.rb +26 -0
- data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +6 -0
- data/examples/v2/{users → service-accounts}/CreateServiceAccount.rb +1 -1
- data/lib/datadog_api_client/inflector.rb +61 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
- data/lib/datadog_api_client/v1/models/host_meta.rb +1 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -1
- data/lib/datadog_api_client/v1/models/list_stream_compute_aggregation.rb +40 -0
- data/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +112 -0
- data/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +102 -0
- data/lib/datadog_api_client/v1/models/list_stream_query.rb +61 -1
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +2 -0
- data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +3 -2
- data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
- data/lib/datadog_api_client/v1/models/monitor_options_notification_presets.rb +29 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -2
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +13 -13
- data/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +187 -0
- data/lib/datadog_api_client/v1/models/run_workflow_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +123 -0
- data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb +28 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +103 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +126 -0
- data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
- data/lib/datadog_api_client/v2/api/cloudflare_integration_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/fastly_integration_api.rb +709 -0
- data/lib/datadog_api_client/v2/api/metrics_api.rb +7 -6
- data/lib/datadog_api_client/v2/api/monitors_api.rb +355 -0
- data/lib/datadog_api_client/v2/api/service_accounts_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/users_api.rb +0 -67
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +133 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +112 -0
- data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +101 -0
- data/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/data_scalar_column.rb +123 -0
- data/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +114 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/fastly_account_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/fastly_account_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +101 -0
- data/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/fastly_service.rb +114 -0
- data/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +93 -0
- data/lib/datadog_api_client/v2/models/fastly_service_data.rb +133 -0
- data/lib/datadog_api_client/v2/models/fastly_service_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/fastly_service_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/fastly_service_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/fastly_services_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/group_scalar_column.rb +113 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +101 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +123 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +102 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +93 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +62 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +62 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_resource_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +91 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +111 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +124 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +150 -0
- data/lib/datadog_api_client/v2/models/monitor_config_policy_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/scalar_column.rb +35 -77
- data/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +4 -16
- data/lib/datadog_api_client/v2/models/scalar_meta.rb +96 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +22 -9
- data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +4 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +91 -3
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.7.0 / 2023-02-08
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
* Mark timeseries values as nullable by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1197
|
|
7
|
+
* Add namespaces attribute and rename excluded_attributes in SDS Public API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1209
|
|
8
|
+
* Set macV as `type any` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1224
|
|
9
|
+
### Added
|
|
10
|
+
* Add httpVersion option to Synthetics API tests by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1202
|
|
11
|
+
* Add deprecationDate to security monitoring rule response by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1203
|
|
12
|
+
* Add new group by configuration to list stream widget by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1199
|
|
13
|
+
* Add synthetics advanced scheduling by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1188
|
|
14
|
+
* Add notification preset enum field to monitor options by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1206
|
|
15
|
+
* Add support for Cloudflare integration API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1205
|
|
16
|
+
* Add support for Fastly account API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1131
|
|
17
|
+
* Add monitor configuration policies by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1208
|
|
18
|
+
* Support is_cspm_enabled field in GCP integrations by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1217
|
|
19
|
+
* Add run workflow widget to dashboard schema by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1210
|
|
20
|
+
* Add new missing enum values for `aggregation` and `detectionMethod` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1226
|
|
21
|
+
* Add region to estimated cost and historical cost response by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1227
|
|
22
|
+
* Add Usage Metering container_excl_agent_usage fields by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1229
|
|
23
|
+
* Add event_stream fields to dashboard list stream widget by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1230
|
|
24
|
+
### Changed
|
|
25
|
+
* Move Service account create from users to service accounts by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1214
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
**Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.6.0...v2.7.0
|
|
29
|
+
|
|
3
30
|
## 2.6.0 / 2023-01-11
|
|
4
31
|
|
|
5
32
|
### Fixed
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Create a new dashboard with logs_pattern_stream list_stream widget
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
8
|
+
title: "Example-Create_a_new_dashboard_with_logs_pattern_stream_list_stream_widget with list_stream widget",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
|
|
12
|
+
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
|
|
13
|
+
requests: [
|
|
14
|
+
DatadogAPIClient::V1::ListStreamWidgetRequest.new({
|
|
15
|
+
columns: [
|
|
16
|
+
DatadogAPIClient::V1::ListStreamColumn.new({
|
|
17
|
+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
|
|
18
|
+
field: "timestamp",
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
query: DatadogAPIClient::V1::ListStreamQuery.new({
|
|
22
|
+
data_source: DatadogAPIClient::V1::ListStreamSource::LOGS_PATTERN_STREAM,
|
|
23
|
+
query_string: "",
|
|
24
|
+
group_by: [
|
|
25
|
+
DatadogAPIClient::V1::ListStreamGroupByItems.new({
|
|
26
|
+
facet: "service",
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
}),
|
|
30
|
+
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
33
|
+
}),
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
36
|
+
})
|
|
37
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Create a new dashboard with event_stream list_stream widget
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
8
|
+
title: "Example-Create_a_new_dashboard_with_event_stream_list_stream_widget with list_stream widget",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
|
|
12
|
+
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
|
|
13
|
+
requests: [
|
|
14
|
+
DatadogAPIClient::V1::ListStreamWidgetRequest.new({
|
|
15
|
+
columns: [
|
|
16
|
+
DatadogAPIClient::V1::ListStreamColumn.new({
|
|
17
|
+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
|
|
18
|
+
field: "timestamp",
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
query: DatadogAPIClient::V1::ListStreamQuery.new({
|
|
22
|
+
data_source: DatadogAPIClient::V1::ListStreamSource::EVENT_STREAM,
|
|
23
|
+
query_string: "",
|
|
24
|
+
event_size: DatadogAPIClient::V1::WidgetEventSize::LARGE,
|
|
25
|
+
}),
|
|
26
|
+
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
})
|
|
33
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Create a new dashboard with run-workflow widget
|
|
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_new_dashboard_with_run_workflow_widget",
|
|
8
|
+
description: "",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0,
|
|
14
|
+
width: 47,
|
|
15
|
+
height: 15,
|
|
16
|
+
}),
|
|
17
|
+
definition: DatadogAPIClient::V1::RunWorkflowWidgetDefinition.new({
|
|
18
|
+
title: "Run workflow title",
|
|
19
|
+
title_size: "16",
|
|
20
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
21
|
+
time: DatadogAPIClient::V1::WidgetTime.new({}),
|
|
22
|
+
type: DatadogAPIClient::V1::RunWorkflowWidgetDefinitionType::RUN_WORKFLOW,
|
|
23
|
+
workflow_id: "2e055f16-8b6a-4cdd-b452-17a34c44b160",
|
|
24
|
+
inputs: [
|
|
25
|
+
DatadogAPIClient::V1::RunWorkflowWidgetInput.new({
|
|
26
|
+
name: "environment",
|
|
27
|
+
value: "$env.value",
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
}),
|
|
31
|
+
}),
|
|
32
|
+
],
|
|
33
|
+
template_variables: [],
|
|
34
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
|
|
35
|
+
is_read_only: false,
|
|
36
|
+
notify_list: [],
|
|
37
|
+
})
|
|
38
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Create a new dashboard with logs_transaction_stream list_stream widget
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
8
|
+
title: "Example-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget with list_stream widget",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::ListStreamWidgetDefinition.new({
|
|
12
|
+
type: DatadogAPIClient::V1::ListStreamWidgetDefinitionType::LIST_STREAM,
|
|
13
|
+
requests: [
|
|
14
|
+
DatadogAPIClient::V1::ListStreamWidgetRequest.new({
|
|
15
|
+
columns: [
|
|
16
|
+
DatadogAPIClient::V1::ListStreamColumn.new({
|
|
17
|
+
width: DatadogAPIClient::V1::ListStreamColumnWidth::AUTO,
|
|
18
|
+
field: "timestamp",
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
query: DatadogAPIClient::V1::ListStreamQuery.new({
|
|
22
|
+
data_source: DatadogAPIClient::V1::ListStreamSource::LOGS_TRANSACTION_STREAM,
|
|
23
|
+
query_string: "",
|
|
24
|
+
group_by: [
|
|
25
|
+
DatadogAPIClient::V1::ListStreamGroupByItems.new({
|
|
26
|
+
facet: "service",
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
compute: [
|
|
30
|
+
DatadogAPIClient::V1::ListStreamComputeItems.new({
|
|
31
|
+
facet: "service",
|
|
32
|
+
aggregation: DatadogAPIClient::V1::ListStreamComputeAggregation::COUNT,
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
response_format: DatadogAPIClient::V1::ListStreamResponseFormat::EVENT_LIST,
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
}),
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
})
|
|
43
|
+
p api_instance.create_dashboard(body)
|
|
@@ -28,6 +28,7 @@ body = DatadogAPIClient::V1::Monitor.new({
|
|
|
28
28
|
notify_audit: false,
|
|
29
29
|
notify_no_data: false,
|
|
30
30
|
on_missing_data: DatadogAPIClient::V1::OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA,
|
|
31
|
+
notification_preset_name: DatadogAPIClient::V1::MonitorOptionsNotificationPresets::HIDE_HANDLES,
|
|
31
32
|
renotify_interval: 60,
|
|
32
33
|
require_full_window: true,
|
|
33
34
|
timeout_h: 24,
|
|
@@ -25,6 +25,7 @@ body = DatadogAPIClient::V1::Monitor.new({
|
|
|
25
25
|
notify_audit: false,
|
|
26
26
|
notify_no_data: false,
|
|
27
27
|
on_missing_data: DatadogAPIClient::V1::OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA,
|
|
28
|
+
notification_preset_name: DatadogAPIClient::V1::MonitorOptionsNotificationPresets::HIDE_HANDLES,
|
|
28
29
|
renotify_interval: 60,
|
|
29
30
|
require_full_window: true,
|
|
30
31
|
timeout_h: 24,
|
|
@@ -22,8 +22,8 @@ body = DatadogAPIClient::V1::ServiceLevelObjectiveRequest.new({
|
|
|
22
22
|
],
|
|
23
23
|
thresholds: [
|
|
24
24
|
DatadogAPIClient::V1::SLOThreshold.new({
|
|
25
|
-
target:
|
|
26
|
-
target_display: "
|
|
25
|
+
target: 97.0,
|
|
26
|
+
target_display: "97.0",
|
|
27
27
|
timeframe: DatadogAPIClient::V1::SLOTimeframe::SEVEN_DAYS,
|
|
28
28
|
warning: 98,
|
|
29
29
|
warning_display: "98.0",
|
|
@@ -29,6 +29,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
|
29
29
|
device_ids: [
|
|
30
30
|
DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
|
|
31
31
|
],
|
|
32
|
+
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
|
|
32
33
|
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}),
|
|
33
34
|
restricted_roles: [
|
|
34
35
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
@@ -39,6 +40,21 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
|
39
40
|
client_token_id: 12345,
|
|
40
41
|
is_enabled: true,
|
|
41
42
|
}),
|
|
43
|
+
scheduling: DatadogAPIClient::V1::SyntheticsTestOptionsScheduling.new({
|
|
44
|
+
timeframes: [
|
|
45
|
+
DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
|
|
46
|
+
day: 1,
|
|
47
|
+
from: "07:00",
|
|
48
|
+
to: "16:00",
|
|
49
|
+
}),
|
|
50
|
+
DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
|
|
51
|
+
day: 3,
|
|
52
|
+
from: "07:00",
|
|
53
|
+
to: "16:00",
|
|
54
|
+
}),
|
|
55
|
+
],
|
|
56
|
+
timezone: "America/New_York",
|
|
57
|
+
}),
|
|
42
58
|
}),
|
|
43
59
|
status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::LIVE,
|
|
44
60
|
subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::HTTP,
|
|
@@ -97,6 +97,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
|
97
97
|
interval: 10,
|
|
98
98
|
}),
|
|
99
99
|
tick_every: 60,
|
|
100
|
+
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP2,
|
|
100
101
|
}),
|
|
101
102
|
subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::HTTP,
|
|
102
103
|
tags: [
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Create a browser test with advanced scheduling options returns "OK - Returns the created test details." response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
|
|
7
|
+
config: DatadogAPIClient::V1::SyntheticsBrowserTestConfig.new({
|
|
8
|
+
assertions: [],
|
|
9
|
+
config_variables: [
|
|
10
|
+
DatadogAPIClient::V1::SyntheticsConfigVariable.new({
|
|
11
|
+
example: "content-type",
|
|
12
|
+
name: "PROPERTY",
|
|
13
|
+
pattern: "content-type",
|
|
14
|
+
type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
|
|
15
|
+
}),
|
|
16
|
+
],
|
|
17
|
+
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|
|
18
|
+
method: "GET",
|
|
19
|
+
url: "https://datadoghq.com",
|
|
20
|
+
}),
|
|
21
|
+
set_cookie: "name:test",
|
|
22
|
+
}),
|
|
23
|
+
locations: [
|
|
24
|
+
"aws:us-east-2",
|
|
25
|
+
],
|
|
26
|
+
message: "Test message",
|
|
27
|
+
name: "Example-Create_a_browser_test_with_advanced_scheduling_options_returns_OK_Returns_the_created_test_details_r",
|
|
28
|
+
options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
|
|
29
|
+
accept_self_signed: false,
|
|
30
|
+
allow_insecure: true,
|
|
31
|
+
device_ids: [
|
|
32
|
+
DatadogAPIClient::V1::SyntheticsDeviceID::TABLET,
|
|
33
|
+
],
|
|
34
|
+
disable_cors: true,
|
|
35
|
+
follow_redirects: true,
|
|
36
|
+
min_failure_duration: 10,
|
|
37
|
+
min_location_failed: 1,
|
|
38
|
+
no_screenshot: true,
|
|
39
|
+
_retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
|
|
40
|
+
count: 3,
|
|
41
|
+
interval: 10,
|
|
42
|
+
}),
|
|
43
|
+
tick_every: 300,
|
|
44
|
+
scheduling: DatadogAPIClient::V1::SyntheticsTestOptionsScheduling.new({
|
|
45
|
+
timeframes: [
|
|
46
|
+
DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
|
|
47
|
+
day: 1,
|
|
48
|
+
from: "07:00",
|
|
49
|
+
to: "16:00",
|
|
50
|
+
}),
|
|
51
|
+
DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
|
|
52
|
+
day: 3,
|
|
53
|
+
from: "07:00",
|
|
54
|
+
to: "16:00",
|
|
55
|
+
}),
|
|
56
|
+
],
|
|
57
|
+
timezone: "America/New_York",
|
|
58
|
+
}),
|
|
59
|
+
}),
|
|
60
|
+
tags: [
|
|
61
|
+
"testing:browser",
|
|
62
|
+
],
|
|
63
|
+
type: DatadogAPIClient::V1::SyntheticsBrowserTestType::BROWSER,
|
|
64
|
+
steps: [
|
|
65
|
+
DatadogAPIClient::V1::SyntheticsStep.new({
|
|
66
|
+
allow_failure: false,
|
|
67
|
+
is_critical: true,
|
|
68
|
+
name: "Refresh page",
|
|
69
|
+
params: {},
|
|
70
|
+
type: DatadogAPIClient::V1::SyntheticsStepType::REFRESH,
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
})
|
|
74
|
+
p api_instance.create_synthetics_browser_test(body)
|
|
@@ -51,6 +51,7 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
|
|
|
51
51
|
device_ids: [
|
|
52
52
|
DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
|
|
53
53
|
],
|
|
54
|
+
http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
|
|
54
55
|
monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}),
|
|
55
56
|
restricted_roles: [
|
|
56
57
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
@@ -61,6 +62,21 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
|
|
|
61
62
|
client_token_id: 12345,
|
|
62
63
|
is_enabled: true,
|
|
63
64
|
}),
|
|
65
|
+
scheduling: DatadogAPIClient::V1::SyntheticsTestOptionsScheduling.new({
|
|
66
|
+
timeframes: [
|
|
67
|
+
DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
|
|
68
|
+
day: 1,
|
|
69
|
+
from: "07:00",
|
|
70
|
+
to: "16:00",
|
|
71
|
+
}),
|
|
72
|
+
DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe.new({
|
|
73
|
+
day: 3,
|
|
74
|
+
from: "07:00",
|
|
75
|
+
to: "16:00",
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
timezone: "America/New_York",
|
|
79
|
+
}),
|
|
64
80
|
}),
|
|
65
81
|
status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::LIVE,
|
|
66
82
|
steps: [
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Add Cloudflare account returns "CREATED" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::CloudflareIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::CloudflareAccountCreateRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::CloudflareAccountCreateRequestData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::CloudflareAccountCreateRequestAttributes.new({
|
|
9
|
+
api_key: "6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu",
|
|
10
|
+
email: "new@email",
|
|
11
|
+
name: "exampleaddcloudflareaccountreturnscreatedresponse",
|
|
12
|
+
}),
|
|
13
|
+
type: DatadogAPIClient::V2::CloudflareAccountType::CLOUDFLARE_ACCOUNTS,
|
|
14
|
+
}),
|
|
15
|
+
})
|
|
16
|
+
p api_instance.create_cloudflare_account(body)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Get Cloudflare account returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::CloudflareIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "cloudflare_account" in the system
|
|
7
|
+
CLOUDFLARE_ACCOUNT_DATA_ID = ENV["CLOUDFLARE_ACCOUNT_DATA_ID"]
|
|
8
|
+
p api_instance.get_cloudflare_account(CLOUDFLARE_ACCOUNT_DATA_ID)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Update Cloudflare account returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::CloudflareIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "cloudflare_account" in the system
|
|
7
|
+
CLOUDFLARE_ACCOUNT_DATA_ID = ENV["CLOUDFLARE_ACCOUNT_DATA_ID"]
|
|
8
|
+
|
|
9
|
+
body = DatadogAPIClient::V2::CloudflareAccountUpdateRequest.new({
|
|
10
|
+
data: DatadogAPIClient::V2::CloudflareAccountUpdateRequestData.new({
|
|
11
|
+
attributes: DatadogAPIClient::V2::CloudflareAccountUpdateRequestAttributes.new({
|
|
12
|
+
api_key: "6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu",
|
|
13
|
+
email: "new@email",
|
|
14
|
+
}),
|
|
15
|
+
type: DatadogAPIClient::V2::CloudflareAccountType::CLOUDFLARE_ACCOUNTS,
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
p api_instance.update_cloudflare_account(CLOUDFLARE_ACCOUNT_DATA_ID, body)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Add Fastly account returns "CREATED" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::FastlyIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::FastlyAccountCreateRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::FastlyAccountCreateRequestData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::FastlyAccountCreateRequestAttributes.new({
|
|
9
|
+
api_key: "ExampleAddFastlyaccountreturnsCREATEDresponse",
|
|
10
|
+
name: "Example-Add_Fastly_account_returns_CREATED_response",
|
|
11
|
+
services: [],
|
|
12
|
+
}),
|
|
13
|
+
type: DatadogAPIClient::V2::FastlyAccountType::FASTLY_ACCOUNTS,
|
|
14
|
+
}),
|
|
15
|
+
})
|
|
16
|
+
p api_instance.create_fastly_account(body)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Add Fastly service returns "CREATED" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::FastlyIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::FastlyServiceRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::FastlyServiceData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::FastlyServiceAttributes.new({
|
|
9
|
+
tags: [
|
|
10
|
+
"myTag",
|
|
11
|
+
"myTag2:myValue",
|
|
12
|
+
],
|
|
13
|
+
}),
|
|
14
|
+
id: "abc123",
|
|
15
|
+
type: DatadogAPIClient::V2::FastlyServiceType::FASTLY_SERVICES,
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
p api_instance.create_fastly_service("account_id", body)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Get Fastly account returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::FastlyIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "fastly_account" in the system
|
|
7
|
+
FASTLY_ACCOUNT_DATA_ID = ENV["FASTLY_ACCOUNT_DATA_ID"]
|
|
8
|
+
p api_instance.get_fastly_account(FASTLY_ACCOUNT_DATA_ID)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Update Fastly account returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::FastlyIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "fastly_account" in the system
|
|
7
|
+
FASTLY_ACCOUNT_DATA_ID = ENV["FASTLY_ACCOUNT_DATA_ID"]
|
|
8
|
+
|
|
9
|
+
body = DatadogAPIClient::V2::FastlyAccountUpdateRequest.new({
|
|
10
|
+
data: DatadogAPIClient::V2::FastlyAccountUpdateRequestData.new({
|
|
11
|
+
attributes: DatadogAPIClient::V2::FastlyAccountUpdateRequestAttributes.new({
|
|
12
|
+
api_key: "update-secret",
|
|
13
|
+
}),
|
|
14
|
+
type: DatadogAPIClient::V2::FastlyAccountType::FASTLY_ACCOUNTS,
|
|
15
|
+
}),
|
|
16
|
+
})
|
|
17
|
+
p api_instance.update_fastly_account(FASTLY_ACCOUNT_DATA_ID, body)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Update Fastly service returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::FastlyIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::FastlyServiceRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::FastlyServiceData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::FastlyServiceAttributes.new({
|
|
9
|
+
tags: [
|
|
10
|
+
"myTag",
|
|
11
|
+
"myTag2:myValue",
|
|
12
|
+
],
|
|
13
|
+
}),
|
|
14
|
+
id: "abc123",
|
|
15
|
+
type: DatadogAPIClient::V2::FastlyServiceType::FASTLY_SERVICES,
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
p api_instance.update_fastly_service("account_id", "service_id", body)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Query scalar data across multiple products returns "OK" response
|
|
2
2
|
|
|
3
3
|
require "datadog_api_client"
|
|
4
4
|
DatadogAPIClient::V2.configure do |config|
|
|
@@ -11,23 +11,22 @@ body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
|
|
|
11
11
|
attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({
|
|
12
12
|
formulas: [
|
|
13
13
|
DatadogAPIClient::V2::QueryFormula.new({
|
|
14
|
-
formula: "a",
|
|
14
|
+
formula: "a+b",
|
|
15
15
|
limit: DatadogAPIClient::V2::FormulaLimit.new({
|
|
16
16
|
count: 10,
|
|
17
17
|
order: DatadogAPIClient::V2::QuerySortOrder::DESC,
|
|
18
18
|
}),
|
|
19
19
|
}),
|
|
20
20
|
],
|
|
21
|
-
from:
|
|
21
|
+
from: 1568899800000,
|
|
22
22
|
queries: [
|
|
23
23
|
DatadogAPIClient::V2::MetricsScalarQuery.new({
|
|
24
24
|
aggregator: DatadogAPIClient::V2::MetricsAggregator::AVG,
|
|
25
25
|
data_source: DatadogAPIClient::V2::MetricsDataSource::METRICS,
|
|
26
|
-
query: "avg:system.cpu.user{*}",
|
|
27
|
-
name: "a",
|
|
26
|
+
query: "avg:system.cpu.user{*} by {env}",
|
|
28
27
|
}),
|
|
29
28
|
],
|
|
30
|
-
to:
|
|
29
|
+
to: 1568923200000,
|
|
31
30
|
}),
|
|
32
31
|
type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST,
|
|
33
32
|
}),
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Scalar cross product query returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
DatadogAPIClient::V2.configure do |config|
|
|
5
|
+
config.unstable_operations["v2.query_scalar_data".to_sym] = true
|
|
6
|
+
end
|
|
7
|
+
api_instance = DatadogAPIClient::V2::MetricsAPI.new
|
|
8
|
+
|
|
9
|
+
body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
|
|
10
|
+
data: DatadogAPIClient::V2::ScalarFormulaRequest.new({
|
|
11
|
+
attributes: DatadogAPIClient::V2::ScalarFormulaRequestAttributes.new({
|
|
12
|
+
formulas: [
|
|
13
|
+
DatadogAPIClient::V2::QueryFormula.new({
|
|
14
|
+
formula: "a",
|
|
15
|
+
limit: DatadogAPIClient::V2::FormulaLimit.new({
|
|
16
|
+
count: 10,
|
|
17
|
+
order: DatadogAPIClient::V2::QuerySortOrder::DESC,
|
|
18
|
+
}),
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
from: 1671612804000,
|
|
22
|
+
queries: [
|
|
23
|
+
DatadogAPIClient::V2::MetricsScalarQuery.new({
|
|
24
|
+
aggregator: DatadogAPIClient::V2::MetricsAggregator::AVG,
|
|
25
|
+
data_source: DatadogAPIClient::V2::MetricsDataSource::METRICS,
|
|
26
|
+
query: "avg:system.cpu.user{*}",
|
|
27
|
+
name: "a",
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
to: 1671620004000,
|
|
31
|
+
}),
|
|
32
|
+
type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST,
|
|
33
|
+
}),
|
|
34
|
+
})
|
|
35
|
+
p api_instance.query_scalar_data(body)
|