datadog_api_client 2.26.1 → 2.28.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (284) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +0 -3
  4. data/.generator/schemas/v1/openapi.yaml +2123 -212
  5. data/.generator/schemas/v2/openapi.yaml +3082 -240
  6. data/.generator/src/generator/formatter.py +3 -44
  7. data/.generator/src/generator/keywords.json +43 -0
  8. data/.generator/src/generator/templates/api.j2 +4 -0
  9. data/.generator/src/generator/templates/api_client.j2 +1 -0
  10. data/.github/workflows/approved_status.yml +4 -0
  11. data/.github/workflows/changelog.yml +5 -0
  12. data/.github/workflows/codeql-analysis.yml +4 -0
  13. data/.github/workflows/docs.yml +3 -0
  14. data/.github/workflows/labeler.yml +5 -0
  15. data/.github/workflows/prepare_release.yml +4 -0
  16. data/.github/workflows/publish.yml +5 -0
  17. data/.github/workflows/release.yml +4 -0
  18. data/.github/workflows/stale.yml +6 -0
  19. data/.github/workflows/test.yml +3 -0
  20. data/.github/workflows/test_integration.yml +3 -0
  21. data/CHANGELOG.md +66 -0
  22. data/examples/v1/dashboards/CreateDashboard_1413226400.rb +66 -0
  23. data/examples/v1/dashboards/CreateDashboard_1433408735.rb +44 -0
  24. data/examples/v1/dashboards/CreateDashboard_3298564989.rb +65 -0
  25. data/examples/v1/dashboards/CreateDashboard_794302680.rb +152 -0
  26. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
  27. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
  28. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +1 -0
  29. data/examples/v1/monitors/ValidateExistingMonitor.rb +0 -1
  30. data/examples/v1/monitors/ValidateMonitor.rb +0 -1
  31. data/examples/v1/monitors/ValidateMonitor_4247196452.rb +0 -1
  32. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +3 -1
  33. data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
  34. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -1
  35. data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +1 -1
  36. data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +1 -1
  37. data/examples/v1/synthetics/CreateSyntheticsMobileTest.rb +27 -0
  38. data/examples/v1/synthetics/FetchUptimes.rb +13 -0
  39. data/examples/v1/synthetics/GetMobileTest.rb +8 -0
  40. data/examples/v1/synthetics/UpdateBrowserTest.rb +3 -1
  41. data/examples/v1/synthetics/UpdateMobileTest.rb +30 -0
  42. data/examples/v2/domain-allowlist/GetDomainAllowlist.rb +5 -0
  43. data/examples/v2/domain-allowlist/PatchDomainAllowlist.rb +17 -0
  44. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -0
  45. data/examples/v2/incidents/CreateIncidentType.rb +19 -0
  46. data/examples/v2/incidents/DeleteIncidentType.rb +11 -0
  47. data/examples/v2/incidents/GetIncidentType.rb +8 -0
  48. data/examples/v2/incidents/ListIncidentTypes.rb +8 -0
  49. data/examples/v2/incidents/UpdateIncidentType.rb +22 -0
  50. data/examples/v2/logs/AggregateLogs_2955613758.rb +0 -1
  51. data/examples/v2/metrics/QueryScalarData.rb +0 -3
  52. data/examples/v2/metrics/QueryScalarData_3112571352.rb +0 -3
  53. data/examples/v2/metrics/QueryTimeseriesData.rb +0 -3
  54. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +0 -3
  55. data/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle.rb +17 -0
  56. data/examples/v2/microsoft-teams-integration/CreateTenantBasedHandle_1540689753.rb +17 -0
  57. data/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle.rb +5 -0
  58. data/examples/v2/microsoft-teams-integration/DeleteTenantBasedHandle_377884154.rb +8 -0
  59. data/examples/v2/microsoft-teams-integration/GetChannelByName.rb +5 -0
  60. data/examples/v2/microsoft-teams-integration/GetTenantBasedHandle.rb +5 -0
  61. data/examples/v2/microsoft-teams-integration/GetTenantBasedHandle_2883785101.rb +8 -0
  62. data/examples/v2/microsoft-teams-integration/ListTenantBasedHandles.rb +5 -0
  63. data/examples/v2/microsoft-teams-integration/ListTenantBasedHandles_769592979.rb +5 -0
  64. data/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle.rb +17 -0
  65. data/examples/v2/microsoft-teams-integration/UpdateTenantBasedHandle_419892746.rb +18 -0
  66. data/examples/v2/rum-metrics/CreateRumMetric.rb +32 -0
  67. data/examples/v2/rum-metrics/DeleteRumMetric.rb +8 -0
  68. data/examples/v2/rum-metrics/GetRumMetric.rb +8 -0
  69. data/examples/v2/rum-metrics/ListRumMetrics.rb +5 -0
  70. data/examples/v2/rum-metrics/UpdateRumMetric.rb +29 -0
  71. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +9 -0
  72. data/examples/v2/security-monitoring/ListFindings_1668290866.rb +14 -0
  73. data/examples/v2/usage-metering/GetBillingDimensionMapping.rb +8 -0
  74. data/examples/v2/usage-metering/GetMonthlyCostAttribution.rb +4 -1
  75. data/lib/datadog_api_client/api_client.rb +1 -0
  76. data/lib/datadog_api_client/configuration.rb +6 -2
  77. data/lib/datadog_api_client/inflector.rb +109 -5
  78. data/lib/datadog_api_client/v1/api/monitors_api.rb +6 -3
  79. data/lib/datadog_api_client/v1/api/synthetics_api.rb +274 -0
  80. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -3
  81. data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
  82. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -3
  83. data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
  84. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -6
  85. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -61
  86. data/lib/datadog_api_client/v1/models/slo_history_monitor.rb +1 -1
  87. data/lib/datadog_api_client/v1/models/synthetics_batch_details_data.rb +2 -2
  88. data/lib/datadog_api_client/v1/models/synthetics_batch_result.rb +2 -2
  89. data/lib/datadog_api_client/v1/models/{synthetics_status.rb → synthetics_batch_status.rb} +4 -4
  90. data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
  91. data/lib/datadog_api_client/v1/models/synthetics_fetch_uptimes_payload.rb +167 -0
  92. data/lib/datadog_api_client/v1/models/synthetics_mobile_step.rb +229 -0
  93. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params.rb +249 -0
  94. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_direction.rb +29 -0
  95. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element.rb +175 -0
  96. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_context_type.rb +27 -0
  97. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_relative_position.rb +115 -0
  98. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator.rb +117 -0
  99. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator_values_items.rb +115 -0
  100. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_element_user_locator_values_items_type.rb +30 -0
  101. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_positions_items.rb +115 -0
  102. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_value.rb +63 -0
  103. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_params_variable.rb +144 -0
  104. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_type.rb +42 -0
  105. data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +263 -0
  106. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_config.rb +117 -0
  107. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options.rb +380 -0
  108. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_type.rb +26 -0
  109. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application.rb +173 -0
  110. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application_reference_type.rb +27 -0
  111. data/lib/datadog_api_client/v1/models/synthetics_step.rb +22 -2
  112. data/lib/datadog_api_client/v1/models/synthetics_step_detail.rb +21 -1
  113. data/lib/datadog_api_client/v1/models/synthetics_test_ci_options.rb +19 -1
  114. data/lib/datadog_api_client/v1/models/synthetics_test_details_type.rb +1 -0
  115. data/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options.rb +34 -4
  116. data/lib/datadog_api_client/v1/models/synthetics_test_options_monitor_options_notification_preset_name.rb +29 -0
  117. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +31 -2
  118. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +32 -6
  119. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
  120. data/lib/datadog_api_client/v1/models/synthetics_test_request_port.rb +63 -0
  121. data/lib/datadog_api_client/v1/models/synthetics_test_restriction_policy_binding.rb +117 -0
  122. data/lib/datadog_api_client/v1/models/synthetics_test_restriction_policy_binding_relation.rb +27 -0
  123. data/lib/datadog_api_client/v1/models/synthetics_test_uptime.rb +135 -0
  124. data/lib/datadog_api_client/v1/models/synthetics_uptime.rb +161 -0
  125. data/lib/datadog_api_client/v1/models/table_widget_request.rb +16 -4
  126. data/lib/datadog_api_client/v1/models/table_widget_text_format_match.rb +144 -0
  127. data/lib/datadog_api_client/v1/models/table_widget_text_format_match_type.rb +31 -0
  128. data/lib/datadog_api_client/v1/models/table_widget_text_format_palette.rb +36 -0
  129. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace.rb +63 -0
  130. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all.rb +144 -0
  131. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all_type.rb +26 -0
  132. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring.rb +165 -0
  133. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring_type.rb +26 -0
  134. data/lib/datadog_api_client/v1/models/table_widget_text_format_rule.rb +163 -0
  135. data/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +1 -12
  136. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +51 -1
  137. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +51 -1
  138. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +51 -1
  139. data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +3 -3
  140. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +3 -69
  141. data/lib/datadog_api_client/v2/api/domain_allowlist_api.rb +153 -0
  142. data/lib/datadog_api_client/v2/api/incidents_api.rb +362 -1
  143. data/lib/datadog_api_client/v2/api/metrics_api.rb +5 -17
  144. data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +434 -0
  145. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +3 -3
  146. data/lib/datadog_api_client/v2/api/rum_metrics_api.rb +357 -0
  147. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -0
  148. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +19 -19
  149. data/lib/datadog_api_client/v2/api/teams_api.rb +1 -0
  150. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +79 -10
  151. data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item.rb +125 -0
  152. data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item_attributes.rb +127 -0
  153. data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item_attributes_endpoints_items.rb +127 -0
  154. data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_body_item_attributes_endpoints_items_status.rb +27 -0
  155. data/lib/datadog_api_client/v2/models/billing_dimensions_mapping_response.rb +107 -0
  156. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +1 -1
  157. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +1 -1
  158. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +1 -1
  159. data/lib/datadog_api_client/v2/models/domain_allowlist.rb +151 -0
  160. data/lib/datadog_api_client/v2/models/domain_allowlist_attributes.rb +117 -0
  161. data/lib/datadog_api_client/v2/models/domain_allowlist_request.rb +123 -0
  162. data/lib/datadog_api_client/v2/models/domain_allowlist_response.rb +105 -0
  163. data/lib/datadog_api_client/v2/models/domain_allowlist_response_data.rb +151 -0
  164. data/lib/datadog_api_client/v2/models/domain_allowlist_response_data_attributes.rb +117 -0
  165. data/lib/datadog_api_client/v2/models/domain_allowlist_type.rb +26 -0
  166. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  167. data/lib/datadog_api_client/v2/models/entity_attributes.rb +1 -1
  168. data/lib/datadog_api_client/v2/models/entity_data.rb +1 -1
  169. data/lib/datadog_api_client/v2/models/entity_response_included_incident.rb +1 -1
  170. data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema.rb +1 -1
  171. data/lib/datadog_api_client/v2/models/entity_response_included_related_oncall_attributes.rb +1 -1
  172. data/lib/datadog_api_client/v2/models/entity_response_included_related_oncall_escalation_item.rb +1 -1
  173. data/lib/datadog_api_client/v2/models/entity_response_included_schema.rb +1 -1
  174. data/lib/datadog_api_client/v2/models/entity_v3_api_version.rb +1 -1
  175. data/lib/datadog_api_client/v2/models/entity_v3_datadog_code_location_item.rb +3 -3
  176. data/lib/datadog_api_client/v2/models/entity_v3_datadog_event_item.rb +2 -2
  177. data/lib/datadog_api_client/v2/models/entity_v3_datadog_integration_opsgenie.rb +2 -2
  178. data/lib/datadog_api_client/v2/models/entity_v3_datadog_integration_pagerduty.rb +2 -2
  179. data/lib/datadog_api_client/v2/models/entity_v3_datadog_log_item.rb +3 -3
  180. data/lib/datadog_api_client/v2/models/entity_v3_datadog_performance.rb +2 -2
  181. data/lib/datadog_api_client/v2/models/entity_v3_datadog_pipelines.rb +2 -2
  182. data/lib/datadog_api_client/v2/models/entity_v3_datastore.rb +4 -4
  183. data/lib/datadog_api_client/v2/models/entity_v3_datastore_datadog.rb +4 -4
  184. data/lib/datadog_api_client/v2/models/entity_v3_datastore_spec.rb +2 -2
  185. data/lib/datadog_api_client/v2/models/entity_v3_integrations.rb +3 -3
  186. data/lib/datadog_api_client/v2/models/entity_v3_metadata.rb +9 -9
  187. data/lib/datadog_api_client/v2/models/entity_v3_metadata_additional_owners_items.rb +2 -2
  188. data/lib/datadog_api_client/v2/models/entity_v3_metadata_contacts_items.rb +2 -2
  189. data/lib/datadog_api_client/v2/models/entity_v3_metadata_links_items.rb +2 -2
  190. data/lib/datadog_api_client/v2/models/entity_v3_metadata_owner.rb +2 -2
  191. data/lib/datadog_api_client/v2/models/entity_v3_queue.rb +5 -5
  192. data/lib/datadog_api_client/v2/models/entity_v3_queue_datadog.rb +4 -4
  193. data/lib/datadog_api_client/v2/models/entity_v3_queue_spec.rb +2 -2
  194. data/lib/datadog_api_client/v2/models/entity_v3_service.rb +5 -5
  195. data/lib/datadog_api_client/v2/models/entity_v3_service_datadog.rb +6 -6
  196. data/lib/datadog_api_client/v2/models/entity_v3_service_spec.rb +3 -3
  197. data/lib/datadog_api_client/v2/models/entity_v3_system.rb +5 -5
  198. data/lib/datadog_api_client/v2/models/entity_v3_system_datadog.rb +5 -5
  199. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +1 -1
  200. data/lib/datadog_api_client/v2/models/finding_attributes.rb +14 -4
  201. data/lib/datadog_api_client/v2/models/finding_vulnerability_type.rb +29 -0
  202. data/lib/datadog_api_client/v2/models/gcp_metric_namespace_config.rb +115 -0
  203. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +23 -1
  204. data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
  205. data/lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb +2 -1
  206. data/lib/datadog_api_client/v2/models/incident_notification_handle.rb +1 -1
  207. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
  208. data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
  209. data/lib/datadog_api_client/v2/models/incident_type_attributes.rb +193 -0
  210. data/lib/datadog_api_client/v2/models/incident_type_create_data.rb +144 -0
  211. data/lib/datadog_api_client/v2/models/incident_type_create_request.rb +123 -0
  212. data/lib/datadog_api_client/v2/models/incident_type_list_response.rb +125 -0
  213. data/lib/datadog_api_client/v2/models/{aws_related_account.rb → incident_type_object.rb} +8 -8
  214. data/lib/datadog_api_client/v2/models/incident_type_patch_data.rb +165 -0
  215. data/lib/datadog_api_client/v2/models/incident_type_patch_request.rb +123 -0
  216. data/lib/datadog_api_client/v2/models/incident_type_response.rb +123 -0
  217. data/lib/datadog_api_client/v2/models/{aws_related_account_type.rb → incident_type_type.rb} +3 -3
  218. data/lib/datadog_api_client/v2/models/incident_type_update_attributes.rb +175 -0
  219. data/lib/datadog_api_client/v2/models/incident_user_attributes.rb +153 -0
  220. data/lib/datadog_api_client/v2/models/incident_user_data.rb +125 -0
  221. data/lib/datadog_api_client/v2/models/include_type.rb +1 -1
  222. data/lib/datadog_api_client/v2/models/list_entity_catalog_response_links.rb +3 -3
  223. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -1
  224. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -1
  225. data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_type_category.rb +27 -0
  226. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -1
  227. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_attributes.rb +165 -0
  228. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_data.rb +147 -0
  229. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_type.rb +26 -0
  230. data/lib/datadog_api_client/v2/models/microsoft_teams_create_tenant_based_handle_request.rb +123 -0
  231. data/lib/datadog_api_client/v2/models/microsoft_teams_get_channel_by_name_response.rb +105 -0
  232. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_attributes.rb +186 -0
  233. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_attributes.rb +249 -0
  234. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_response_data.rb +147 -0
  235. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_info_type.rb +26 -0
  236. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_attributes.rb +202 -0
  237. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_request_data.rb +144 -0
  238. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response.rb +123 -0
  239. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_response_data.rb +147 -0
  240. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handle_type.rb +26 -0
  241. data/lib/datadog_api_client/v2/models/microsoft_teams_tenant_based_handles_response.rb +125 -0
  242. data/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request.rb +123 -0
  243. data/lib/datadog_api_client/v2/models/microsoft_teams_update_tenant_based_handle_request_data.rb +144 -0
  244. data/lib/datadog_api_client/v2/models/ms_teams_integration_metadata.rb +125 -0
  245. data/lib/datadog_api_client/v2/models/ms_teams_integration_metadata_teams_item.rb +186 -0
  246. data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +35 -4
  247. data/lib/datadog_api_client/v2/models/relation_type.rb +1 -1
  248. data/lib/datadog_api_client/v2/models/relationship_item.rb +1 -1
  249. data/lib/datadog_api_client/v2/models/rum_metric_compute.rb +145 -0
  250. data/lib/datadog_api_client/v2/models/rum_metric_compute_aggregation_type.rb +27 -0
  251. data/lib/datadog_api_client/v2/models/rum_metric_create_attributes.rb +176 -0
  252. data/lib/datadog_api_client/v2/models/rum_metric_create_data.rb +165 -0
  253. data/lib/datadog_api_client/v2/models/rum_metric_create_request.rb +123 -0
  254. data/lib/datadog_api_client/v2/models/rum_metric_event_type.rb +32 -0
  255. data/lib/datadog_api_client/v2/models/rum_metric_filter.rb +123 -0
  256. data/lib/datadog_api_client/v2/models/rum_metric_group_by.rb +133 -0
  257. data/lib/datadog_api_client/v2/models/rum_metric_response.rb +105 -0
  258. data/lib/datadog_api_client/v2/models/rum_metric_response_attributes.rb +147 -0
  259. data/lib/datadog_api_client/v2/models/rum_metric_response_compute.rb +127 -0
  260. data/lib/datadog_api_client/v2/models/rum_metric_response_data.rb +125 -0
  261. data/lib/datadog_api_client/v2/models/rum_metric_response_filter.rb +105 -0
  262. data/lib/datadog_api_client/v2/models/rum_metric_response_group_by.rb +115 -0
  263. data/lib/datadog_api_client/v2/models/{aws_related_account_attributes.rb → rum_metric_response_uniqueness.rb} +11 -21
  264. data/lib/datadog_api_client/v2/models/rum_metric_type.rb +26 -0
  265. data/lib/datadog_api_client/v2/models/rum_metric_uniqueness.rb +123 -0
  266. data/lib/datadog_api_client/v2/models/rum_metric_uniqueness_when.rb +27 -0
  267. data/lib/datadog_api_client/v2/models/rum_metric_update_attributes.rb +127 -0
  268. data/lib/datadog_api_client/v2/models/rum_metric_update_compute.rb +106 -0
  269. data/lib/datadog_api_client/v2/models/rum_metric_update_data.rb +154 -0
  270. data/lib/datadog_api_client/v2/models/rum_metric_update_request.rb +123 -0
  271. data/lib/datadog_api_client/v2/models/{aws_related_accounts_response.rb → rum_metrics_response.rb} +5 -5
  272. data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +145 -0
  273. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  274. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  275. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +13 -1
  276. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  277. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +13 -1
  278. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_included_keyword_configuration.rb +15 -4
  279. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb +2 -2
  280. data/lib/datadog_api_client/v2/models/team_update_attributes.rb +1 -26
  281. data/lib/datadog_api_client/v2/models/upsert_catalog_entity_request.rb +1 -1
  282. data/lib/datadog_api_client/version.rb +1 -1
  283. metadata +145 -8
  284. data/examples/v2/cloud-cost-management/ListAWSRelatedAccounts.rb +0 -5
