datadog_api_client 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/templates/api.mustache +2 -2
  4. data/.generator/templates/api_client.mustache +7 -0
  5. data/.generator/templates/api_client_typhoeus_partial.mustache +7 -0
  6. data/.generator/templates/configuration.mustache +4 -0
  7. data/.openapi-generator/VERSION +1 -1
  8. data/CHANGELOG.md +27 -0
  9. data/README.md +12 -1
  10. data/data/v1/openapi.yaml +866 -119
  11. data/data/v2/openapi.yaml +113 -0
  12. data/docs/v1/AWSAccount.md +6 -0
  13. data/docs/v1/DowntimeRecurrence.md +1 -1
  14. data/docs/v1/Event.md +1 -1
  15. data/docs/v1/FormulaAndFunctionApmDependencyStatName.md +15 -0
  16. data/docs/v1/FormulaAndFunctionApmDependencyStatsDataSource.md +15 -0
  17. data/docs/v1/FormulaAndFunctionApmDependencyStatsQueryDefinition.md +36 -0
  18. data/docs/v1/FormulaAndFunctionApmResourceStatName.md +15 -0
  19. data/docs/v1/FormulaAndFunctionApmResourceStatsDataSource.md +15 -0
  20. data/docs/v1/FormulaAndFunctionApmResourceStatsQueryDefinition.md +36 -0
  21. data/docs/v1/FormulaAndFunctionQueryDefinition.md +5 -1
  22. data/docs/v1/FunnelQuery.md +22 -0
  23. data/docs/v1/FunnelRequestType.md +15 -0
  24. data/docs/v1/FunnelSource.md +15 -0
  25. data/docs/v1/FunnelWidgetDefinition.md +28 -0
  26. data/docs/v1/FunnelWidgetDefinitionType.md +15 -0
  27. data/docs/v1/FunnelWidgetRequest.md +20 -0
  28. data/docs/v1/LogsAPI.md +1 -1
  29. data/docs/v1/MetricContentEncoding.md +15 -0
  30. data/docs/v1/MetricsAPI.md +10 -6
  31. data/docs/v1/MetricsPayload.md +1 -1
  32. data/docs/v1/MonitorOptions.md +5 -1
  33. data/docs/v1/MonitorRenotifyStatusType.md +15 -0
  34. data/docs/v1/MonitorsAPI.md +9 -9
  35. data/docs/v1/NotebookCreateDataAttributes.md +2 -0
  36. data/docs/v1/NotebookMetadata.md +22 -0
  37. data/docs/v1/NotebookMetadataType.md +15 -0
  38. data/docs/v1/NotebookResponseDataAttributes.md +2 -0
  39. data/docs/v1/NotebookUpdateDataAttributes.md +2 -0
  40. data/docs/v1/NotebooksAPI.md +7 -3
  41. data/docs/v1/NotebooksResponseDataAttributes.md +2 -0
  42. data/docs/v1/ProcessQueryDefinition.md +1 -1
  43. data/docs/v1/README.md +31 -3
  44. data/docs/v1/SLOCorrection.md +1 -1
  45. data/docs/v1/SLOCorrectionCreateData.md +1 -1
  46. data/docs/v1/SLOCorrectionCreateRequestAttributes.md +4 -4
  47. data/docs/v1/SLOCorrectionListResponse.md +1 -1
  48. data/docs/v1/SLOCorrectionResponseAttributes.md +4 -4
  49. data/docs/v1/SLOCorrectionUpdateRequestAttributes.md +3 -3
  50. data/docs/v1/ScatterPlotWidgetDefinitionRequests.md +4 -2
  51. data/docs/v1/ScatterplotDimension.md +15 -0
  52. data/docs/v1/ScatterplotTableRequest.md +22 -0
  53. data/docs/v1/ScatterplotWidgetFormula.md +22 -0
  54. data/docs/v1/Series.md +1 -1
  55. data/docs/v1/ServiceChecksAPI.md +1 -1
  56. data/docs/v1/ServiceLevelObjectiveCorrectionsAPI.md +11 -11
  57. data/docs/v1/SyntheticsAPI.md +61 -0
  58. data/docs/v1/SyntheticsAPIStep.md +1 -1
  59. data/docs/v1/SyntheticsBatchDetails.md +18 -0
  60. data/docs/v1/SyntheticsBatchDetailsData.md +22 -0
  61. data/docs/v1/SyntheticsBatchResult.md +36 -0
  62. data/docs/v1/SyntheticsBrowserError.md +3 -3
  63. data/docs/v1/SyntheticsCIBatchMetadata.md +20 -0
  64. data/docs/v1/{SyntheticsCITestMetadataCi.md → SyntheticsCIBatchMetadataCI.md} +2 -2
  65. data/docs/v1/SyntheticsCIBatchMetadataGit.md +20 -0
  66. data/docs/v1/SyntheticsCITest.md +1 -1
  67. data/docs/v1/SyntheticsStatus.md +15 -0
  68. data/docs/v1/SyntheticsTestDetails.md +2 -0
  69. data/docs/v1/SyntheticsTestExecutionRule.md +15 -0
  70. data/docs/v1/SyntheticsTestRequest.md +2 -0
  71. data/docs/v1/UsageAttributionValues.md +4 -4
  72. data/docs/v1/UsageMeteringAPI.md +65 -0
  73. data/docs/v1/UsageSDSHour.md +22 -0
  74. data/docs/v1/UsageSDSResponse.md +18 -0
  75. data/docs/v1/UsageSummaryDate.md +4 -0
  76. data/docs/v1/UsageSummaryDateOrg.md +6 -2
  77. data/docs/v1/UsageSummaryResponse.md +6 -2
  78. data/docs/v1/UsageTimeseriesHour.md +1 -1
  79. data/docs/v1/WebhooksIntegration.md +1 -1
  80. data/docs/v1/WebhooksIntegrationUpdateRequest.md +1 -1
  81. data/docs/v1/WidgetDefinition.md +2 -0
  82. data/docs/v2/IncidentServicesAPI.md +5 -5
  83. data/docs/v2/IncidentTeamsAPI.md +5 -5
  84. data/docs/v2/IncidentsAPI.md +5 -5
  85. data/docs/v2/README.md +5 -0
  86. data/docs/v2/SecurityMonitoringAPI.md +5 -5
  87. data/examples/v1/metrics/SubmitMetrics.rbbeta +14 -0
  88. data/extract-code-blocks.awk +4 -0
  89. data/lib/datadog_api_client/v1/api/logs_api.rb +1 -1
  90. data/lib/datadog_api_client/v1/api/metrics_api.rb +5 -2
  91. data/lib/datadog_api_client/v1/api/monitors_api.rb +9 -9
  92. data/lib/datadog_api_client/v1/api/notebooks_api.rb +8 -2
  93. data/lib/datadog_api_client/v1/api/service_checks_api.rb +1 -1
  94. data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +16 -16
  95. data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -0
  96. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +77 -0
  97. data/lib/datadog_api_client/v1/api_client.rb +14 -0
  98. data/lib/datadog_api_client/v1/configuration.rb +7 -0
  99. data/lib/datadog_api_client/v1/models/aws_account.rb +37 -1
  100. data/lib/datadog_api_client/v1/models/content_encoding.rb +2 -2
  101. data/lib/datadog_api_client/v1/models/creator.rb +1 -0
  102. data/lib/datadog_api_client/v1/models/dashboard_summary_definition.rb +1 -0
  103. data/lib/datadog_api_client/v1/models/downtime_recurrence.rb +1 -1
  104. data/lib/datadog_api_client/v1/models/event.rb +1 -16
  105. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stat_name.rb +44 -0
  106. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_data_source.rb +38 -0
  107. data/lib/datadog_api_client/v1/models/formula_and_function_apm_dependency_stats_query_definition.rb +356 -0
  108. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stat_name.rb +47 -0
  109. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_data_source.rb +38 -0
  110. data/lib/datadog_api_client/v1/models/formula_and_function_apm_resource_stats_query_definition.rb +348 -0
  111. data/lib/datadog_api_client/v1/models/formula_and_function_query_definition.rb +2 -0
  112. data/lib/datadog_api_client/v1/models/funnel_query.rb +271 -0
  113. data/lib/datadog_api_client/v1/models/funnel_request_type.rb +38 -0
  114. data/lib/datadog_api_client/v1/models/funnel_source.rb +38 -0
  115. data/lib/datadog_api_client/v1/models/funnel_widget_definition.rb +322 -0
  116. data/lib/datadog_api_client/v1/models/funnel_widget_definition_type.rb +38 -0
  117. data/lib/datadog_api_client/v1/models/funnel_widget_request.rb +251 -0
  118. data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +38 -0
  119. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +1 -0
  120. data/lib/datadog_api_client/v1/models/monitor.rb +2 -0
  121. data/lib/datadog_api_client/v1/models/monitor_options.rb +26 -2
  122. data/lib/datadog_api_client/v1/models/monitor_renotify_status_type.rb +40 -0
  123. data/lib/datadog_api_client/v1/models/notebook_author.rb +2 -0
  124. data/lib/datadog_api_client/v1/models/notebook_create_data_attributes.rb +10 -1
  125. data/lib/datadog_api_client/v1/models/notebook_metadata.rb +259 -0
  126. data/lib/datadog_api_client/v1/models/notebook_metadata_type.rb +42 -0
  127. data/lib/datadog_api_client/v1/models/notebook_response_data_attributes.rb +10 -1
  128. data/lib/datadog_api_client/v1/models/notebook_update_data_attributes.rb +10 -1
  129. data/lib/datadog_api_client/v1/models/notebooks_response_data_attributes.rb +10 -1
  130. data/lib/datadog_api_client/v1/models/notebooks_response_meta.rb +1 -1
  131. data/lib/datadog_api_client/v1/models/scatter_plot_widget_definition_requests.rb +10 -11
  132. data/lib/datadog_api_client/v1/models/scatterplot_dimension.rb +41 -0
  133. data/lib/datadog_api_client/v1/models/scatterplot_table_request.rb +256 -0
  134. data/lib/datadog_api_client/v1/models/scatterplot_widget_formula.rb +262 -0
  135. data/lib/datadog_api_client/v1/models/slo_correction.rb +2 -2
  136. data/lib/datadog_api_client/v1/models/slo_correction_create_data.rb +6 -1
  137. data/lib/datadog_api_client/v1/models/slo_correction_create_request.rb +1 -1
  138. data/lib/datadog_api_client/v1/models/slo_correction_create_request_attributes.rb +5 -5
  139. data/lib/datadog_api_client/v1/models/slo_correction_list_response.rb +2 -2
  140. data/lib/datadog_api_client/v1/models/slo_correction_response.rb +1 -1
  141. data/lib/datadog_api_client/v1/models/slo_correction_response_attributes.rb +5 -5
  142. data/lib/datadog_api_client/v1/models/slo_correction_update_data.rb +1 -1
  143. data/lib/datadog_api_client/v1/models/slo_correction_update_request.rb +1 -1
  144. data/lib/datadog_api_client/v1/models/slo_correction_update_request_attributes.rb +4 -4
  145. data/lib/datadog_api_client/v1/models/synthetics_batch_details.rb +232 -0
  146. data/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb +253 -0
  147. data/lib/datadog_api_client/v1/models/synthetics_batch_result.rb +319 -0
  148. data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata.rb → synthetics_ci_batch_metadata.rb} +6 -6
  149. data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata_ci.rb → synthetics_ci_batch_metadata_ci.rb} +4 -4
  150. data/lib/datadog_api_client/v1/models/{synthetics_ci_test_metadata_git.rb → synthetics_ci_batch_metadata_git.rb} +5 -5
  151. data/lib/datadog_api_client/v1/models/synthetics_ci_test.rb +1 -1
  152. data/lib/datadog_api_client/v1/models/synthetics_status.rb +40 -0
  153. data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +10 -1
  154. data/lib/datadog_api_client/v1/models/synthetics_test_execution_rule.rb +40 -0
  155. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  156. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +13 -13
  157. data/lib/datadog_api_client/v1/models/usage_sds_hour.rb +253 -0
  158. data/lib/datadog_api_client/v1/models/usage_sds_response.rb +235 -0
  159. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
  160. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +28 -8
  161. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +29 -9
  162. data/lib/datadog_api_client/v1/models/usage_timeseries_hour.rb +1 -1
  163. data/lib/datadog_api_client/v1/models/webhooks_integration.rb +1 -1
  164. data/lib/datadog_api_client/v1/models/webhooks_integration_update_request.rb +1 -1
  165. data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
  166. data/lib/datadog_api_client/v1.rb +29 -3
  167. data/lib/datadog_api_client/v2/api/incident_services_api.rb +5 -5
  168. data/lib/datadog_api_client/v2/api/incident_teams_api.rb +5 -5
  169. data/lib/datadog_api_client/v2/api/incidents_api.rb +5 -5
  170. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +5 -5
  171. data/lib/datadog_api_client/v2/api_client.rb +14 -0
  172. data/lib/datadog_api_client/v2/configuration.rb +5 -0
  173. data/lib/datadog_api_client/v2/models/incident_field_attributes_multiple_value.rb +1 -0
  174. data/lib/datadog_api_client/v2/models/incident_field_attributes_single_value.rb +1 -0
  175. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -0
  176. data/lib/datadog_api_client/v2/models/user_attributes.rb +2 -0
  177. data/lib/datadog_api_client/version.rb +1 -1
  178. data/spec/v1/models/formula_and_function_apm_dependency_stat_name_spec.rb +31 -0
  179. data/spec/v1/models/formula_and_function_apm_dependency_stats_data_source_spec.rb +31 -0
  180. data/spec/v1/models/formula_and_function_apm_dependency_stats_query_definition_spec.rb +91 -0
  181. data/spec/v1/models/formula_and_function_apm_resource_stat_name_spec.rb +31 -0
  182. data/spec/v1/models/formula_and_function_apm_resource_stats_data_source_spec.rb +31 -0
  183. data/spec/v1/models/formula_and_function_apm_resource_stats_query_definition_spec.rb +91 -0
  184. data/spec/v1/models/funnel_query_spec.rb +49 -0
  185. data/spec/v1/models/funnel_request_type_spec.rb +31 -0
  186. data/spec/v1/models/funnel_source_spec.rb +31 -0
  187. data/spec/v1/models/funnel_widget_definition_spec.rb +67 -0
  188. data/spec/v1/models/funnel_widget_definition_type_spec.rb +31 -0
  189. data/spec/v1/models/funnel_widget_request_spec.rb +43 -0
  190. data/spec/v1/models/metric_content_encoding_spec.rb +31 -0
  191. data/spec/v1/models/monitor_renotify_status_type_spec.rb +31 -0
  192. data/spec/v1/models/notebook_metadata_spec.rb +49 -0
  193. data/spec/v1/models/notebook_metadata_type_spec.rb +31 -0
  194. data/spec/v1/models/scatterplot_dimension_spec.rb +31 -0
  195. data/spec/v1/models/scatterplot_table_request_spec.rb +49 -0
  196. data/spec/v1/models/scatterplot_widget_formula_spec.rb +49 -0
  197. data/spec/v1/models/synthetics_batch_details_data_spec.rb +49 -0
  198. data/spec/v1/models/synthetics_batch_details_spec.rb +37 -0
  199. data/spec/v1/models/synthetics_batch_result_spec.rb +91 -0
  200. data/spec/v1/models/{synthetics_ci_test_metadata_ci_spec.rb → synthetics_ci_batch_metadata_ci_spec.rb} +6 -6
  201. data/spec/v1/models/{synthetics_ci_test_metadata_git_spec.rb → synthetics_ci_batch_metadata_git_spec.rb} +6 -6
  202. data/spec/v1/models/{synthetics_ci_test_metadata_spec.rb → synthetics_ci_batch_metadata_spec.rb} +6 -6
  203. data/spec/v1/models/synthetics_status_spec.rb +31 -0
  204. data/spec/v1/models/synthetics_test_execution_rule_spec.rb +31 -0
  205. data/spec/v1/models/usage_sds_hour_spec.rb +49 -0
  206. data/spec/v1/models/usage_sds_response_spec.rb +37 -0
  207. metadata +119 -14
  208. data/docs/v1/SyntheticsCITestMetadata.md +0 -20
  209. data/docs/v1/SyntheticsCITestMetadataGit.md +0 -20
