datadog_api_client 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.github/workflows/scripts/test_integration.js +24 -0
  4. data/.github/workflows/test.yml +4 -0
  5. data/.github/workflows/test_integration.yml +87 -0
  6. data/.openapi-generator/FILES +48 -0
  7. data/CHANGELOG.md +18 -0
  8. data/README.md +1 -1
  9. data/data/v1/openapi.yaml +1133 -99
  10. data/data/v2/openapi.yaml +420 -13
  11. data/docs/v1/Downtime.md +2 -0
  12. data/docs/v1/DowntimeChild.md +48 -0
  13. data/docs/v1/MetricsAPI.md +1 -1
  14. data/docs/v1/Monitor.md +3 -3
  15. data/docs/v1/MonitorGroupSearchResponse.md +22 -0
  16. data/docs/v1/MonitorGroupSearchResponseCounts.md +20 -0
  17. data/docs/v1/MonitorGroupSearchResult.md +30 -0
  18. data/docs/v1/MonitorOptions.md +1 -1
  19. data/docs/v1/MonitorSearchResponse.md +22 -0
  20. data/docs/v1/MonitorSearchResponseCounts.md +24 -0
  21. data/docs/v1/MonitorSearchResponseMetadata.md +24 -0
  22. data/docs/v1/MonitorSearchResult.md +40 -0
  23. data/docs/v1/MonitorSearchResultNotification.md +20 -0
  24. data/docs/v1/MonitorsAPI.md +155 -13
  25. data/docs/v1/NotebookCreateDataAttributes.md +1 -1
  26. data/docs/v1/NotebookResponseDataAttributes.md +3 -3
  27. data/docs/v1/NotebookUpdateDataAttributes.md +1 -1
  28. data/docs/v1/NotebooksResponse.md +1 -1
  29. data/docs/v1/NotebooksResponseData.md +22 -0
  30. data/docs/v1/NotebooksResponseDataAttributes.md +30 -0
  31. data/docs/v1/README.md +25 -4
  32. data/docs/v1/SyntheticsAPI.md +62 -2
  33. data/docs/v1/SyntheticsAPITest.md +2 -2
  34. data/docs/v1/SyntheticsAPITestConfig.md +1 -1
  35. data/docs/v1/SyntheticsBrowserTest.md +2 -2
  36. data/docs/v1/SyntheticsConfigVariable.md +3 -1
  37. data/docs/v1/SyntheticsGlobalVariableValue.md +1 -1
  38. data/docs/v1/SyntheticsListGlobalVariablesResponse.md +18 -0
  39. data/docs/v1/SyntheticsTestConfig.md +1 -1
  40. data/docs/v1/SyntheticsTestDetails.md +2 -2
  41. data/docs/v1/UsageAttributionBody.md +2 -0
  42. data/docs/v1/UsageAttributionPagination.md +3 -7
  43. data/docs/v1/UsageAttributionValues.md +8 -0
  44. data/docs/v1/UsageAuditLogsHour.md +20 -0
  45. data/docs/v1/UsageAuditLogsResponse.md +18 -0
  46. data/docs/v1/UsageCWSHour.md +22 -0
  47. data/docs/v1/UsageCWSResponse.md +18 -0
  48. data/docs/v1/UsageCloudSecurityPostureManagementHour.md +22 -0
  49. data/docs/v1/UsageCloudSecurityPostureManagementResponse.md +18 -0
  50. data/docs/v1/UsageMeteringAPI.md +157 -21
  51. data/docs/v1/UsageSummaryDate.md +12 -4
  52. data/docs/v1/UsageSummaryDateOrg.md +12 -4
  53. data/docs/v1/UsageSummaryResponse.md +12 -4
  54. data/docs/v1/UsageTopAvgMetricsMetadata.md +2 -2
  55. data/docs/v1/WidgetCustomLink.md +7 -3
  56. data/docs/v2/IncidentServicesAPI.md +2 -2
  57. data/docs/v2/IncidentTeamsAPI.md +2 -2
  58. data/docs/v2/IncidentsAPI.md +2 -2
  59. data/docs/v2/IncidentsResponse.md +1 -1
  60. data/docs/v2/KeyManagementAPI.md +6 -6
  61. data/docs/v2/README.md +21 -0
  62. data/docs/v2/RelationshipToIncidentIntegrationMetadataData.md +1 -1
  63. data/docs/v2/RelationshipToIncidentIntegrationMetadatas.md +1 -1
  64. data/docs/v2/RolesAPI.md +4 -4
  65. data/docs/v2/SecurityFilter.md +22 -0
  66. data/docs/v2/SecurityFilterAttributes.md +30 -0
  67. data/docs/v2/SecurityFilterCreateAttributes.md +26 -0
  68. data/docs/v2/SecurityFilterCreateData.md +20 -0
  69. data/docs/v2/SecurityFilterCreateRequest.md +18 -0
  70. data/docs/v2/SecurityFilterDeleteResponse.md +18 -0
  71. data/docs/v2/SecurityFilterExclusionFilter.md +20 -0
  72. data/docs/v2/SecurityFilterExclusionFilterResponse.md +20 -0
  73. data/docs/v2/SecurityFilterFilteredDataType.md +15 -0
  74. data/docs/v2/SecurityFilterMeta.md +18 -0
  75. data/docs/v2/SecurityFilterResponse.md +20 -0
  76. data/docs/v2/SecurityFilterType.md +15 -0
  77. data/docs/v2/SecurityFilterUpdateAttributes.md +28 -0
  78. data/docs/v2/SecurityFilterUpdateData.md +20 -0
  79. data/docs/v2/SecurityFilterUpdateRequest.md +18 -0
  80. data/docs/v2/SecurityFiltersResponse.md +20 -0
  81. data/docs/v2/SecurityMonitoringAPI.md +316 -2
  82. data/docs/v2/UsersAPI.md +10 -10
  83. data/lib/datadog_api_client/v1.rb +18 -2
  84. data/lib/datadog_api_client/v1/api/metrics_api.rb +2 -2
  85. data/lib/datadog_api_client/v1/api/monitors_api.rb +163 -5
  86. data/lib/datadog_api_client/v1/api/synthetics_api.rb +67 -0
  87. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +180 -23
  88. data/lib/datadog_api_client/v1/models/downtime.rb +11 -1
  89. data/lib/datadog_api_client/v1/models/downtime_child.rb +427 -0
  90. data/lib/datadog_api_client/v1/models/monitor.rb +10 -0
  91. data/lib/datadog_api_client/v1/models/monitor_group_search_response.rb +243 -0
  92. data/lib/datadog_api_client/v1/models/monitor_group_search_response_counts.rb +237 -0
  93. data/lib/datadog_api_client/v1/models/monitor_group_search_result.rb +285 -0
  94. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  95. data/lib/datadog_api_client/v1/models/monitor_search_response.rb +243 -0
  96. data/lib/datadog_api_client/v1/models/monitor_search_response_counts.rb +261 -0
  97. data/lib/datadog_api_client/v1/models/monitor_search_response_metadata.rb +253 -0
  98. data/lib/datadog_api_client/v1/models/monitor_search_result.rb +339 -0
  99. data/lib/datadog_api_client/v1/models/monitor_search_result_notification.rb +233 -0
  100. data/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +1 -1
  101. data/lib/datadog_api_client/v1/models/notebook_distribution_cell_attributes.rb +1 -1
  102. data/lib/datadog_api_client/v1/models/notebook_heat_map_cell_attributes.rb +1 -1
  103. data/lib/datadog_api_client/v1/models/notebook_log_stream_cell_attributes.rb +1 -1
  104. data/lib/datadog_api_client/v1/models/notebook_markdown_cell_attributes.rb +1 -1
  105. data/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +3 -3
  106. data/lib/datadog_api_client/v1/models/notebook_timeseries_cell_attributes.rb +1 -1
  107. data/lib/datadog_api_client/v1/models/notebook_toplist_cell_attributes.rb +1 -1
  108. data/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +1 -1
  109. data/lib/datadog_api_client/v1/models/notebooks_response.rb +1 -1
  110. data/lib/datadog_api_client/v1/models/notebooks_response_data.rb +258 -0
  111. data/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb +317 -0
  112. data/lib/datadog_api_client/v1/models/synthetics_api_test_config.rb +0 -5
  113. data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +11 -6
  114. data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
  115. data/lib/datadog_api_client/v1/models/synthetics_global_variable_value.rb +0 -5
  116. data/lib/datadog_api_client/v1/models/synthetics_list_global_variables_response.rb +225 -0
  117. data/lib/datadog_api_client/v1/models/synthetics_test_config.rb +0 -5
  118. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +11 -1
  119. data/lib/datadog_api_client/v1/models/usage_attribution_pagination.rb +10 -30
  120. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
  121. data/lib/datadog_api_client/v1/models/usage_audit_logs_hour.rb +233 -0
  122. data/lib/datadog_api_client/v1/models/{usage_compliance_response.rb → usage_audit_logs_response.rb} +6 -6
  123. data/lib/datadog_api_client/v1/models/{usage_compliance_hour.rb → usage_cloud_security_posture_management_hour.rb} +19 -19
  124. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +225 -0
  125. data/lib/datadog_api_client/v1/models/usage_cws_hour.rb +243 -0
  126. data/lib/datadog_api_client/v1/models/usage_cws_response.rb +225 -0
  127. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +61 -22
  128. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +61 -22
  129. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +61 -22
  130. data/lib/datadog_api_client/v1/models/usage_top_avg_metrics_metadata.rb +2 -4
  131. data/lib/datadog_api_client/v1/models/widget_custom_link.rb +24 -14
  132. data/lib/datadog_api_client/v2.rb +16 -0
  133. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +369 -0
  134. data/lib/datadog_api_client/v2/models/incident_integration_metadata_type.rb +1 -1
  135. data/lib/datadog_api_client/v2/models/relationship_to_incident_integration_metadata_data.rb +1 -1
  136. data/lib/datadog_api_client/v2/models/security_filter.rb +243 -0
  137. data/lib/datadog_api_client/v2/models/security_filter_attributes.rb +299 -0
  138. data/lib/datadog_api_client/v2/models/security_filter_create_attributes.rb +289 -0
  139. data/lib/datadog_api_client/v2/models/security_filter_create_data.rb +243 -0
  140. data/lib/datadog_api_client/v2/models/security_filter_create_request.rb +227 -0
  141. data/lib/datadog_api_client/v2/models/security_filter_delete_response.rb +222 -0
  142. data/lib/datadog_api_client/v2/models/security_filter_exclusion_filter.rb +243 -0
  143. data/lib/datadog_api_client/v2/models/security_filter_exclusion_filter_response.rb +233 -0
  144. data/lib/datadog_api_client/v2/models/security_filter_filtered_data_type.rb +39 -0
  145. data/lib/datadog_api_client/v2/models/security_filter_meta.rb +223 -0
  146. data/lib/datadog_api_client/v2/models/security_filter_response.rb +231 -0
  147. data/lib/datadog_api_client/v2/models/security_filter_type.rb +39 -0
  148. data/lib/datadog_api_client/v2/models/security_filter_update_attributes.rb +289 -0
  149. data/lib/datadog_api_client/v2/models/security_filter_update_data.rb +243 -0
  150. data/lib/datadog_api_client/v2/models/security_filter_update_request.rb +227 -0
  151. data/lib/datadog_api_client/v2/models/security_filters_response.rb +234 -0
  152. data/lib/datadog_api_client/version.rb +1 -1
  153. data/spec/v1/models/downtime_child_spec.rb +127 -0
  154. data/spec/v1/models/monitor_group_search_response_counts_spec.rb +43 -0
  155. data/spec/v1/models/monitor_group_search_response_spec.rb +49 -0
  156. data/spec/v1/models/monitor_group_search_result_spec.rb +73 -0
  157. data/spec/v1/models/monitor_search_response_counts_spec.rb +55 -0
  158. data/spec/v1/models/monitor_search_response_metadata_spec.rb +55 -0
  159. data/spec/v1/models/monitor_search_response_spec.rb +49 -0
  160. data/spec/v1/models/monitor_search_result_notification_spec.rb +43 -0
  161. data/spec/v1/models/monitor_search_result_spec.rb +103 -0
  162. data/spec/v1/models/notebooks_response_data_attributes_spec.rb +73 -0
  163. data/spec/v1/models/notebooks_response_data_spec.rb +49 -0
  164. data/spec/v1/models/synthetics_list_global_variables_response_spec.rb +37 -0
  165. data/spec/v1/models/usage_audit_logs_hour_spec.rb +43 -0
  166. data/spec/v1/models/{usage_compliance_response_spec.rb → usage_audit_logs_response_spec.rb} +6 -6
  167. data/spec/v1/models/usage_cloud_security_posture_management_hour_spec.rb +49 -0
  168. data/spec/v1/models/usage_cloud_security_posture_management_response_spec.rb +37 -0
  169. data/spec/v1/models/{usage_compliance_hour_spec.rb → usage_cws_hour_spec.rb} +8 -8
  170. data/spec/v1/models/usage_cws_response_spec.rb +37 -0
  171. data/spec/v2/models/security_filter_attributes_spec.rb +73 -0
  172. data/spec/v2/models/security_filter_create_attributes_spec.rb +61 -0
  173. data/spec/v2/models/security_filter_create_data_spec.rb +43 -0
  174. data/spec/v2/models/security_filter_create_request_spec.rb +37 -0
  175. data/spec/v2/models/security_filter_delete_response_spec.rb +37 -0
  176. data/spec/v2/models/security_filter_exclusion_filter_response_spec.rb +43 -0
  177. data/spec/v2/models/security_filter_exclusion_filter_spec.rb +43 -0
  178. data/spec/v2/models/security_filter_filtered_data_type_spec.rb +31 -0
  179. data/spec/v2/models/security_filter_meta_spec.rb +37 -0
  180. data/spec/v2/models/security_filter_response_spec.rb +43 -0
  181. data/spec/v2/models/security_filter_spec.rb +49 -0
  182. data/spec/v2/models/security_filter_type_spec.rb +31 -0
  183. data/spec/v2/models/security_filter_update_attributes_spec.rb +67 -0
  184. data/spec/v2/models/security_filter_update_data_spec.rb +43 -0
  185. data/spec/v2/models/security_filter_update_request_spec.rb +37 -0
  186. data/spec/v2/models/security_filters_response_spec.rb +43 -0
  187. metadata +140 -11
  188. data/.azure-pipelines/all.yml +0 -50
  189. data/docs/v1/UsageComplianceHour.md +0 -22
  190. data/docs/v1/UsageComplianceResponse.md +0 -18