@@ -12,6 +12,7 @@ body = DatadogAPIClient::V1::GCPAccount.new({
12
12
  host_filters: "key:value,filter:example",
13
13
  is_cspm_enabled: true,
14
14
  is_security_command_center_enabled: true,
15
+ is_resource_change_collection_enabled: true,
15
16
  private_key: "private_key",
16
17
  private_key_id: "123456789abcdefghi123456789abcdefghijklm",
17
18
  project_id: "datadog-apitest",
@@ -15,6 +15,7 @@ body = DatadogAPIClient::V1::GCPAccount.new({
15
15
  ],
16
16
  is_cspm_enabled: true,
17
17
  is_security_command_center_enabled: true,
18
+ is_resource_change_collection_enabled: true,
18
19
  private_key: "private_key",
19
20
  private_key_id: "123456789abcdefghi123456789abcdefghijklm",
20
21
  project_id: "datadog-apitest",
@@ -20,7 +20,6 @@ body = DatadogAPIClient::V1::Monitor.new({
20
20
  enable_logs_sample: true,
21
21
  escalation_message: "the situation has escalated",
22
22
  evaluation_delay: 700,
23
- groupby_simple_monitor: true,
24
23
  include_tags: true,
25
24
  locked: false,
26
25
  new_host_delay: 600,
@@ -17,7 +17,6 @@ body = DatadogAPIClient::V1::Monitor.new({
17
17
  enable_logs_sample: true,
18
18
  escalation_message: "the situation has escalated",
19
19
  evaluation_delay: 700,
20
- groupby_simple_monitor: true,
21
20
  include_tags: true,
22
21
  locked: false,
23
22
  new_host_delay: 600,
@@ -18,7 +18,6 @@ body = DatadogAPIClient::V1::Monitor.new({
18
18
  escalation_message: "the situation has escalated",
19
19
  evaluation_delay: 700,
20
20
  group_retention_duration: "2d",
21
- groupby_simple_monitor: false,
22
21
  include_tags: true,
23
22
  locked: false,
24
23
  new_host_delay: 600,
@@ -30,7 +30,9 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
30
30
  DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
31
31
  ],
32
32
  http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
33
- monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}),
33
+ monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
34
+ notification_preset_name: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptionsNotificationPresetName::SHOW_ALL,
35
+ }),
34
36
  restricted_roles: [
35
37
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
36
38
  ],
@@ -14,7 +14,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
14
14
  ],
15
15
  request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
16
16
  host: "datadoghq.com",
17
- port: "443",
17
+ port: "{{ DATADOG_PORT }}",
18
18
  }),
19
19
  }),