@@ -23,7 +23,7 @@ module DatadogAPIClient::V1
23
23
  @api_client = api_client
24
24
  end
25
25
  # Create an SLO correction
26
- # Create an SLO Correction
26
+ # Create an SLO Correction.
27
27
  # @param body [SLOCorrectionCreateRequest] Create an SLO Correction
28
28
  # @param [Hash] opts the optional parameters
29
29
  # @return [SLOCorrectionResponse]
@@ -33,7 +33,7 @@ module DatadogAPIClient::V1
33
33
  end
34
34
 
35
35
  # Create an SLO correction
36
- # Create an SLO Correction
36
+ # Create an SLO Correction.
37
37
  # @param body [SLOCorrectionCreateRequest] Create an SLO Correction
38
38
  # @param [Hash] opts the optional parameters
39
39
  # @return [Array<(SLOCorrectionResponse, Integer, Hash)>] SLOCorrectionResponse data, response status code and response headers
@@ -98,8 +98,8 @@ module DatadogAPIClient::V1
98
98
  end
99
99
 
100
100
  # Delete an SLO correction
101
- # Permanently delete the specified SLO correction object
102
- # @param slo_correction_id [String] The ID of the SLO correction object
101
+ # Permanently delete the specified SLO correction object.
102
+ # @param slo_correction_id [String] The ID of the SLO correction object.
103
103
  # @param [Hash] opts the optional parameters