data/docs/v2/UsersAPI.md CHANGED
@@ -90,7 +90,7 @@ Disable a user. Can only be used with an application key belonging to an adminis
90
90
  ```ruby
91
91
  require 'datadog_api_client'
92
92
  api_instance = DatadogAPIClient::V2::UsersAPI.new
93
- user_id = 'user_id_example' # String | The ID of the user.
93
+ user_id = '00000000-0000-0000-0000-000000000000' # String | The ID of the user.
94
94
 
95
95
  begin
96
96
  # Disable a user
@@ -151,7 +151,7 @@ Returns a single user invitation by its UUID.
151
151
  ```ruby
152
152
  require 'datadog_api_client'
153
153
  api_instance = DatadogAPIClient::V2::UsersAPI.new
154
- user_invitation_uuid = 'user_invitation_uuid_example' # String | The UUID of the user invitation.
154
+ user_invitation_uuid = '00000000-0000-0000-0000-000000000000' # String | The UUID of the user invitation.
155
155
 
156
156
  begin
157
157
  # Get a user invitation
@@ -213,7 +213,7 @@ Get a user in the organization specified by the user’s `user_id`.
213
213
  ```ruby
214
214
  require 'datadog_api_client'
215
215
  api_instance = DatadogAPIClient::V2::UsersAPI.new
216
- user_id = 'user_id_example' # String | The ID of the user.
216
+ user_id = '00000000-0000-0000-0000-000000000000' # String | The ID of the user.
217
217
 
218
218
  begin
219
219
  # Get user details
@@ -275,7 +275,7 @@ Get a user organization. Returns the user information and all organizations join
275
275
  ```ruby
276
276
  require 'datadog_api_client'
277
277
  api_instance = DatadogAPIClient::V2::UsersAPI.new
278
- user_id = 'user_id_example' # String | The ID of the user.
278
+ user_id = '00000000-0000-0000-0000-000000000000' # String | The ID of the user.
279
279
 
280
280
  begin
281
281
  # Get a user organization
@@ -337,7 +337,7 @@ Get a user permission set. Returns a list of the user’s permissions granted by
337
337
  ```ruby
338
338
  require 'datadog_api_client'
339
339
  api_instance = DatadogAPIClient::V2::UsersAPI.new
340
- user_id = 'user_id_example' # String | The ID of the user.
340
+ user_id = '00000000-0000-0000-0000-000000000000' # String | The ID of the user.
341
341
 
342
342
  begin
343
343
  # Get a user permissions
@@ -400,12 +400,12 @@ Get the list of all users in the organization. This list includes all users even
400
400
  require 'datadog_api_client'
401
401
  api_instance = DatadogAPIClient::V2::UsersAPI.new
402
402
  opts = {
403
- page_size: 789, # Integer | Size for a given page.
404
- page_number: 789, # Integer | Specific page number to return.
405
- sort: 'sort_example', # String | User attribute to order results by. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example `sort=-name`. Options: `name`, `modified_at`, `user_count`.
403
+ page_size: 10, # Integer | Size for a given page.
404
+ page_number: 0, # Integer | Specific page number to return.
405
+ sort: 'name', # String | User attribute to order results by. Sort order is ascending by default. Sort order is descending if the field is prefixed by a negative sign, for example `sort=-name`. Options: `name`, `modified_at`, `user_count`.
406
406
  sort_dir: DatadogAPIClient::V2::QuerySortOrder::ASC, # QuerySortOrder | Direction of sort. Options: `asc`, `desc`.
407
407
  filter: 'filter_example', # String | Filter all users by the given string. Defaults to no filtering.
408
- filter_status: 'filter_status_example' # String | Filter on status attribute. Comma separated list, with possible values `Active`, `Pending`, and `Disabled`. Defaults to no filtering.
408
+ filter_status: 'Active' # String | Filter on status attribute. Comma separated list, with possible values `Active`, `Pending`, and `Disabled`. Defaults to no filtering.
409
409
  }
410
410
 
411
411
  begin
@@ -535,7 +535,7 @@ Edit a user. Can only be used with an application key belonging to an administra
535
535
  ```ruby