20
20
  locations: [
@@ -72,7 +72,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
72
72
  ],
73
73
  request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
74
74
  host: "grpcbin.test.k6.io",
75
- port: "9000",
75
+ port: 9000,
76
76
  service: "grpcbin.GRPCBin",
77
77
  method: "Index",
78
78
  message: "{}",
@@ -25,7 +25,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
25
25
  ],
26
26
  request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
27
27
  host: "localhost",
28
- port: "50051",
28
+ port: 50051,
29
29
  service: "Hello",
30
30
  method: "GET",
31
31
  message: "",
@@ -21,7 +21,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
21
21
  request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
22
22
  host: "https://datadoghq.com",
23
23
  message: "message",
24
- port: "443",
24
+ port: 443,
25
25
  }),
26
26
  }),
27
27
  locations: [
@@ -0,0 +1,27 @@
1
+ # Create a mobile test returns "OK - Returns the created test details." response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5
+
6
+ body = DatadogAPIClient::V1::SyntheticsMobileTest.new({
7
+ name: "Example-Synthetic",
8
+ status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
9
+ type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
10
+ config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
11
+ variables: [],
12
+ }),
13
+ message: "",
14
+ options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
15
+ device_ids: [
16
+ "synthetics:mobile:device:iphone_15_ios_17",
17
+ ],
18
+ mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
19
+ application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
20
+ reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
21
+ reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
22
+ }),
23
+ tick_every: 3600,
24
+ }),
25
+ steps: [],
26
+ })
27
+ p api_instance.create_synthetics_mobile_test(body)
@@ -0,0 +1,13 @@
1
+ # Fetch uptime for multiple tests returns "OK." response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5
+
6
+ body = DatadogAPIClient::V1::SyntheticsFetchUptimesPayload.new({
7
+ from_ts: 1726041488,
8
+ public_ids: [
9
+ "p8m-9gw-nte",
10
+ ],
11
+ to_ts: 1726055954,
12
+ })
13
+ p api_instance.fetch_uptimes(body)
@@ -0,0 +1,8 @@
1
+ # Get a Mobile test returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5
+
6
+ # there is a valid "synthetics_mobile_test" in the system
7
+ SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
8
+ p api_instance.get_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID)
@@ -56,7 +56,9 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
56
56
  DatadogAPIClient::V1::SyntheticsDeviceID::CHROME_LAPTOP_LARGE,