104
104
  # @return [nil]
105
105
  def delete_slo_correction(slo_correction_id, opts = {})
@@ -108,8 +108,8 @@ module DatadogAPIClient::V1
108
108
  end
109
109
 
110
110
  # Delete an SLO correction
111
- # Permanently delete the specified SLO correction object
112
- # @param slo_correction_id [String] The ID of the SLO correction object
111
+ # Permanently delete the specified SLO correction object.
112
+ # @param slo_correction_id [String] The ID of the SLO correction object.
113
113
  # @param [Hash] opts the optional parameters
114
114
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
115
115
  def delete_slo_correction_with_http_info(slo_correction_id, opts = {})
@@ -171,8 +171,8 @@ module DatadogAPIClient::V1
171
171
  end
172
172
 
173
173
  # Get an SLO correction for an SLO
174
- # Get an SLO correction
175
- # @param slo_correction_id [String] The ID of the SLO correction object
174
+ # Get an SLO correction.
175
+ # @param slo_correction_id [String] The ID of the SLO correction object.
176
176
  # @param [Hash] opts the optional parameters
177
177
  # @return [SLOCorrectionResponse]
178
178
  def get_slo_correction(slo_correction_id, opts = {})
@@ -181,8 +181,8 @@ module DatadogAPIClient::V1
181
181
  end