536
536
  require 'datadog_api_client'
537
537
  api_instance = DatadogAPIClient::V2::UsersAPI.new
538
- user_id = 'user_id_example' # String | The ID of the user.
538
+ user_id = '00000000-0000-0000-0000-000000000000' # String | The ID of the user.
539
539
  body = DatadogAPIClient::V2::UserUpdateRequest.new({data: DatadogAPIClient::V2::UserUpdateData.new({attributes: DatadogAPIClient::V2::UserUpdateAttributes.new, id: '00000000-0000-0000-0000-000000000000', type: DatadogAPIClient::V2::UsersType::USERS})}) # UserUpdateRequest |
540
540
 
541
541
  begin
@@ -84,6 +84,7 @@ require 'datadog_api_client/v1/models/distribution_widget_request'
84
84
  require 'datadog_api_client/v1/models/distribution_widget_x_axis'
85
85
  require 'datadog_api_client/v1/models/distribution_widget_y_axis'
86
86
  require 'datadog_api_client/v1/models/downtime'
87
+ require 'datadog_api_client/v1/models/downtime_child'
87
88
  require 'datadog_api_client/v1/models/downtime_recurrence'
88
89
  require 'datadog_api_client/v1/models/event'
89
90
  require 'datadog_api_client/v1/models/event_alert_type'
@@ -229,9 +230,17 @@ require 'datadog_api_client/v1/models/metrics_query_response'
229
230
  require 'datadog_api_client/v1/models/metrics_query_unit'
230
231
  require 'datadog_api_client/v1/models/monitor'
231
232
  require 'datadog_api_client/v1/models/monitor_device_id'
233
+ require 'datadog_api_client/v1/models/monitor_group_search_response'
234
+ require 'datadog_api_client/v1/models/monitor_group_search_response_counts'
235
+ require 'datadog_api_client/v1/models/monitor_group_search_result'
232
236
  require 'datadog_api_client/v1/models/monitor_options'
233
237
  require 'datadog_api_client/v1/models/monitor_options_aggregation'
234
238
  require 'datadog_api_client/v1/models/monitor_overall_states'
239
+ require 'datadog_api_client/v1/models/monitor_search_response'
240
+ require 'datadog_api_client/v1/models/monitor_search_response_counts'
241
+ require 'datadog_api_client/v1/models/monitor_search_response_metadata'
242
+ require 'datadog_api_client/v1/models/monitor_search_result'
243
+ require 'datadog_api_client/v1/models/monitor_search_result_notification'
235
244
  require 'datadog_api_client/v1/models/monitor_state'
236
245
  require 'datadog_api_client/v1/models/monitor_state_group'
237
246
  require 'datadog_api_client/v1/models/monitor_summary_widget_definition'
@@ -277,6 +286,8 @@ require 'datadog_api_client/v1/models/notebook_update_data'
277
286
  require 'datadog_api_client/v1/models/notebook_update_data_attributes'
278
287
  require 'datadog_api_client/v1/models/notebook_update_request'
279
288
  require 'datadog_api_client/v1/models/notebooks_response'
289
+ require 'datadog_api_client/v1/models/notebooks_response_data'
290
+ require 'datadog_api_client/v1/models/notebooks_response_data_attributes'
280
291
  require 'datadog_api_client/v1/models/notebooks_response_meta'
281
292
  require 'datadog_api_client/v1/models/notebooks_response_page'
282
293
  require 'datadog_api_client/v1/models/organization'
@@ -403,6 +414,7 @@ require 'datadog_api_client/v1/models/synthetics_global_variable_parse_test_opti
403
414
  require 'datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type'
404
415
  require 'datadog_api_client/v1/models/synthetics_global_variable_parser_type'
405
416
  require 'datadog_api_client/v1/models/synthetics_global_variable_value'
417
+ require 'datadog_api_client/v1/models/synthetics_list_global_variables_response'
406
418
  require 'datadog_api_client/v1/models/synthetics_list_tests_response'
407
419
  require 'datadog_api_client/v1/models/synthetics_location'
408
420
  require 'datadog_api_client/v1/models/synthetics_locations'
@@ -468,12 +480,16 @@ require 'datadog_api_client/v1/models/usage_attribution_response'
468
480
  require 'datadog_api_client/v1/models/usage_attribution_sort'
469
481
  require 'datadog_api_client/v1/models/usage_attribution_supported_metrics'
470
482
  require 'datadog_api_client/v1/models/usage_attribution_values'
483
+ require 'datadog_api_client/v1/models/usage_audit_logs_hour'
484
+ require 'datadog_api_client/v1/models/usage_audit_logs_response'
471
485
  require 'datadog_api_client/v1/models/usage_billable_summary_body'
472
486
  require 'datadog_api_client/v1/models/usage_billable_summary_hour'
473
487
  require 'datadog_api_client/v1/models/usage_billable_summary_keys'
474
488
  require 'datadog_api_client/v1/models/usage_billable_summary_response'
475
- require 'datadog_api_client/v1/models/usage_compliance_hour'
476
- require 'datadog_api_client/v1/models/usage_compliance_response'
489
+ require 'datadog_api_client/v1/models/usage_cws_hour'
490
+ require 'datadog_api_client/v1/models/usage_cws_response'
491
+ require 'datadog_api_client/v1/models/usage_cloud_security_posture_management_hour'
492
+ require 'datadog_api_client/v1/models/usage_cloud_security_posture_management_response'
477
493
  require 'datadog_api_client/v1/models/usage_custom_reports_attributes'
478
494
  require 'datadog_api_client/v1/models/usage_custom_reports_data'
479
495
  require 'datadog_api_client/v1/models/usage_custom_reports_meta'
@@ -338,7 +338,7 @@ module DatadogAPIClient::V1
338
338
  end
339
339
 
340
340
  # Submit metrics
341
- # The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. The maximum payload size is 3.2 megabytes (3200000). Compressed payloads must have a decompressed size of up to 62 megabytes (62914560). If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect - 64 bits for the timestamp - 32 bits for the value - 20 bytes for the metric names - 50 bytes for the timeseries - The full payload is approximately ~ 100 bytes. However, with the DogStatsD API, compression is applied, which reduces the payload size.
341
+ # The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. The maximum payload size is 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed size of less than 62 megabytes (62914560 bytes). If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect: - 64 bits for the timestamp - 32 bits for the value - 20 bytes for the metric names - 50 bytes for the timeseries - The full payload is approximately 100 bytes. However, with the DogStatsD API, compression is applied, which reduces the payload size.
342
342
  # @param body [MetricsPayload]
343
343
  # @param [Hash] opts the optional parameters
344
344
  # @return [IntakePayloadAccepted]
@@ -348,7 +348,7 @@ module DatadogAPIClient::V1
348
348
  end
349
349
 
350
350
  # Submit metrics
351
- # The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. The maximum payload size is 3.2 megabytes (3200000). Compressed payloads must have a decompressed size of up to 62 megabytes (62914560). If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect - 64 bits for the timestamp - 32 bits for the value - 20 bytes for the metric names - 50 bytes for the timeseries - The full payload is approximately ~ 100 bytes. However, with the DogStatsD API, compression is applied, which reduces the payload size.
351
+ # The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards. The maximum payload size is 3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed size of less than 62 megabytes (62914560 bytes). If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect: - 64 bits for the timestamp - 32 bits for the value - 20 bytes for the metric names - 50 bytes for the timeseries - The full payload is approximately 100 bytes. However, with the DogStatsD API, compression is applied, which reduces the payload size.
352
352
  # @param body [MetricsPayload]
353
353
  # @param [Hash] opts the optional parameters
354
354
  # @return [Array<(IntakePayloadAccepted, Integer, Hash)>] IntakePayloadAccepted data, response status code and response headers
@@ -97,7 +97,7 @@ module DatadogAPIClient::V1
97
97
  end
98
98
 
99
99
  # Create a monitor
