datadog_api_client 2.13.0 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +346 -36
- data/.generator/schemas/v2/openapi.yaml +436 -174
- data/.generator/src/generator/formatter.py +34 -29
- data/.generator/src/generator/openapi.py +3 -1
- data/.generator/src/generator/templates/api.j2 +8 -2
- data/.generator/src/generator/templates/api_client.j2 +81 -53
- data/.generator/src/generator/templates/configuration.j2 +21 -0
- data/.pre-commit-config.yaml +2 -2
- data/CHANGELOG.md +57 -0
- data/README.md +23 -0
- data/examples/v1/azure-integration/CreateAzureIntegration.rb +3 -0
- data/examples/v1/azure-integration/DeleteAzureIntegration.rb +3 -0
- data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +3 -0
- data/examples/v1/azure-integration/UpdateAzureIntegration.rb +3 -0
- data/examples/v1/dashboards/CreateDashboard_252716965.rb +6 -0
- data/examples/v1/dashboards/CreateDashboard_2618036642.rb +36 -0
- data/examples/v1/dashboards/CreateDashboard_2705593938.rb +3 -0
- data/examples/v1/dashboards/CreateDashboard_3777304439.rb +50 -0
- data/examples/v1/dashboards/DeletePublicDashboardInvitation.rb +3 -3
- data/examples/v1/dashboards/ListDashboards_1062671515.rb +8 -0
- data/examples/v1/monitors/ListMonitors_2966492814.rb +8 -0
- data/examples/v1/notebooks/ListNotebooks_788665428.rb +8 -0
- data/examples/v1/service-level-objective-corrections/ListSLOCorrection_2647266873.rb +8 -0
- data/examples/v1/service-level-objectives/ListSLOs_3036942817.rb +8 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +2 -0
- data/examples/v1/synthetics/ListTests_1938827783.rb +8 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
- data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
- data/examples/v2/downtimes/CancelDowntime.rb +0 -3
- data/examples/v2/downtimes/CreateDowntime.rb +0 -3
- data/examples/v2/downtimes/GetDowntime.rb +0 -3
- data/examples/v2/downtimes/ListDowntimes.rb +0 -3
- data/examples/v2/downtimes/ListDowntimes_805770330.rb +8 -0
- data/examples/v2/downtimes/ListMonitorDowntimes.rb +0 -3
- data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -3
- data/examples/v2/downtimes/UpdateDowntime.rb +0 -3
- data/examples/v2/logs/AggregateLogs_2955613758.rb +1 -1
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.rb +1 -1
- data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.rb +1 -1
- data/examples/v2/teams/CreateTeam.rb +2 -2
- data/examples/v2/teams/CreateTeam_252121814.rb +24 -0
- data/examples/v2/teams/GetUserMemberships.rb +8 -0
- data/examples/v2/teams/ListTeams_3592098458.rb +8 -0
- data/examples/v2/teams/UpdateTeam.rb +9 -0
- data/examples/v2/users/ListUsers_4075885358.rb +8 -0
- data/lib/datadog_api_client/api_client.rb +81 -53
- data/lib/datadog_api_client/configuration.rb +22 -6
- data/lib/datadog_api_client/inflector.rb +11 -1
- data/lib/datadog_api_client/v1/api/dashboards_api.rb +25 -0
- data/lib/datadog_api_client/v1/api/monitors_api.rb +22 -0
- data/lib/datadog_api_client/v1/api/notebooks_api.rb +21 -0
- data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +23 -2
- data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +31 -10
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +25 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
- data/lib/datadog_api_client/v1/models/azure_account.rb +32 -1
- data/lib/datadog_api_client/v1/models/distribution_widget_definition.rb +13 -1
- data/lib/datadog_api_client/v1/models/heat_map_widget_request.rb +35 -1
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +4 -0
- data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
- data/lib/datadog_api_client/v1/models/monitor.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +81 -1
- data/lib/datadog_api_client/v1/models/sunburst_widget_request.rb +14 -4
- data/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_assertion_timings_scope.rb +27 -0
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
- data/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_profiling_hour.rb +12 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +44 -4
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +44 -4
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +44 -4
- data/lib/datadog_api_client/v1/models/widget_comparator.rb +1 -0
- data/lib/datadog_api_client/v2/api/audit_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +11 -7
- data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +25 -36
- data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/processes_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/rum_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +6 -6
- data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/spans_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/spans_metrics_api.rb +2 -2
- data/lib/datadog_api_client/v2/api/teams_api.rb +87 -0
- data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
- data/lib/datadog_api_client/v2/api/users_api.rb +22 -0
- data/lib/datadog_api_client/v2/models/application_key_create_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/application_key_update_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb +9 -21
- data/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb +1 -1
- data/lib/datadog_api_client/v2/models/{team_data.rb → ci_app_pipeline_event_attributes.rb} +24 -62
- data/lib/datadog_api_client/v2/models/ci_app_pipeline_level.rb +30 -0
- data/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_test_level.rb +29 -0
- data/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb +1 -1
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb +25 -1
- data/lib/datadog_api_client/v2/models/dashboard_list_item.rb +25 -1
- data/lib/datadog_api_client/v2/models/downtime_relationships_monitor_data.rb +1 -1
- data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb +19 -1
- data/lib/datadog_api_client/v2/models/formula_limit.rb +1 -0
- data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_group_by.rb +3 -2
- data/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_list_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_query_options.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb +1 -1
- data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +14 -4
- data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/query_formula.rb +1 -0
- data/lib/datadog_api_client/v2/models/relationship_to_team_links.rb +14 -4
- data/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb +14 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_metadata_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb +80 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb +26 -2
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb +24 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb +24 -4
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +1 -19
- data/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/team_attributes.rb +50 -4
- data/lib/datadog_api_client/v2/models/team_create_attributes.rb +57 -4
- data/lib/datadog_api_client/v2/models/team_relationships_links.rb +80 -0
- data/lib/datadog_api_client/v2/models/team_response.rb +1 -1
- data/lib/datadog_api_client/v2/models/team_update_attributes.rb +57 -4
- data/lib/datadog_api_client/v2/models/teams_response.rb +24 -4
- data/lib/datadog_api_client/v2/models/teams_response_links.rb +129 -0
- data/lib/datadog_api_client/v2/models/teams_response_meta.rb +80 -0
- data/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb +150 -0
- data/lib/datadog_api_client/v2/models/usage_attributes_object.rb +11 -1
- data/lib/datadog_api_client/v2/models/user_teams_response.rb +24 -4
- data/lib/datadog_api_client/version.rb +1 -1
- data/spec/configuration_spec.rb +17 -0
- data/spec/retry_spec.rb +44 -0
- metadata +28 -3
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
|
|
33
33
|
|
34
34
|
# Aggregate pipelines events.
|
35
35
|
#
|
36
|
-
#
|
36
|
+
# Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries.
|
37
37
|
#
|
38
38
|
# @param body [CIAppPipelinesAggregateRequest]
|
39
39
|
# @param opts [Hash] the optional parameters
|
@@ -100,16 +100,20 @@ module DatadogAPIClient::V2
|
|
100
100
|
|
101
101
|
# Send pipeline event.
|
102
102
|
#
|
103
|
-
# Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see
|
103
|
+
# Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).
|
104
104
|
#
|
105
105
|
# Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
|
106
106
|
#
|
107
|
-
# This API endpoint is in private beta.
|
108
|
-
#
|
109
107
|
# @param body [CIAppCreatePipelineEventRequest]
|
110
108
|
# @param opts [Hash] the optional parameters
|
111
109
|
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
112
110
|
def create_ci_app_pipeline_event_with_http_info(body, opts = {})
|
111
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym]
|
112
|
+
if unstable_enabled
|
113
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ci_app_pipeline_event")
|
114
|
+
else
|
115
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ci_app_pipeline_event"))
|
116
|
+
end
|
113
117
|
|
114
118
|
if @api_client.config.debugging
|
115
119
|
@api_client.config.logger.debug 'Calling API: CIVisibilityPipelinesAPI.create_ci_app_pipeline_event ...'
|
@@ -171,7 +175,7 @@ module DatadogAPIClient::V2
|
|
171
175
|
|
172
176
|
# Get a list of pipelines events.
|
173
177
|
#
|
174
|
-
# List endpoint returns CI Visibility pipeline events that match a [
|
178
|
+
# List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
|
175
179
|
# [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
|
176
180
|
#
|
177
181
|
# Use this endpoint to see your latest pipeline events.
|
@@ -260,7 +264,7 @@ module DatadogAPIClient::V2
|
|
260
264
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
261
265
|
break
|
262
266
|
end
|
263
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
267
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
264
268
|
end
|
265
269
|
end
|
266
270
|
|
@@ -274,7 +278,7 @@ module DatadogAPIClient::V2
|
|
274
278
|
|
275
279
|
# Search pipelines events.
|
276
280
|
#
|
277
|
-
# List endpoint returns CI Visibility pipeline events that match a [
|
281
|
+
# List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
|
278
282
|
# [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
|
279
283
|
#
|
280
284
|
# Use this endpoint to build complex events filtering and search.
|
@@ -189,7 +189,7 @@ module DatadogAPIClient::V2
|
|
189
189
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
190
190
|
break
|
191
191
|
end
|
192
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
192
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
193
193
|
end
|
194
194
|
end
|
195
195
|
|
@@ -39,12 +39,6 @@ module DatadogAPIClient::V2
|
|
39
39
|
# @param opts [Hash] the optional parameters
|
40
40
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
41
|
def cancel_downtime_with_http_info(downtime_id, opts = {})
|
42
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.cancel_downtime".to_sym]
|
43
|
-
if unstable_enabled
|
44
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.cancel_downtime")
|
45
|
-
else
|
46
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.cancel_downtime"))
|
47
|
-
end
|
48
42
|
|
49
43
|
if @api_client.config.debugging
|
50
44
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.cancel_downtime ...'
|
@@ -110,12 +104,6 @@ module DatadogAPIClient::V2
|
|
110
104
|
# @param opts [Hash] the optional parameters
|
111
105
|
# @return [Array<(DowntimeResponse, Integer, Hash)>] DowntimeResponse data, response status code and response headers
|
112
106
|
def create_downtime_with_http_info(body, opts = {})
|
113
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.create_downtime".to_sym]
|
114
|
-
if unstable_enabled
|
115
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_downtime")
|
116
|
-
else
|
117
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_downtime"))
|
118
|
-
end
|
119
107
|
|
120
108
|
if @api_client.config.debugging
|
121
109
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.create_downtime ...'
|
@@ -184,12 +172,6 @@ module DatadogAPIClient::V2
|
|
184
172
|
# @option opts [String] :include Comma-separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `monitor`.
|
185
173
|
# @return [Array<(DowntimeResponse, Integer, Hash)>] DowntimeResponse data, response status code and response headers
|
186
174
|
def get_downtime_with_http_info(downtime_id, opts = {})
|
187
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.get_downtime".to_sym]
|
188
|
-
if unstable_enabled
|
189
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_downtime")
|
190
|
-
else
|
191
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_downtime"))
|
192
|
-
end
|
193
175
|
|
194
176
|
if @api_client.config.debugging
|
195
177
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.get_downtime ...'
|
@@ -255,14 +237,10 @@ module DatadogAPIClient::V2
|
|
255
237
|
# @param opts [Hash] the optional parameters
|
256
238
|
# @option opts [Boolean] :current_only Only return downtimes that are active when the request is made.
|
257
239
|
# @option opts [String] :include Comma-separated list of resource paths for related resources to include in the response. Supported resource paths are `created_by` and `monitor`.
|
240
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
241
|
+
# @option opts [Integer] :page_limit Maximum number of downtimes in the response.
|
258
242
|
# @return [Array<(ListDowntimesResponse, Integer, Hash)>] ListDowntimesResponse data, response status code and response headers
|
259
243
|
def list_downtimes_with_http_info(opts = {})
|
260
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_downtimes".to_sym]
|
261
|
-
if unstable_enabled
|
262
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_downtimes")
|
263
|
-
else
|
264
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_downtimes"))
|
265
|
-
end
|
266
244
|
|
267
245
|
if @api_client.config.debugging
|
268
246
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.list_downtimes ...'
|
@@ -274,6 +252,8 @@ module DatadogAPIClient::V2
|
|
274
252
|
query_params = opts[:query_params] || {}
|
275
253
|
query_params[:'current_only'] = opts[:'current_only'] if !opts[:'current_only'].nil?
|
276
254
|
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
255
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
256
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
277
257
|
|
278
258
|
# header parameters
|
279
259
|
header_params = opts[:header_params] || {}
|
@@ -310,6 +290,27 @@ module DatadogAPIClient::V2
|
|
310
290
|
return data, status_code, headers
|
311
291
|
end
|
312
292
|
|
293
|
+
# Get all downtimes.
|
294
|
+
#
|
295
|
+
# Provide a paginated version of {#list_downtimes}, returning all items.
|
296
|
+
#
|
297
|
+
# To use it you need to use a block: list_downtimes_with_pagination { |item| p item }
|
298
|
+
#
|
299
|
+
# @yield [DowntimeResponseData] Paginated items
|
300
|
+
def list_downtimes_with_pagination(opts = {})
|
301
|
+
api_version = "V2"
|
302
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 30)
|
303
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
304
|
+
while true do
|
305
|
+
response = list_downtimes(opts)
|
306
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
307
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
308
|
+
break
|
309
|
+
end
|
310
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
313
314
|
# Get active downtimes for a monitor.
|
314
315
|
#
|
315
316
|
# @see #list_monitor_downtimes_with_http_info
|
@@ -326,12 +327,6 @@ module DatadogAPIClient::V2
|
|
326
327
|
# @param opts [Hash] the optional parameters
|
327
328
|
# @return [Array<(MonitorDowntimeMatchResponse, Integer, Hash)>] MonitorDowntimeMatchResponse data, response status code and response headers
|
328
329
|
def list_monitor_downtimes_with_http_info(monitor_id, opts = {})
|
329
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.list_monitor_downtimes".to_sym]
|
330
|
-
if unstable_enabled
|
331
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_monitor_downtimes")
|
332
|
-
else
|
333
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_monitor_downtimes"))
|
334
|
-
end
|
335
330
|
|
336
331
|
if @api_client.config.debugging
|
337
332
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.list_monitor_downtimes ...'
|
@@ -398,12 +393,6 @@ module DatadogAPIClient::V2
|
|
398
393
|
# @param opts [Hash] the optional parameters
|
399
394
|
# @return [Array<(DowntimeResponse, Integer, Hash)>] DowntimeResponse data, response status code and response headers
|
400
395
|
def update_downtime_with_http_info(downtime_id, body, opts = {})
|
401
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.update_downtime".to_sym]
|
402
|
-
if unstable_enabled
|
403
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_downtime")
|
404
|
-
else
|
405
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_downtime"))
|
406
|
-
end
|
407
396
|
|
408
397
|
if @api_client.config.debugging
|
409
398
|
@api_client.config.logger.debug 'Calling API: DowntimesAPI.update_downtime ...'
|
@@ -128,7 +128,7 @@ module DatadogAPIClient::V2
|
|
128
128
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
129
129
|
break
|
130
130
|
end
|
131
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
131
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
@@ -63,7 +63,7 @@ module DatadogAPIClient::V2
|
|
63
63
|
return_type = opts[:debug_return_type] || 'IPAllowlistResponse'
|
64
64
|
|
65
65
|
# auth_names
|
66
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
66
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
67
67
|
|
68
68
|
new_options = opts.merge(
|
69
69
|
:operation => :get_ip_allowlist,
|
@@ -130,7 +130,7 @@ module DatadogAPIClient::V2
|
|
130
130
|
return_type = opts[:debug_return_type] || 'IPAllowlistResponse'
|
131
131
|
|
132
132
|
# auth_names
|
133
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
133
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
134
134
|
|
135
135
|
new_options = opts.merge(
|
136
136
|
:operation => :update_ip_allowlist,
|
@@ -298,7 +298,7 @@ module DatadogAPIClient::V2
|
|
298
298
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
299
299
|
break
|
300
300
|
end
|
301
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
301
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
302
302
|
end
|
303
303
|
end
|
304
304
|
|
@@ -541,7 +541,7 @@ module DatadogAPIClient::V2
|
|
541
541
|
# @option opts [Boolean] :filter_include_percentiles Filter distributions with additional percentile aggregations enabled or disabled.
|
542
542
|
# @option opts [Boolean] :filter_queried Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
|
543
543
|
# @option opts [String] :filter_tags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Can only be combined with the filter[queried] filter.
|
544
|
-
# @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query.
|
544
|
+
# @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).
|
545
545
|
# @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers
|
546
546
|
def list_tag_configurations_with_http_info(opts = {})
|
547
547
|
|
@@ -111,7 +111,7 @@ module DatadogAPIClient::V2
|
|
111
111
|
def list_processes_with_pagination(opts = {})
|
112
112
|
api_version = "V2"
|
113
113
|
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 1000)
|
114
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_limit",
|
114
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
115
115
|
while true do
|
116
116
|
response = list_processes(opts)
|
117
117
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
@@ -448,7 +448,7 @@ module DatadogAPIClient::V2
|
|
448
448
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
449
449
|
break
|
450
450
|
end
|
451
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
451
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
452
452
|
end
|
453
453
|
end
|
454
454
|
|
@@ -729,7 +729,7 @@ module DatadogAPIClient::V2
|
|
729
729
|
#
|
730
730
|
# @param signal_id [String] The ID of the signal.
|
731
731
|
# @param opts [Hash] the optional parameters
|
732
|
-
# @return [Array<(
|
732
|
+
# @return [Array<(SecurityMonitoringSignalResponse, Integer, Hash)>] SecurityMonitoringSignalResponse data, response status code and response headers
|
733
733
|
def get_security_monitoring_signal_with_http_info(signal_id, opts = {})
|
734
734
|
|
735
735
|
if @api_client.config.debugging
|
@@ -757,7 +757,7 @@ module DatadogAPIClient::V2
|
|
757
757
|
post_body = opts[:debug_body]
|
758
758
|
|
759
759
|
# return_type
|
760
|
-
return_type = opts[:debug_return_type] || '
|
760
|
+
return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalResponse'
|
761
761
|
|
762
762
|
# auth_names
|
763
763
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
@@ -927,14 +927,14 @@ module DatadogAPIClient::V2
|
|
927
927
|
def list_findings_with_pagination(opts = {})
|
928
928
|
api_version = "V2"
|
929
929
|
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100)
|
930
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_limit",
|
930
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
931
931
|
while true do
|
932
932
|
response = list_findings(opts)
|
933
933
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
934
934
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
935
935
|
break
|
936
936
|
end
|
937
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
937
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.cursor"))
|
938
938
|
end
|
939
939
|
end
|
940
940
|
|
@@ -1160,7 +1160,7 @@ module DatadogAPIClient::V2
|
|
1160
1160
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
1161
1161
|
break
|
1162
1162
|
end
|
1163
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
1163
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
1164
1164
|
end
|
1165
1165
|
end
|
1166
1166
|
|
@@ -1309,7 +1309,7 @@ module DatadogAPIClient::V2
|
|
1309
1309
|
return_type = opts[:debug_return_type] || 'MuteFindingResponse'
|
1310
1310
|
|
1311
1311
|
# auth_names
|
1312
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
1312
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
1313
1313
|
|
1314
1314
|
new_options = opts.merge(
|
1315
1315
|
:operation => :update_finding,
|
@@ -306,14 +306,14 @@ module DatadogAPIClient::V2
|
|
306
306
|
def list_service_definitions_with_pagination(opts = {})
|
307
307
|
api_version = "V2"
|
308
308
|
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
309
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_size",
|
309
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
310
310
|
while true do
|
311
311
|
response = list_service_definitions(opts)
|
312
312
|
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
313
313
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
314
314
|
break
|
315
315
|
end
|
316
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_number",
|
316
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + page_size)
|
317
317
|
end
|
318
318
|
end
|
319
319
|
end
|
@@ -287,7 +287,7 @@ module DatadogAPIClient::V2
|
|
287
287
|
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
288
288
|
break
|
289
289
|
end
|
290
|
-
@api_client.set_attribute_from_path(api_version, opts, "page_cursor",
|
290
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_cursor", String, @api_client.get_attribute_from_path(response, "meta.page.after"))
|
291
291
|
end
|
292
292
|
end
|
293
293
|
end
|
@@ -201,7 +201,7 @@ module DatadogAPIClient::V2
|
|
201
201
|
return_type = opts[:debug_return_type] || 'SpansMetricResponse'
|
202
202
|
|
203
203
|
# auth_names
|
204
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
204
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
205
205
|
|
206
206
|
new_options = opts.merge(
|
207
207
|
:operation => :get_spans_metric,
|
@@ -261,7 +261,7 @@ module DatadogAPIClient::V2
|
|
261
261
|
return_type = opts[:debug_return_type] || 'SpansMetricsResponse'
|
262
262
|
|
263
263
|
# auth_names
|
264
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth
|
264
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
265
265
|
|
266
266
|
new_options = opts.merge(
|
267
267
|
:operation => :list_spans_metrics,
|
@@ -782,6 +782,71 @@ module DatadogAPIClient::V2
|
|
782
782
|
return data, status_code, headers
|
783
783
|
end
|
784
784
|
|
785
|
+
# Get user memberships.
|
786
|
+
#
|
787
|
+
# @see #get_user_memberships_with_http_info
|
788
|
+
def get_user_memberships(user_uuid, opts = {})
|
789
|
+
data, _status_code, _headers = get_user_memberships_with_http_info(user_uuid, opts)
|
790
|
+
data
|
791
|
+
end
|
792
|
+
|
793
|
+
# Get user memberships.
|
794
|
+
#
|
795
|
+
# Get a list of memberships for a user
|
796
|
+
#
|
797
|
+
# @param user_uuid [String] None
|
798
|
+
# @param opts [Hash] the optional parameters
|
799
|
+
# @return [Array<(UserTeamsResponse, Integer, Hash)>] UserTeamsResponse data, response status code and response headers
|
800
|
+
def get_user_memberships_with_http_info(user_uuid, opts = {})
|
801
|
+
|
802
|
+
if @api_client.config.debugging
|
803
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.get_user_memberships ...'
|
804
|
+
end
|
805
|
+
# verify the required parameter 'user_uuid' is set
|
806
|
+
if @api_client.config.client_side_validation && user_uuid.nil?
|
807
|
+
fail ArgumentError, "Missing the required parameter 'user_uuid' when calling TeamsAPI.get_user_memberships"
|
808
|
+
end
|
809
|
+
# resource path
|
810
|
+
local_var_path = '/api/v2/users/{user_uuid}/memberships'.sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/'))
|
811
|
+
|
812
|
+
# query parameters
|
813
|
+
query_params = opts[:query_params] || {}
|
814
|
+
|
815
|
+
# header parameters
|
816
|
+
header_params = opts[:header_params] || {}
|
817
|
+
# HTTP header 'Accept' (if needed)
|
818
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
819
|
+
|
820
|
+
# form parameters
|
821
|
+
form_params = opts[:form_params] || {}
|
822
|
+
|
823
|
+
# http body (model)
|
824
|
+
post_body = opts[:debug_body]
|
825
|
+
|
826
|
+
# return_type
|
827
|
+
return_type = opts[:debug_return_type] || 'UserTeamsResponse'
|
828
|
+
|
829
|
+
# auth_names
|
830
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
831
|
+
|
832
|
+
new_options = opts.merge(
|
833
|
+
:operation => :get_user_memberships,
|
834
|
+
:header_params => header_params,
|
835
|
+
:query_params => query_params,
|
836
|
+
:form_params => form_params,
|
837
|
+
:body => post_body,
|
838
|
+
:auth_names => auth_names,
|
839
|
+
:return_type => return_type,
|
840
|
+
:api_version => "V2"
|
841
|
+
)
|
842
|
+
|
843
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
844
|
+
if @api_client.config.debugging
|
845
|
+
@api_client.config.logger.debug "API called: TeamsAPI#get_user_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
846
|
+
end
|
847
|
+
return data, status_code, headers
|
848
|
+
end
|
849
|
+
|
785
850
|
# Get all teams.
|
786
851
|
#
|
787
852
|
# @see #list_teams_with_http_info
|
@@ -859,6 +924,28 @@ module DatadogAPIClient::V2
|
|
859
924
|
return data, status_code, headers
|
860
925
|
end
|
861
926
|
|
927
|
+
# Get all teams.
|
928
|
+
#
|
929
|
+
# Provide a paginated version of {#list_teams}, returning all items.
|
930
|
+
#
|
931
|
+
# To use it you need to use a block: list_teams_with_pagination { |item| p item }
|
932
|
+
#
|
933
|
+
# @yield [Team] Paginated items
|
934
|
+
def list_teams_with_pagination(opts = {})
|
935
|
+
api_version = "V2"
|
936
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
937
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
938
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
|
939
|
+
while true do
|
940
|
+
response = list_teams(opts)
|
941
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
942
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
943
|
+
break
|
944
|
+
end
|
945
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1)
|
946
|
+
end
|
947
|
+
end
|
948
|
+
|
862
949
|
# Update a team.
|
863
950
|
#
|
864
951
|
# @see #update_team_with_http_info
|
@@ -255,7 +255,7 @@ module DatadogAPIClient::V2
|
|
255
255
|
# Get hourly usage by product family.
|
256
256
|
#
|
257
257
|
# @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
|
258
|
-
# @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
|
258
|
+
# @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_trail`, `serverless`, `ci_app`, `cloud_cost_management`, `cspm`, `custom_events`, `cws`, `dbm`, `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, `lambda_traced_invocations`, `logs`, `network_flows`, `network_hosts`, `observability_pipelines`, `online_archive`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, `sds`, `snmp`, `synthetics_api`, `synthetics_browser`, `synthetics_mobile`, `synthetics_parallel_testing`, and `timeseries`. The following product family has been **deprecated**: `audit_logs`.
|
259
259
|
# @param opts [Hash] the optional parameters
|
260
260
|
# @option opts [Time] :filter_timestamp_end Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour.
|
261
261
|
# @option opts [Boolean] :filter_include_descendants Include child org usage in the response. Defaults to false.
|
@@ -495,6 +495,28 @@ module DatadogAPIClient::V2
|
|
495
495
|
return data, status_code, headers
|
496
496
|
end
|
497
497
|
|
498
|
+
# List all users.
|
499
|
+
#
|
500
|
+
# Provide a paginated version of {#list_users}, returning all items.
|
501
|
+
#
|
502
|
+
# To use it you need to use a block: list_users_with_pagination { |item| p item }
|
503
|
+
#
|
504
|
+
# @yield [User] Paginated items
|
505
|
+
def list_users_with_pagination(opts = {})
|
506
|
+
api_version = "V2"
|
507
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
508
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
509
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
|
510
|
+
while true do
|
511
|
+
response = list_users(opts)
|
512
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
513
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
514
|
+
break
|
515
|
+
end
|
516
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1)
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
498
520
|
# Send invitation emails.
|
499
521
|
#
|
500
522
|
# @see #send_invitations_with_http_info
|
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
|
|
24
24
|
# Name of the application key.
|
25
25
|
attr_reader :name
|
26
26
|
|
27
|
-
# Array of scopes to grant the application key.
|
27
|
+
# Array of scopes to grant the application key.
|
28
28
|
attr_accessor :scopes
|
29
29
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
|
|
24
24
|
# Name of the application key.
|
25
25
|
attr_accessor :name
|
26
26
|
|
27
|
-
# Array of scopes to grant the application key.
|
27
|
+
# Array of scopes to grant the application key.
|
28
28
|
attr_accessor :scopes
|
29
29
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -24,6 +24,9 @@ module DatadogAPIClient::V2
|
|
24
24
|
# JSON object of attributes from Audit Logs events.
|
25
25
|
attr_accessor :attributes
|
26
26
|
|
27
|
+
# Message of the event.
|
28
|
+
attr_accessor :message
|
29
|
+
|
27
30
|
# Name of the application or service generating Audit Logs events.
|
28
31
|
# This name is used to correlate Audit Logs to APM, so make sure you specify the same
|
29
32
|
# value when you use both products.
|
@@ -40,6 +43,7 @@ module DatadogAPIClient::V2
|
|
40
43
|
def self.attribute_map
|
41
44
|
{
|
42
45
|
:'attributes' => :'attributes',
|
46
|
+
:'message' => :'message',
|
43
47
|
:'service' => :'service',
|
44
48
|
:'tags' => :'tags',
|
45
49
|
:'timestamp' => :'timestamp'
|
@@ -51,6 +55,7 @@ module DatadogAPIClient::V2
|
|
51
55
|
def self.openapi_types
|
52
56
|
{
|
53
57
|
:'attributes' => :'Hash<String, Object>',
|
58
|
+
:'message' => :'String',
|
54
59
|
:'service' => :'String',
|
55
60
|
:'tags' => :'Array<String>',
|
56
61
|
:'timestamp' => :'Time'
|
@@ -77,6 +82,10 @@ module DatadogAPIClient::V2
|
|
77
82
|
self.attributes = attributes[:'attributes']
|
78
83
|
end
|
79
84
|
|
85
|
+
if attributes.key?(:'message')
|
86
|
+
self.message = attributes[:'message']
|
87
|
+
end
|
88
|
+
|
80
89
|
if attributes.key?(:'service')
|
81
90
|
self.service = attributes[:'service']
|
82
91
|
end
|
@@ -99,6 +108,7 @@ module DatadogAPIClient::V2
|
|
99
108
|
return true if self.equal?(o)
|
100
109
|
self.class == o.class &&
|
101
110
|
attributes == o.attributes &&
|
111
|
+
message == o.message &&
|
102
112
|
service == o.service &&
|
103
113
|
tags == o.tags &&
|
104
114
|
timestamp == o.timestamp
|
@@ -108,7 +118,7 @@ module DatadogAPIClient::V2
|
|
108
118
|
# @return [Integer] Hash code
|
109
119
|
# @!visibility private
|
110
120
|
def hash
|
111
|
-
[attributes, service, tags, timestamp].hash
|
121
|
+
[attributes, message, service, tags, timestamp].hash
|
112
122
|
end
|
113
123
|
end
|
114
124
|
end
|