182
182
 
183
183
  # Get an SLO correction for an SLO
184
- # Get an SLO correction
185
- # @param slo_correction_id [String] The ID of the SLO correction object
184
+ # Get an SLO correction.
185
+ # @param slo_correction_id [String] The ID of the SLO correction object.
186
186
  # @param [Hash] opts the optional parameters
187
187
  # @return [Array<(SLOCorrectionResponse, Integer, Hash)>] SLOCorrectionResponse data, response status code and response headers
188
188
  def get_slo_correction_with_http_info(slo_correction_id, opts = {})
@@ -244,7 +244,7 @@ module DatadogAPIClient::V1
244
244
  end
245
245
 
246
246
  # Get all SLO corrections
247
- # Get all Service Level Objective corrections
247
+ # Get all Service Level Objective corrections.
248
248
  # @param [Hash] opts the optional parameters
249
249
  # @return [SLOCorrectionListResponse]
250
250
  def list_slo_correction(opts = {})
@@ -253,7 +253,7 @@ module DatadogAPIClient::V1
253
253
  end
254
254
 
255
255
  # Get all SLO corrections
256
- # Get all Service Level Objective corrections
256
+ # Get all Service Level Objective corrections.
257
257
  # @param [Hash] opts the optional parameters
258
258
  # @return [Array<(SLOCorrectionListResponse, Integer, Hash)>] SLOCorrectionListResponse data, response status code and response headers
259
259
  def list_slo_correction_with_http_info(opts = {})
@@ -311,8 +311,8 @@ module DatadogAPIClient::V1
311
311
  end
312
312
 
313
313
  # Update an SLO correction
314
- # Update the specified SLO correction object object
315
- # @param slo_correction_id [String] The ID of the SLO correction object
314
+ # Update the specified SLO correction object object.
315
+ # @param slo_correction_id [String] The ID of the SLO correction object.
316
316
  # @param body [SLOCorrectionUpdateRequest] The edited SLO correction object.
317
317
  # @param [Hash] opts the optional parameters
318
318
  # @return [SLOCorrectionResponse]
@@ -322,8 +322,8 @@ module DatadogAPIClient::V1
322
322
  end
323
323
 
324
324
  # Update an SLO correction
325
- # Update the specified SLO correction object object
326
- # @param slo_correction_id [String] The ID of the SLO correction object
325
+ # Update the specified SLO correction object object.
326
+ # @param slo_correction_id [String] The ID of the SLO correction object.
327
327
  # @param body [SLOCorrectionUpdateRequest] The edited SLO correction object.
