datadog_api_client 2.3.0 → 2.4.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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +229 -6
  4. data/.generator/schemas/v2/openapi.yaml +1295 -335
  5. data/.github/workflows/docs.yml +2 -0
  6. data/.github/workflows/test.yml +2 -0
  7. data/CHANGELOG.md +19 -0
  8. data/examples/v1/logs-indexes/UpdateLogsIndex.rb +3 -0
  9. data/examples/v1/monitors/CreateMonitor_2012680290.rb +23 -0
  10. data/examples/v1/service-level-objectives/GetSLOHistory.rb +0 -3
  11. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +9 -0
  12. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  13. data/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.rb +33 -0
  14. data/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.rb +11 -0
  15. data/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.rb +10 -0
  16. data/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.rb +23 -0
  17. data/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.rb +22 -0
  18. data/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.rb +36 -0
  19. data/examples/v2/ci-visibility-tests/ListCIAppTestEvents.rb +11 -0
  20. data/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.rb +10 -0
  21. data/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.rb +23 -0
  22. data/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.rb +20 -0
  23. data/examples/v2/security-monitoring/GetSecurityMonitoringRule.rb +4 -1
  24. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +23 -33
  25. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
  26. data/examples/v2/service-definition/DeleteServiceDefinition.rb +1 -1
  27. data/examples/v2/service-definition/GetServiceDefinition.rb +1 -1
  28. data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +1 -1
  29. data/lib/datadog_api_client/configuration.rb +0 -1
  30. data/lib/datadog_api_client/inflector.rb +49 -0
  31. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +0 -6
  32. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  33. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  34. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +4 -0
  35. data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
  36. data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +98 -0
  37. data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb +148 -0
  38. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  39. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
  40. data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +2 -1
  41. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_operator.rb +26 -0
  42. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target.rb +150 -0
  43. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb +118 -0
  44. data/lib/datadog_api_client/v1/models/synthetics_step.rb +11 -1
  45. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +2 -2
  46. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +31 -0
  48. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  49. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  50. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
  51. data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
  52. data/lib/datadog_api_client/v1/models/usage_sds_hour.rb +31 -1
  53. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
  54. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
  55. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
  56. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +283 -0
  57. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +283 -0
  58. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +1 -1
  59. data/lib/datadog_api_client/v2/api/logs_api.rb +6 -0
  60. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -2
  61. data/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value.rb +64 -0
  62. data/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value_timeseries_point.rb +108 -0
  63. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +128 -0
  64. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort_type.rb +27 -0
  65. data/lib/datadog_api_client/v2/models/ci_app_aggregation_function.rb +37 -0
  66. data/lib/datadog_api_client/v2/models/ci_app_compute.rb +140 -0
  67. data/lib/datadog_api_client/v2/models/ci_app_compute_type.rb +27 -0
  68. data/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb +132 -0
  69. data/lib/datadog_api_client/v2/models/ci_app_group_by_histogram.rb +154 -0
  70. data/lib/datadog_api_client/v2/models/ci_app_group_by_missing.rb +63 -0
  71. data/lib/datadog_api_client/v2/models/ci_app_group_by_total.rb +64 -0
  72. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb +118 -0
  73. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event_type_name.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/ci_app_pipeline_events_request.rb +129 -0
  75. data/lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb +120 -0
  76. data/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregate_request.rb +143 -0
  77. data/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregation_buckets_response.rb +100 -0
  78. data/lib/datadog_api_client/v2/models/ci_app_pipelines_analytics_aggregate_response.rb +118 -0
  79. data/lib/datadog_api_client/v2/models/ci_app_pipelines_bucket_response.rb +108 -0
  80. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +160 -0
  81. data/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb +118 -0
  82. data/lib/datadog_api_client/v2/models/ci_app_query_options.rb +109 -0
  83. data/lib/datadog_api_client/v2/models/ci_app_query_page_options.rb +119 -0
  84. data/lib/datadog_api_client/v2/models/ci_app_response_links.rb +99 -0
  85. data/lib/datadog_api_client/v2/models/ci_app_response_metadata.rb +141 -0
  86. data/lib/datadog_api_client/v2/models/ci_app_response_page.rb +98 -0
  87. data/lib/datadog_api_client/v2/models/ci_app_response_status.rb +27 -0
  88. data/lib/datadog_api_client/v2/models/ci_app_sort.rb +27 -0
  89. data/lib/datadog_api_client/v2/models/ci_app_sort_order.rb +27 -0
  90. data/lib/datadog_api_client/v2/models/ci_app_test_event.rb +118 -0
  91. data/lib/datadog_api_client/v2/models/ci_app_test_event_type_name.rb +26 -0
  92. data/lib/datadog_api_client/v2/models/ci_app_test_events_request.rb +129 -0
  93. data/lib/datadog_api_client/v2/models/ci_app_test_events_response.rb +120 -0
  94. data/lib/datadog_api_client/v2/models/ci_app_tests_aggregate_request.rb +143 -0
  95. data/lib/datadog_api_client/v2/models/ci_app_tests_aggregation_buckets_response.rb +100 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb +118 -0
  97. data/lib/datadog_api_client/v2/models/ci_app_tests_bucket_response.rb +108 -0
  98. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +160 -0
  99. data/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb +118 -0
  100. data/lib/datadog_api_client/v2/models/ci_app_warning.rb +118 -0
  101. data/lib/datadog_api_client/v2/models/logs_query_filter.rb +11 -1
  102. data/lib/datadog_api_client/v2/models/logs_storage_tier.rb +27 -0
  103. data/lib/datadog_api_client/v2/models/rum_query_filter.rb +2 -2
  104. data/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb +14 -14
  105. data/lib/datadog_api_client/version.rb +1 -1
  106. metadata +62 -3
  107. data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +0 -9
