datadog_api_client 2.0.2 → 2.2.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 +6 -6
- data/.generator/poetry.lock +21 -14
- data/.generator/pyproject.toml +1 -1
- data/.generator/schemas/v1/openapi.yaml +840 -908
- data/.generator/schemas/v2/openapi.yaml +1304 -913
- data/.generator/src/generator/formatter.py +1 -1
- data/.generator/src/generator/templates/api_client.j2 +5 -1
- data/.generator/src/generator/templates/configuration.j2 +17 -0
- data/.github/workflows/test.yml +4 -1
- data/.github/workflows/test_integration.yml +5 -0
- data/.pre-commit-config.yaml +1 -1
- data/CHANGELOG.md +49 -0
- data/README.md +11 -0
- data/examples/v1/dashboards/CreateDashboard_1094917386.rb +37 -0
- data/examples/v1/dashboards/CreateDashboard_1307120899.rb +61 -0
- data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
- data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
- data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
- data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
- data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
- data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
- data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor.rb +1 -0
- data/examples/v1/monitors/ValidateMonitor_4247196452.rb +38 -0
- data/examples/v1/synthetics/CreateGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +23 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +10 -0
- data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +6 -0
- data/examples/v1/synthetics/EditGlobalVariable.rb +1 -0
- data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
- data/examples/v1/usage-metering/GetDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +0 -3
- data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -3
- data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
- data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
- data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
- data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
- data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
- data/examples/v2/metrics/SubmitMetrics_1762007427.rb +23 -0
- data/examples/v2/roles/UpdateRole.rb +13 -0
- data/examples/v2/rum/CreateRUMApplication.rb +15 -0
- data/examples/v2/rum/DeleteRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplication.rb +8 -0
- data/examples/v2/rum/GetRUMApplications.rb +5 -0
- data/examples/v2/rum/UpdateRUMApplication.rb +16 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
- data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
- data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
- data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
- data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
- data/examples/v2/usage-metering/GetHourlyUsage.rb +5 -0
- data/generate.sh +30 -0
- data/lib/datadog_api_client/api_client.rb +5 -1
- data/lib/datadog_api_client/configuration.rb +20 -6
- data/lib/datadog_api_client/inflector.rb +67 -1
- data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +42 -62
- data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
- data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
- data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
- data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.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/list_stream_query.rb +14 -4
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +28 -1
- data/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +13 -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/on_missing_data_option.rb +33 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
- data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
- data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
- data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
- data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
- data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
- data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
- data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
- data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
- data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
- data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +2 -1
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +155 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +11 -12
- data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +31 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_process_status.rb +0 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +15 -1
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
- data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
- data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
- data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
- data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
- data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
- 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_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -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 +21 -1
- data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
- data/lib/datadog_api_client/v1/models/widget_monitor_summary_sort.rb +2 -0
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +77 -9
- data/lib/datadog_api_client/v2/api/rum_api.rb +329 -0
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +68 -3
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
- data/lib/datadog_api_client/v2/models/content_encoding.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
- data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
- data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
- data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
- data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
- data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +2 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
- data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
- data/lib/datadog_api_client/v2/models/role_update_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/rum_application.rb +166 -0
- data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +279 -0
- data/lib/datadog_api_client/v2/models/rum_application_create.rb +145 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +132 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_create_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_response.rb +111 -0
- data/lib/datadog_api_client/v2/models/rum_application_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_application_update.rb +155 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +121 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_request.rb +122 -0
- data/lib/datadog_api_client/v2/models/rum_application_update_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/rum_applications_response.rb +113 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
- data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +97 -6
- data/Makefile +0 -7
- data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
|
@@ -136,7 +136,7 @@ def format_parameters(kwargs, spec, replace_values=None, has_body=False):
|
|
|
136
136
|
required = p.get("required", False)
|
|
137
137
|
k = snake_case(p["name"])
|
|
138
138
|
if required:
|
|
139
|
-
v = kwargs.pop(
|
|
139
|
+
v = kwargs.pop(p["name"]) # otherwise there is a missing required parameters
|
|
140
140
|
value = format_data_with_schema(
|
|
141
141
|
v["value"],
|
|
142
142
|
p["schema"],
|
|
@@ -138,7 +138,11 @@ module {{ module_name }}
|
|
|
138
138
|
:timeout => @config.timeout,
|
|
139
139
|
:verify_peer => @config.verify_ssl,
|
|
140
140
|
:verify => _verify_ssl_host,
|
|
141
|
-
:verbose => @config.debugging
|
|
141
|
+
:verbose => @config.debugging,
|
|
142
|
+
:http_proxyaddr => @config.http_proxyaddr,
|
|
143
|
+
:http_proxyport => @config.http_proxyport,
|
|
144
|
+
:http_proxyuser => @config.http_proxyuser,
|
|
145
|
+
:http_proxypass => @config.http_proxypass
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
req_opts[:pem] = File.read(@config.cert_file) if @config.cert_file
|
|
@@ -125,6 +125,19 @@ module {{ module_name }}
|
|
|
125
125
|
# Set this to add accept encoding header for compression
|
|
126
126
|
attr_accessor :compress
|
|
127
127
|
|
|
128
|
+
### Proxy settings
|
|
129
|
+
# Address of proxy server to use
|
|
130
|
+
attr_accessor :http_proxyaddr
|
|
131
|
+
|
|
132
|
+
# Port of proxy server to use
|
|
133
|
+
attr_accessor :http_proxyport
|
|
134
|
+
|
|
135
|
+
# User for proxy server authentication
|
|
136
|
+
attr_accessor :http_proxyuser
|
|
137
|
+
|
|
138
|
+
# Password for proxy server authentication
|
|
139
|
+
attr_accessor :http_proxypass
|
|
140
|
+
|
|
128
141
|
def initialize
|
|
129
142
|
{%- set default_server = openapi.servers[0]|format_server %}
|
|
130
143
|
@scheme = '{{ default_server.scheme }}'
|
|
@@ -146,6 +159,10 @@ module {{ module_name }}
|
|
|
146
159
|
@inject_format = false
|
|
147
160
|
@force_ending_format = false
|
|
148
161
|
@compress = true
|
|
162
|
+
@http_proxyaddr = nil
|
|
163
|
+
@http_proxyport = nil
|
|
164
|
+
@http_proxyuser = nil
|
|
165
|
+
@http_proxypass = nil
|
|
149
166
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
|
150
167
|
@unstable_operations = {
|
|
151
168
|
{%- for version, apis in all_apis.items() %}
|
data/.github/workflows/test.yml
CHANGED
|
@@ -32,6 +32,9 @@ jobs:
|
|
|
32
32
|
fetch-depth: 0
|
|
33
33
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
34
34
|
token: ${{ steps.get_token.outputs.token }}
|
|
35
|
+
- uses: actions/setup-python@v4
|
|
36
|
+
with:
|
|
37
|
+
python-version: '3.10'
|
|
35
38
|
- name: Install pre-commit
|
|
36
39
|
run: python -m pip install pre-commit
|
|
37
40
|
- name: set PY
|
|
@@ -128,5 +131,5 @@ jobs:
|
|
|
128
131
|
with:
|
|
129
132
|
github-token: ${{ steps.get_token.outputs.token }}
|
|
130
133
|
repo: datadog-api-spec
|
|
131
|
-
status: ${{ needs.test.result == 'success' && needs.examples.result == 'success' && 'success' || 'failure' }}
|
|
134
|
+
status: ${{ (needs.test.result == 'cancelled' || needs.examples.result == 'cancelled') && 'pending' || needs.test.result == 'success' && needs.examples.result == 'success' && 'success' || 'failure' }}
|
|
132
135
|
context: unit
|
|
@@ -2,6 +2,7 @@ name: Run Integration Tests
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
5
6
|
branches:
|
|
6
7
|
- master
|
|
7
8
|
schedule:
|
|
@@ -49,6 +50,10 @@ jobs:
|
|
|
49
50
|
repo: datadog-api-spec
|
|
50
51
|
status: pending
|
|
51
52
|
context: integration
|
|
53
|
+
- name: Install system zstd
|
|
54
|
+
run: |
|
|
55
|
+
sudo apt-get -y install zstd
|
|
56
|
+
echo "ZSTANDARD_LIBRARY=$(find /usr/lib -iname libzstd.so.1)" >> $GITHUB_ENV
|
|
52
57
|
- name: Set up Ruby 3.1
|
|
53
58
|
uses: ruby/setup-ruby@v1
|
|
54
59
|
with:
|
data/.pre-commit-config.yaml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.2.0 / 2022-10-03
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
* Refactor RuleQuery models by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1082
|
|
7
|
+
* Fix SearchSLO response structure by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1084
|
|
8
|
+
### Added
|
|
9
|
+
* Add ListActiveConfigurations endpoint and add new filter[queried] param to list tag configurations endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1017
|
|
10
|
+
* Add doesNotExist to synthetics operator enum by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1059
|
|
11
|
+
* Add TopologyMapWidget to dashboard schema by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1063
|
|
12
|
+
* Add Overall Status support to SLO Search API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1065
|
|
13
|
+
* Add support for proxy usage by @skarimo in https://github.com/DataDog/datadog-api-client-ruby/pull/1069
|
|
14
|
+
* Add APM Fargate to Usage Metering API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1058
|
|
15
|
+
* Add support for template variable multiselect in dashboards by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1068
|
|
16
|
+
* Add storage option to widget query definitions by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1072
|
|
17
|
+
* Add support for retrieving a security signal by ID by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1077
|
|
18
|
+
* Add support for signal correlation API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1073
|
|
19
|
+
* Add support for SLO List widget by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1076
|
|
20
|
+
* Add new historical_cost endpoint, and update estimate_cost by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1071
|
|
21
|
+
* Add support for incident attachment APIs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1083
|
|
22
|
+
|
|
23
|
+
## New Contributors
|
|
24
|
+
* @nkzou made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/1057
|
|
25
|
+
* @dependabot made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/1091
|
|
26
|
+
|
|
27
|
+
**Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.1.0...v2.2.0
|
|
28
|
+
|
|
29
|
+
## 2.1.0 / 2022-08-31
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
* Add support for digest auth in synthetics tests by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1021
|
|
33
|
+
* Add support for RUM application endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1022
|
|
34
|
+
* add priority parameters for dashboard monitor summary widget by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1026
|
|
35
|
+
* Add `logs_pattern_stream` to `list_stream` widget source by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1028
|
|
36
|
+
* Add group_retention_duration and on_missing_data monitor options by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1024
|
|
37
|
+
* Expose CSPM aws host count in Usage Metering API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1041
|
|
38
|
+
* Add estimated ingested logs attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1005
|
|
39
|
+
* Add org region to usage summary and billable usage summary by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1034
|
|
40
|
+
* add compression methods to metric payloads by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1001
|
|
41
|
+
* Add role relationships to RoleUpdateData by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1038
|
|
42
|
+
* Add `ci_tests` enum to FormulaAndFunctionEventsDataSource by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1035
|
|
43
|
+
* Add missing options and request option to synthetics test by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1027
|
|
44
|
+
* Add support for global variable from multistep synthetics tests by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/993
|
|
45
|
+
### Changed
|
|
46
|
+
* update deprecated usage attribution API docs to direct users to migra… by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1029
|
|
47
|
+
* [Synthetics] remove started form eventType enum by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1031
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
**Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.0.2...v2.1.0
|
|
51
|
+
|
|
3
52
|
## 2.0.2 / 2022-08-03
|
|
4
53
|
|
|
5
54
|
### Fixed
|
data/README.md
CHANGED
|
@@ -138,6 +138,17 @@ config.debugging = true
|
|
|
138
138
|
client = DatadogAPIClient::APIClient.new(config)
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
### Configure proxy
|
|
142
|
+
|
|
143
|
+
You can configure the client to use proxy by setting `http_proxyaddr` and `http_proxyport` keys on configuration object:
|
|
144
|
+
|
|
145
|
+
```ruby
|
|
146
|
+
config = DatadogAPIClient::Configuration.new
|
|
147
|
+
config.http_proxyaddr = '127.0.0.1'
|
|
148
|
+
config.http_proxyport = '3128'
|
|
149
|
+
client = DatadogAPIClient::APIClient.new(config)
|
|
150
|
+
```
|
|
151
|
+
|
|
141
152
|
### Pagination
|
|
142
153
|
|
|
143
154
|
Several listing operations have a pagination method to help consume all the items available.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Create a new dashboard with manage_status widget and show_priority parameter
|
|
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_manage_status_widget_and_show_priority_parameter",
|
|
8
|
+
description: "",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0,
|
|
14
|
+
width: 50,
|
|
15
|
+
height: 25,
|
|
16
|
+
}),
|
|
17
|
+
definition: DatadogAPIClient::V1::MonitorSummaryWidgetDefinition.new({
|
|
18
|
+
type: DatadogAPIClient::V1::MonitorSummaryWidgetDefinitionType::MANAGE_STATUS,
|
|
19
|
+
summary_type: DatadogAPIClient::V1::WidgetSummaryType::MONITORS,
|
|
20
|
+
display_format: DatadogAPIClient::V1::WidgetMonitorSummaryDisplayFormat::COUNTS_AND_LIST,
|
|
21
|
+
color_preference: DatadogAPIClient::V1::WidgetColorPreference::TEXT,
|
|
22
|
+
hide_zero_counts: true,
|
|
23
|
+
show_last_triggered: false,
|
|
24
|
+
query: "",
|
|
25
|
+
sort: DatadogAPIClient::V1::WidgetMonitorSummarySort::PRIORITY_ASCENDING,
|
|
26
|
+
count: 50,
|
|
27
|
+
start: 0,
|
|
28
|
+
show_priority: false,
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
template_variables: [],
|
|
33
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
|
|
34
|
+
is_read_only: false,
|
|
35
|
+
notify_list: [],
|
|
36
|
+
})
|
|
37
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Create a new timeseries widget with ci_tests data source
|
|
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_timeseries_widget_with_ci_tests_data_source with ci_tests datasource",
|
|
8
|
+
widgets: [
|
|
9
|
+
DatadogAPIClient::V1::Widget.new({
|
|
10
|
+
definition: DatadogAPIClient::V1::TimeseriesWidgetDefinition.new({
|
|
11
|
+
title: "",
|
|
12
|
+
show_legend: true,
|
|
13
|
+
legend_layout: DatadogAPIClient::V1::TimeseriesWidgetLegendLayout::AUTO,
|
|
14
|
+
legend_columns: [
|
|
15
|
+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::AVG,
|
|
16
|
+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::MIN,
|
|
17
|
+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::MAX,
|
|
18
|
+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::VALUE,
|
|
19
|
+
DatadogAPIClient::V1::TimeseriesWidgetLegendColumn::SUM,
|
|
20
|
+
],
|
|
21
|
+
time: DatadogAPIClient::V1::WidgetTime.new({}),
|
|
22
|
+
type: DatadogAPIClient::V1::TimeseriesWidgetDefinitionType::TIMESERIES,
|
|
23
|
+
requests: [
|
|
24
|
+
DatadogAPIClient::V1::TimeseriesWidgetRequest.new({
|
|
25
|
+
formulas: [
|
|
26
|
+
DatadogAPIClient::V1::WidgetFormula.new({
|
|
27
|
+
formula: "query1",
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
queries: [
|
|
31
|
+
DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition.new({
|
|
32
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionEventsDataSource::CI_TESTS,
|
|
33
|
+
name: "query1",
|
|
34
|
+
search: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch.new({
|
|
35
|
+
query: "test_level:test",
|
|
36
|
+
}),
|
|
37
|
+
indexes: [
|
|
38
|
+
"*",
|
|
39
|
+
],
|
|
40
|
+
compute: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute.new({
|
|
41
|
+
aggregation: DatadogAPIClient::V1::FormulaAndFunctionEventAggregation::COUNT,
|
|
42
|
+
}),
|
|
43
|
+
group_by: [],
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::TIMESERIES,
|
|
47
|
+
style: DatadogAPIClient::V1::WidgetRequestStyle.new({
|
|
48
|
+
palette: "dog_classic",
|
|
49
|
+
line_type: DatadogAPIClient::V1::WidgetLineType::SOLID,
|
|
50
|
+
line_width: DatadogAPIClient::V1::WidgetLineWidth::NORMAL,
|
|
51
|
+
}),
|
|
52
|
+
display_type: DatadogAPIClient::V1::WidgetDisplayType::LINE,
|
|
53
|
+
}),
|
|
54
|
+
],
|
|
55
|
+
}),
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
59
|
+
reflow_type: DatadogAPIClient::V1::DashboardReflowType::AUTO,
|
|
60
|
+
})
|
|
61
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Create a new dashboard with slo list 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_slo_list_widget",
|
|
8
|
+
description: "",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
layout: DatadogAPIClient::V1::WidgetLayout.new({
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0,
|
|
14
|
+
width: 60,
|
|
15
|
+
height: 21,
|
|
16
|
+
}),
|
|
17
|
+
definition: DatadogAPIClient::V1::SLOListWidgetDefinition.new({
|
|
18
|
+
title_size: "16",
|
|
19
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
20
|
+
type: DatadogAPIClient::V1::SLOListWidgetDefinitionType::SLO_LIST,
|
|
21
|
+
requests: [
|
|
22
|
+
DatadogAPIClient::V1::SLOListWidgetRequest.new({
|
|
23
|
+
query: DatadogAPIClient::V1::SLOListWidgetQuery.new({
|
|
24
|
+
query_string: "env:prod AND service:my-app",
|
|
25
|
+
limit: 75,
|
|
26
|
+
}),
|
|
27
|
+
request_type: DatadogAPIClient::V1::SLOListWidgetRequestType::SLO_LIST,
|
|
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 topology_map 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_topology_map_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::TopologyMapWidgetDefinition.new({
|
|
18
|
+
title: "",
|
|
19
|
+
title_size: "16",
|
|
20
|
+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
|
|
21
|
+
type: DatadogAPIClient::V1::TopologyMapWidgetDefinitionType::TOPOLOGY_MAP,
|
|
22
|
+
requests: [
|
|
23
|
+
DatadogAPIClient::V1::TopologyRequest.new({
|
|
24
|
+
request_type: DatadogAPIClient::V1::TopologyRequestType::TOPOLOGY,
|
|
25
|
+
query: DatadogAPIClient::V1::TopologyQuery.new({
|
|
26
|
+
data_source: DatadogAPIClient::V1::TopologyQueryDataSource::SERVICE_MAP,
|
|
27
|
+
service: "",
|
|
28
|
+
filters: [
|
|
29
|
+
"env:none",
|
|
30
|
+
"environment:*",
|
|
31
|
+
],
|
|
32
|
+
}),
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
template_variables: [],
|
|
39
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE,
|
|
40
|
+
is_read_only: false,
|
|
41
|
+
notify_list: [],
|
|
42
|
+
})
|
|
43
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Create a new dashboard with template variable presets using values returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
description: nil,
|
|
8
|
+
is_read_only: false,
|
|
9
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
10
|
+
notify_list: [],
|
|
11
|
+
reflow_type: DatadogAPIClient::V1::DashboardReflowType::AUTO,
|
|
12
|
+
restricted_roles: [],
|
|
13
|
+
template_variable_presets: [
|
|
14
|
+
DatadogAPIClient::V1::DashboardTemplateVariablePreset.new({
|
|
15
|
+
name: "my saved view",
|
|
16
|
+
template_variables: [
|
|
17
|
+
DatadogAPIClient::V1::DashboardTemplateVariablePresetValue.new({
|
|
18
|
+
name: "datacenter",
|
|
19
|
+
values: [
|
|
20
|
+
"*",
|
|
21
|
+
"my-host",
|
|
22
|
+
],
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
template_variables: [
|
|
28
|
+
DatadogAPIClient::V1::DashboardTemplateVariable.new({
|
|
29
|
+
available_values: [
|
|
30
|
+
"my-host",
|
|
31
|
+
"host1",
|
|
32
|
+
"host2",
|
|
33
|
+
],
|
|
34
|
+
defaults: [
|
|
35
|
+
"my-host",
|
|
36
|
+
],
|
|
37
|
+
name: "host1",
|
|
38
|
+
prefix: "host",
|
|
39
|
+
}),
|
|
40
|
+
],
|
|
41
|
+
title: "",
|
|
42
|
+
widgets: [
|
|
43
|
+
DatadogAPIClient::V1::Widget.new({
|
|
44
|
+
definition: DatadogAPIClient::V1::HostMapWidgetDefinition.new({
|
|
45
|
+
requests: DatadogAPIClient::V1::HostMapWidgetDefinitionRequests.new({
|
|
46
|
+
fill: DatadogAPIClient::V1::HostMapRequest.new({
|
|
47
|
+
q: "avg:system.cpu.user{*}",
|
|
48
|
+
}),
|
|
49
|
+
}),
|
|
50
|
+
type: DatadogAPIClient::V1::HostMapWidgetDefinitionType::HOSTMAP,
|
|
51
|
+
}),
|
|
52
|
+
}),
|
|
53
|
+
],
|
|
54
|
+
})
|
|
55
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Create a new dashboard with logs_stream list_stream widget and storage parameter
|
|
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_stream_list_stream_widget_and_storage_parameter 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_STREAM,
|
|
23
|
+
query_string: "",
|
|
24
|
+
storage: "hot",
|
|
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,50 @@
|
|
|
1
|
+
# Create a new dashboard with logs query table widget and storage parameter
|
|
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_query_table_widget_and_storage_parameter with query table widget and storage parameter",
|
|
9
|
+
widgets: [
|
|
10
|
+
DatadogAPIClient::V1::Widget.new({
|
|
11
|
+
definition: DatadogAPIClient::V1::TableWidgetDefinition.new({
|
|
12
|
+
type: DatadogAPIClient::V1::TableWidgetDefinitionType::QUERY_TABLE,
|
|
13
|
+
requests: [
|
|
14
|
+
DatadogAPIClient::V1::TableWidgetRequest.new({
|
|
15
|
+
queries: [
|
|
16
|
+
DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinition.new({
|
|
17
|
+
data_source: DatadogAPIClient::V1::FormulaAndFunctionEventsDataSource::LOGS,
|
|
18
|
+
name: "query1",
|
|
19
|
+
search: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionSearch.new({
|
|
20
|
+
query: "",
|
|
21
|
+
}),
|
|
22
|
+
indexes: [
|
|
23
|
+
"*",
|
|
24
|
+
],
|
|
25
|
+
compute: DatadogAPIClient::V1::FormulaAndFunctionEventQueryDefinitionCompute.new({
|
|
26
|
+
aggregation: DatadogAPIClient::V1::FormulaAndFunctionEventAggregation::COUNT,
|
|
27
|
+
}),
|
|
28
|
+
group_by: [],
|
|
29
|
+
storage: "online_archives",
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
formulas: [
|
|
33
|
+
DatadogAPIClient::V1::WidgetFormula.new({
|
|
34
|
+
conditional_formats: [],
|
|
35
|
+
cell_display_mode: DatadogAPIClient::V1::TableWidgetCellDisplayMode::BAR,
|
|
36
|
+
formula: "query1",
|
|
37
|
+
limit: DatadogAPIClient::V1::WidgetFormulaLimit.new({
|
|
38
|
+
count: 50,
|
|
39
|
+
order: DatadogAPIClient::V1::QuerySortOrder::DESC,
|
|
40
|
+
}),
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::SCALAR,
|
|
44
|
+
}),
|
|
45
|
+
],
|
|
46
|
+
}),
|
|
47
|
+
}),
|
|
48
|
+
],
|
|
49
|
+
})
|
|
50
|
+
p api_instance.create_dashboard(body)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Create a new dashboard with template variable defaults returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Dashboard.new({
|
|
7
|
+
description: nil,
|
|
8
|
+
is_read_only: false,
|
|
9
|
+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
|
|
10
|
+
notify_list: [],
|
|
11
|
+
reflow_type: DatadogAPIClient::V1::DashboardReflowType::AUTO,
|
|
12
|
+
restricted_roles: [],
|
|
13
|
+
template_variables: [
|
|
14
|
+
DatadogAPIClient::V1::DashboardTemplateVariable.new({
|
|
15
|
+
available_values: [
|
|
16
|
+
"my-host",
|
|
17
|
+
"host1",
|
|
18
|
+
"host2",
|
|
19
|
+
],
|
|
20
|
+
defaults: [
|
|
21
|
+
"my-host",
|
|
22
|
+
],
|
|
23
|
+
name: "host1",
|
|
24
|
+
prefix: "host",
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
title: "",
|
|
28
|
+
widgets: [
|
|
29
|
+
DatadogAPIClient::V1::Widget.new({
|
|
30
|
+
definition: DatadogAPIClient::V1::HostMapWidgetDefinition.new({
|
|
31
|
+
requests: DatadogAPIClient::V1::HostMapWidgetDefinitionRequests.new({
|
|
32
|
+
fill: DatadogAPIClient::V1::HostMapRequest.new({
|
|
33
|
+
q: "avg:system.cpu.user{*}",
|
|
34
|
+
}),
|
|
35
|
+
}),
|
|
36
|
+
type: DatadogAPIClient::V1::HostMapWidgetDefinitionType::HOSTMAP,
|
|
37
|
+
}),
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
})
|
|
41
|
+
p api_instance.create_dashboard(body)
|
|
@@ -27,6 +27,7 @@ body = DatadogAPIClient::V1::Monitor.new({
|
|
|
27
27
|
no_data_timeframe: nil,
|
|
28
28
|
notify_audit: false,
|
|
29
29
|
notify_no_data: false,
|
|
30
|
+
on_missing_data: DatadogAPIClient::V1::OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA,
|
|
30
31
|
renotify_interval: 60,
|
|
31
32
|
require_full_window: true,
|
|
32
33
|
timeout_h: 24,
|
|
@@ -24,6 +24,7 @@ body = DatadogAPIClient::V1::Monitor.new({
|
|
|
24
24
|
no_data_timeframe: nil,
|
|
25
25
|
notify_audit: false,
|
|
26
26
|
notify_no_data: false,
|
|
27
|
+
on_missing_data: DatadogAPIClient::V1::OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA,
|
|
27
28
|
renotify_interval: 60,
|
|
28
29
|
require_full_window: true,
|
|
29
30
|
timeout_h: 24,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Validate a multi-alert monitor returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::MonitorsAPI.new
|
|
5
|
+
|
|
6
|
+
body = DatadogAPIClient::V1::Monitor.new({
|
|
7
|
+
name: "Example-Validate_a_multi_alert_monitor_returns_OK_response",
|
|
8
|
+
type: DatadogAPIClient::V1::MonitorType::LOG_ALERT,
|
|
9
|
+
query: 'logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2',
|
|
10
|
+
message: "some message Notify: @hipchat-channel",
|
|
11
|
+
tags: [
|
|
12
|
+
"test:examplevalidateamultialertmonitorreturnsokresponse",
|
|
13
|
+
"env:ci",
|
|
14
|
+
],
|
|
15
|
+
priority: 3,
|
|
16
|
+
options: DatadogAPIClient::V1::MonitorOptions.new({
|
|
17
|
+
enable_logs_sample: true,
|
|
18
|
+
escalation_message: "the situation has escalated",
|
|
19
|
+
evaluation_delay: 700,
|
|
20
|
+
group_retention_duration: "2d",
|
|
21
|
+
groupby_simple_monitor: false,
|
|
22
|
+
include_tags: true,
|
|
23
|
+
locked: false,
|
|
24
|
+
new_host_delay: 600,
|
|
25
|
+
no_data_timeframe: nil,
|
|
26
|
+
notify_audit: false,
|
|
27
|
+
notify_no_data: false,
|
|
28
|
+
on_missing_data: DatadogAPIClient::V1::OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA,
|
|
29
|
+
renotify_interval: 60,
|
|
30
|
+
require_full_window: true,
|
|
31
|
+
timeout_h: 24,
|
|
32
|
+
thresholds: DatadogAPIClient::V1::MonitorThresholds.new({
|
|
33
|
+
critical: 2,
|
|
34
|
+
warning: 1,
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
})
|
|
38
|
+
p api_instance.validate_monitor(body)
|
|
@@ -13,6 +13,7 @@ body = DatadogAPIClient::V1::SyntheticsGlobalVariable.new({
|
|
|
13
13
|
name: "MY_VARIABLE",
|
|
14
14
|
parse_test_options: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions.new({
|
|
15
15
|
field: "content-type",
|
|
16
|
+
local_variable_name: "LOCAL_VARIABLE",
|
|
16
17
|
parser: DatadogAPIClient::V1::SyntheticsVariableParser.new({
|
|
17
18
|
type: DatadogAPIClient::V1::SyntheticsGlobalVariableParserType::REGEX,
|
|
18
19
|
value: ".*",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Create a global variable from test returns "OK" response
|
|
2
|
+
|
|
3
|
+
require "datadog_api_client"
|
|
4
|
+
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
|
|
5
|
+
|
|
6
|
+
# there is a valid "synthetics_api_test_multi_step" in the system
|
|
7
|
+
SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"]
|
|
8
|
+
|
|
9
|
+
body = DatadogAPIClient::V1::SyntheticsGlobalVariable.new({
|
|
10
|
+
description: "",
|
|
11
|
+
name: "GLOBAL_VARIABLE_PAYLOAD_EXAMPLECREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE",
|
|
12
|
+
tags: [],
|
|
13
|
+
value: DatadogAPIClient::V1::SyntheticsGlobalVariableValue.new({
|
|
14
|
+
secure: false,
|
|
15
|
+
value: "",
|
|
16
|
+
}),
|
|
17
|
+
parse_test_public_id: SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID,
|
|
18
|
+
parse_test_options: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions.new({
|
|
19
|
+
type: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptionsType::LOCAL_VARIABLE,
|
|
20
|
+
local_variable_name: "EXTRACTED_VALUE",
|
|
21
|
+
}),
|
|
22
|
+
})
|
|
23
|
+
p api_instance.create_global_variable(body)
|
|
@@ -23,6 +23,16 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
|
|
|
23
23
|
target: 200,
|
|
24
24
|
}),
|
|
25
25
|
],
|
|
26
|
+
extracted_values: [
|
|
27
|
+
DatadogAPIClient::V1::SyntheticsParsingOptions.new({
|
|
28
|
+
field: "server",
|
|
29
|
+
name: "EXTRACTED_VALUE",
|
|
30
|
+
parser: DatadogAPIClient::V1::SyntheticsVariableParser.new({
|
|
31
|
+
type: DatadogAPIClient::V1::SyntheticsGlobalVariableParserType::RAW,
|
|
32
|
+
}),
|
|
33
|
+
type: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptionsType::HTTP_HEADER,
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
26
36
|
is_critical: true,
|
|
27
37
|
name: "request is sent",
|
|
28
38
|
request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
|