328
328
  # @param [Hash] opts the optional parameters
329
329
  # @return [Array<(SLOCorrectionResponse, Integer, Hash)>] SLOCorrectionResponse data, response status code and response headers
@@ -1238,6 +1238,79 @@ module DatadogAPIClient::V1
1238
1238
  return data, status_code, headers
1239
1239
  end
1240
1240
 
1241
+ # Get details of batch
1242
+ # Get a batch's updated details.
1243
+ # @param batch_id [String] The ID of the batch.
1244
+ # @param [Hash] opts the optional parameters
1245
+ # @return [SyntheticsBatchDetails]
1246
+ def get_synthetics_ci_batch(batch_id, opts = {})
1247
+ data, _status_code, _headers = get_synthetics_ci_batch_with_http_info(batch_id, opts)
1248
+ data
1249
+ end
1250
+
1251
+ # Get details of batch
1252
+ # Get a batch&#39;s updated details.
1253
+ # @param batch_id [String] The ID of the batch.
1254
+ # @param [Hash] opts the optional parameters
1255
+ # @return [Array<(SyntheticsBatchDetails, Integer, Hash)>] SyntheticsBatchDetails data, response status code and response headers
1256
+ def get_synthetics_ci_batch_with_http_info(batch_id, opts = {})
1257
+
1258
+ if @api_client.config.unstable_operations.has_key?(:get_synthetics_ci_batch)
1259
+ unstable_enabled = @api_client.config.unstable_operations[:get_synthetics_ci_batch]
1260
+ if unstable_enabled
1261
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "get_synthetics_ci_batch")
1262
+ else
1263
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_synthetics_ci_batch"))
1264
+ end
1265
+ end
1266
+
1267
+ if @api_client.config.debugging
1268
+ @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_ci_batch ...'
1269
+ end
1270
+ # verify the required parameter 'batch_id' is set
1271
+ if @api_client.config.client_side_validation && batch_id.nil?
1272
+ fail ArgumentError, "Missing the required parameter 'batch_id' when calling SyntheticsAPI.get_synthetics_ci_batch"
1273
+ end
1274
+ # resource path
1275
+ local_var_path = '/api/v1/synthetics/ci/batch/{batch_id}'.sub('{' + 'batch_id' + '}', CGI.escape(batch_id.to_s))
1276
+
1277
+ # query parameters
1278
+ query_params = opts[:query_params] || {}
1279
+
1280
+ # header parameters
1281
+ header_params = opts[:header_params] || {}
1282
+ # HTTP header 'Accept' (if needed)
1283
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1284
+
1285
+ # form parameters
1286
+ form_params = opts[:form_params] || {}
1287
+
1288
+ # http body (model)
1289
+ post_body = opts[:debug_body]
1290
+
1291
+ # return_type
1292
+ return_type = opts[:debug_return_type] || 'SyntheticsBatchDetails'
1293
+
1294
+ # auth_names
1295
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
1296
+
1297
+ new_options = opts.merge(
1298
+ :operation => :get_synthetics_ci_batch,
1299
+ :header_params => header_params,
1300
+ :query_params => query_params,
1301
+ :form_params => form_params,
1302
+ :body => post_body,
1303
+ :auth_names => auth_names,
1304
+ :return_type => return_type
1305
+ )
1306
+
1307
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1308
+ if @api_client.config.debugging
1309
+ @api_client.config.logger.debug "API called: SyntheticsAPI#get_synthetics_ci_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1310
+ end
1311
+ return data, status_code, headers
1312
+ end
1313
+
1241
1314
  # Get a test configuration
1242
1315
  # Get the detailed configuration associated with a Synthetics test.
1243
1316
  # @param public_id [String] The public ID of the test to get details from.
@@ -1958,6 +1958,83 @@ module DatadogAPIClient::V1
1958
1958
  return data, status_code, headers
1959
1959
  end
1960
1960
 
