datadog_api_client 2.16.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (292) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +799 -16
  4. data/.generator/schemas/v2/openapi.yaml +2732 -409
  5. data/.generator/src/generator/cli.py +5 -0
  6. data/.generator/src/generator/formatter.py +4 -0
  7. data/.generator/src/generator/openapi.py +2 -0
  8. data/.generator/src/generator/templates/api_client.j2 +3 -0
  9. data/.generator/src/generator/templates/datadog_api_client.j2 +19 -0
  10. data/.generator/src/generator/templates/inflector.j2 +1 -1
  11. data/.generator/src/generator/templates/model_base.j2 +4 -0
  12. data/.pre-commit-config.yaml +1 -1
  13. data/CHANGELOG.md +54 -0
  14. data/Gemfile +1 -0
  15. data/LICENSE-3rdparty.csv +1 -0
  16. data/datadog_api_client.gemspec +2 -0
  17. data/examples/v1/aws-integration/CreateAWSAccount.rb +2 -2
  18. data/examples/v1/aws-integration/CreateAWSEventBridgeSource.rb +12 -0
  19. data/examples/v1/aws-integration/CreateAWSTagFilter.rb +1 -1
  20. data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -1
  21. data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
  22. data/examples/v1/aws-integration/DeleteAWSEventBridgeSource.rb +11 -0
  23. data/examples/v1/aws-integration/ListAWSEventBridgeSources.rb +5 -0
  24. data/examples/v1/aws-integration/UpdateAWSAccount.rb +6 -6
  25. data/examples/v1/azure-integration/CreateAzureIntegration.rb +2 -0
  26. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +2 -0
  27. data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +2 -0
  28. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +2 -0
  29. data/examples/v1/dashboards/CreateDashboard_1213075383.rb +7 -0
  30. data/examples/v1/dashboards/CreateDashboard_1284514532.rb +3 -0
  31. data/examples/v1/monitors/CreateMonitor_1539578087.rb +0 -1
  32. data/examples/v1/synthetics/PatchTest.rb +22 -0
  33. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
  34. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
  35. data/examples/v2/confluent-cloud/DeleteConfluentAccount.rb +4 -1
  36. data/examples/v2/confluent-cloud/DeleteConfluentResource.rb +5 -0
  37. data/examples/v2/container-images/ListContainerImages.rb +0 -3
  38. data/examples/v2/container-images/ListContainerImages_3088586393.rb +0 -3
  39. data/examples/v2/container-images/ListContainerImages_3974828736.rb +0 -3
  40. data/examples/v2/containers/ListContainers.rb +5 -0
  41. data/examples/v2/containers/ListContainers_2175733917.rb +8 -0
  42. data/examples/v2/containers/ListContainers_931009654.rb +8 -0
  43. data/examples/v2/dora-metrics/CreateDORADeployment.rb +23 -0
  44. data/examples/v2/dora-metrics/CreateDORAIncident.rb +25 -0
  45. data/examples/v2/downtimes/ListMonitorDowntimes.rb +1 -1
  46. data/examples/v2/events/ListEvents.rb +0 -3
  47. data/examples/v2/events/ListEvents_1527584014.rb +0 -3
  48. data/examples/v2/events/ListEvents_2663715109.rb +0 -3
  49. data/examples/v2/events/SearchEvents.rb +0 -3
  50. data/examples/v2/events/SearchEvents_3856995058.rb +0 -3
  51. data/examples/v2/key-management/CreateCurrentUserApplicationKey.rb +2 -7
  52. data/examples/v2/key-management/DeleteApplicationKey.rb +4 -1
  53. data/examples/v2/key-management/DeleteCurrentUserApplicationKey.rb +4 -1
  54. data/examples/v2/okta-integration/CreateOktaAccount.rb +19 -0
  55. data/examples/v2/okta-integration/DeleteOktaAccount.rb +5 -0
  56. data/examples/v2/okta-integration/GetOktaAccount.rb +8 -0
  57. data/examples/v2/okta-integration/ListOktaAccounts.rb +5 -0
  58. data/examples/v2/okta-integration/UpdateOktaAccount.rb +20 -0
  59. data/examples/v2/powerpack/CreatePowerpack.rb +1 -0
  60. data/examples/v2/powerpack/UpdatePowerpack.rb +1 -0
  61. data/examples/v2/security-monitoring/MuteFindings.rb +29 -0
  62. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
  63. data/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.rb +27 -0
  64. data/examples/v2/service-scorecards/CreateScorecardRule.rb +19 -0
  65. data/examples/v2/service-scorecards/DeleteScorecardRule.rb +11 -0
  66. data/examples/v2/service-scorecards/ListScorecardOutcomes.rb +8 -0
  67. data/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.rb +13 -0
  68. data/examples/v2/service-scorecards/ListScorecardRules.rb +8 -0
  69. data/examples/v2/service-scorecards/ListScorecardRules_4057666343.rb +13 -0
  70. data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +3 -1
  71. data/examples/v2/teams/ListTeams_3429963470.rb +12 -0
  72. data/examples/v2/usage-metering/GetActiveBillingDimensions.rb +8 -0
  73. data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +8 -0
  74. data/examples/v2/usage-metering/GetProjectedCost.rb +8 -0
  75. data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +4 -1
  76. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +4 -1
  77. data/examples/v2/usage-metering/GetUsageObservabilityPipelines.rb +4 -1
  78. data/examples/v2/users/GetUser.rb +5 -2
  79. data/lib/datadog_api_client/api_client.rb +3 -0
  80. data/lib/datadog_api_client/configuration.rb +11 -4
  81. data/lib/datadog_api_client/inflector.rb +137 -9
  82. data/lib/datadog_api_client/v1/api/aws_integration_api.rb +194 -0
  83. data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -1
  84. data/lib/datadog_api_client/v1/api/monitors_api.rb +5 -1
  85. data/lib/datadog_api_client/v1/api/synthetics_api.rb +73 -1
  86. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  87. data/lib/datadog_api_client/v1/model_base.rb +4 -0
  88. data/lib/datadog_api_client/v1/models/aws_account.rb +2 -1
  89. data/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb +105 -0
  90. data/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb +112 -0
  91. data/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb +110 -0
  92. data/lib/datadog_api_client/v1/models/aws_event_bridge_create_status.rb +26 -0
  93. data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb +100 -0
  94. data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb +80 -0
  95. data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_status.rb +26 -0
  96. data/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb +92 -0
  97. data/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb +90 -0
  98. data/lib/datadog_api_client/v1/models/azure_account.rb +24 -2
  99. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +21 -0
  100. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  101. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +42 -0
  102. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +421 -1
  103. data/lib/datadog_api_client/v1/models/synthetics_patch_test_body.rb +82 -0
  104. data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation.rb +100 -0
  105. data/lib/datadog_api_client/v1/models/synthetics_patch_test_operation_name.rb +31 -0
  106. data/lib/datadog_api_client/v1/models/toplist_widget_definition.rb +11 -1
  107. data/lib/datadog_api_client/v1/models/toplist_widget_display.rb +63 -0
  108. data/lib/datadog_api_client/v1/models/toplist_widget_flat.rb +98 -0
  109. data/lib/datadog_api_client/v1/models/toplist_widget_flat_type.rb +26 -0
  110. data/lib/datadog_api_client/v1/models/toplist_widget_legend.rb +28 -0
  111. data/lib/datadog_api_client/v1/models/toplist_widget_scaling.rb +27 -0
  112. data/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +119 -0
  113. data/lib/datadog_api_client/v1/models/toplist_widget_stacked_type.rb +26 -0
  114. data/lib/datadog_api_client/v1/models/toplist_widget_style.rb +90 -0
  115. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
  116. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
  117. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
  118. data/lib/datadog_api_client/v1/models/widget_live_span.rb +2 -0
  119. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +6 -0
  120. data/lib/datadog_api_client/v2/api/container_images_api.rb +0 -6
  121. data/lib/datadog_api_client/v2/api/containers_api.rb +123 -0
  122. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +181 -0
  123. data/lib/datadog_api_client/v2/api/events_api.rb +0 -12
  124. data/lib/datadog_api_client/v2/api/key_management_api.rb +8 -0
  125. data/lib/datadog_api_client/v2/api/metrics_api.rb +6 -3
  126. data/lib/datadog_api_client/v2/api/okta_integration_api.rb +355 -0
  127. data/lib/datadog_api_client/v2/api/roles_api.rb +2 -0
  128. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +66 -72
  129. data/lib/datadog_api_client/v2/api/service_scorecards_api.rb +457 -0
  130. data/lib/datadog_api_client/v2/api/teams_api.rb +2 -0
  131. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +241 -0
  132. data/lib/datadog_api_client/v2/model_base.rb +4 -0
  133. data/lib/datadog_api_client/v2/models/active_billing_dimensions_attributes.rb +92 -0
  134. data/lib/datadog_api_client/v2/models/active_billing_dimensions_body.rb +100 -0
  135. data/lib/datadog_api_client/v2/models/active_billing_dimensions_response.rb +80 -0
  136. data/lib/datadog_api_client/v2/models/active_billing_dimensions_type.rb +26 -0
  137. data/lib/datadog_api_client/v2/models/api_keys_response.rb +14 -4
  138. data/lib/datadog_api_client/v2/models/api_keys_response_meta.rb +90 -0
  139. data/lib/datadog_api_client/v2/models/api_keys_response_meta_page.rb +80 -0
  140. data/lib/datadog_api_client/v2/models/application_key_response_meta.rb +90 -0
  141. data/lib/datadog_api_client/v2/models/application_key_response_meta_page.rb +80 -0
  142. data/lib/datadog_api_client/v2/models/bulk_mute_findings_request.rb +98 -0
  143. data/lib/datadog_api_client/v2/models/{mute_finding_request_attributes.rb → bulk_mute_findings_request_attributes.rb} +5 -5
  144. data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_data.rb +161 -0
  145. data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb +82 -0
  146. data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb +80 -0
  147. data/lib/datadog_api_client/v2/models/{mute_finding_request_properties.rb → bulk_mute_findings_request_properties.rb} +6 -6
  148. data/lib/datadog_api_client/v2/models/bulk_mute_findings_response.rb +98 -0
  149. data/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb +90 -0
  150. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +13 -1
  151. data/lib/datadog_api_client/v2/models/{mute_finding_response_data.rb → container.rb} +9 -9
  152. data/lib/datadog_api_client/v2/models/container_attributes.rb +183 -0
  153. data/lib/datadog_api_client/v2/models/container_group.rb +110 -0
  154. data/lib/datadog_api_client/v2/models/container_group_attributes.rb +90 -0
  155. data/lib/datadog_api_client/v2/models/container_group_relationships.rb +80 -0
  156. data/lib/datadog_api_client/v2/models/container_group_relationships_link.rb +92 -0
  157. data/lib/datadog_api_client/v2/models/container_group_relationships_links.rb +80 -0
  158. data/lib/datadog_api_client/v2/models/container_group_type.rb +26 -0
  159. data/lib/datadog_api_client/v2/models/container_item.rb +63 -0
  160. data/lib/datadog_api_client/v2/models/container_meta.rb +80 -0
  161. data/lib/datadog_api_client/v2/models/container_meta_page.rb +160 -0
  162. data/lib/datadog_api_client/v2/models/container_meta_page_type.rb +26 -0
  163. data/lib/datadog_api_client/v2/models/container_type.rb +26 -0
  164. data/lib/datadog_api_client/v2/models/containers_response.rb +102 -0
  165. data/lib/datadog_api_client/v2/models/containers_response_links.rb +130 -0
  166. data/lib/datadog_api_client/v2/models/cost_attribution_aggregates_body.rb +100 -0
  167. data/lib/datadog_api_client/v2/models/cost_attribution_type.rb +26 -0
  168. data/lib/datadog_api_client/v2/models/create_rule_request.rb +80 -0
  169. data/lib/datadog_api_client/v2/models/create_rule_request_data.rb +90 -0
  170. data/lib/datadog_api_client/v2/models/create_rule_response.rb +80 -0
  171. data/lib/datadog_api_client/v2/models/create_rule_response_data.rb +110 -0
  172. data/lib/datadog_api_client/v2/models/dora_deployment_request.rb +98 -0
  173. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +170 -0
  174. data/lib/datadog_api_client/v2/models/dora_deployment_request_data.rb +98 -0
  175. data/lib/datadog_api_client/v2/models/dora_deployment_response.rb +98 -0
  176. data/lib/datadog_api_client/v2/models/dora_deployment_response_data.rb +108 -0
  177. data/lib/datadog_api_client/v2/models/dora_deployment_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/dora_git_info.rb +125 -0
  179. data/lib/datadog_api_client/v2/models/{mute_finding_response.rb → dora_incident_request.rb} +6 -6
  180. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +179 -0
  181. data/lib/datadog_api_client/v2/models/dora_incident_request_data.rb +98 -0
  182. data/lib/datadog_api_client/v2/models/dora_incident_response.rb +98 -0
  183. data/lib/datadog_api_client/v2/models/dora_incident_response_data.rb +108 -0
  184. data/lib/datadog_api_client/v2/models/dora_incident_type.rb +26 -0
  185. data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +24 -4
  186. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +14 -4
  187. data/lib/datadog_api_client/v2/models/incident_create_relationships.rb +9 -19
  188. data/lib/datadog_api_client/v2/models/incident_impacts_type.rb +26 -0
  189. data/lib/datadog_api_client/v2/models/incident_integration_metadata_attributes.rb +21 -1
  190. data/lib/datadog_api_client/v2/models/incident_integration_metadata_response_data.rb +11 -1
  191. data/lib/datadog_api_client/v2/models/incident_integration_relationships.rb +90 -0
  192. data/lib/datadog_api_client/v2/models/incident_non_datadog_creator.rb +90 -0
  193. data/lib/datadog_api_client/v2/models/incident_responders_type.rb +26 -0
  194. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +69 -4
  195. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +42 -4
  196. data/lib/datadog_api_client/v2/models/incident_severity.rb +31 -0
  197. data/lib/datadog_api_client/v2/models/incident_todo_attributes.rb +24 -4
  198. data/lib/datadog_api_client/v2/models/incident_todo_relationships.rb +90 -0
  199. data/lib/datadog_api_client/v2/models/incident_todo_response_data.rb +11 -1
  200. data/lib/datadog_api_client/v2/models/incident_update_relationships.rb +8 -0
  201. data/lib/datadog_api_client/v2/models/incident_user_defined_field_type.rb +26 -0
  202. data/lib/datadog_api_client/v2/models/list_application_keys_response.rb +14 -4
  203. data/lib/datadog_api_client/v2/models/list_rules_response.rb +92 -0
  204. data/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb +110 -0
  205. data/lib/datadog_api_client/v2/models/list_rules_response_links.rb +80 -0
  206. data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +13 -1
  207. data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb +12 -1
  208. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +13 -1
  209. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +13 -1
  210. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +13 -1
  211. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_attributes.rb +151 -0
  212. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_body.rb +100 -0
  213. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_meta.rb +92 -0
  214. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_pagination.rb +88 -0
  215. data/lib/datadog_api_client/v2/models/monthly_cost_attribution_response.rb +92 -0
  216. data/lib/datadog_api_client/v2/models/okta_account.rb +129 -0
  217. data/lib/datadog_api_client/v2/models/okta_account_attributes.rb +170 -0
  218. data/lib/datadog_api_client/v2/models/{mute_finding_request.rb → okta_account_request.rb} +6 -6
  219. data/lib/datadog_api_client/v2/models/okta_account_response.rb +80 -0
  220. data/lib/datadog_api_client/v2/models/{mute_finding_request_data.rb → okta_account_response_data.rb} +9 -9
  221. data/lib/datadog_api_client/v2/models/okta_account_type.rb +26 -0
  222. data/lib/datadog_api_client/v2/models/okta_account_update_request.rb +98 -0
  223. data/lib/datadog_api_client/v2/models/okta_account_update_request_attributes.rb +149 -0
  224. data/lib/datadog_api_client/v2/models/okta_account_update_request_data.rb +90 -0
  225. data/lib/datadog_api_client/v2/models/okta_accounts_response.rb +82 -0
  226. data/lib/datadog_api_client/v2/models/outcome_type.rb +26 -0
  227. data/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb +82 -0
  228. data/lib/datadog_api_client/v2/models/outcomes_batch_request.rb +80 -0
  229. data/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb +90 -0
  230. data/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb +150 -0
  231. data/lib/datadog_api_client/v2/models/outcomes_batch_response.rb +121 -0
  232. data/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb +120 -0
  233. data/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb +90 -0
  234. data/lib/datadog_api_client/v2/models/outcomes_batch_type.rb +26 -0
  235. data/lib/datadog_api_client/v2/models/outcomes_response.rb +104 -0
  236. data/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb +110 -0
  237. data/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb +100 -0
  238. data/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb +90 -0
  239. data/lib/datadog_api_client/v2/models/outcomes_response_links.rb +80 -0
  240. data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +24 -4
  241. data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +14 -4
  242. data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +2 -2
  243. data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +8 -0
  244. data/lib/datadog_api_client/v2/models/projected_cost.rb +100 -0
  245. data/lib/datadog_api_client/v2/models/projected_cost_attributes.rb +132 -0
  246. data/lib/datadog_api_client/v2/models/projected_cost_response.rb +82 -0
  247. data/lib/datadog_api_client/v2/models/projected_cost_type.rb +26 -0
  248. data/lib/datadog_api_client/v2/models/relationship_to_incident_impact_data.rb +119 -0
  249. data/lib/datadog_api_client/v2/models/relationship_to_incident_impacts.rb +100 -0
  250. data/lib/datadog_api_client/v2/models/relationship_to_incident_responder_data.rb +119 -0
  251. data/lib/datadog_api_client/v2/models/relationship_to_incident_responders.rb +100 -0
  252. data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_field_data.rb +119 -0
  253. data/lib/datadog_api_client/v2/models/relationship_to_incident_user_defined_fields.rb +100 -0
  254. data/lib/datadog_api_client/v2/models/relationship_to_outcome.rb +80 -0
  255. data/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb +90 -0
  256. data/lib/datadog_api_client/v2/models/relationship_to_rule.rb +80 -0
  257. data/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb +80 -0
  258. data/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb +90 -0
  259. data/lib/datadog_api_client/v2/models/rule_attributes.rb +160 -0
  260. data/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb +80 -0
  261. data/lib/datadog_api_client/v2/models/rule_type.rb +26 -0
  262. data/lib/datadog_api_client/v2/models/scorecard_type.rb +26 -0
  263. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
  264. data/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb +7 -7
  265. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
  266. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +13 -1
  267. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +8 -8
  268. data/lib/datadog_api_client/v2/models/sort_direction.rb +27 -0
  269. data/lib/datadog_api_client/v2/models/state.rb +28 -0
  270. data/lib/datadog_api_client/v2/models/teams_field.rb +40 -0
  271. data/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb +1 -1
  272. data/lib/datadog_api_client/v2/models/widget_live_span.rb +40 -0
  273. data/lib/datadog_api_client/version.rb +1 -1
  274. data/lib/datadog_api_client.rb +16 -1
  275. metadata +186 -25
  276. data/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.rb +0 -8
  277. data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -5
  278. data/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.rb +0 -14
  279. data/examples/v2/key-management/DeleteApplicationKey_771691550.rb +0 -8
  280. data/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.rb +0 -8
  281. data/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.rb +0 -8
  282. data/examples/v2/key-management/ListApplicationKeys_2237010090.rb +0 -5
  283. data/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.rb +0 -5
  284. data/examples/v2/security-monitoring/UpdateFinding.rb +0 -23
  285. data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +0 -5
  286. data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +0 -9
  287. data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.rb +0 -8
  288. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.rb +0 -8
  289. data/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.rb +0 -8
  290. data/examples/v2/users/GetUser_3047557953.rb +0 -8
  291. data/lib/datadog_api_client/v2/models/mute_finding_response_attributes.rb +0 -191
  292. data/lib/datadog_api_client/v2/models/mute_finding_response_properties.rb +0 -114