100
- # Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - SLO: `slo alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")` - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be 3. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI. **SLO Alert Query** Example: `error_budget(\"slo_id\").over(\"time_window\") operator #` - **`slo_id`**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **`time_window`**: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. - **`operator`**: `>=` or `>`
100
+ # Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: `query alert` - APM: `query alert` or `trace-analytics alert` - composite: `composite` - custom: `service check` - event: `event alert` - forecast: `query alert` - host: `service check` - integration: `query alert` or `service check` - live process: `process alert` - logs: `log alert` - metric: `metric alert` - network: `service check` - outlier: `query alert` - process: `service check` - rum: `rum alert` - SLO: `slo alert` - watchdog: `event alert` - event-v2: `event-v2 alert` #### Query Types **Metric Alert Query** Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #` - `time_aggr`: avg, sum, max, min, change, or pct_change - `time_window`: `last_#m` (with `#` between 1 and 2880 depending on the monitor type) or `last_#h`(with `#` between 1 and 48 depending on the monitor type), or `last_1d` - `space_aggr`: avg, sum, min, or max - `tags`: one or more tags (comma-separated), or * - `key`: a 'key' in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - `operator`: <, <=, >, >=, ==, or != - `#`: an integer or decimal number used to set the threshold If you are using the `_change_` or `_pct_change_` time aggregator, instead use `change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - `change_aggr` change, pct_change - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, 'dbscan', 7) > 0` **Service Check Query** Example: `\"check\".over(tags).last(count).by(group).count_by_status()` - **`check`** name of the check, e.g. `datadog.agent.up` - **`tags`** one or more quoted tags (comma-separated), or \"*\". e.g.: `.over(\"env:prod\", \"role:db\")`; **`over`** cannot be blank. - **`count`** must be at greater than or equal to your max threshold (defined in the `options`). It is limited to 100. For example, if you've specified to notify on 1 critical, 3 ok, and 2 warn statuses, `count` should be at least 3. - **`group`** must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. For example, Postgres integration monitors are tagged by `db`, `host`, and `port`, and Network monitors by `host`, `instance`, and `url`. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation for more information. **Event Alert Query** Example: `events('sources:nagios status:error,warning priority:normal tags: \"string query\"').rollup(\"count\").last(\"1h\")\"` - **`event`**, the event query string: - **`string_query`** free text query to match against event title and text. - **`sources`** event sources (comma-separated). - **`status`** event statuses (comma-separated). Valid options: error, warn, and info. - **`priority`** event priorities (comma-separated). Valid options: low, normal, all. - **`host`** event reporting host (comma-separated). - **`tags`** event tags (comma-separated). - **`excluded_tags`** excluded event tags (comma-separated). - **`rollup`** the stats roll-up method. `count` is the only supported method now. - **`last`** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: `events(query).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: `processes(search).over(tags).rollup('count').last(timeframe) operator #` - **`search`** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) page. - **`tags`** one or more tags (comma-separated) - **`timeframe`** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **`operator`** <, <=, >, >=, ==, or != - **`#`** an integer or decimal number used to set the threshold **Logs Alert Query** Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #` - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **`index_name`** For multi-index organizations, the log index in which the request is performed. - **`rollup_method`** The stats roll-up method - supports `count`, `avg` and `cardinality`. - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48) - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`. - **`#`** an integer or decimal number used to set the threshold. **Composite Query** Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite monitors * **`name`** [*required*, *default* = **dynamic, based on query**]: The name of the alert. * **`message`** [*required*, *default* = **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events. * **`tags`** [*optional*, *default* = **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the `monitor_tags` argument to filter results by these tags. It is only available via the API and isn't visible or editable in the Datadog UI. **SLO Alert Query** Example: `error_budget(\"slo_id\").over(\"time_window\") operator #` - **`slo_id`**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **`time_window`**: The time window of the SLO target you wish to alert on. Valid options: `7d`, `30d`, `90d`. - **`operator`**: `>=` or `>`
101
101
  # @param body [Monitor] Create a monitor request body.
102
102
  # @param [Hash] opts the optional parameters
103
103
  # @return [Monitor]
@@ -107,7 +107,7 @@ module DatadogAPIClient::V1
107
107
  end
108
108
 
109
109
  # Create a monitor