@@ -0,0 +1,283 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'cgi'
17
+
18
+ module DatadogAPIClient::V2
19
+ class CIVisibilityTestsAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Aggregate tests events.
27
+ #
28
+ # @see #aggregate_ci_app_test_events_with_http_info
29
+ def aggregate_ci_app_test_events(body, opts = {})
30
+ data, _status_code, _headers = aggregate_ci_app_test_events_with_http_info(body, opts)
31
+ data
32
+ end
33
+
34
+ # Aggregate tests events.
35
+ #
36
+ # The API endpoint to aggregate CI Visibility test events into buckets of computed metrics and timeseries.
37
+ #
38
+ # @param body [CIAppTestsAggregateRequest]
39
+ # @param opts [Hash] the optional parameters
40
+ # @return [Array<(CIAppTestsAnalyticsAggregateResponse, Integer, Hash)>] CIAppTestsAnalyticsAggregateResponse data, response status code and response headers
41
+ def aggregate_ci_app_test_events_with_http_info(body, opts = {})
42
+
43
+ if @api_client.config.debugging
44
+ @api_client.config.logger.debug 'Calling API: CIVisibilityTestsAPI.aggregate_ci_app_test_events ...'
45
+ end
46
+ # verify the required parameter 'body' is set
47
+ if @api_client.config.client_side_validation && body.nil?
48
+ fail ArgumentError, "Missing the required parameter 'body' when calling CIVisibilityTestsAPI.aggregate_ci_app_test_events"
49
+ end
50
+ # resource path
51
+ local_var_path = '/api/v2/ci/tests/analytics/aggregate'
52
+
53
+ # query parameters
54
+ query_params = opts[:query_params] || {}
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+ # HTTP header 'Content-Type'
61
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'CIAppTestsAnalyticsAggregateResponse'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
74
+
75
+ new_options = opts.merge(
76
+ :operation => :aggregate_ci_app_test_events,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type,
83
+ :api_version => "V2"
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: CIVisibilityTestsAPI#aggregate_ci_app_test_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Get a list of tests events.
94
+ #
95
+ # @see #list_ci_app_test_events_with_http_info
96
+ def list_ci_app_test_events(opts = {})
97
+ data, _status_code, _headers = list_ci_app_test_events_with_http_info(opts)
98
+ data
99
+ end
100
+
101
+ # Get a list of tests events.
102
+ #
103
+ # List endpoint returns CI Visibility test events that match a log search query.
104
+ # [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
105
+ #
106
+ # Use this endpoint to see your latest test events.
107
+ #
108
+ # @param opts [Hash] the optional parameters
109
+ # @option opts [String] :filter_query Search query following log syntax.
110
+ # @option opts [Time] :filter_from Minimum timestamp for requested events.
111
+ # @option opts [Time] :filter_to Maximum timestamp for requested events.
112
+ # @option opts [CIAppSort] :sort Order of events in results.
113
+ # @option opts [String] :page_cursor List following results with a cursor provided in the previous query.
114
+ # @option opts [Integer] :page_limit Maximum number of events in the response.
115
+ # @return [Array<(CIAppTestEventsResponse, Integer, Hash)>] CIAppTestEventsResponse data, response status code and response headers
116
+ def list_ci_app_test_events_with_http_info(opts = {})
117
+
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: CIVisibilityTestsAPI.list_ci_app_test_events ...'
120
+ end
121
+ allowable_values = ['timestamp', '-timestamp']
122
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
123
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
124
+ end
125
+ if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000
126
+ fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling CIVisibilityTestsAPI.list_ci_app_test_events, must be smaller than or equal to 1000.'
127
+ end
128
+ # resource path
129
+ local_var_path = '/api/v2/ci/tests/events'
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+ query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil?
134
+ query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil?
135
+ query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil?
136
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
137
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
138
+ query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
139
+
140
+ # header parameters
141
+ header_params = opts[:header_params] || {}
142
+ # HTTP header 'Accept' (if needed)
143
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
144
+
145
+ # form parameters
146
+ form_params = opts[:form_params] || {}
147
+
148
+ # http body (model)
149
+ post_body = opts[:debug_body]
150
+
151
+ # return_type
152
+ return_type = opts[:debug_return_type] || 'CIAppTestEventsResponse'
153
+
154
+ # auth_names
155
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
156
+
157
+ new_options = opts.merge(
158
+ :operation => :list_ci_app_test_events,
159
+ :header_params => header_params,
160
+ :query_params => query_params,
161
+ :form_params => form_params,
162
+ :body => post_body,
163
+ :auth_names => auth_names,
164
+ :return_type => return_type,
165
+ :api_version => "V2"
166
+ )
167
+
168
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "API called: CIVisibilityTestsAPI#list_ci_app_test_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
+ end
172
+ return data, status_code, headers
173
+ end
174
+
175
+ # Get a list of tests events.
176
+ #
177
+ # Provide a paginated version of {#list_ci_app_test_events}, returning all items.
178
+ #
179
+ # To use it you need to use a block: list_ci_app_test_events_with_pagination { |item| p item }
180
+ #
181
+ # @yield [CIAppTestEvent] Paginated items
182
+ def list_ci_app_test_events_with_pagination(opts = {})
183
+ api_version = "V2"
184
+ page_size = @api_client.get_attribute_from_path(opts, "page_limit", 10)
185
+ @api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
186
+ while true do
187
+ response = list_ci_app_test_events(opts)
188
+ @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
189
+ if @api_client.get_attribute_from_path(response, "data").length < page_size
190
+ break
191
+ end
192
+ @api_client.set_attribute_from_path(api_version, opts, "page_cursor", Integer, @api_client.get_attribute_from_path(response, "meta.page.after"))
193
+ end
194
+ end
195
+
196
+ # Search tests events.
197
+ #
198
+ # @see #search_ci_app_test_events_with_http_info
199
+ def search_ci_app_test_events(opts = {})
200
+ data, _status_code, _headers = search_ci_app_test_events_with_http_info(opts)
201
+ data
202
+ end
203
+
204
+ # Search tests events.
205
+ #
206
+ # List endpoint returns CI Visibility test events that match a log search query.
207
+ # [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
208
+ #
209
+ # Use this endpoint to build complex events filtering and search.
210
+ #
211
+ # @param opts [Hash] the optional parameters
212
+ # @option opts [CIAppTestEventsRequest] :body
213
+ # @return [Array<(CIAppTestEventsResponse, Integer, Hash)>] CIAppTestEventsResponse data, response status code and response headers
214
+ def search_ci_app_test_events_with_http_info(opts = {})
215
+
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug 'Calling API: CIVisibilityTestsAPI.search_ci_app_test_events ...'
218
+ end
219
+ # resource path
220
+ local_var_path = '/api/v2/ci/tests/events/search'
221
+
222
+ # query parameters
223
+ query_params = opts[:query_params] || {}
224
+
225
+ # header parameters
226
+ header_params = opts[:header_params] || {}
227
+ # HTTP header 'Accept' (if needed)
228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
229
+ # HTTP header 'Content-Type'
230
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
231
+
232
+ # form parameters
233
+ form_params = opts[:form_params] || {}
234
+
235
+ # http body (model)
236
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
237
+
238
+ # return_type
239
+ return_type = opts[:debug_return_type] || 'CIAppTestEventsResponse'
240
+
241
+ # auth_names
242
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
243
+
244
+ new_options = opts.merge(
245
+ :operation => :search_ci_app_test_events,
246
+ :header_params => header_params,
247
+ :query_params => query_params,
248
+ :form_params => form_params,
249
+ :body => post_body,
250
+ :auth_names => auth_names,
251
+ :return_type => return_type,
252
+ :api_version => "V2"
253
+ )
254
+
255
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: CIVisibilityTestsAPI#search_ci_app_test_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+
262
+ # Search tests events.
263
+ #
264
+ # Provide a paginated version of {#search_ci_app_test_events}, returning all items.
265
+ #
266
+ # To use it you need to use a block: search_ci_app_test_events_with_pagination { |item| p item }
267
+ #
268
+ # @yield [CIAppTestEvent] Paginated items
269
+ def search_ci_app_test_events_with_pagination(opts = {})
270
+ api_version = "V2"
271
+ page_size = @api_client.get_attribute_from_path(opts, "body.page.limit", 10)
272
+ @api_client.set_attribute_from_path(api_version, opts, "body.page.limit", CIAppTestEventsRequest, page_size)
273
+ while true do
274
+ response = search_ci_app_test_events(opts)
275
+ @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
276
+ if @api_client.get_attribute_from_path(response, "data").length < page_size
277
+ break
278
+ end
279
+ @api_client.set_attribute_from_path(api_version, opts, "body.page.cursor", CIAppTestEventsRequest, @api_client.get_attribute_from_path(response, "meta.page.after"))
280
+ end
281
+ end
282
+ end
283
+ end
@@ -167,7 +167,7 @@ module DatadogAPIClient::V2
167
167
  #
168
168
  # The download endpoint generates a Cloud Workload Security policy file from your currently active
169
169
  # Cloud Workload Security rules, and downloads them as a .policy file. This file can then be deployed to
170
- # your agents to update the policy running in your environment.
170
+ # your Agents to update the policy running in your environment.
171
171
  #
172
172
  # @param opts [Hash] the optional parameters
173
173
  # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
@@ -211,6 +211,7 @@ module DatadogAPIClient::V2
211
211
  # @option opts [String] :filter_index For customers with multiple indexes, the indexes to search Defaults to '*' which means all indexes
212
212
  # @option opts [Time] :filter_from Minimum timestamp for requested logs.
213
213
  # @option opts [Time] :filter_to Maximum timestamp for requested logs.
214
+ # @option opts [LogsStorageTier] :filter_storage_tier Specifies the storage type to be used
214
215
  # @option opts [LogsSort] :sort Order of logs in results.
215
216
  # @option opts [String] :page_cursor List following results with a cursor provided in the previous query.
216
217
  # @option opts [Integer] :page_limit Maximum number of logs in the response.
@@ -220,6 +221,10 @@ module DatadogAPIClient::V2
220
221
  if @api_client.config.debugging
221
222
  @api_client.config.logger.debug 'Calling API: LogsAPI.list_logs_get ...'
222
223
  end
224
+ allowable_values = ['indexes', 'online-archives']
225
+ if @api_client.config.client_side_validation && opts[:'filter_storage_tier'] && !allowable_values.include?(opts[:'filter_storage_tier'])
226
+ fail ArgumentError, "invalid value for \"filter_storage_tier\", must be one of #{allowable_values}"
227
+ end
223
228
  allowable_values = ['timestamp', '-timestamp']
224
229
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
225
230
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -236,6 +241,7 @@ module DatadogAPIClient::V2
236
241
  query_params[:'filter[index]'] = opts[:'filter_index'] if !opts[:'filter_index'].nil?
237
242
  query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil?
238
243
  query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil?
244
+ query_params[:'filter[storage_tier]'] = opts[:'filter_storage_tier'] if !opts[:'filter_storage_tier'].nil?
239
245
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
240
246
  query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
241
247
  query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
@@ -109,7 +109,8 @@ module DatadogAPIClient::V2
109
109
  # Get estimated cost across your account.
110
110
  #
111
111
  # Get estimated cost across multi-org and single root-org accounts.
112
- # Estimated cost data is only available for the current month and previous month.
112
+ # Estimated cost data is only available for the current month and previous month
113
+ # and is delayed by up to 72 hours from when it was incurred.
113
114
  # To access historical costs prior to this, use the `/historical_cost` endpoint.
114
115
  #
115
116
  # @param opts [Hash] the optional parameters
@@ -251,7 +252,7 @@ module DatadogAPIClient::V2
251
252
 
252
253
  # Get hourly usage by product family.
253
254
  #
254
- # Get hourly usage by product family
255
+ # Get hourly usage by product family.
255
256
  #
256
257
  # @param filter_timestamp_start [Time] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
257
258
  # @param filter_product_families [String] Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, `application_security`, `audit_logs`, `serverless`, `ci_app`, `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`, and `timeseries`.
@@ -0,0 +1,64 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # A bucket value, can either be a timeseries or a single value.
21
+ module CIAppAggregateBucketValue
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'String',
30
+ :'Float',
31
+ :'Array<CIAppAggregateBucketValueTimeseriesPoint>'
32
+ ]
33
+ end
34
+ # Builds the object
35
+ # @param data [Mixed] Data to be matched against the list of oneOf items
36
+ # @return [Object] Returns the model or the data itself
37
+ def build(data)
38
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
39
+ # Note:
40
+ # - We do not attempt to check whether exactly one item matches.
41
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
42
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
43
+ # - TODO: scalar values are de facto behaving as if they were nullable.
44
+ # - TODO: logging when debugging is set.
45
+ openapi_one_of.each do |klass|
46
+ begin
47
+ next if klass == :AnyType # "nullable: true"
48
+ typed_data = find_and_cast_into_type(klass, data)
49
+ next if typed_data._unparsed
50
+ return typed_data if typed_data
51
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
52
+ end
53
+ end
54
+
55
+ if openapi_one_of.include?(:AnyType)
56
+ data
57
+ else
58
+ self._unparsed = true
59
+ DatadogAPIClient::UnparsedObject.new(data)
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,108 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # A timeseries point.
21
+ class CIAppAggregateBucketValueTimeseriesPoint
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The time value for this point.
29
+ attr_accessor :time
30
+
31
+ # The value for this point.
32
+ attr_accessor :value
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'time' => :'time',
39
+ :'value' => :'value'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'time' => :'Time',
48
+ :'value' => :'Float'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ # @!visibility private
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param attributes [Hash] Model attributes in the form of hash
61
+ # @!visibility private
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppAggregateBucketValueTimeseriesPoint` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppAggregateBucketValueTimeseriesPoint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'time')
76
+ self.time = attributes[:'time']
77
+ end
78
+
79
+ if attributes.key?(:'value')
80
+ self.value = attributes[:'value']
81
+ end
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ # @!visibility private
87
+ def valid?
88
+ true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param o [Object] Object to be compared
93
+ # @!visibility private
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ time == o.time &&
98
+ value == o.value
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ # @!visibility private
104
+ def hash
105
+ [time, value].hash
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,128 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # A sort rule.
21
+ class CIAppAggregateSort
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # An aggregation function.
29
+ attr_accessor :aggregation
30
+
31
+ # The metric to sort by (only used for `type=measure`).
32
+ attr_accessor :metric
33
+
34
+ # The order to use, ascending or descending.
35
+ attr_accessor :order
36
+
37
+ # The type of sorting algorithm.
38
+ attr_accessor :type
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'aggregation' => :'aggregation',
45
+ :'metric' => :'metric',
46
+ :'order' => :'order',
47
+ :'type' => :'type'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'aggregation' => :'CIAppAggregationFunction',
56
+ :'metric' => :'String',
57
+ :'order' => :'CIAppSortOrder',
58
+ :'type' => :'CIAppAggregateSortType'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ # @!visibility private
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param attributes [Hash] Model attributes in the form of hash
71
+ # @!visibility private
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppAggregateSort` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppAggregateSort`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'aggregation')
86
+ self.aggregation = attributes[:'aggregation']
87
+ end
88
+
89
+ if attributes.key?(:'metric')
90
+ self.metric = attributes[:'metric']
91
+ end
92
+
93
+ if attributes.key?(:'order')
94
+ self.order = attributes[:'order']
95
+ end
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ end
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ # @!visibility private
105
+ def valid?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param o [Object] Object to be compared
111
+ # @!visibility private
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ aggregation == o.aggregation &&
116
+ metric == o.metric &&
117
+ order == o.order &&
118
+ type == o.type
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ # @!visibility private
124
+ def hash
125
+ [aggregation, metric, order, type].hash
126
+ end
127
+ end
128
+ end
@@ -0,0 +1,27 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The type of sorting algorithm.
21
+ class CIAppAggregateSortType
22
+ include BaseEnumModel
23
+
24
+ ALPHABETICAL = "alphabetical".freeze
25
+ MEASURE = "measure".freeze
26
+ end
27
+ end