@@ -55,6 +55,7 @@ def cli(specs, output):
55
55
  api_j2 = env.get_template("api.j2")
56
56
  model_j2 = env.get_template("model.j2")
57
57
  package_j2 = env.get_template("package.j2")
58
+ datadog_api_client_j2 = env.get_template("datadog_api_client.j2")
58
59
 
59
60
  extra_files = {
60
61
  "model_base.rb": env.get_template("model_base.j2"),
@@ -120,6 +121,10 @@ def cli(specs, output):
120
121
  with filename.open("w") as fp:
121
122
  fp.write(template.render(all_apis=all_apis, all_specs=all_specs, all_models=all_models))
122
123
 
124
+ datadog_api_client_output = output / "datadog_api_client.rb"
125
+ with datadog_api_client_output.open("w") as fp:
126
+ fp.write(datadog_api_client_j2.render(all_apis=all_apis))
127
+
123
128
  # Parameter mappings for bdd tests
124
129
  scenarios_test_output = pathlib.Path("../features/")
125
130
  for name, template in test_scenarios_files.items():
@@ -262,11 +262,15 @@ def format_data_with_schema(
262
262
  raise TypeError(f"{x} is not supported type {schema}")
263
263
  return "true" if x else "false"
264
264
 
265
+ def format_uuid(x):
266
+ return f'UUIDTools::UUID.parse("{x}")'
267
+
265
268
  formatter = {
266
269
  "number": format_number,
267
270
  "integer": format_number,
268
271
  "boolean": format_boolean,
269
272
  "string": format_string,
273
+ "uuid": format_uuid,
270
274
  None: repr,
271
275
  }[schema.get("type")]
272
276
 
@@ -58,6 +58,8 @@ def type_to_ruby(schema, alternative_name=None):
58
58
  return "Time"
59
59
  elif format_ == "binary":
60
60
  return "File"
61
+ elif format_ == "uuid":
62
+ return "UUID"
61
63
  return "String"
62
64
  elif type_ == "boolean":
63
65
  return "Boolean"
@@ -324,6 +324,9 @@ module {{ module_name }}
324
324
  when 'Object'
325
325
  # generic object (usually a Hash), return directly
326
326
  data
327
+ when 'UUID'
328
+ # parse uuid object
329
+ data.to_s
327
330
  when /\AArray<(.+)>\z/
328
331
  # e.g. Array<Pet>
329
332
  sub_type = $1
@@ -0,0 +1,19 @@
1
+ =begin
2
+ {% include "api_info.j2" %}
3
+ =end
4
+
5
+ require 'datadog_api_client/models'
6
+ require_relative 'datadog_api_client/inflector'
7
+
8
+ loader = Zeitwerk::Loader.new
9
+ loader.tag = File.basename(__FILE__, ".rb")
10
+ loader.collapse("#{__dir__}/datadog_api_client/*/models/")
11
+ loader.collapse("#{__dir__}/datadog_api_client/*/api/")
12
+
13
+ {%- for version, apis in all_apis.items() %}
14
+ loader.push_dir("#{__dir__}/datadog_api_client/{{ version }}", namespace: DatadogAPIClient::{{ version|upper }})
15
+ {%- endfor %}
16
+ # Ignore model_base.rb from being loaded in by zeitwerk as it is loaded in by default
17
+ loader.ignore("#{__dir__}/datadog_api_client/*/model_base.rb")
18
+ loader.inflector = {{ module_name }}::{{ module_name }}Inflector.new
19
+ loader.setup
@@ -3,7 +3,7 @@ require 'zeitwerk'
3
3
  module {{ module_name }}
4
4
  class {{ module_name }}Inflector < Zeitwerk::Inflector
5
5
  def camelize(basename, abspath)
6
- model_name = "#{abspath.match('v[0-9]')}.#{basename}"
6
+ model_name = "#{abspath.scan(/v[0-9]/).last}.#{basename}"
7
7
  overrides[model_name] || basename.split('_').each(&:capitalize!).join
8
8
  end
9
9
 
@@ -107,6 +107,8 @@ module {{ module_name }}::{{ version|upper }}
107
107
  when :Array
108
108
  # generic array, return directly
109
109
  value
110
+ when :UUID
111
+ value.to_s
110
112
  when /\AArray<(?<inner_type>.+)>\z/
111
113
  inner_type = Regexp.last_match[:inner_type]
112
114
  value.map { |v| _deserialize(inner_type, v) }
@@ -236,6 +238,8 @@ module {{ module_name }}::{{ version|upper }}
236
238
  return data if data.instance_of?(String)
237
239
  when 'Object' # "type: object"
238
240
  return data if data.instance_of?(Hash)
241
+ when 'UUID'
242
+ return UUIDTools::UUID.parse(data)
239
243
  when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
240
244
  if data.instance_of?(Array)
241
245
  sub_type = Regexp.last_match[:sub_type]
@@ -5,7 +5,7 @@ repos:
5
5
  name: Generate
6
6
  language: system
7
7
  entry: bash -c "./generate.sh"
8
- files: '^(\.generator/.*|\.pre-commit-config\.yaml|Makefile|\features/.*)'
8
+ files: '^(\.generator/.*|\.pre-commit-config\.yaml|Makefile|\features/.*|lib/.*)'
9
9
  pass_filenames: false
10
10
  - id: format-examples
11
11
  name: Format generated examples
data/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.18.0 / 2023-12-12
4
+
5
+ ### Fixed
6
+ * Fix Powerpack schema by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1613
7
+ ### Added
8
+ * Add support for projected-cost endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1598
9
+ * Document missing incident fields by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1617
10
+ * Add active billing dimensions to usage metering by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1637
11
+ * Add Cost Attribution To Usage Metering Public Beta Documentation by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1622
12
+ * Update spec to include new DORA API endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1636
13
+ * Add support to patch Synthetics test with partial data using JSON Patch by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1630
14
+ * Document new api/app key schemas by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1616
15
+ * Document new field `filters` for `CloudWorkloadSecurityAgentRule` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1638
16
+ * Live and historical custom timeseries docs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1628
17
+ * Add week_to_date and month_to_date to widget livespan by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1631
18
+ * Document `included_keywords` in `ListStandardPatterns` response by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1641
19
+ * Document fields `remote_config_read_enabled` and `category` by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1639
20
+ * Update Azure Spec to include Resource Collection by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1646
21
+ * Allow creation of Application Security detection rules from the v2 API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1648
22
+ * Add Okta Integration APIs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1629
23
+ * Remove unstable flag for Events v2 api by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1653
24
+
25
+
26
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.17.0...v2.18.0
27
+
28
+ ## 2.17.0 / 2023-11-15
29
+
30
+ ### Fixed
31
+ * Remove notify_no_data default by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1595
32
+ * Fix SecurityMonitoringSignalAttribute field name by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1602
33
+ * Fix for inflection when your absolute filepath happens to match `v[0-9]` by @ienders in https://github.com/DataDog/datadog-api-client-ruby/pull/1618
34
+ * Fix typo in service definition field by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1615
35
+ ### Added
36
+ * Update documentation for Cloud SIEM by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1587
37
+ * Add containers API spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1588
38
+ * Add serverless apm to usage attribution api by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1593
39
+ * Document missing parameters by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1552
40
+ * Powerpack Live Span Support by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1600
41
+ * Add Amazon EventBridge endpoints to AWS Integration API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1589
42
+ * Add Container App filters to Azure API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1571
43
+ * Add UUID format support by @HantingZhang2 in https://github.com/DataDog/datadog-api-client-ruby/pull/1606
44
+ * Add new UA products to usage metering docs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1604
45
+ * Add scorecards endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1610
46
+ * Document top list widget style by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1596
47
+ * Add optional group-bys support to security signals by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1611
48
+ ### Changed
49
+ * Add Beta Banner to Send Pipeline Events Endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1601
50
+ * Remove endpoint for mute or unmute a finding and add support for bulk mute findings endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1597
51
+
52
+ ## New Contributors
53
+ * @ienders made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/1618
54
+
55
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.16.0...v2.17.0
56
+
3
57
  ## 2.16.0 / 2023-10-16
4
58
 
5
59
  ### Fixed
data/Gemfile CHANGED
@@ -19,6 +19,7 @@ group :development, :test do
19
19
  gem 'webmock'
20
20
  gem 'zstandard'
21
21
  gem 'pry'
22
+ gem 'uuidtools'
22
23
  end
23
24
 
24
25
  group :docs do
data/LICENSE-3rdparty.csv CHANGED
@@ -71,6 +71,7 @@ tomlrb,MIT,Francois Bernier
71
71
  typhoeus,MIT,"David Balatero, Paul Dix, Hans Hasselberg"
72
72
  tzinfo,MIT,Philip Ross
73
73
  unicode-display_width,MIT,Jan Lelis
74
+ uuidtools,Apache-2.0,Bob Aman
74
75
  vcr,"Hippocratic-2.1,MIT","Myron Marston, Kurtis Rainbolt-Greene, Olle Jonsson"
75
76
  webmock,MIT,Bartosz Blimke
76
77
  with_env,MIT,Zach Dennis
@@ -26,6 +26,8 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_runtime_dependency "zeitwerk", "~> 2.6", ">= 2.6.0"
28
28
 
29
+ spec.add_runtime_dependency "uuidtools", "~> 2.1.5", ">= 2.1.5"
30
+
29
31
  spec.add_development_dependency "rspec", "~> 3.6", ">= 3.6.0"
30
32
 
31
33
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|cassettes)/}) }
@@ -4,9 +4,9 @@ require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::AWSAccount.new({
7
- account_id: "1234567",
7
+ account_id: "163662907100",
8
8
  account_specific_namespace_rules: {
9
- auto_scaling: false, opswork: false,
9
+ auto_scaling: false,
10
10
  },
11
11
  cspm_resource_collection_enabled: true,
12
12
  excluded_regions: [
@@ -0,0 +1,12 @@
1
+ # Create an Amazon EventBridge source returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V1::AWSEventBridgeCreateRequest.new({
7
+ account_id: "123456789012",
8
+ create_event_bus: true,
9
+ event_generator_name: "app-alerts",
10
+ region: "us-east-1",
11
+ })
12
+ p api_instance.create_aws_event_bridge_source(body)
@@ -4,7 +4,7 @@ require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::AWSTagFilterCreateRequest.new({
7
- account_id: "1234567",
7
+ account_id: "123456789012",
8
8
  namespace: DatadogAPIClient::V1::AWSNamespace::ELB,
9
9
  tag_filter_str: "prod*",
10
10
  })
@@ -4,7 +4,7 @@ require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::AWSAccount.new({
7
- account_id: "1234567",
7
+ account_id: "123456789012",
8
8
  account_specific_namespace_rules: {
9
9
  auto_scaling: false, opswork: false,
10
10
  },
@@ -4,7 +4,7 @@ require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::AWSAccountDeleteRequest.new({
7
- account_id: "1234567",
7
+ account_id: "163662907100",
8
8
  role_name: "DatadogAWSIntegrationRole",
9
9
  })
10
10
  p api_instance.delete_aws_account(body)
@@ -0,0 +1,11 @@
1
+ # Delete an Amazon EventBridge source returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V1::AWSEventBridgeDeleteRequest.new({
7
+ account_id: "123456789012",
8
+ event_generator_name: "app-alerts-zyxw3210",
9
+ region: "us-east-1",
10
+ })
11
+ p api_instance.delete_aws_event_bridge_source(body)
@@ -0,0 +1,5 @@
1
+ # Get all Amazon EventBridge sources returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
+ p api_instance.list_aws_event_bridge_sources()
@@ -4,11 +4,11 @@ require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V1::AWSIntegrationAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V1::AWSAccount.new({
7
- account_id: "123456789012",
7
+ account_id: "163662907100",
8
8
  account_specific_namespace_rules: {
9
9
  auto_scaling: false,
10
10
  },
11
- cspm_resource_collection_enabled: true,
11
+ cspm_resource_collection_enabled: false,
12
12
  excluded_regions: [
13
13
  "us-east-1",
14
14
  "us-west-2",
@@ -19,12 +19,12 @@ body = DatadogAPIClient::V1::AWSAccount.new({
19
19
  host_tags: [
20
20
  "$KEY:$VALUE",
21
21
  ],
22
- metrics_collection_enabled: false,
22
+ metrics_collection_enabled: true,
23
23
  resource_collection_enabled: true,
24
- role_name: "datadog-role",
24
+ role_name: "DatadogAWSIntegrationRole",
25
25
  })
26
26
  opts = {
27
- account_id: "123456789012",
28
- role_name: "datadog-role",
27
+ account_id: "163662907100",
28
+ role_name: "DatadogAWSIntegrationRole",
29
29
  }
30
30
  p api_instance.update_aws_account(body, opts)
@@ -8,6 +8,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
8
8
  automute: true,
9
9
  client_id: "testc7f6-1234-5678-9101-3fcbf464test",
10
10
  client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
11
+ container_app_filters: "key:value,filter:example",
11
12
  cspm_enabled: true,
12
13
  custom_metrics_enabled: true,
13
14
  errors: [
@@ -16,6 +17,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
16
17
  host_filters: "key:value,filter:example",
17
18
  new_client_id: "new1c7f6-1234-5678-9101-3fcbf464test",
18
19
  new_tenant_name: "new1c44-1234-5678-9101-cc00736ftest",
20
+ resource_collection_enabled: true,
19
21
  tenant_name: "testc44-1234-5678-9101-cc00736ftest",
20
22
  })
21
23
  p api_instance.create_azure_integration(body)
@@ -8,6 +8,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
8
8
  automute: true,
9
9
  client_id: "testc7f6-1234-5678-9101-3fcbf464test",
10
10
  client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
11
+ container_app_filters: "key:value,filter:example",
11
12
  cspm_enabled: true,
12
13
  custom_metrics_enabled: true,
13
14
  errors: [
@@ -16,6 +17,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
16
17
  host_filters: "key:value,filter:example",
17
18
  new_client_id: "new1c7f6-1234-5678-9101-3fcbf464test",
18
19
  new_tenant_name: "new1c44-1234-5678-9101-cc00736ftest",
20
+ resource_collection_enabled: true,
19
21
  tenant_name: "testc44-1234-5678-9101-cc00736ftest",
20
22
  })
21
23
  p api_instance.delete_azure_integration(body)
@@ -8,6 +8,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
8
8
  automute: true,
9
9
  client_id: "testc7f6-1234-5678-9101-3fcbf464test",
10
10
  client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
11
+ container_app_filters: "key:value,filter:example",
11
12
  cspm_enabled: true,
12
13
  custom_metrics_enabled: true,
13
14
  errors: [
@@ -16,6 +17,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
16
17
  host_filters: "key:value,filter:example",
17
18
  new_client_id: "new1c7f6-1234-5678-9101-3fcbf464test",
18
19
  new_tenant_name: "new1c44-1234-5678-9101-cc00736ftest",
20
+ resource_collection_enabled: true,
19
21
  tenant_name: "testc44-1234-5678-9101-cc00736ftest",
20
22
  })
21
23
  p api_instance.update_azure_host_filters(body)
@@ -8,6 +8,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
8
8
  automute: true,
9
9
  client_id: "testc7f6-1234-5678-9101-3fcbf464test",
10
10
  client_secret: "testingx./Sw*g/Y33t..R1cH+hScMDt",
11
+ container_app_filters: "key:value,filter:example",
11
12
  cspm_enabled: true,
12
13
  custom_metrics_enabled: true,
13
14
  errors: [
@@ -16,6 +17,7 @@ body = DatadogAPIClient::V1::AzureAccount.new({
16
17
  host_filters: "key:value,filter:example",
17
18
  new_client_id: "new1c7f6-1234-5678-9101-3fcbf464test",
18
19
  new_tenant_name: "new1c44-1234-5678-9101-cc00736ftest",
20
+ resource_collection_enabled: true,
19
21
  tenant_name: "testc44-1234-5678-9101-cc00736ftest",
20
22
  })
21
23
  p api_instance.update_azure_integration(body)
@@ -19,6 +19,13 @@ body = DatadogAPIClient::V1::Dashboard.new({
19
19
  title_size: "16",
20
20
  title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
21
21
  time: DatadogAPIClient::V1::WidgetTime.new({}),
22
+ style: DatadogAPIClient::V1::ToplistWidgetStyle.new({
23
+ display: DatadogAPIClient::V1::ToplistWidgetStacked.new({
24
+ type: DatadogAPIClient::V1::ToplistWidgetStackedType::STACKED,
25
+ legend: DatadogAPIClient::V1::ToplistWidgetLegend::INLINE,
26
+ }),
27
+ scaling: DatadogAPIClient::V1::ToplistWidgetScaling::RELATIVE,
28
+ }),
22
29
  type: DatadogAPIClient::V1::ToplistWidgetDefinitionType::TOPLIST,
23
30
  requests: [
24
31
  DatadogAPIClient::V1::ToplistWidgetRequest.new({
@@ -35,6 +35,9 @@ body = DatadogAPIClient::V1::Dashboard.new({
35
35
  display_type: DatadogAPIClient::V1::WidgetDisplayType::BARS,
36
36
  }),
37
37
  ],
38
+ time: DatadogAPIClient::V1::WidgetTime.new({
39
+ live_span: DatadogAPIClient::V1::WidgetLiveSpan::WEEK_TO_DATE,
40
+ }),
38
41
  }),
39
42
  }),
40
43
  ],
@@ -13,7 +13,6 @@ body = DatadogAPIClient::V1::Monitor.new({
13
13
  critical: 0.5,
14
14
  }),
15
15
  notify_audit: false,
16
- on_missing_data: DatadogAPIClient::V1::OnMissingDataOption::DEFAULT,
17
16
  include_tags: false,
18
17
  scheduling_options: DatadogAPIClient::V1::MonitorOptionsSchedulingOptions.new({
19
18
  evaluation_window: DatadogAPIClient::V1::MonitorOptionsSchedulingOptionsEvaluationWindow.new({
@@ -0,0 +1,22 @@
1
+ # Patch a Synthetic test returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5
+
6
+ # there is a valid "synthetics_api_test" in the system
7
+ SYNTHETICS_API_TEST_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_PUBLIC_ID"]
8
+
9
+ body = DatadogAPIClient::V1::SyntheticsPatchTestBody.new({
10
+ data: [
11
+ DatadogAPIClient::V1::SyntheticsPatchTestOperation.new({
12
+ op: DatadogAPIClient::V1::SyntheticsPatchTestOperationName::REPLACE,
13
+ path: "/name",
14
+ value: "New test name",
15
+ }),
16
+ DatadogAPIClient::V1::SyntheticsPatchTestOperation.new({
17
+ op: DatadogAPIClient::V1::SyntheticsPatchTestOperationName::REMOVE,
18
+ path: "/config/assertions/0",
19
+ }),
20
+ ],
21
+ })
22
+ p api_instance.patch_test(SYNTHETICS_API_TEST_PUBLIC_ID, body)
@@ -1,6 +1,9 @@
1
1
  # Send pipeline event returns "Request accepted for processing" response
2
2
 
3
3
  require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym] = true
6
+ end
4
7
  api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new
5
8
 
6
9
  body = DatadogAPIClient::V2::CIAppCreatePipelineEventRequest.new({
@@ -1,6 +1,9 @@
1
1
  # Send pipeline job event returns "Request accepted for processing" response
2
2
 
3
3
  require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym] = true
6
+ end
4
7
  api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new
5
8
 
6
9
  body = DatadogAPIClient::V2::CIAppCreatePipelineEventRequest.new({
@@ -2,4 +2,7 @@
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::ConfluentCloudAPI.new
5
- api_instance.delete_confluent_account("account_id")
5
+
6
+ # there is a valid "confluent_account" in the system
7
+ CONFLUENT_ACCOUNT_DATA_ID = ENV["CONFLUENT_ACCOUNT_DATA_ID"]
8
+ api_instance.delete_confluent_account(CONFLUENT_ACCOUNT_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Delete resource from Confluent account returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ConfluentCloudAPI.new
5
+ api_instance.delete_confluent_resource("account_id", "resource_id")
@@ -1,8 +1,5 @@
1
1
  # Get all Container Images returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_container_images".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::ContainerImagesAPI.new
8
5
  p api_instance.list_container_images()
@@ -1,9 +1,6 @@
1
1
  # Get all Container Images returns "OK" response with pagination
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_container_images".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::ContainerImagesAPI.new
8
5
  opts = {
9
6
  page_size: 2,
@@ -1,9 +1,6 @@
1
1
  # Get all Container Image groups returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_container_images".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::ContainerImagesAPI.new
8
5
  opts = {
9
6
  group_by: "short_image",
@@ -0,0 +1,5 @@
1
+ # Get All Containers returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ContainersAPI.new
5
+ p api_instance.list_containers()
@@ -0,0 +1,8 @@
1
+ # Get All Container groups returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ContainersAPI.new
5
+ opts = {
6
+ group_by: "short_image",
7
+ }
8
+ p api_instance.list_containers(opts)
@@ -0,0 +1,8 @@
1
+ # Get All Containers returns "OK" response with pagination
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::ContainersAPI.new
5
+ opts = {
6
+ page_size: 2,
7
+ }
8
+ api_instance.list_containers_with_pagination(opts) { |item| puts item }
@@ -0,0 +1,23 @@
1
+ # Send a deployment event for DORA Metrics returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_dora_deployment".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
8
+
9
+ body = DatadogAPIClient::V2::DORADeploymentRequest.new({
10
+ data: DatadogAPIClient::V2::DORADeploymentRequestData.new({
11
+ attributes: DatadogAPIClient::V2::DORADeploymentRequestAttributes.new({
12
+ finished_at: 1693491984000000000,
13
+ git: DatadogAPIClient::V2::DORAGitInfo.new({
14
+ commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
15
+ repository_url: "https://github.com/organization/example-repository",
16
+ }),
17
+ service: "shopist",
18
+ started_at: 1693491974000000000,
19
+ version: "v1.12.07",
20
+ }),
21
+ }),
22
+ })
23
+ p api_instance.create_dora_deployment(body)
@@ -0,0 +1,25 @@
1
+ # Send an incident event for DORA Metrics returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_dora_incident".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
8
+
9
+ body = DatadogAPIClient::V2::DORAIncidentRequest.new({
10
+ data: DatadogAPIClient::V2::DORAIncidentRequestData.new({
11
+ attributes: DatadogAPIClient::V2::DORAIncidentRequestAttributes.new({
12
+ finished_at: 1693491984000000000,
13
+ git: DatadogAPIClient::V2::DORAGitInfo.new({
14
+ commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
15
+ repository_url: "https://github.com/organization/example-repository",
16
+ }),
17
+ name: "Webserver is down failing all requests",
18
+ service: "shopist",
19
+ severity: "High",
20
+ started_at: 1693491974000000000,
21
+ version: "v1.12.07",
22
+ }),
23
+ }),
24
+ })
25
+ p api_instance.create_dora_incident(body)
@@ -2,4 +2,4 @@
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::DowntimesAPI.new
5
- p api_instance.list_monitor_downtimes(9223372036854775807)
5
+ p api_instance.list_monitor_downtimes(35534610)
@@ -1,8 +1,5 @@
1
1
  # Get a list of events returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_events".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::EventsAPI.new
8
5
  p api_instance.list_events()
@@ -1,9 +1,6 @@
1
1
  # Get a list of events returns "OK" response with pagination
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_events".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::EventsAPI.new
8
5
  opts = {
9
6
  filter_from: "now-15m",
@@ -1,9 +1,6 @@
1
1
  # Get a quick list of events returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.list_events".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::EventsAPI.new
8
5
  opts = {
9
6
  filter_query: "datadog-agent",