110
- # Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: &#x60;query alert&#x60; - APM: &#x60;query alert&#x60; or &#x60;trace-analytics alert&#x60; - composite: &#x60;composite&#x60; - custom: &#x60;service check&#x60; - event: &#x60;event alert&#x60; - forecast: &#x60;query alert&#x60; - host: &#x60;service check&#x60; - integration: &#x60;query alert&#x60; or &#x60;service check&#x60; - live process: &#x60;process alert&#x60; - logs: &#x60;log alert&#x60; - metric: &#x60;metric alert&#x60; - network: &#x60;service check&#x60; - outlier: &#x60;query alert&#x60; - process: &#x60;service check&#x60; - rum: &#x60;rum alert&#x60; - SLO: &#x60;slo alert&#x60; - watchdog: &#x60;event alert&#x60; - event-v2: &#x60;event-v2 alert&#x60; #### Query Types **Metric Alert Query** Example: &#x60;time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #&#x60; - &#x60;time_aggr&#x60;: avg, sum, max, min, change, or pct_change - &#x60;time_window&#x60;: &#x60;last_#m&#x60; (with &#x60;#&#x60; between 1 and 2880 depending on the monitor type) or &#x60;last_#h&#x60;(with &#x60;#&#x60; between 1 and 48 depending on the monitor type), or &#x60;last_1d&#x60; - &#x60;space_aggr&#x60;: avg, sum, min, or max - &#x60;tags&#x60;: one or more tags (comma-separated), or * - &#x60;key&#x60;: a &#39;key&#39; in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - &#x60;operator&#x60;: &lt;, &lt;&#x3D;, &gt;, &gt;&#x3D;, &#x3D;&#x3D;, or !&#x3D; - &#x60;#&#x60;: an integer or decimal number used to set the threshold If you are using the &#x60;_change_&#x60; or &#x60;_pct_change_&#x60; time aggregator, instead use &#x60;change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #&#x60; with: - &#x60;change_aggr&#x60; change, pct_change - &#x60;time_aggr&#x60; avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - &#x60;time_window&#x60; last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - &#x60;timeshift&#x60; #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: &#x60;avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, &#39;dbscan&#39;, 7) &gt; 0&#x60; **Service Check Query** Example: &#x60;\&quot;check\&quot;.over(tags).last(count).count_by_status()&#x60; - **&#x60;check&#x60;** name of the check, e.g. &#x60;datadog.agent.up&#x60; - **&#x60;tags&#x60;** one or more quoted tags (comma-separated), or \&quot;*\&quot;. e.g.: &#x60;.over(\&quot;env:prod\&quot;, \&quot;role:db\&quot;)&#x60; - **&#x60;count&#x60;** must be at greater than or equal to your max threshold (defined in the &#x60;options&#x60;). It is limited to 100. For example, if you&#39;ve specified to notify on 1 critical, 3 ok, and 2 warn statuses, &#x60;count&#x60; should be 3. **Event Alert Query** Example: &#x60;events(&#39;sources:nagios status:error,warning priority:normal tags: \&quot;string query\&quot;&#39;).rollup(\&quot;count\&quot;).last(\&quot;1h\&quot;)\&quot;&#x60; - **&#x60;event&#x60;**, the event query string: - **&#x60;string_query&#x60;** free text query to match against event title and text. - **&#x60;sources&#x60;** event sources (comma-separated). - **&#x60;status&#x60;** event statuses (comma-separated). Valid options: error, warn, and info. - **&#x60;priority&#x60;** event priorities (comma-separated). Valid options: low, normal, all. - **&#x60;host&#x60;** event reporting host (comma-separated). - **&#x60;tags&#x60;** event tags (comma-separated). - **&#x60;excluded_tags&#x60;** excluded event tags (comma-separated). - **&#x60;rollup&#x60;** the stats roll-up method. &#x60;count&#x60; is the only supported method now. - **&#x60;last&#x60;** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: &#x60;events(query).rollup(rollup_method[, measure]).last(time_window) operator #&#x60; - **&#x60;query&#x60;** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **&#x60;rollup_method&#x60;** The stats roll-up method - supports &#x60;count&#x60;, &#x60;avg&#x60; and &#x60;cardinality&#x60;. - **&#x60;measure&#x60;** For &#x60;avg&#x60; and cardinality &#x60;rollup_method&#x60; - specify the measure or the facet name you want to use. - **&#x60;time_window&#x60;** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **&#x60;operator&#x60;** &#x60;&lt;&#x60;, &#x60;&lt;&#x3D;&#x60;, &#x60;&gt;&#x60;, &#x60;&gt;&#x3D;&#x60;, &#x60;&#x3D;&#x3D;&#x60;, or &#x60;!&#x3D;&#x60;. - **&#x60;#&#x60;** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: &#x60;processes(search).over(tags).rollup(&#39;count&#39;).last(timeframe) operator #&#x60; - **&#x60;search&#x60;** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab&#x3D;linuxwindows) page. - **&#x60;tags&#x60;** one or more tags (comma-separated) - **&#x60;timeframe&#x60;** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **&#x60;operator&#x60;** &lt;, &lt;&#x3D;, &gt;, &gt;&#x3D;, &#x3D;&#x3D;, or !&#x3D; - **&#x60;#&#x60;** an integer or decimal number used to set the threshold **Logs Alert Query** Example: &#x60;logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #&#x60; - **&#x60;query&#x60;** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **&#x60;index_name&#x60;** For multi-index organizations, the log index in which the request is performed. - **&#x60;rollup_method&#x60;** The stats roll-up method - supports &#x60;count&#x60;, &#x60;avg&#x60; and &#x60;cardinality&#x60;. - **&#x60;measure&#x60;** For &#x60;avg&#x60; and cardinality &#x60;rollup_method&#x60; - specify the measure or the facet name you want to use. - **&#x60;time_window&#x60;** #m (between 1 and 2880), #h (between 1 and 48) - **&#x60;operator&#x60;** &#x60;&lt;&#x60;, &#x60;&lt;&#x3D;&#x60;, &#x60;&gt;&#x60;, &#x60;&gt;&#x3D;&#x60;, &#x60;&#x3D;&#x3D;&#x60;, or &#x60;!&#x3D;&#x60;. - **&#x60;#&#x60;** an integer or decimal number used to set the threshold. **Composite Query** Example: &#x60;12345 &amp;&amp; 67890&#x60;, where &#x60;12345&#x60; and &#x60;67890&#x60; are the IDs of non-composite monitors * **&#x60;name&#x60;** [*required*, *default* &#x3D; **dynamic, based on query**]: The name of the alert. * **&#x60;message&#x60;** [*required*, *default* &#x3D; **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same &#39;@username&#39; notation as events. * **&#x60;tags&#x60;** [*optional*, *default* &#x3D; **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the &#x60;monitor_tags&#x60; argument to filter results by these tags. It is only available via the API and isn&#39;t visible or editable in the Datadog UI. **SLO Alert Query** Example: &#x60;error_budget(\&quot;slo_id\&quot;).over(\&quot;time_window\&quot;) operator #&#x60; - **&#x60;slo_id&#x60;**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **&#x60;time_window&#x60;**: The time window of the SLO target you wish to alert on. Valid options: &#x60;7d&#x60;, &#x60;30d&#x60;, &#x60;90d&#x60;. - **&#x60;operator&#x60;**: &#x60;&gt;&#x3D;&#x60; or &#x60;&gt;&#x60;
110
+ # Create a monitor using the specified options. #### Monitor Types The type of monitor chosen from: - anomaly: &#x60;query alert&#x60; - APM: &#x60;query alert&#x60; or &#x60;trace-analytics alert&#x60; - composite: &#x60;composite&#x60; - custom: &#x60;service check&#x60; - event: &#x60;event alert&#x60; - forecast: &#x60;query alert&#x60; - host: &#x60;service check&#x60; - integration: &#x60;query alert&#x60; or &#x60;service check&#x60; - live process: &#x60;process alert&#x60; - logs: &#x60;log alert&#x60; - metric: &#x60;metric alert&#x60; - network: &#x60;service check&#x60; - outlier: &#x60;query alert&#x60; - process: &#x60;service check&#x60; - rum: &#x60;rum alert&#x60; - SLO: &#x60;slo alert&#x60; - watchdog: &#x60;event alert&#x60; - event-v2: &#x60;event-v2 alert&#x60; #### Query Types **Metric Alert Query** Example: &#x60;time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator #&#x60; - &#x60;time_aggr&#x60;: avg, sum, max, min, change, or pct_change - &#x60;time_window&#x60;: &#x60;last_#m&#x60; (with &#x60;#&#x60; between 1 and 2880 depending on the monitor type) or &#x60;last_#h&#x60;(with &#x60;#&#x60; between 1 and 48 depending on the monitor type), or &#x60;last_1d&#x60; - &#x60;space_aggr&#x60;: avg, sum, min, or max - &#x60;tags&#x60;: one or more tags (comma-separated), or * - &#x60;key&#x60;: a &#39;key&#39; in key:value tag syntax; defines a separate alert for each tag in the group (multi-alert) - &#x60;operator&#x60;: &lt;, &lt;&#x3D;, &gt;, &gt;&#x3D;, &#x3D;&#x3D;, or !&#x3D; - &#x60;#&#x60;: an integer or decimal number used to set the threshold If you are using the &#x60;_change_&#x60; or &#x60;_pct_change_&#x60; time aggregator, instead use &#x60;change_aggr(time_aggr(time_window), timeshift):space_aggr:metric{tags} [by {key}] operator #&#x60; with: - &#x60;change_aggr&#x60; change, pct_change - &#x60;time_aggr&#x60; avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/monitor_types/#define-the-conditions) - &#x60;time_window&#x60; last\\_#m (between 1 and 2880 depending on the monitor type), last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or 2) - &#x60;timeshift&#x60; #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago Use this to create an outlier monitor using the following query: &#x60;avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, &#39;dbscan&#39;, 7) &gt; 0&#x60; **Service Check Query** Example: &#x60;\&quot;check\&quot;.over(tags).last(count).by(group).count_by_status()&#x60; - **&#x60;check&#x60;** name of the check, e.g. &#x60;datadog.agent.up&#x60; - **&#x60;tags&#x60;** one or more quoted tags (comma-separated), or \&quot;*\&quot;. e.g.: &#x60;.over(\&quot;env:prod\&quot;, \&quot;role:db\&quot;)&#x60;; **&#x60;over&#x60;** cannot be blank. - **&#x60;count&#x60;** must be at greater than or equal to your max threshold (defined in the &#x60;options&#x60;). It is limited to 100. For example, if you&#39;ve specified to notify on 1 critical, 3 ok, and 2 warn statuses, &#x60;count&#x60; should be at least 3. - **&#x60;group&#x60;** must be specified for check monitors. Per-check grouping is already explicitly known for some service checks. For example, Postgres integration monitors are tagged by &#x60;db&#x60;, &#x60;host&#x60;, and &#x60;port&#x60;, and Network monitors by &#x60;host&#x60;, &#x60;instance&#x60;, and &#x60;url&#x60;. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation for more information. **Event Alert Query** Example: &#x60;events(&#39;sources:nagios status:error,warning priority:normal tags: \&quot;string query\&quot;&#39;).rollup(\&quot;count\&quot;).last(\&quot;1h\&quot;)\&quot;&#x60; - **&#x60;event&#x60;**, the event query string: - **&#x60;string_query&#x60;** free text query to match against event title and text. - **&#x60;sources&#x60;** event sources (comma-separated). - **&#x60;status&#x60;** event statuses (comma-separated). Valid options: error, warn, and info. - **&#x60;priority&#x60;** event priorities (comma-separated). Valid options: low, normal, all. - **&#x60;host&#x60;** event reporting host (comma-separated). - **&#x60;tags&#x60;** event tags (comma-separated). - **&#x60;excluded_tags&#x60;** excluded event tags (comma-separated). - **&#x60;rollup&#x60;** the stats roll-up method. &#x60;count&#x60; is the only supported method now. - **&#x60;last&#x60;** the timeframe to roll up the counts. Examples: 45m, 4h. Supported timeframes: m, h and d. This value should not exceed 48 hours. **NOTE** Only available on US1 and EU. **Event V2 Alert Query** Example: &#x60;events(query).rollup(rollup_method[, measure]).last(time_window) operator #&#x60; - **&#x60;query&#x60;** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **&#x60;rollup_method&#x60;** The stats roll-up method - supports &#x60;count&#x60;, &#x60;avg&#x60; and &#x60;cardinality&#x60;. - **&#x60;measure&#x60;** For &#x60;avg&#x60; and cardinality &#x60;rollup_method&#x60; - specify the measure or the facet name you want to use. - **&#x60;time_window&#x60;** #m (5, 10, 15, or 30), #h (1, 2, or 4, 24). - **&#x60;operator&#x60;** &#x60;&lt;&#x60;, &#x60;&lt;&#x3D;&#x60;, &#x60;&gt;&#x60;, &#x60;&gt;&#x3D;&#x60;, &#x60;&#x3D;&#x3D;&#x60;, or &#x60;!&#x3D;&#x60;. - **&#x60;#&#x60;** an integer or decimal number used to set the threshold. **NOTE** Only available on US1-FED, US3, and in closed beta on EU and US1. **Process Alert Query** Example: &#x60;processes(search).over(tags).rollup(&#39;count&#39;).last(timeframe) operator #&#x60; - **&#x60;search&#x60;** free text search string for querying processes. Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab&#x3D;linuxwindows) page. - **&#x60;tags&#x60;** one or more tags (comma-separated) - **&#x60;timeframe&#x60;** the timeframe to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and d - **&#x60;operator&#x60;** &lt;, &lt;&#x3D;, &gt;, &gt;&#x3D;, &#x3D;&#x3D;, or !&#x3D; - **&#x60;#&#x60;** an integer or decimal number used to set the threshold **Logs Alert Query** Example: &#x60;logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) operator #&#x60; - **&#x60;query&#x60;** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - **&#x60;index_name&#x60;** For multi-index organizations, the log index in which the request is performed. - **&#x60;rollup_method&#x60;** The stats roll-up method - supports &#x60;count&#x60;, &#x60;avg&#x60; and &#x60;cardinality&#x60;. - **&#x60;measure&#x60;** For &#x60;avg&#x60; and cardinality &#x60;rollup_method&#x60; - specify the measure or the facet name you want to use. - **&#x60;time_window&#x60;** #m (between 1 and 2880), #h (between 1 and 48) - **&#x60;operator&#x60;** &#x60;&lt;&#x60;, &#x60;&lt;&#x3D;&#x60;, &#x60;&gt;&#x60;, &#x60;&gt;&#x3D;&#x60;, &#x60;&#x3D;&#x3D;&#x60;, or &#x60;!&#x3D;&#x60;. - **&#x60;#&#x60;** an integer or decimal number used to set the threshold. **Composite Query** Example: &#x60;12345 &amp;&amp; 67890&#x60;, where &#x60;12345&#x60; and &#x60;67890&#x60; are the IDs of non-composite monitors * **&#x60;name&#x60;** [*required*, *default* &#x3D; **dynamic, based on query**]: The name of the alert. * **&#x60;message&#x60;** [*required*, *default* &#x3D; **dynamic, based on query**]: A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same &#39;@username&#39; notation as events. * **&#x60;tags&#x60;** [*optional*, *default* &#x3D; **empty list**]: A list of tags to associate with your monitor. When getting all monitor details via the API, use the &#x60;monitor_tags&#x60; argument to filter results by these tags. It is only available via the API and isn&#39;t visible or editable in the Datadog UI. **SLO Alert Query** Example: &#x60;error_budget(\&quot;slo_id\&quot;).over(\&quot;time_window\&quot;) operator #&#x60; - **&#x60;slo_id&#x60;**: The alphanumeric SLO ID of the SLO you are configuring the alert for. - **&#x60;time_window&#x60;**: The time window of the SLO target you wish to alert on. Valid options: &#x60;7d&#x60;, &#x60;30d&#x60;, &#x60;90d&#x60;. - **&#x60;operator&#x60;**: &#x60;&gt;&#x3D;&#x60; or &#x60;&gt;&#x60;
111
111
  # @param body [Monitor] Create a monitor request body.
