datadog_api_client 2.26.1 → 2.27.1
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 +2152 -10
- data/.generator/schemas/v2/openapi.yaml +1771 -41
- data/.generator/src/generator/formatter.py +1 -1
- data/.github/workflows/approved_status.yml +4 -0
- data/.github/workflows/changelog.yml +5 -0
- data/.github/workflows/codeql-analysis.yml +4 -0
- data/.github/workflows/docs.yml +3 -0
- data/.github/workflows/labeler.yml +5 -0
- data/.github/workflows/prepare_release.yml +4 -0
- data/.github/workflows/publish.yml +5 -0
- data/.github/workflows/release.yml +4 -0
- data/.github/workflows/stale.yml +6 -0
- data/.github/workflows/test.yml +3 -0
- data/.github/workflows/test_integration.yml +3 -0
- data/CHANGELOG.md +27 -0
- data/examples/v1/dashboards/CreateDashboard_1433408735.rb +44 -0
- data/examples/v1/dashboards/CreateDashboard_794302680.rb +152 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +1 -1
- data/examples/v1/synthetics/CreateSyntheticsMobileTest.rb +27 -0
- data/examples/v1/synthetics/FetchUptimes.rb +13 -0
- data/examples/v1/synthetics/GetMobileTest.rb +8 -0
- data/examples/v1/synthetics/UpdateMobileTest.rb +30 -0
- data/examples/v2/logs/AggregateLogs_2955613758.rb +0 -1
- data/examples/v2/microsoft-teams-integration/CreateApiHandle.rb +17 -0
- data/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb +17 -0
- data/examples/v2/microsoft-teams-integration/DeleteApiHandle.rb +5 -0
- data/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb +8 -0
- data/examples/v2/microsoft-teams-integration/GetApiHandle.rb +5 -0
- data/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb +5 -0
- data/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb +8 -0
- data/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb +8 -0
- data/examples/v2/microsoft-teams-integration/GetChannelByName.rb +5 -0
- data/examples/v2/microsoft-teams-integration/ListApiHandles.rb +5 -0
- data/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb +5 -0
- data/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb +17 -0
- data/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb +18 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +9 -0
- data/lib/datadog_api_client/inflector.rb +51 -0
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +272 -0
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_fetch_uptimes_payload.rb +167 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_device_id.rb +251 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step.rb +203 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_step_type.rb +42 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +263 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding.rb +105 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items.rb +117 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items_role.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_ci_options.rb +123 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_config.rb +117 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments.rb +105 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments_property_names.rb +105 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options.rb +354 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options.rb +155 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options_notification_preset_name.rb +29 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_test_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application.rb +154 -0
- data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application_reference_type.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request_port.rb +63 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_uptime.rb +135 -0
- data/lib/datadog_api_client/v1/models/synthetics_uptime.rb +161 -0
- data/lib/datadog_api_client/v1/models/table_widget_request.rb +16 -4
- data/lib/datadog_api_client/v1/models/table_widget_text_format_match.rb +144 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_match_type.rb +31 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_palette.rb +36 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace.rb +63 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all.rb +144 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring.rb +165 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/table_widget_text_format_rule.rb +163 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
- data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -4
- data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +497 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +3 -3
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/fastly_services_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_notification_handle.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_type_category.rb +27 -0
- data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb +186 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb +249 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb +202 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb +125 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_attributes.rb +165 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_data.rb +147 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_get_channel_by_name_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +35 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +145 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +13 -1
- data/lib/datadog_api_client/v2/models/team_update_attributes.rb +1 -26
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +72 -2
|
@@ -251,7 +251,7 @@ def format_data_with_schema(
|
|
|
251
251
|
return str(x)
|
|
252
252
|
|
|
253
253
|
def format_string(x):
|
|
254
|
-
if isinstance(x, bool):
|
|
254
|
+
if isinstance(x, (bool, int, float)):
|
|
255
255
|
raise TypeError(f"{x} is not supported type {schema}")
|
|
256
256
|
if schema.get("format") == "binary":
|
|
257
257
|
return open_file(x)
|
data/.github/workflows/docs.yml
CHANGED
data/.github/workflows/stale.yml
CHANGED
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.27.1 / 2024-10-02
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
* change schema used in FastlyServicesResponse by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2020
|
|
7
|
+
* Update configuration for frozen-string-literal by @HParker in https://github.com/DataDog/datadog-api-client-ruby/pull/1971
|
|
8
|
+
### Added
|
|
9
|
+
* Allow Table Widget requests to specify text replace formatting in dashboards by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1993
|
|
10
|
+
* Add documentation for Data Jobs Monitoring summary keys by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1997
|
|
11
|
+
* Update estimate docs with realtime changes by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2024
|
|
12
|
+
* Ensure clients can handle empty oneOf objects by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2022
|
|
13
|
+
* Add referenceTables field to security monitoring endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2017
|
|
14
|
+
* Add UA documentation for new DJM usage_type by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2018
|
|
15
|
+
* Add v2 endpoints for MS Teams Integration by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2026
|
|
16
|
+
* Add documention for OCI Integration by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2033
|
|
17
|
+
* Add schema for mobile test by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2010
|
|
18
|
+
* Add Synthetics endpoint to fetch uptimes in API spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1984
|
|
19
|
+
### Changed
|
|
20
|
+
* Split the synthetics request port field into a oneOf by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2005
|
|
21
|
+
* Remove unused field `color` in `TeamUpdateAttributes` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1998
|
|
22
|
+
* Powerpack add support for prefix and available values by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2011
|
|
23
|
+
* Update v2 metrics list endpoint filter by metric type to use metric type category by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/2025
|
|
24
|
+
|
|
25
|
+
## New Contributors
|
|
26
|
+
* @HParker made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/1971
|
|
27
|
+
|
|
28
|
+
**Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.26.1...v2.27.1
|
|
29
|
+
|
|
3
30
|
## 2.26.1 / 2024-09-11
|
|
4
31
|
|
|
5
32
|
### Fixed
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Clients deserialize a dashboard with a empty time object
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
title: "Example-Dashboard",
|
|
8
|
+
widgets: [
|
|
9
|
+
DatadogAPIClient::V1::Widget.new({
|
|
10
|
+
definition: DatadogAPIClient::V1::TimeseriesWidgetDefinition.new({
|
|
11
|
+
title: "Example Cloud Cost Query",
|
|
12
|
+
title_size: "16",
|
|
13
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
14
|
+
type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES,
|
|
15
|
+
requests: [
|
|
16
|
+
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
|
|
17
|
+
formulas: [
|
|
18
|
+
DatadogAPIClient::V1::WidgetFormula.new({
|
|
19
|
+
formula: "query1",
|
|
20
|
+
}),
|
|
21
|
+
],
|
|
22
|
+
queries: [
|
|
23
|
+
DatadogAPIClient::V1::FormulaAndFunctionCloudCostQueryDefinition.new({
|
|
24
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionCloudCostDataSource::CLOUD_COST,
|
|
25
|
+
name: "query1",
|
|
26
|
+
query: "sum:aws.cost.amortized{*} by {aws_product}.rollup(sum, monthly)",
|
|
27
|
+
}),
|
|
28
|
+
],
|
|
29
|
+
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
|
|
30
|
+
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
|
|
31
|
+
palette: "dog_classic",
|
|
32
|
+
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
|
|
33
|
+
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
|
|
34
|
+
}),
|
|
35
|
+
display_type: DatadogAPIClient::V1::WidgetDisplayType::BARS,
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
time: DatadogAPIClient::V1::WidgetLegacyLiveSpan.new({}),
|
|
39
|
+
}),
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
43
|
+
})
|
|
44
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Create a new dashboard with query_table widget and text formatting
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
title: "Example-Dashboard",
|
|
8
|
+
description: "",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::TableWidgetDefinition.new({
|
|
12
|
+
title: "",
|
|
13
|
+
title_size: "16",
|
|
14
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
15
|
+
type: DatadogAPIClient::V1::TableWidgetDefinitionType::QUERY_TABLE,
|
|
16
|
+
requests: [
|
|
17
|
+
DatadogAPIClient::V1::TableWidgetRequest.new({
|
|
18
|
+
queries: [
|
|
19
|
+
DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({
|
|
20
|
+
aggregator: DatadogAPIClient::V1::FormulaAndFunctionMetricAggregation::AVG,
|
|
21
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS,
|
|
22
|
+
name: "query1",
|
|
23
|
+
query: "avg:aws.stream.globalaccelerator.processed_bytes_in{*} by {aws_account,acceleratoripaddress}",
|
|
24
|
+
}),
|
|
25
|
+
DatadogAPIClient::V1::FormulaAndFunctionMetricQueryDefinition.new({
|
|
26
|
+
aggregator: DatadogAPIClient::V1::FormulaAndFunctionMetricAggregation::AVG,
|
|
27
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionMetricDataSource::METRICS,
|
|
28
|
+
name: "query2",
|
|
29
|
+
query: "avg:aws.stream.globalaccelerator.processed_bytes_out{*} by {aws_account,acceleratoripaddress}",
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::SCALAR,
|
|
33
|
+
text_formats: [
|
|
34
|
+
[
|
|
35
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
36
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
37
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::IS,
|
|
38
|
+
value: "fruit",
|
|
39
|
+
}),
|
|
40
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::WHITE_ON_RED,
|
|
41
|
+
replace: DatadogAPIClient::V1::TableWidgetTextFormatReplaceAll.new({
|
|
42
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatReplaceAllType::ALL,
|
|
43
|
+
with: "vegetable",
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
47
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
48
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::IS,
|
|
49
|
+
value: "animal",
|
|
50
|
+
}),
|
|
51
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::CUSTOM_BG,
|
|
52
|
+
custom_bg_color: "#632ca6",
|
|
53
|
+
}),
|
|
54
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
55
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
56
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::IS,
|
|
57
|
+
value: "robot",
|
|
58
|
+
}),
|
|
59
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::RED_ON_WHITE,
|
|
60
|
+
}),
|
|
61
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
62
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
63
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::IS,
|
|
64
|
+
value: "ai",
|
|
65
|
+
}),
|
|
66
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::YELLOW_ON_WHITE,
|
|
67
|
+
}),
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
71
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
72
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::IS_NOT,
|
|
73
|
+
value: "xyz",
|
|
74
|
+
}),
|
|
75
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::WHITE_ON_YELLOW,
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
80
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
81
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::CONTAINS,
|
|
82
|
+
value: "test",
|
|
83
|
+
}),
|
|
84
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::WHITE_ON_GREEN,
|
|
85
|
+
replace: DatadogAPIClient::V1::TableWidgetTextFormatReplaceAll.new({
|
|
86
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatReplaceAllType::ALL,
|
|
87
|
+
with: "vegetable",
|
|
88
|
+
}),
|
|
89
|
+
}),
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
93
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
94
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::DOES_NOT_CONTAIN,
|
|
95
|
+
value: "blah",
|
|
96
|
+
}),
|
|
97
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::BLACK_ON_LIGHT_RED,
|
|
98
|
+
}),
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
102
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
103
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::STARTS_WITH,
|
|
104
|
+
value: "abc",
|
|
105
|
+
}),
|
|
106
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::BLACK_ON_LIGHT_YELLOW,
|
|
107
|
+
}),
|
|
108
|
+
],
|
|
109
|
+
[
|
|
110
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
111
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
112
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::ENDS_WITH,
|
|
113
|
+
value: "xyz",
|
|
114
|
+
}),
|
|
115
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::BLACK_ON_LIGHT_GREEN,
|
|
116
|
+
}),
|
|
117
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
118
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
119
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::ENDS_WITH,
|
|
120
|
+
value: "zzz",
|
|
121
|
+
}),
|
|
122
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::GREEN_ON_WHITE,
|
|
123
|
+
}),
|
|
124
|
+
DatadogAPIClient::V1::TableWidgetTextFormatRule.new({
|
|
125
|
+
match: DatadogAPIClient::V1::TableWidgetTextFormatMatch.new({
|
|
126
|
+
type: DatadogAPIClient::V1::TableWidgetTextFormatMatchType::IS,
|
|
127
|
+
value: "animal",
|
|
128
|
+
}),
|
|
129
|
+
palette: DatadogAPIClient::V1::TableWidgetTextFormatPalette::CUSTOM_TEXT,
|
|
130
|
+
custom_fg_color: "#632ca6",
|
|
131
|
+
}),
|
|
132
|
+
],
|
|
133
|
+
],
|
|
134
|
+
formulas: [],
|
|
135
|
+
}),
|
|
136
|
+
],
|
|
137
|
+
has_search_bar: DatadogAPIClient::V1::TableWidgetHasSearchBar::NEVER,
|
|
138
|
+
}),
|
|
139
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
140
|
+
x: 0,
|
|
141
|
+
y: 0,
|
|
142
|
+
width: 4,
|
|
143
|
+
height: 4,
|
|
144
|
+
}),
|
|
145
|
+
}),
|
|
146
|
+
],
|
|
147
|
+
template_variables: [],
|
|
148
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
|
|
149
|
+
is_read_only: false,
|
|
150
|
+
notify_list: [],
|
|
151
|
+
})
|
|
152
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Create a mobile test 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::SyntheticsMobileTest.new({
|
|
7
|
+
name: "Example-Synthetic",
|
|
8
|
+
status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
|
|
9
|
+
type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
|
|
10
|
+
config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
|
|
11
|
+
variables: [],
|
|
12
|
+
}),
|
|
13
|
+
message: "",
|
|
14
|
+
options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
|
|
15
|
+
device_ids: [
|
|
16
|
+
DatadogAPIClient::V1::SyntheticsMobileDeviceID::SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17,
|
|
17
|
+
],
|
|
18
|
+
mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
|
|
19
|
+
application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
|
|
20
|
+
reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
|
|
21
|
+
reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
|
|
22
|
+
}),
|
|
23
|
+
tick_every: 3600,
|
|
24
|
+
}),
|
|
25
|
+
steps: [],
|
|
26
|
+
})
|
|
27
|
+
p api_instance.create_synthetics_mobile_test(body)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Fetch uptime for multiple tests returns "OK." response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::SyntheticsFetchUptimesPayload.new({
|
|
7
|
+
from_ts: 1726041488,
|
|
8
|
+
public_ids: [
|
|
9
|
+
"p8m-9gw-nte",
|
|
10
|
+
],
|
|
11
|
+
to_ts: 1726055954,
|
|
12
|
+
})
|
|
13
|
+
p api_instance.fetch_uptimes(body)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Get a Mobile test returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "synthetics_mobile_test" in the system
|
|
7
|
+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
|
|
8
|
+
p api_instance.get_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Edit a Mobile test returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "synthetics_mobile_test" in the system
|
|
7
|
+
SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
|
|
8
|
+
|
|
9
|
+
body = DatadogAPIClient::V1::SyntheticsMobileTest.new({
|
|
10
|
+
name: "Example-Synthetic-updated",
|
|
11
|
+
status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
|
|
12
|
+
type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
|
|
13
|
+
config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
|
|
14
|
+
variables: [],
|
|
15
|
+
}),
|
|
16
|
+
message: "",
|
|
17
|
+
options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
|
|
18
|
+
device_ids: [
|
|
19
|
+
DatadogAPIClient::V1::SyntheticsMobileDeviceID::SYNTHETICS_MOBILE_DEVICE_IPHONE_15_IOS_17,
|
|
20
|
+
],
|
|
21
|
+
mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
|
|
22
|
+
application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
|
|
23
|
+
reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
|
|
24
|
+
reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
|
|
25
|
+
}),
|
|
26
|
+
tick_every: 3600,
|
|
27
|
+
}),
|
|
28
|
+
steps: [],
|
|
29
|
+
})
|
|
30
|
+
p api_instance.update_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Create handle returns "CREATED" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsCreateApiHandleRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestAttributes.new({
|
|
9
|
+
channel_id: "fake-channel-id",
|
|
10
|
+
name: "fake-handle-name",
|
|
11
|
+
team_id: "00000000-0000-0000-0000-000000000000",
|
|
12
|
+
tenant_id: "00000000-0000-0000-0000-000000000001",
|
|
13
|
+
}),
|
|
14
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE,
|
|
15
|
+
}),
|
|
16
|
+
})
|
|
17
|
+
p api_instance.create_api_handle(body)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Create api handle returns "CREATED" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsCreateApiHandleRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleRequestAttributes.new({
|
|
9
|
+
channel_id: "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2",
|
|
10
|
+
name: "Example-Microsoft-Teams-Integration",
|
|
11
|
+
team_id: "e5f50a58-c929-4fb3-8866-e2cd836de3c2",
|
|
12
|
+
tenant_id: "4d3bac44-0230-4732-9e70-cc00736f0a97",
|
|
13
|
+
}),
|
|
14
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE,
|
|
15
|
+
}),
|
|
16
|
+
})
|
|
17
|
+
p api_instance.create_api_handle(body)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Delete api handle returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "api_handle" in the system
|
|
7
|
+
API_HANDLE_DATA_ID = ENV["API_HANDLE_DATA_ID"]
|
|
8
|
+
api_instance.delete_api_handle(API_HANDLE_DATA_ID)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Get api handle information by name returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "api_handle" in the system
|
|
7
|
+
API_HANDLE_DATA_ATTRIBUTES_NAME = ENV["API_HANDLE_DATA_ATTRIBUTES_NAME"]
|
|
8
|
+
p api_instance.get_api_handle_by_name(API_HANDLE_DATA_ATTRIBUTES_NAME)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Get api handle information returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "api_handle" in the system
|
|
7
|
+
API_HANDLE_DATA_ID = ENV["API_HANDLE_DATA_ID"]
|
|
8
|
+
p api_instance.get_api_handle(API_HANDLE_DATA_ID)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Update handle returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequest.new({
|
|
7
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequestData.new({
|
|
8
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleAttributes.new({
|
|
9
|
+
channel_id: "fake-channel-id",
|
|
10
|
+
name: "fake-handle-name",
|
|
11
|
+
team_id: "00000000-0000-0000-0000-000000000000",
|
|
12
|
+
tenant_id: "00000000-0000-0000-0000-000000000001",
|
|
13
|
+
}),
|
|
14
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE,
|
|
15
|
+
}),
|
|
16
|
+
})
|
|
17
|
+
p api_instance.update_api_handle("handle_id", body)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Update api handle returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "api_handle" in the system
|
|
7
|
+
API_HANDLE_DATA_ATTRIBUTES_NAME = ENV["API_HANDLE_DATA_ATTRIBUTES_NAME"]
|
|
8
|
+
API_HANDLE_DATA_ID = ENV["API_HANDLE_DATA_ID"]
|
|
9
|
+
|
|
10
|
+
body = DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequest.new({
|
|
11
|
+
data: DatadogAPIClient::V2::MicrosoftTeamsUpdateApiHandleRequestData.new({
|
|
12
|
+
attributes: DatadogAPIClient::V2::MicrosoftTeamsApiHandleAttributes.new({
|
|
13
|
+
name: "fake-handle-name--updated",
|
|
14
|
+
}),
|
|
15
|
+
type: DatadogAPIClient::V2::MicrosoftTeamsApiHandleType::HANDLE,
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
p api_instance.update_api_handle(API_HANDLE_DATA_ID, body)
|