1961
+ # Get hourly usage for Sensitive Data Scanner
1962
+ # Get hourly usage for Sensitive Data Scanner.
1963
+ # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
1964
+ # @param [Hash] opts the optional parameters
1965
+ # @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.
1966
+ # @return [UsageSDSResponse]
1967
+ def get_usage_sds(start_hr, opts = {})
1968
+ data, _status_code, _headers = get_usage_sds_with_http_info(start_hr, opts)
1969
+ data
1970
+ end
1971
+
1972
+ # Get hourly usage for Sensitive Data Scanner
1973
+ # Get hourly usage for Sensitive Data Scanner.
1974
+ # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
1975
+ # @param [Hash] opts the optional parameters
1976
+ # @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.
1977
+ # @return [Array<(UsageSDSResponse, Integer, Hash)>] UsageSDSResponse data, response status code and response headers
1978
+ def get_usage_sds_with_http_info(start_hr, opts = {})
1979
+
1980
+ if @api_client.config.unstable_operations.has_key?(:get_usage_sds)
1981
+ unstable_enabled = @api_client.config.unstable_operations[:get_usage_sds]
1982
+ if unstable_enabled
1983
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "get_usage_sds")
1984
+ else
1985
+ raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_usage_sds"))
1986
+ end
1987
+ end
1988
+
1989
+ if @api_client.config.debugging
1990
+ @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_sds ...'
1991
+ end
1992
+ # verify the required parameter 'start_hr' is set
1993
+ if @api_client.config.client_side_validation && start_hr.nil?
1994
+ fail ArgumentError, "Missing the required parameter 'start_hr' when calling UsageMeteringAPI.get_usage_sds"
1995
+ end
1996
+ # resource path
1997
+ local_var_path = '/api/v1/usage/sds'
1998
+
1999
+ # query parameters
2000
+ query_params = opts[:query_params] || {}
2001
+ query_params[:'start_hr'] = start_hr
2002
+ query_params[:'end_hr'] = opts[:'end_hr'] if !opts[:'end_hr'].nil?
2003
+
2004
+ # header parameters
2005
+ header_params = opts[:header_params] || {}
2006
+ # HTTP header 'Accept' (if needed)
2007
+ header_params['Accept'] = @api_client.select_header_accept(['application/json;datetime-format=rfc3339'])
2008
+
2009
+ # form parameters
2010
+ form_params = opts[:form_params] || {}
2011
+
2012
+ # http body (model)
2013
+ post_body = opts[:debug_body]
2014
+
2015
+ # return_type
2016
+ return_type = opts[:debug_return_type] || 'UsageSDSResponse'
2017
+
2018
+ # auth_names
2019
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
2020
+
2021
+ new_options = opts.merge(
2022
+ :operation => :get_usage_sds,
2023
+ :header_params => header_params,
2024
+ :query_params => query_params,
2025
+ :form_params => form_params,
2026
+ :body => post_body,
2027
+ :auth_names => auth_names,
2028
+ :return_type => return_type
2029
+ )
2030
+
2031
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2032
+ if @api_client.config.debugging
2033
+ @api_client.config.logger.debug "API called: UsageMeteringAPI#get_usage_sds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2034
+ end
2035
+ return data, status_code, headers
2036
+ end
2037
+
1961
2038
  # Get hourly usage for SNMP devices
1962
2039
  # Get hourly usage for SNMP devices.
1963
2040
  # @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour.
@@ -39,6 +39,7 @@ module DatadogAPIClient::V1
39
39
  'Content-Type' => 'application/json',
40
40
  'User-Agent' => @user_agent
41
41
  }
42
+ @default_headers['Accept-Encoding'] = 'gzip' if @config.compress
42
43
  end
43
44
 
44
45
  def self.default
@@ -156,6 +157,13 @@ module DatadogAPIClient::V1
156
157
  else
157
158
  data = nil
158
159
  end
160
+ if header_params['Content-Encoding'] == 'gzip'
161
+ gzip = Zlib::Deflate.new(nil, Zlib::MAX_WBITS + 16)
162
+ data = gzip.deflate(data, Zlib::FINISH)
163
+ gzip.close
164
+ elsif header_params['Content-Encoding'] == 'deflate'
165
+ data = Zlib::deflate(data)
166
+ end
159
167
  data
160
168
  end
161
169
 
@@ -222,6 +230,12 @@ module DatadogAPIClient::V1
222
230
 
223
231
  return nil if body.nil? || body.empty?
224
232
 
233
+ if response.headers['Content-Encoding'].eql?('gzip') then
234
+ gzip = Zlib::Inflate.new(Zlib::MAX_WBITS + 16)
235
+ body = gzip.inflate(body)
236
+ gzip.close
237
+ end
238
+
225
239
  # return response body directly for String return type
226
240
  return body if return_type == 'String'
227
241
 
@@ -143,6 +143,9 @@ module DatadogAPIClient::V1
143
143
 
144
144
  attr_accessor :force_ending_format
145
145
 
146
+ # Set this to add accept encoding header for compression
147
+ attr_accessor :compress
148
+
146
149
  def initialize
147
150
  @scheme = 'https'
148
151
  @host = 'api.datadoghq.com'
@@ -163,6 +166,7 @@ module DatadogAPIClient::V1
163
166
  @debugging = false
164
167
  @inject_format = false
165
168
  @force_ending_format = false
169
+ @compress = true
166
170
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
167
171
  @unstable_operations = {
168
172
  create_slo_correction: false,
@@ -288,6 +292,7 @@ module DatadogAPIClient::V1
288
292
  enum_values: [
289
293
  "datadoghq.com",
290
294
  "us3.datadoghq.com",
295
+ "us5.datadoghq.com",
291
296
  "datadoghq.eu",
292
297
  "ddog-gov.com"
293
298
  ]
@@ -342,6 +347,7 @@ module DatadogAPIClient::V1
342
347
  enum_values: [
343
348
  "datadoghq.com",
344
349
  "us3.datadoghq.com",
350
+ "us5.datadoghq.com",
345
351
  "datadoghq.eu",
346
352
  "ddog-gov.com"
347
353
  ]
@@ -388,6 +394,7 @@ module DatadogAPIClient::V1
388
394
  enum_values: [
389
395
  "datadoghq.com",
390
396
  "us3.datadoghq.com",
397
+ "us5.datadoghq.com",
391
398
  "datadoghq.eu",
392
399
  "ddog-gov.com"
393
400
  ]
@@ -31,6 +31,9 @@ module DatadogAPIClient::V1
31
31
  # An object, (in the form `{\"namespace1\":true/false, \"namespace2\":true/false}`), that enables or disables metric collection for specific AWS namespaces for this AWS account only.
32
32
  attr_accessor :account_specific_namespace_rules
33
33
 
34
+ # Whether Datadog collects cloud security posture management resources from your AWS account. This includes additional resources not covered under the general `resource_collection`.
35
+ attr_accessor :cspm_resource_collection_enabled
36
+
34
37
  # An array of AWS regions to exclude from metrics collection.
35
38
  attr_accessor :excluded_regions
36
39
 
@@ -40,6 +43,12 @@ module DatadogAPIClient::V1
40
43
  # Array of tags (in the form `key:value`) to add to all hosts and metrics reporting through this integration.
41
44
  attr_accessor :host_tags
42
45
 
46
+ # Whether Datadog collects metrics for this AWS account.
47
+ attr_accessor :metrics_collection_enabled
48
+
49
+ # Whether Datadog collects a standard set of resources from your AWS account.
50
+ attr_accessor :resource_collection_enabled
51
+
43
52
  # Your Datadog role delegation name.
44
53
  attr_accessor :role_name
45
54
 
@@ -52,9 +61,12 @@ module DatadogAPIClient::V1
52
61
  :'access_key_id' => :'access_key_id',
53
62
  :'account_id' => :'account_id',
54
63
  :'account_specific_namespace_rules' => :'account_specific_namespace_rules',
64
+ :'cspm_resource_collection_enabled' => :'cspm_resource_collection_enabled',
55
65
  :'excluded_regions' => :'excluded_regions',
56
66
  :'filter_tags' => :'filter_tags',
57
67
  :'host_tags' => :'host_tags',
68
+ :'metrics_collection_enabled' => :'metrics_collection_enabled',
69
+ :'resource_collection_enabled' => :'resource_collection_enabled',
58
70
  :'role_name' => :'role_name',
59
71
  :'secret_access_key' => :'secret_access_key'
60
72
  }