57
57
  ],
58
58
  http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
59
- monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({}),
59
+ monitor_options: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptions.new({
60
+ notification_preset_name: DatadogAPIClient::V1::SyntheticsTestOptionsMonitorOptionsNotificationPresetName::SHOW_ALL,
61
+ }),
60
62
  restricted_roles: [
61
63
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
62
64
  ],
@@ -0,0 +1,30 @@
1
+ # Edit a Mobile test returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::SyntheticsAPI.new
5
+
6
+ # there is a valid "synthetics_mobile_test" in the system
7
+ SYNTHETICS_MOBILE_TEST_PUBLIC_ID = ENV["SYNTHETICS_MOBILE_TEST_PUBLIC_ID"]
8
+
9
+ body = DatadogAPIClient::V1::SyntheticsMobileTest.new({
10
+ name: "Example-Synthetic-updated",
11
+ status: DatadogAPIClient::V1::SyntheticsTestPauseStatus::PAUSED,
12
+ type: DatadogAPIClient::V1::SyntheticsMobileTestType::MOBILE,
13
+ config: DatadogAPIClient::V1::SyntheticsMobileTestConfig.new({
14
+ variables: [],
15
+ }),
16
+ message: "",
17
+ options: DatadogAPIClient::V1::SyntheticsMobileTestOptions.new({
18
+ device_ids: [
19
+ "synthetics:mobile:device:iphone_15_ios_17",
20
+ ],
21
+ mobile_application: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplication.new({
22
+ application_id: "ab0e0aed-536d-411a-9a99-5428c27d8f8e",
23
+ reference_id: "6115922a-5f5d-455e-bc7e-7955a57f3815",
24
+ reference_type: DatadogAPIClient::V1::SyntheticsMobileTestsMobileApplicationReferenceType::VERSION,
25
+ }),
26
+ tick_every: 3600,
27
+ }),
28
+ steps: [],
29
+ })
30
+ p api_instance.update_mobile_test(SYNTHETICS_MOBILE_TEST_PUBLIC_ID, body)
@@ -0,0 +1,5 @@
1
+ # Get Domain Allowlist returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::DomainAllowlistAPI.new
5
+ p api_instance.get_domain_allowlist()
@@ -0,0 +1,17 @@
1
+ # Sets Domain Allowlist returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::DomainAllowlistAPI.new
5
+
6
+ body = DatadogAPIClient::V2::DomainAllowlistRequest.new({
7
+ data: DatadogAPIClient::V2::DomainAllowlist.new({
8
+ attributes: DatadogAPIClient::V2::DomainAllowlistAttributes.new({
9
+ domains: [
10
+ "@static-test-domain.test",
11
+ ],
12
+ enabled: false,
13
+ }),
14
+ type: DatadogAPIClient::V2::DomainAllowlistType::DOMAIN_ALLOWLIST,
15
+ }),
16
+ })
17
+ p api_instance.patch_domain_allowlist(body)
@@ -7,6 +7,7 @@ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
7
7
  data: DatadogAPIClient::V2::GCPSTSServiceAccountData.new({
8
8
  attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
9
9
  is_security_command_center_enabled: true,
10
+ is_resource_change_collection_enabled: true,
10
11
  client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
11
12
  host_filters: [],
12
13
  }),