112
112
  # @param [Hash] opts the optional parameters
113
113
  # @return [Array<(Monitor, Integer, Hash)>] Monitor data, response status code and response headers
@@ -418,6 +418,164 @@ module DatadogAPIClient::V1
418
418
  return data, status_code, headers
419
419
  end
420
420
 
421
+ # Monitors group search
422
+ # Search and filter your monitor groups details.
423
+ # @param [Hash] opts the optional parameters
424
+ # @option opts [String] :query After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance &#x60;query&#x3D;\&quot;type:metric status:alert\&quot;&#x60;. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors
425
+ # @option opts [Integer] :page Page to start paginating from. (default to 0)
426
+ # @option opts [Integer] :per_page Number of monitors to return per page. (default to 30)
427
+ # @option opts [String] :sort String for sort order, composed of field and sort order separate by a comma, e.g. &#x60;name,asc&#x60;. Supported sort directions: &#x60;asc&#x60;, &#x60;desc&#x60;. Supported fields: * &#x60;name&#x60; * &#x60;status&#x60; * &#x60;tags&#x60;
428
+ # @return [MonitorGroupSearchResponse]
429
+ def search_monitor_groups(opts = {})
430
+ data, _status_code, _headers = search_monitor_groups_with_http_info(opts)
431
+ data
432
+ end
433
+
434
+ # Monitors group search
435
+ # Search and filter your monitor groups details.
436
+ # @param [Hash] opts the optional parameters
437
+ # @option opts [String] :query After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance &#x60;query&#x3D;\&quot;type:metric status:alert\&quot;&#x60;. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors
438
+ # @option opts [Integer] :page Page to start paginating from.
439
+ # @option opts [Integer] :per_page Number of monitors to return per page.
440
+ # @option opts [String] :sort String for sort order, composed of field and sort order separate by a comma, e.g. &#x60;name,asc&#x60;. Supported sort directions: &#x60;asc&#x60;, &#x60;desc&#x60;. Supported fields: * &#x60;name&#x60; * &#x60;status&#x60; * &#x60;tags&#x60;
441
+ # @return [Array<(MonitorGroupSearchResponse, Integer, Hash)>] MonitorGroupSearchResponse data, response status code and response headers
442
+ def search_monitor_groups_with_http_info(opts = {})
443
+
444
+ if @api_client.config.unstable_operations.has_key?(:search_monitor_groups)
445
+ unstable_enabled = @api_client.config.unstable_operations[:search_monitor_groups]
446
+ if unstable_enabled
447
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "search_monitor_groups")
448
+ else
449
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "search_monitor_groups"))
450
+ end
451
+ end
452
+
453
+ if @api_client.config.debugging
454
+ @api_client.config.logger.debug 'Calling API: MonitorsAPI.search_monitor_groups ...'
455
+ end
456
+ # resource path
457
+ local_var_path = '/api/v1/monitor/groups/search'
458
+
459
+ # query parameters
460
+ query_params = opts[:query_params] || {}
461
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
462
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
463
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
464
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
465
+
466
+ # header parameters
467
+ header_params = opts[:header_params] || {}
468
+ # HTTP header 'Accept' (if needed)
469
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
470
+
471
+ # form parameters
472
+ form_params = opts[:form_params] || {}
473
+
474
+ # http body (model)
475
+ post_body = opts[:debug_body]
476
+
477
+ # return_type
478
+ return_type = opts[:debug_return_type] || 'MonitorGroupSearchResponse'
479
+
480
+ # auth_names
481
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
482
+
483
+ new_options = opts.merge(
484
+ :operation => :search_monitor_groups,
485
+ :header_params => header_params,
486
+ :query_params => query_params,
487
+ :form_params => form_params,
488
+ :body => post_body,
489
+ :auth_names => auth_names,
490
+ :return_type => return_type
491
+ )
492
+
493
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
494
+ if @api_client.config.debugging
495
+ @api_client.config.logger.debug "API called: MonitorsAPI#search_monitor_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
496
+ end
497
+ return data, status_code, headers
498
+ end
499
+
500
+ # Monitors search
501
+ # Search and filter your monitors details.
502
+ # @param [Hash] opts the optional parameters
503
+ # @option opts [String] :query After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance &#x60;query&#x3D;\&quot;type:metric status:alert\&quot;&#x60;. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors
504
+ # @option opts [Integer] :page Page to start paginating from. (default to 0)
505
+ # @option opts [Integer] :per_page Number of monitors to return per page. (default to 30)
506
+ # @option opts [String] :sort String for sort order, composed of field and sort order separate by a comma, e.g. &#x60;name,asc&#x60;. Supported sort directions: &#x60;asc&#x60;, &#x60;desc&#x60;. Supported fields: * &#x60;name&#x60; * &#x60;status&#x60; * &#x60;tags&#x60;
507
+ # @return [MonitorSearchResponse]
508
+ def search_monitors(opts = {})
509
+ data, _status_code, _headers = search_monitors_with_http_info(opts)
510
+ data
511
+ end
512
+
513
+ # Monitors search
514
+ # Search and filter your monitors details.
515
+ # @param [Hash] opts the optional parameters
516
+ # @option opts [String] :query After entering a search query in your [Manage Monitor page][1] use the query parameter value in the URL of the page as value for this parameter. Consult the dedicated [manage monitor documentation][2] page to learn more. The query can contain any number of space-separated monitor attributes, for instance &#x60;query&#x3D;\&quot;type:metric status:alert\&quot;&#x60;. [1]: https://app.datadoghq.com/monitors/manage [2]: /monitors/manage_monitor/#find-the-monitors
517
+ # @option opts [Integer] :page Page to start paginating from.
518
+ # @option opts [Integer] :per_page Number of monitors to return per page.
519
+ # @option opts [String] :sort String for sort order, composed of field and sort order separate by a comma, e.g. &#x60;name,asc&#x60;. Supported sort directions: &#x60;asc&#x60;, &#x60;desc&#x60;. Supported fields: * &#x60;name&#x60; * &#x60;status&#x60; * &#x60;tags&#x60;
520
+ # @return [Array<(MonitorSearchResponse, Integer, Hash)>] MonitorSearchResponse data, response status code and response headers
521
+ def search_monitors_with_http_info(opts = {})
522
+
523
+ if @api_client.config.unstable_operations.has_key?(:search_monitors)
524
+ unstable_enabled = @api_client.config.unstable_operations[:search_monitors]
525
+ if unstable_enabled
526
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "search_monitors")
527
+ else
528
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "search_monitors"))
529
+ end
530
+ end
531
+
532
+ if @api_client.config.debugging
533
+ @api_client.config.logger.debug 'Calling API: MonitorsAPI.search_monitors ...'
534
+ end
535
+ # resource path
536
+ local_var_path = '/api/v1/monitor/search'
537
+
538
+ # query parameters
539
+ query_params = opts[:query_params] || {}
540
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
541
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
542
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
543
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
544
+
545
+ # header parameters
546
+ header_params = opts[:header_params] || {}
547
+ # HTTP header 'Accept' (if needed)
548
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
549
+
550
+ # form parameters
551
+ form_params = opts[:form_params] || {}
552
+
553
+ # http body (model)
554
+ post_body = opts[:debug_body]
555
+
556
+ # return_type
557
+ return_type = opts[:debug_return_type] || 'MonitorSearchResponse'
558
+
559
+ # auth_names
560
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
561
+
562
+ new_options = opts.merge(
563
+ :operation => :search_monitors,
564
+ :header_params => header_params,
565
+ :query_params => query_params,
566
+ :form_params => form_params,
567
+ :body => post_body,
568
+ :auth_names => auth_names,
569
+ :return_type => return_type
570
+ )
571
+
572
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
573
+ if @api_client.config.debugging
574
+ @api_client.config.logger.debug "API called: MonitorsAPI#search_monitors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
575
+ end
576
+ return data, status_code, headers
577
+ end
578
+
421
579
  # Edit a monitor