@@ -71,9 +83,12 @@ module DatadogAPIClient::V1
71
83
  :'access_key_id' => :'String',
72
84
  :'account_id' => :'String',
73
85
  :'account_specific_namespace_rules' => :'Hash<String, Boolean>',
86
+ :'cspm_resource_collection_enabled' => :'Boolean',
74
87
  :'excluded_regions' => :'Array<String>',
75
88
  :'filter_tags' => :'Array<String>',
76
89
  :'host_tags' => :'Array<String>',
90
+ :'metrics_collection_enabled' => :'Boolean',
91
+ :'resource_collection_enabled' => :'Boolean',
77
92
  :'role_name' => :'String',
78
93
  :'secret_access_key' => :'String'
79
94
  }
@@ -114,6 +129,12 @@ module DatadogAPIClient::V1
114
129
  end
115
130
  end
116
131
 
132
+ if attributes.key?(:'cspm_resource_collection_enabled')
133
+ self.cspm_resource_collection_enabled = attributes[:'cspm_resource_collection_enabled']
134
+ else
135
+ self.cspm_resource_collection_enabled = false
136
+ end
137
+
117
138
  if attributes.key?(:'excluded_regions')
118
139
  if (value = attributes[:'excluded_regions']).is_a?(Array)
119
140
  self.excluded_regions = value
@@ -132,6 +153,18 @@ module DatadogAPIClient::V1
132
153
  end
133
154
  end
134
155
 
156
+ if attributes.key?(:'metrics_collection_enabled')
157
+ self.metrics_collection_enabled = attributes[:'metrics_collection_enabled']
158
+ else
159
+ self.metrics_collection_enabled = true
160
+ end
161
+
162
+ if attributes.key?(:'resource_collection_enabled')
163
+ self.resource_collection_enabled = attributes[:'resource_collection_enabled']
164
+ else
165
+ self.resource_collection_enabled = false
166
+ end
167
+
135
168
  if attributes.key?(:'role_name')
136
169
  self.role_name = attributes[:'role_name']
137
170
  end
@@ -162,9 +195,12 @@ module DatadogAPIClient::V1
162
195
  access_key_id == o.access_key_id &&
163
196
  account_id == o.account_id &&
164
197
  account_specific_namespace_rules == o.account_specific_namespace_rules &&
198
+ cspm_resource_collection_enabled == o.cspm_resource_collection_enabled &&
165
199
  excluded_regions == o.excluded_regions &&
166
200
  filter_tags == o.filter_tags &&
167
201
  host_tags == o.host_tags &&
202
+ metrics_collection_enabled == o.metrics_collection_enabled &&
203
+ resource_collection_enabled == o.resource_collection_enabled &&
168
204
  role_name == o.role_name &&
169
205
  secret_access_key == o.secret_access_key
170
206
  end
@@ -178,7 +214,7 @@ module DatadogAPIClient::V1
178
214
  # Calculates hash code according to all attributes.
179
215
  # @return [Integer] Hash code
180
216
  def hash
181
- [access_key_id, account_id, account_specific_namespace_rules, excluded_regions, filter_tags, host_tags, role_name, secret_access_key].hash
217
+ [access_key_id, account_id, account_specific_namespace_rules, cspm_resource_collection_enabled, excluded_regions, filter_tags, host_tags, metrics_collection_enabled, resource_collection_enabled, role_name, secret_access_key].hash
182
218
  end
183
219
 
184
220
  # Builds the object from hash
@@ -18,8 +18,8 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V1
20
20
  class ContentEncoding
21
- gzip = "gzip".freeze
22
- deflate = "deflate".freeze
21
+ GZIP = "gzip".freeze
22
+ DEFLATE = "deflate".freeze
23
23
 
24
24
  # Builds the enum from string
25
25
  # @param [String] The enum value in the form of the string
@@ -57,6 +57,7 @@ module DatadogAPIClient::V1
57
57
  # List of attributes with nullable: true
58
58
  def self.openapi_nullable
59
59
  Set.new([
60
+ :'name'
60
61
  ])
61
62
  end