@@ -0,0 +1,19 @@
1
+ # Create an incident type returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_incident_type".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ body = DatadogAPIClient::V2::IncidentTypeCreateRequest.new({
10
+ data: DatadogAPIClient::V2::IncidentTypeCreateData.new({
11
+ attributes: DatadogAPIClient::V2::IncidentTypeAttributes.new({
12
+ description: "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.",
13
+ is_default: false,
14
+ name: "Security Incident",
15
+ }),
16
+ type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
17
+ }),
18
+ })
19
+ p api_instance.create_incident_type(body)
@@ -0,0 +1,11 @@
1
+ # Delete an incident type returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.delete_incident_type".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident_type" in the system
10
+ INCIDENT_TYPE_DATA_ID = ENV["INCIDENT_TYPE_DATA_ID"]
11
+ api_instance.delete_incident_type(INCIDENT_TYPE_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # Get incident type details returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_incident_type".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+ p api_instance.get_incident_type("incident_type_id")
@@ -0,0 +1,8 @@
1
+ # Get a list of incident types returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.list_incident_types".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+ p api_instance.list_incident_types()
@@ -0,0 +1,22 @@
1
+ # Update an incident type returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.update_incident_type".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::IncidentsAPI.new
8
+
9
+ # there is a valid "incident_type" in the system
10
+ INCIDENT_TYPE_DATA_ATTRIBUTES_NAME = ENV["INCIDENT_TYPE_DATA_ATTRIBUTES_NAME"]
11
+ INCIDENT_TYPE_DATA_ID = ENV["INCIDENT_TYPE_DATA_ID"]
12
+
13
+ body = DatadogAPIClient::V2::IncidentTypePatchRequest.new({
14
+ data: DatadogAPIClient::V2::IncidentTypePatchData.new({
15
+ id: INCIDENT_TYPE_DATA_ID,
16
+ attributes: DatadogAPIClient::V2::IncidentTypeUpdateAttributes.new({
17
+ name: "Security Incident-updated",
18
+ }),
19
+ type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES,
20
+ }),
21
+ })
22
+ p api_instance.update_incident_type(INCIDENT_TYPE_DATA_ID, body)
@@ -29,7 +29,6 @@ body = DatadogAPIClient::V2::LogsAggregateRequest.new({
29
29
  aggregation: DatadogAPIClient::V2::LogsAggregationFunction::PERCENTILE_90,
30
30
  metric: "@duration",
31
31
  }),
32
- total: "recall",
33
32
  }),