422
580
  # Edit the specified monitor.
423
581
  # @param monitor_id [Integer] The ID of the monitor.
@@ -503,7 +661,7 @@ module DatadogAPIClient::V1
503
661
  # Validate the monitor provided in the request.
504
662
  # @param body [Monitor] Monitor request object
505
663
  # @param [Hash] opts the optional parameters
506
- # @return [Monitor]
664
+ # @return [Object]
507
665
  def validate_monitor(body, opts = {})
508
666
  data, _status_code, _headers = validate_monitor_with_http_info(body, opts)
509
667
  data
@@ -513,7 +671,7 @@ module DatadogAPIClient::V1
513
671
  # Validate the monitor provided in the request.
514
672
  # @param body [Monitor] Monitor request object
515
673
  # @param [Hash] opts the optional parameters
516
- # @return [Array<(Monitor, Integer, Hash)>] Monitor data, response status code and response headers
674
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
517
675
  def validate_monitor_with_http_info(body, opts = {})
518
676
 
519
677
  if @api_client.config.unstable_operations.has_key?(:validate_monitor)
@@ -552,7 +710,7 @@ module DatadogAPIClient::V1
552
710
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
553
711
 
554
712
  # return_type
555
- return_type = opts[:debug_return_type] || 'Monitor'
713
+ return_type = opts[:debug_return_type] || 'Object'
556
714
 
557
715
  # auth_names
558
716
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
@@ -1311,6 +1311,73 @@ module DatadogAPIClient::V1
1311
1311
  return data, status_code, headers
1312
1312
  end
1313
1313
 
1314
+ # Get all global variables
1315
+ # Get the list of all Synthetics global variables.
1316
+ # @param [Hash] opts the optional parameters
1317
+ # @return [SyntheticsListGlobalVariablesResponse]
1318
+ def list_global_variables(opts = {})
1319
+ data, _status_code, _headers = list_global_variables_with_http_info(opts)
1320
+ data
1321
+ end
1322
+
1323
+ # Get all global variables
1324
+ # Get the list of all Synthetics global variables.
1325
+ # @param [Hash] opts the optional parameters
1326
+ # @return [Array<(SyntheticsListGlobalVariablesResponse, Integer, Hash)>] SyntheticsListGlobalVariablesResponse data, response status code and response headers
1327
+ def list_global_variables_with_http_info(opts = {})
1328
+
1329
+ if @api_client.config.unstable_operations.has_key?(:list_global_variables)
1330
+ unstable_enabled = @api_client.config.unstable_operations[:list_global_variables]
1331
+ if unstable_enabled
1332
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "list_global_variables")
1333
+ else
1334
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_global_variables"))
1335
+ end
1336
+ end
1337
+
1338
+ if @api_client.config.debugging
1339
+ @api_client.config.logger.debug 'Calling API: SyntheticsAPI.list_global_variables ...'
1340
+ end
1341
+ # resource path
1342
+ local_var_path = '/api/v1/synthetics/variables'
1343
+
1344
+ # query parameters
1345
+ query_params = opts[:query_params] || {}
1346
+
1347
+ # header parameters
1348
+ header_params = opts[:header_params] || {}
1349
+ # HTTP header 'Accept' (if needed)
1350
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1351
+
1352
+ # form parameters
1353
+ form_params = opts[:form_params] || {}
1354
+
1355
+ # http body (model)
1356
+ post_body = opts[:debug_body]
1357
+
1358
+ # return_type
1359
+ return_type = opts[:debug_return_type] || 'SyntheticsListGlobalVariablesResponse'
1360
+
1361
+ # auth_names
1362
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
1363
+
1364
+ new_options = opts.merge(
1365
+ :operation => :list_global_variables,
1366
+ :header_params => header_params,
1367
+ :query_params => query_params,
1368
+ :form_params => form_params,
1369
+ :body => post_body,
1370
+ :auth_names => auth_names,
1371
+ :return_type => return_type
1372
+ )
1373
+
1374
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1375
+ if @api_client.config.debugging
1376
+ @api_client.config.logger.debug "API called: SyntheticsAPI#list_global_variables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1377
+ end
1378
+ return data, status_code, headers
1379
+ end
1380
+
1314
1381
  # Get all locations (public and private)
1315
1382
  # Get the list of public and private locations available for Synthetic tests. No arguments required.
1316
1383
  # @param [Hash] opts the optional parameters
@@ -724,6 +724,83 @@ module DatadogAPIClient::V1
724
724
  return data, status_code, headers
725
725
  end
726
726
 
727
+ # Get hourly usage for audit logs
728
+ # Get hourly usage for audit logs.
729
+ # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
730
+ # @param [Hash] opts the optional parameters
731
+ # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour.
732
+ # @return [UsageAuditLogsResponse]
733
+ def get_usage_audit_logs(start_hr, opts = {})
734
+ data, _status_code, _headers = get_usage_audit_logs_with_http_info(start_hr, opts)
735
+ data
736
+ end
737
+
738
+ # Get hourly usage for audit logs
739
+ # Get hourly usage for audit logs.
740
+ # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
741
+ # @param [Hash] opts the optional parameters
742
+ # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour.
743
+ # @return [Array<(UsageAuditLogsResponse, Integer, Hash)>] UsageAuditLogsResponse data, response status code and response headers
744
+ def get_usage_audit_logs_with_http_info(start_hr, opts = {})
745
+
746
+ if @api_client.config.unstable_operations.has_key?(:get_usage_audit_logs)
747
+ unstable_enabled = @api_client.config.unstable_operations[:get_usage_audit_logs]
748
+ if unstable_enabled
749
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "get_usage_audit_logs")
750
+ else
751
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_usage_audit_logs"))
752
+ end
753
+ end
754
+
755
+ if @api_client.config.debugging
756
+ @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_audit_logs ...'
757
+ end
758
+ # verify the required parameter 'start_hr' is set
759
+ if @api_client.config.client_side_validation && start_hr.nil?
760
+ fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_audit_logs"
761
+ end
762
+ # resource path
763
+ local_var_path = '/api/v1/usage/audit_logs'
764
+
765
+ # query parameters
766
+ query_params = opts[:query_params] || {}
767
+ query_params[:'start_hr'] = start_hr
768
+ query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil?
769
+
770
+ # header parameters
771
+ header_params = opts[:header_params] || {}
772
+ # HTTP header 'Accept' (if needed)
773
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339'])
774
+
775
+ # form parameters
776
+ form_params = opts[:form_params] || {}
777
+
778
+ # http body (model)
779
+ post_body = opts[:debug_body]
780
+
781
+ # return_type
782
+ return_type = opts[:debug_return_type] || 'UsageAuditLogsResponse'
783
+
784
+ # auth_names
785
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
786
+
787
+ new_options = opts.merge(
788
+ :operation => :get_usage_audit_logs,
789
+ :header_params => header_params,
790
+ :query_params => query_params,
791
+ :form_params => form_params,
792
+ :body => post_body,
793
+ :auth_names => auth_names,
794
+ :return_type => return_type
795
+ )
796
+
797
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
798
+ if @api_client.config.debugging
799
+ @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_audit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
800
+ end
801
+ return data, status_code, headers
802
+ end
803
+
727
804
  # Get billable usage across your account
728
805
  # Get billable usage across your account.
729
806
  # @param [Hash] opts the optional parameters
@@ -794,43 +871,120 @@ module DatadogAPIClient::V1
794
871
  return data, status_code, headers
795
872
  end
796
873
 