62
63
 
@@ -86,6 +86,7 @@ module DatadogAPIClient::V1
86
86
  # List of attributes with nullable: true
87
87
  def self.openapi_nullable
88
88
  Set.new([
89
+ :'description',
89
90
  ])
90
91
  end
91
92
 
@@ -25,7 +25,7 @@ module DatadogAPIClient::V1
25
25
  # How often to repeat as an integer. For example, to repeat every 3 days, select a type of `days` and a period of `3`.
26
26
  attr_accessor :period
27
27
 
28
- # The `RRULE` standard for defining recurring events (**requires to set \"type\" to rrule**) For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) are supported. **Note**: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`). More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/supress-alert-with-downtimes/?tab=api)
28
+ # The `RRULE` standard for defining recurring events (**requires to set \"type\" to rrule**) For example, to have a recurring event on the first day of each month, set the type to `rrule` and set the `FREQ` to `MONTHLY` and `BYMONTHDAY` to `1`. Most common `rrule` options from the [iCalendar Spec](https://tools.ietf.org/html/rfc5545) are supported. **Note**: Attributes specifying the duration in `RRULE` are not supported (for example, `DTSTART`, `DTEND`, `DURATION`). More examples available in this [downtime guide](https://docs.datadoghq.com/monitors/guide/suppress-alert-with-downtimes/?tab=api)
29
29
  attr_accessor :rrule
30
30
 
31
31
  # The type of recurrence. Choose from `days`, `weeks`, `months`, `years`, `rrule`.
@@ -53,7 +53,7 @@ module DatadogAPIClient::V1
53
53
  # The body of the event. Limited to 4000 characters. The text supports markdown. To use markdown in the event text, start the text block with `%%% \\n` and end the text block with `\\n %%%`. Use `msg_text` with the Datadog Ruby library.
54
54
  attr_accessor :text
55
55
 
56
- # The event title. Limited to 100 characters. Use `msg_title` with the Datadog Ruby library.
56
+ # The event title.
57
57
  attr_accessor :title
58
58
 
59
59
  # URL of the event.
@@ -186,10 +186,6 @@ module DatadogAPIClient::V1
186
186
  invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 4000.')
187
187
  end
188
188
 
189
- if !@title.nil? && @title.to_s.length > 100
190
- invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 100.')
191
- end
192
-
193
189
  invalid_properties
194
190
  end
195
191
 
@@ -197,7 +193,6 @@ module DatadogAPIClient::V1
197
193
  # @return true if the model is valid
198
194
  def valid?
199
195
  return false if !@text.nil? && @text.to_s.length > 4000
200
- return false if !@title.nil? && @title.to_s.length > 100
201
196
  true
202
197
  end
203
198
 
@@ -211,16 +206,6 @@ module DatadogAPIClient::V1
211
206
  @text = text
212
207
  end
213
208
 
214
- # Custom attribute writer method with validation
215
- # @param [Object] title Value to be assigned
216
- def title=(title)
217
- if !title.nil? && title.to_s.length > 100
218
- fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 100.'
219
- end
220
-
221
- @title = title
222
- end
223
-
224
209
  # Checks equality by comparing each attribute.
225
210
  # @param [Object] Object to be compared
226
211
  def ==(o)
@@ -0,0 +1,44 @@
1
+ =begin
2
+ #Datadog API V1 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://openapi-generator.tech
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::V1
20
+ class FormulaAndFunctionApmDependencyStatName
21
+ AVG_DURATION = "avg_duration".freeze
22
+ AVG_ROOT_DURATION = "avg_root_duration".freeze
23
+ AVG_SPANS_PER_TRACE = "avg_spans_per_trace".freeze
24
+ ERROR_RATE = "error_rate".freeze
25
+ PCT_EXEC_TIME = "pct_exec_time".freeze
26
+ PCT_OF_TRACES = "pct_of_traces".freeze
27
+ TOTAL_TRACES_COUNT = "total_traces_count".freeze
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def self.build_from_hash(value)
33
+ new.build_from_hash(value)
34
+ end
35
+
36
+ # Builds the enum from string
37
+ # @param [String] The enum value in the form of the string
38
+ # @return [String] The enum value
39
+ def build_from_hash(value)
40
+ constantValues = FormulaAndFunctionApmDependencyStatName.constants.select { |c| FormulaAndFunctionApmDependencyStatName::const_get(c) == value }
41
+ constantValues.empty? ? DatadogAPIClient::V1::UnparsedObject.new(value) : value
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,38 @@
1
+ =begin
2
+ #Datadog API V1 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://openapi-generator.tech
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::V1
20
+ class FormulaAndFunctionApmDependencyStatsDataSource
21
+ APM_DEPENDENCY_STATS = "apm_dependency_stats".freeze
22
+
23
+ # Builds the enum from string
24
+ # @param [String] The enum value in the form of the string
25
+ # @return [String] The enum value
26
+ def self.build_from_hash(value)
27
+ new.build_from_hash(value)
28
+ end
29
+
30
+ # Builds the enum from string
31
+ # @param [String] The enum value in the form of the string
32
+ # @return [String] The enum value
33
+ def build_from_hash(value)
34
+ constantValues = FormulaAndFunctionApmDependencyStatsDataSource.constants.select { |c| FormulaAndFunctionApmDependencyStatsDataSource::const_get(c) == value }
35
+ constantValues.empty? ? DatadogAPIClient::V1::UnparsedObject.new(value) : value
36
+ end
37
+ end
38
+ end