34
33
  ],
35
34
  })
@@ -1,9 +1,6 @@
1
1
  # Query scalar data across multiple products returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.query_scalar_data".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::MetricsAPI.new
8
5
 
9
6
  body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
@@ -1,9 +1,6 @@
1
1
  # Scalar cross product query returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.query_scalar_data".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::MetricsAPI.new
8
5
 
9
6
  body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
@@ -1,9 +1,6 @@
1
1
  # Query timeseries data across multiple products returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.query_timeseries_data".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::MetricsAPI.new
8
5
 
9
6
  body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({
@@ -1,9 +1,6 @@
1
1
  # Timeseries cross product query returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
- DatadogAPIClient.configure do |config|
5
- config.unstable_operations["v2.query_timeseries_data".to_sym] = true
6
- end
7
4
  api_instance = DatadogAPIClient::V2::MetricsAPI.new
8
5
 
9
6
  body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({
@@ -0,0 +1,17 @@
1
+ # Create tenant-based handle returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest.new({
7
+ data: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData.new({
8
+ attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes.new({
9
+ channel_id: "fake-channel-id",
10
+ name: "fake-handle-name",
11
+ team_id: "00000000-0000-0000-0000-000000000000",
12
+ tenant_id: "00000000-0000-0000-0000-000000000001",
13
+ }),
14
+ type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
15
+ }),
16
+ })
17
+ p api_instance.create_tenant_based_handle(body)
@@ -0,0 +1,17 @@
1
+ # Create api handle returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V2::MicrosoftTeamsCreateTenantBasedHandleRequest.new({
7
+ data: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestData.new({
8
+ attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleRequestAttributes.new({
9
+ channel_id: "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2",
10
+ name: "Example-Microsoft-Teams-Integration",
11
+ team_id: "e5f50a58-c929-4fb3-8866-e2cd836de3c2",
12
+ tenant_id: "4d3bac44-0230-4732-9e70-cc00736f0a97",
13
+ }),
14
+ type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
15
+ }),
16
+ })
17
+ p api_instance.create_tenant_based_handle(body)
@@ -0,0 +1,5 @@
1
+ # Delete tenant-based handle returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+ api_instance.delete_tenant_based_handle("handle_id")
@@ -0,0 +1,8 @@
1
+ # Delete api handle returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+
6
+ # there is a valid "tenant_based_handle" in the system
7
+ TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"]
8
+ api_instance.delete_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get channel information by name returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+ p api_instance.get_channel_by_name("tenant_name", "team_name", "channel_name")
@@ -0,0 +1,5 @@
1
+ # Get tenant-based handle information returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+ p api_instance.get_tenant_based_handle("handle_id")
@@ -0,0 +1,8 @@
1
+ # Get api handle information returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+
6
+ # there is a valid "tenant_based_handle" in the system
7
+ TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"]
8
+ p api_instance.get_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get all tenant-based handles returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+ p api_instance.list_tenant_based_handles()
@@ -0,0 +1,5 @@
1
+ # Get all api handles returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+ p api_instance.list_tenant_based_handles()
@@ -0,0 +1,17 @@
1
+ # Update tenant-based handle returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest.new({
7
+ data: DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData.new({
8
+ attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes.new({
9
+ channel_id: "fake-channel-id",
10
+ name: "fake-handle-name",
11
+ team_id: "00000000-0000-0000-0000-000000000000",
12
+ tenant_id: "00000000-0000-0000-0000-000000000001",
13
+ }),
14
+ type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
15
+ }),
16
+ })
17
+ p api_instance.update_tenant_based_handle("handle_id", body)
@@ -0,0 +1,18 @@
1
+ # Update api handle returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5
+
6
+ # there is a valid "tenant_based_handle" in the system
7
+ TENANT_BASED_HANDLE_DATA_ATTRIBUTES_NAME = ENV["TENANT_BASED_HANDLE_DATA_ATTRIBUTES_NAME"]
8
+ TENANT_BASED_HANDLE_DATA_ID = ENV["TENANT_BASED_HANDLE_DATA_ID"]
9
+
10
+ body = DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequest.new({
11
+ data: DatadogAPIClient::V2::MicrosoftTeamsUpdateTenantBasedHandleRequestData.new({
12
+ attributes: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleAttributes.new({
13
+ name: "fake-handle-name--updated",
14
+ }),
15
+ type: DatadogAPIClient::V2::MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
16
+ }),
17
+ })
18
+ p api_instance.update_tenant_based_handle(TENANT_BASED_HANDLE_DATA_ID, body)
@@ -0,0 +1,32 @@
1
+ # Create a rum-based metric returns "Created" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::RumMetricCreateRequest.new({
7
+ data: DatadogAPIClient::V2::RumMetricCreateData.new({
8
+ attributes: DatadogAPIClient::V2::RumMetricCreateAttributes.new({
9
+ compute: DatadogAPIClient::V2::RumMetricCompute.new({
10
+ aggregation_type: DatadogAPIClient::V2::RumMetricComputeAggregationType::DISTRIBUTION,
11
+ include_percentiles: true,
12
+ path: "@duration",
13
+ }),
14
+ event_type: DatadogAPIClient::V2::RumMetricEventType::SESSION,
15
+ filter: DatadogAPIClient::V2::RumMetricFilter.new({
16
+ query: "@service:web-ui",
17
+ }),
18
+ group_by: [
19
+ DatadogAPIClient::V2::RumMetricGroupBy.new({
20
+ path: "@browser.name",
21
+ tag_name: "browser_name",
22
+ }),
23
+ ],
24
+ uniqueness: DatadogAPIClient::V2::RumMetricUniqueness.new({
25
+ _when: DatadogAPIClient::V2::RumMetricUniquenessWhen::WHEN_MATCH,
26
+ }),
27
+ }),
28
+ id: "rum.sessions.webui.count",
29
+ type: DatadogAPIClient::V2::RumMetricType::RUM_METRICS,
30
+ }),
31
+ })
32
+ p api_instance.create_rum_metric(body)
@@ -0,0 +1,8 @@
1
+ # Delete a rum-based metric returns "No Content" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
5
+
6
+ # there is a valid "rum_metric" in the system
7
+ RUM_METRIC_DATA_ID = ENV["RUM_METRIC_DATA_ID"]
8
+ api_instance.delete_rum_metric(RUM_METRIC_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # Get a rum-based metric returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
5
+
6
+ # there is a valid "rum_metric" in the system
7
+ RUM_METRIC_DATA_ID = ENV["RUM_METRIC_DATA_ID"]
8
+ p api_instance.get_rum_metric(RUM_METRIC_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get all rum-based metrics returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
5
+ p api_instance.list_rum_metrics()
@@ -0,0 +1,29 @@
1
+ # Update a rum-based metric returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::RumMetricsAPI.new
5
+
6
+ # there is a valid "rum_metric" in the system
7
+ RUM_METRIC_DATA_ID = ENV["RUM_METRIC_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::RumMetricUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::RumMetricUpdateData.new({
11
+ id: RUM_METRIC_DATA_ID,
12
+ type: DatadogAPIClient::V2::RumMetricType::RUM_METRICS,
13
+ attributes: DatadogAPIClient::V2::RumMetricUpdateAttributes.new({
14
+ compute: DatadogAPIClient::V2::RumMetricUpdateCompute.new({
15
+ include_percentiles: false,
16
+ }),
17
+ filter: DatadogAPIClient::V2::RumMetricFilter.new({
18
+ query: "@service:rum-config",
19
+ }),
20
+ group_by: [
21
+ DatadogAPIClient::V2::RumMetricGroupBy.new({
22
+ path: "@browser.version",
23
+ tag_name: "browser_version",
24
+ }),
25
+ ],
26
+ }),
27
+ }),
28
+ })
29
+ p api_instance.update_rum_metric(RUM_METRIC_DATA_ID, body)
@@ -32,5 +32,14 @@ body = DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload.new({
32
32
  tags: [],
33
33
  is_enabled: true,
34
34
  type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::LOG_DETECTION,
35
+ reference_tables: [
36
+ DatadogAPIClient::V2::SecurityMonitoringReferenceTable.new({
37
+ table_name: "synthetics_test_reference_table_dont_delete",
38
+ column_name: "value",
39
+ log_field_path: "testtag",
40
+ check_presence: true,
41
+ rule_query_name: "a",
42
+ }),
43
+ ],
35
44
  })