797
- # Get hourly usage for Compliance Monitoring
798
- # Get hourly usage for Compliance Monitoring.
874
+ # Get hourly usage for CSPM
875
+ # Get hourly usage for Cloud Security Posture Management (CSPM).
876
+ # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
877
+ # @param [Hash] opts the optional parameters
878
+ # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour.
879
+ # @return [UsageCloudSecurityPostureManagementResponse]
880
+ def get_usage_cloud_security_posture_management(start_hr, opts = {})
881
+ data, _status_code, _headers = get_usage_cloud_security_posture_management_with_http_info(start_hr, opts)
882
+ data
883
+ end
884
+
885
+ # Get hourly usage for CSPM
886
+ # Get hourly usage for Cloud Security Posture Management (CSPM).
887
+ # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
888
+ # @param [Hash] opts the optional parameters
889
+ # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour.
890
+ # @return [Array<(UsageCloudSecurityPostureManagementResponse, Integer, Hash)>] UsageCloudSecurityPostureManagementResponse data, response status code and response headers
891
+ def get_usage_cloud_security_posture_management_with_http_info(start_hr, opts = {})
892
+
893
+ if @api_client.config.unstable_operations.has_key?(:get_usage_cloud_security_posture_management)
894
+ unstable_enabled = @api_client.config.unstable_operations[:get_usage_cloud_security_posture_management]
895
+ if unstable_enabled
896
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "get_usage_cloud_security_posture_management")
897
+ else
898
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_usage_cloud_security_posture_management"))
899
+ end
900
+ end
901
+
902
+ if @api_client.config.debugging
903
+ @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_cloud_security_posture_management ...'
904
+ end
905
+ # verify the required parameter 'start_hr' is set
906
+ if @api_client.config.client_side_validation && start_hr.nil?
907
+ fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_cloud_security_posture_management"
908
+ end
909
+ # resource path
910
+ local_var_path = '/api/v1/usage/cspm'
911
+
912
+ # query parameters
913
+ query_params = opts[:query_params] || {}
914
+ query_params[:'start_hr'] = start_hr
915
+ query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil?
916
+
917
+ # header parameters
918
+ header_params = opts[:header_params] || {}
919
+ # HTTP header 'Accept' (if needed)
920
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339'])
921
+
922
+ # form parameters
923
+ form_params = opts[:form_params] || {}
924
+
925
+ # http body (model)
926
+ post_body = opts[:debug_body]
927
+
928
+ # return_type
929
+ return_type = opts[:debug_return_type] || 'UsageCloudSecurityPostureManagementResponse'
930
+
931
+ # auth_names
932
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
933
+
934
+ new_options = opts.merge(
935
+ :operation => :get_usage_cloud_security_posture_management,
936
+ :header_params => header_params,
937
+ :query_params => query_params,
938
+ :form_params => form_params,
939
+ :body => post_body,
940
+ :auth_names => auth_names,
941
+ :return_type => return_type
942
+ )
943
+
944
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
945
+ if @api_client.config.debugging
946
+ @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_cloud_security_posture_management\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
947
+ end
948
+ return data, status_code, headers
949
+ end
950
+
951
+ # Get hourly usage for Cloud Workload Security
952
+ # Get hourly usage for Cloud Workload Security.
799
953
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
800
954
  # @param [Hash] opts the optional parameters
801
955
  # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour.
802
- # @return [UsageComplianceResponse]
803
- def get_usage_compliance_monitoring(start_hr, opts = {})
804
- data, _status_code, _headers = get_usage_compliance_monitoring_with_http_info(start_hr, opts)
956
+ # @return [UsageCWSResponse]
957
+ def get_usage_cws(start_hr, opts = {})
958
+ data, _status_code, _headers = get_usage_cws_with_http_info(start_hr, opts)
805
959
  data
806
960
  end
807
961
 
808
- # Get hourly usage for Compliance Monitoring
809
- # Get hourly usage for Compliance Monitoring.
962
+ # Get hourly usage for Cloud Workload Security
963
+ # Get hourly usage for Cloud Workload Security.
810
964
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
811
965
  # @param [Hash] opts the optional parameters
812
966
  # @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour.
813
- # @return [Array<(UsageComplianceResponse, Integer, Hash)>] UsageComplianceResponse data, response status code and response headers
814
- def get_usage_compliance_monitoring_with_http_info(start_hr, opts = {})
967
+ # @return [Array<(UsageCWSResponse, Integer, Hash)>] UsageCWSResponse data, response status code and response headers
968
+ def get_usage_cws_with_http_info(start_hr, opts = {})
815
969
 
816
- if @api_client.config.unstable_operations.has_key?(:get_usage_compliance_monitoring)
817
- unstable_enabled = @api_client.config.unstable_operations[:get_usage_compliance_monitoring]
970
+ if @api_client.config.unstable_operations.has_key?(:get_usage_cws)
971
+ unstable_enabled = @api_client.config.unstable_operations[:get_usage_cws]
818
972
  if unstable_enabled
819
- @api_client.config.logger.warn format("Using unstable operation '%s'", "get_usage_compliance_monitoring")
973
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "get_usage_cws")
820
974
  else
821
- raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_usage_compliance_monitoring"))
975
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_usage_cws"))
822
976
  end
823
977
  end
824
978
 
825
979
  if @api_client.config.debugging
826
- @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_compliance_monitoring ...'
980
+ @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_cws ...'
827
981
  end
828
982
  # verify the required parameter 'start_hr' is set
829
983
  if @api_client.config.client_side_validation && start_hr.nil?
830
- fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_compliance_monitoring"
984
+ fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_cws"
831
985
  end
832
986
  # resource path
833
- local_var_path = '/api/v1/usage/compliance-monitoring'
987
+ local_var_path = '/api/v1/usage/cws'
834
988
 
835
989
  # query parameters
836
990
  query_params = opts[:query_params] || {}
@@ -849,13 +1003,13 @@ module DatadogAPIClient::V1
849
1003
  post_body = opts[:debug_body]
850
1004
 
851
1005
  # return_type
852
- return_type = opts[:debug_return_type] || 'UsageComplianceResponse'
1006
+ return_type = opts[:debug_return_type] || 'UsageCWSResponse'
853
1007
 
854
1008
  # auth_names
855
1009
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
856
1010
 
857
1011
  new_options = opts.merge(
858
- :operation => :get_usage_compliance_monitoring,
1012
+ :operation => :get_usage_cws,
859
1013
  :header_params => header_params,
860
1014
  :query_params => query_params,
861
1015
  :form_params => form_params,
@@ -866,7 +1020,7 @@ module DatadogAPIClient::V1
866
1020
 
867
1021
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
868
1022
  if @api_client.config.debugging
869
- @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_compliance_monitoring\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1023
+ @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_cws\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
870
1024
  end
871
1025
  return data, status_code, headers
872
1026
  end
@@ -2266,26 +2420,28 @@ module DatadogAPIClient::V1
2266
2420
  return data, status_code, headers
2267
2421
  end
2268
2422
 
2269
- # Get top custom metrics by hourly average
2270
- # Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
2423
+ # Get all custom metrics by hourly average
2424
+ # Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
2271
2425
  # @param [Hash] opts the optional parameters
2272
2426
  # @option opts [Time] :month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
2273
2427
  # @option opts [Time] :day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
2274
2428
  # @option opts [Array<String>] :names Comma-separated list of metric names.
2275
2429
  # @option opts [Integer] :limit Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. (default to 500)
2430
+ # @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
2276
2431
  # @return [UsageTopAvgMetricsResponse]
2277
2432
  def get_usage_top_avg_metrics(opts = {})
2278
2433
  data, _status_code, _headers = get_usage_top_avg_metrics_with_http_info(opts)
2279
2434
  data
2280
2435
  end
2281
2436
 
2282
- # Get top custom metrics by hourly average
2283
- # Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
2437
+ # Get all custom metrics by hourly average
2438
+ # Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
2284
2439
  # @param [Hash] opts the optional parameters
2285
2440
  # @option opts [Time] :month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both)
2286
2441
  # @option opts [Time] :day Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both)
2287
2442
  # @option opts [Array<String>] :names Comma-separated list of metric names.
2288
2443
  # @option opts [Integer] :limit Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.
2444
+ # @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
2289
2445
  # @return [Array<(UsageTopAvgMetricsResponse, Integer, Hash)>] UsageTopAvgMetricsResponse data, response status code and response headers
2290
2446
  def get_usage_top_avg_metrics_with_http_info(opts = {})
2291
2447
 
@@ -2318,6 +2474,7 @@ module DatadogAPIClient::V1
2318
2474
  query_params[:'day'] = opts[:'day'] if !opts[:'day'].nil?
2319
2475
  query_params[:'names'] = @api_client.build_collection_param(opts[:'names'], :multi) if !opts[:'names'].nil?
2320
2476
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2477
+ query_params[:'next_record_id'] = opts[:'next_record_id'] if !opts[:'next_record_id'].nil?
2321
2478
 
2322
2479
  # header parameters
2323
2480
  header_params = opts[:header_params] || {}