36
45
  p api_instance.create_security_monitoring_rule(body)
@@ -0,0 +1,14 @@
1
+ # List findings with detection_type query param returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.list_findings".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
8
+ opts = {
9
+ filter_vulnerability_type: [
10
+ FindingVulnerabilityType::MISCONFIGURATION,
11
+ FindingVulnerabilityType::ATTACK_PATH,
12
+ ],
13
+ }
14
+ p api_instance.list_findings(opts)
@@ -0,0 +1,8 @@
1
+ # Get billing dimension mapping for usage endpoints returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_billing_dimension_mapping".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
8
+ p api_instance.get_billing_dimension_mapping()
@@ -5,4 +5,7 @@ DatadogAPIClient.configure do |config|
5
5
  config.unstable_operations["v2.get_monthly_cost_attribution".to_sym] = true
6
6
  end
7
7
  api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
8
- p api_instance.get_monthly_cost_attribution((Time.now + -5 * 86400), (Time.now + -3 * 86400), "infra_host_total_cost")
8
+ opts = {
9
+ end_month: (Time.now + -3 * 86400),
10
+ }
11
+ p api_instance.get_monthly_cost_attribution((Time.now + -5 * 86400), "infra_host_total_cost", opts)
@@ -199,6 +199,7 @@ module DatadogAPIClient
199
199
 
200
200
  req_opts[:pem] = File.read(@config.cert_file) if @config.cert_file
201
201
  req_opts[:pem_password] = File.read(@config.key_file) if @config.key_file
202
+ req_opts[:query_string_normalizer] = opts[:query_string_normalizer] if opts[:query_string_normalizer]
202
203
 
203
204
  opts[:stream_body] = true if opts[:return_type] == 'File'
204
205