datadog_api_client 2.20.0 → 2.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +5 -0
  4. data/.generator/schemas/v1/openapi.yaml +502 -754
  5. data/.generator/schemas/v2/openapi.yaml +2903 -102
  6. data/.github/workflows/prepare_release.yml +2 -2
  7. data/.github/workflows/publish.yml +2 -2
  8. data/.github/workflows/release.yml +2 -2
  9. data/.github/workflows/test.yml +1 -1
  10. data/CHANGELOG.md +52 -0
  11. data/Gemfile +1 -1
  12. data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
  13. data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -0
  14. data/examples/v1/aws-integration/UpdateAWSAccount.rb +1 -1
  15. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
  16. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1241981394.rb +118 -0
  18. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +4 -0
  20. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +2 -2
  21. data/examples/v2/authn-mappings/CreateAuthNMapping.rb +1 -1
  22. data/examples/v2/authn-mappings/UpdateAuthNMapping.rb +1 -1
  23. data/examples/v2/case-management/ArchiveCase.rb +14 -0
  24. data/examples/v2/case-management/AssignCase.rb +20 -0
  25. data/examples/v2/case-management/CreateCase.rb +33 -0
  26. data/examples/v2/case-management/CreateProject.rb +15 -0
  27. data/examples/v2/case-management/DeleteProject.rb +5 -0
  28. data/examples/v2/case-management/GetCase.rb +8 -0
  29. data/examples/v2/case-management/GetProject.rb +5 -0
  30. data/examples/v2/case-management/GetProjects.rb +5 -0
  31. data/examples/v2/case-management/SearchCases.rb +5 -0
  32. data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
  33. data/examples/v2/case-management/UnarchiveCase.rb +14 -0
  34. data/examples/v2/case-management/UnassignCase.rb +14 -0
  35. data/examples/v2/case-management/UpdatePriority.rb +17 -0
  36. data/examples/v2/case-management/UpdateStatus.rb +17 -0
  37. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
  38. data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
  39. data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
  40. data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
  41. data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
  42. data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
  43. data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
  44. data/examples/v2/gcp-integration/CreateGCPSTSAccount.rb +1 -1
  45. data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +1 -1
  46. data/examples/v2/gcp-integration/CreateGCPSTSAccount_130557025.rb +1 -1
  47. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
  48. data/examples/v2/gcp-integration/CreateGCPSTSAccount_2597004741.rb +1 -1
  49. data/examples/v2/gcp-integration/CreateGCPSTSAccount_4235664992.rb +1 -1
  50. data/examples/v2/gcp-integration/UpdateGCPSTSAccount.rb +1 -1
  51. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
  52. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_3205636354.rb +1 -1
  53. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
  54. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
  55. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
  56. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
  57. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
  58. data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
  59. data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
  60. data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
  61. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +22 -0
  62. data/examples/v2/metrics/ListMetricAssets.rb +5 -0
  63. data/examples/v2/metrics/QueryScalarData_3112571352.rb +2 -2
  64. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +3 -3
  65. data/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +19 -0
  66. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule.rb +42 -0
  67. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +4 -0
  68. data/examples/v2/service-level-objectives/CreateSLOReportJob.rb +20 -0
  69. data/examples/v2/service-level-objectives/GetSLOReport.rb +8 -0
  70. data/examples/v2/service-level-objectives/GetSLOReportJobStatus.rb +11 -0
  71. data/lib/datadog_api_client/configuration.rb +3 -0
  72. data/lib/datadog_api_client/inflector.rb +132 -7
  73. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
  74. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +104 -131
  75. data/lib/datadog_api_client/v1/models/aws_account.rb +12 -2
  76. data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
  77. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +8 -0
  78. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  79. data/lib/datadog_api_client/v1/models/monitor_options.rb +4 -1
  80. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +12 -0
  81. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +124 -4
  82. data/lib/datadog_api_client/v1/models/series.rb +1 -1
  83. data/lib/datadog_api_client/v1/models/slo_time_slice_condition.rb +14 -2
  84. data/lib/datadog_api_client/v1/models/slo_time_slice_interval.rb +29 -0
  85. data/lib/datadog_api_client/v1/models/slo_time_slice_spec.rb +1 -1
  86. data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
  87. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +23 -1
  88. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_file.rb +175 -0
  89. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +2 -0
  90. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  91. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
  92. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
  93. data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +6 -0
  94. data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
  95. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
  96. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
  97. data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
  98. data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
  99. data/lib/datadog_api_client/v2/api/metrics_api.rb +70 -2
  100. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +67 -0
  101. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
  102. data/lib/datadog_api_client/v2/api/service_level_objectives_api.rb +245 -0
  103. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +15 -6
  104. data/lib/datadog_api_client/v2/models/authn_mapping_create_data.rb +1 -1
  105. data/lib/datadog_api_client/v2/models/authn_mapping_create_relationships.rb +37 -54
  106. data/lib/datadog_api_client/v2/models/authn_mapping_included.rb +2 -1
  107. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_role.rb +98 -0
  108. data/lib/datadog_api_client/v2/models/authn_mapping_relationship_to_team.rb +98 -0
  109. data/lib/datadog_api_client/v2/models/authn_mapping_relationships.rb +14 -4
  110. data/lib/datadog_api_client/v2/models/authn_mapping_team.rb +100 -0
  111. data/lib/datadog_api_client/v2/models/authn_mapping_team_attributes.rb +212 -0
  112. data/lib/datadog_api_client/v2/models/authn_mapping_update_data.rb +1 -1
  113. data/lib/datadog_api_client/v2/models/authn_mapping_update_relationships.rb +37 -54
  114. data/lib/datadog_api_client/v2/models/case.rb +150 -0
  115. data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
  116. data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
  117. data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
  118. data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
  119. data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
  120. data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
  121. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
  122. data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
  123. data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
  124. data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
  125. data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
  126. data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
  127. data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
  128. data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
  129. data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
  130. data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
  131. data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
  132. data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
  134. data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
  135. data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
  136. data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
  137. data/lib/datadog_api_client/{v1/models/usage_attribution_pagination.rb → v2/models/case_update_status_attributes.rb} +29 -51
  138. data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
  139. data/lib/datadog_api_client/{v1/models/usage_attribution_metadata.rb → v2/models/cases_response.rb} +22 -22
  140. data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
  141. data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
  142. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
  143. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
  144. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
  145. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
  146. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
  147. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
  148. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
  149. data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
  150. data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
  151. data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
  152. data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
  153. data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
  154. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
  155. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
  156. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
  157. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
  158. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
  159. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
  160. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
  162. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
  163. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
  164. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
  165. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
  166. data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
  167. data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
  168. data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
  169. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
  170. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
  171. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
  172. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
  173. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
  174. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
  175. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
  176. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
  177. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
  178. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
  179. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
  180. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
  181. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
  182. data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
  183. data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
  184. data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
  185. data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
  186. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
  187. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
  188. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
  189. data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
  190. data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
  191. data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
  192. data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
  193. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
  194. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
  195. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
  196. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
  197. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
  198. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
  199. data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
  200. data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
  201. data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
  202. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
  203. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
  204. data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
  205. data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
  206. data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
  207. data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
  208. data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
  209. data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
  210. data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
  211. data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
  212. data/lib/datadog_api_client/v2/models/metric_series.rb +1 -1
  213. data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
  214. data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
  215. data/lib/datadog_api_client/{v1/models/usage_attribution_response.rb → v2/models/nullable_user_relationship.rb} +22 -26
  216. data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
  217. data/lib/datadog_api_client/v2/models/project.rb +150 -0
  218. data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
  219. data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
  220. data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
  221. data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
  222. data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
  223. data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
  224. data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
  225. data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
  226. data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
  227. data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
  228. data/lib/datadog_api_client/v2/models/relationship_to_team.rb +80 -0
  229. data/lib/datadog_api_client/v2/models/relationship_to_team_data.rb +90 -0
  230. data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +183 -0
  231. data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +1 -1
  232. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +1 -1
  233. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +1 -1
  234. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +1 -1
  235. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +1 -1
  236. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +1 -1
  237. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +11 -1
  238. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +13 -14
  239. data/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +11 -1
  240. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
  241. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +13 -1
  242. data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
  243. data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
  244. data/lib/datadog_api_client/v2/models/slo_report_create_request.rb +98 -0
  245. data/lib/datadog_api_client/v2/models/slo_report_create_request_attributes.rb +160 -0
  246. data/lib/datadog_api_client/v2/models/slo_report_create_request_data.rb +98 -0
  247. data/lib/datadog_api_client/v2/models/slo_report_interval.rb +27 -0
  248. data/lib/datadog_api_client/v2/models/slo_report_post_response.rb +80 -0
  249. data/lib/datadog_api_client/v2/models/slo_report_post_response_data.rb +90 -0
  250. data/lib/datadog_api_client/v2/models/slo_report_status.rb +29 -0
  251. data/lib/datadog_api_client/v2/models/slo_report_status_get_response.rb +80 -0
  252. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_attributes.rb +80 -0
  253. data/lib/datadog_api_client/v2/models/slo_report_status_get_response_data.rb +100 -0
  254. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +8 -0
  255. data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
  256. data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
  257. data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
  258. data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
  259. data/lib/datadog_api_client/v2/models/user_teams_response.rb +13 -1
  260. data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
  261. data/lib/datadog_api_client/version.rb +1 -1
  262. metadata +196 -33
  263. data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -9
  264. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +0 -152
  265. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +0 -61
  266. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +0 -72
  267. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +0 -590
@@ -0,0 +1,8 @@
1
+ # Get a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ # there is a valid "agent_rule_rc" in the system
7
+ AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
+ p api_instance.get_csm_threats_agent_rule(AGENT_RULE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get all CSM Threats Agent rules returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+ p api_instance.list_csm_threats_agent_rules()
@@ -0,0 +1,20 @@
1
+ # Update a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ # there is a valid "agent_rule_rc" in the system
7
+ AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData.new({
11
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes.new({
12
+ description: "Test Agent rule",
13
+ enabled: true,
14
+ expression: 'exec.file.name == "sh"',
15
+ }),
16
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
17
+ id: AGENT_RULE_DATA_ID,
18
+ }),
19
+ })
20
+ p api_instance.update_csm_threats_agent_rule(AGENT_RULE_DATA_ID, body)
@@ -9,15 +9,18 @@ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
9
9
  body = DatadogAPIClient::V2::DORAIncidentRequest.new({
10
10
  data: DatadogAPIClient::V2::DORAIncidentRequestData.new({
11
11
  attributes: DatadogAPIClient::V2::DORAIncidentRequestAttributes.new({
12
- finished_at: 1693491984000000000,
12
+ finished_at: 1707842944600000000,
13
13
  git: DatadogAPIClient::V2::DORAGitInfo.new({
14
14
  commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
15
15
  repository_url: "https://github.com/organization/example-repository",
16
16
  }),
17
17
  name: "Webserver is down failing all requests",
18
- service: "shopist",
18
+ services: [
19
+ "shopist",
20
+ ],
19
21
  severity: "High",
20
- started_at: 1693491974000000000,
22
+ started_at: 1707842944500000000,
23
+ team: "backend",
21
24
  version: "v1.12.07",
22
25
  }),
23
26
  }),
@@ -6,7 +6,7 @@ api_instance = DatadogAPIClient::V2::GCPIntegrationAPI.new
6
6
  body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
7
7
  data: DatadogAPIClient::V2::GCPSTSServiceAccountData.new({
8
8
  attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
9
- client_email: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
9
+ client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
10
10
  host_filters: [],
11
11
  }),
12
12
  type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
@@ -10,7 +10,7 @@ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
10
10
  "lorem",
11
11
  "ipsum",
12
12
  ],
13
- client_email: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
13
+ client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
14
14
  host_filters: [],
15
15
  }),
16
16
  type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
@@ -7,7 +7,7 @@ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
7
7
  data: DatadogAPIClient::V2::GCPSTSServiceAccountData.new({
8
8
  attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
9
9
  resource_collection_enabled: true,
10
- client_email: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
10
+ client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
11
11
  host_filters: [],
12
12
  }),
13
13
  type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
@@ -0,0 +1,18 @@
1
+ # Create a new entry for your service account with cloud run revision filters enabled returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::GCPIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
7
+ data: DatadogAPIClient::V2::GCPSTSServiceAccountData.new({
8
+ attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
9
+ cloud_run_revision_filters: [
10
+ "meh:bleh",
11
+ ],
12
+ client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
13
+ host_filters: [],
14
+ }),
15
+ type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
16
+ }),
17
+ })
18
+ p api_instance.create_gcpsts_account(body)
@@ -7,7 +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
- client_email: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
10
+ client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
11
11
  host_filters: [],
12
12
  }),
13
13
  type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
@@ -8,7 +8,7 @@ body = DatadogAPIClient::V2::GCPSTSServiceAccountCreateRequest.new({
8
8
  attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
9
9
  is_cspm_enabled: true,
10
10
  resource_collection_enabled: true,
11
- client_email: "252bf553ef04b351@test-project.iam.gserviceaccount.com",
11
+ client_email: "Test-252bf553ef04b351@test-project.iam.gserviceaccount.com",
12
12
  host_filters: [],
13
13
  }),
14
14
  type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
@@ -9,7 +9,7 @@ GCP_STS_ACCOUNT_DATA_ID = ENV["GCP_STS_ACCOUNT_DATA_ID"]
9
9
  body = DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest.new({
10
10
  data: DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData.new({
11
11
  attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
12
- client_email: "252bf553ef04b351@example.com",
12
+ client_email: "Test-252bf553ef04b351@example.com",
13
13
  host_filters: [
14
14
  "foo:bar",
15
15
  ],
@@ -0,0 +1,21 @@
1
+ # Update STS Service Account returns "OK" response with cloud run revision filters
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::GCPIntegrationAPI.new
5
+
6
+ # there is a valid "gcp_sts_account" in the system
7
+ GCP_STS_ACCOUNT_DATA_ID = ENV["GCP_STS_ACCOUNT_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData.new({
11
+ attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
12
+ client_email: "Test-252bf553ef04b351@example.com",
13
+ cloud_run_revision_filters: [
14
+ "merp:derp",
15
+ ],
16
+ }),
17
+ id: GCP_STS_ACCOUNT_DATA_ID,
18
+ type: DatadogAPIClient::V2::GCPServiceAccountType::GCP_SERVICE_ACCOUNT,
19
+ }),
20
+ })
21
+ p api_instance.update_gcpsts_account(GCP_STS_ACCOUNT_DATA_ID, body)
@@ -9,7 +9,7 @@ GCP_STS_ACCOUNT_DATA_ID = ENV["GCP_STS_ACCOUNT_DATA_ID"]
9
9
  body = DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequest.new({
10
10
  data: DatadogAPIClient::V2::GCPSTSServiceAccountUpdateRequestData.new({
11
11
  attributes: DatadogAPIClient::V2::GCPSTSServiceAccountAttributes.new({
12
- client_email: "252bf553ef04b351@example.com",
12
+ client_email: "Test-252bf553ef04b351@example.com",
13
13
  resource_collection_enabled: true,
14
14
  }),
15
15
  id: GCP_STS_ACCOUNT_DATA_ID,
@@ -0,0 +1,31 @@
1
+ # Create a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: true,
10
+ forward_tags: true,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasic.new({
18
+ password: "datadog-custom-destination-password",
19
+ type: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasicType::BASIC,
20
+ username: "datadog-custom-destination-username",
21
+ }),
22
+ endpoint: "https://example.com",
23
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttpType::HTTP,
24
+ }),
25
+ name: "Nginx logs",
26
+ query: "source:nginx",
27
+ }),
28
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
29
+ }),
30
+ })
31
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,31 @@
1
+ # Create a Custom Header HTTP custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthCustomHeader.new({
18
+ header_value: "my-secret",
19
+ type: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthCustomHeaderType::CUSTOM_HEADER,
20
+ header_name: "MY-AUTHENTICATION-HEADER",
21
+ }),
22
+ endpoint: "https://example.com",
23
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttpType::HTTP,
24
+ }),
25
+ name: "Nginx logs",
26
+ query: "source:nginx",
27
+ }),
28
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
29
+ }),
30
+ })
31
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,27 @@
1
+ # Create a Splunk custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunk.new({
17
+ access_token: "my-access-token",
18
+ endpoint: "https://example.com",
19
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationSplunkType::SPLUNK_HEC,
20
+ }),
21
+ name: "Nginx logs",
22
+ query: "source:nginx",
23
+ }),
24
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
25
+ }),
26
+ })
27
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,32 @@
1
+ # Create an Elasticsearch custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationElasticsearch.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationElasticsearchDestinationAuth.new({
18
+ username: "my-username",
19
+ password: "my-password",
20
+ }),
21
+ index_name: "nginx-logs",
22
+ index_rotation: "yyyy-MM-dd",
23
+ endpoint: "https://example.com",
24
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationElasticsearchType::ELASTICSEARCH,
25
+ }),
26
+ name: "Nginx logs",
27
+ query: "source:nginx",
28
+ }),
29
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
30
+ }),
31
+ })
32
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,31 @@
1
+ # Create a Basic HTTP custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CustomDestinationCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CustomDestinationCreateRequestDefinition.new({
8
+ attributes: DatadogAPIClient::V2::CustomDestinationCreateRequestAttributes.new({
9
+ enabled: false,
10
+ forward_tags: false,
11
+ forward_tags_restriction_list: [
12
+ "datacenter",
13
+ "host",
14
+ ],
15
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::ALLOW_LIST,
16
+ forwarder_destination: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttp.new({
17
+ auth: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasic.new({
18
+ password: "datadog-custom-destination-password",
19
+ type: DatadogAPIClient::V2::CustomDestinationHttpDestinationAuthBasicType::BASIC,
20
+ username: "datadog-custom-destination-username",
21
+ }),
22
+ endpoint: "https://example.com",
23
+ type: DatadogAPIClient::V2::CustomDestinationForwardDestinationHttpType::HTTP,
24
+ }),
25
+ name: "Nginx logs",
26
+ query: "source:nginx",
27
+ }),
28
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
29
+ }),
30
+ })
31
+ p api_instance.create_logs_custom_destination(body)
@@ -0,0 +1,8 @@
1
+ # Delete a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ # there is a valid "custom_destination" in the system
7
+ CUSTOM_DESTINATION_DATA_ID = ENV["CUSTOM_DESTINATION_DATA_ID"]
8
+ api_instance.delete_logs_custom_destination(CUSTOM_DESTINATION_DATA_ID)
@@ -0,0 +1,8 @@
1
+ # Get a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ # there is a valid "custom_destination" in the system
7
+ CUSTOM_DESTINATION_DATA_ID = ENV["CUSTOM_DESTINATION_DATA_ID"]
8
+ p api_instance.get_logs_custom_destination(CUSTOM_DESTINATION_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get all custom destinations returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+ p api_instance.list_logs_custom_destinations()
@@ -0,0 +1,22 @@
1
+ # Update a custom destination returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::LogsCustomDestinationsAPI.new
5
+
6
+ # there is a valid "custom_destination" in the system
7
+ CUSTOM_DESTINATION_DATA_ID = ENV["CUSTOM_DESTINATION_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CustomDestinationUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::CustomDestinationUpdateRequestDefinition.new({
11
+ attributes: DatadogAPIClient::V2::CustomDestinationUpdateRequestAttributes.new({
12
+ name: "Nginx logs (Updated)",
13
+ query: "source:nginx",
14
+ enabled: false,
15
+ forward_tags: false,
16
+ forward_tags_restriction_list_type: DatadogAPIClient::V2::CustomDestinationAttributeTagsRestrictionListType::BLOCK_LIST,
17
+ }),
18
+ type: DatadogAPIClient::V2::CustomDestinationType::CUSTOM_DESTINATION,
19
+ id: CUSTOM_DESTINATION_DATA_ID,
20
+ }),
21
+ })
22
+ p api_instance.update_logs_custom_destination(CUSTOM_DESTINATION_DATA_ID, body)
@@ -0,0 +1,5 @@
1
+ # Related Assets to a Metric returns "Success" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::MetricsAPI.new
5
+ p api_instance.list_metric_assets("system.cpu.user")
@@ -18,7 +18,7 @@ body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
18
18
  }),
19
19
  }),
20
20
  ],
21
- from: 1671612804000,
21
+ from: 1636625471000,
22
22
  queries: [
23
23
  DatadogAPIClient::V2::MetricsScalarQuery.new({
24
24
  aggregator: DatadogAPIClient::V2::MetricsAggregator::AVG,
@@ -27,7 +27,7 @@ body = DatadogAPIClient::V2::ScalarFormulaQueryRequest.new({
27
27
  name: "a",
28
28
  }),
29
29
  ],
30
- to: 1671620004000,
30
+ to: 1636629071000,
31
31
  }),
32
32
  type: DatadogAPIClient::V2::ScalarFormulaRequestType::SCALAR_REQUEST,
33
33
  }),
@@ -18,16 +18,16 @@ body = DatadogAPIClient::V2::TimeseriesFormulaQueryRequest.new({
18
18
  }),
19
19
  }),
20
20
  ],
21
- from: 1671612804000,
21
+ from: 1636625471000,
22
22
  interval: 5000,
23
23
  queries: [
24
24
  DatadogAPIClient::V2::MetricsTimeseriesQuery.new({
25
25
  data_source: DatadogAPIClient::V2::MetricsDataSource::METRICS,
26
- query: "avg:system.cpu.user{*}",
26
+ query: "avg:datadog.estimated_usage.metrics.custom{*}",
27
27
  name: "a",
28
28
  }),
29
29
  ],
30
- to: 1671620004000,
30
+ to: 1636629071000,
31
31
  }),
32
32
  type: DatadogAPIClient::V2::TimeseriesFormulaRequestType::TIMESERIES_REQUEST,
33
33
  }),
@@ -0,0 +1,19 @@
1
+ # Create a suppression rule with an exclusion query returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+
6
+ body = DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateRequest.new({
7
+ data: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateData.new({
8
+ attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes.new({
9
+ description: "This rule suppresses low-severity signals in staging environments.",
10
+ enabled: true,
11
+ expiration_date: 1703187336000,
12
+ name: "Example-Security-Monitoring",
13
+ rule_query: "type:log_detection source:cloudtrail",
14
+ data_exclusion_query: "account_id:12345",
15
+ }),
16
+ type: DatadogAPIClient::V2::SecurityMonitoringSuppressionType::SUPPRESSIONS,
17
+ }),
18
+ })
19
+ p api_instance.create_security_monitoring_suppression(body)
@@ -0,0 +1,42 @@
1
+ # Validate a detection rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5
+
6
+ body = DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload.new({
7
+ cases: [
8
+ DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({
9
+ name: "",
10
+ status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO,
11
+ notifications: [],
12
+ condition: "a > 0",
13
+ }),
14
+ ],
15
+ has_extended_title: true,
16
+ is_enabled: true,
17
+ message: "My security monitoring rule",
18
+ name: "My security monitoring rule",
19
+ options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({
20
+ evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::THIRTY_MINUTES,
21
+ keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::THIRTY_MINUTES,
22
+ max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::THIRTY_MINUTES,
23
+ detection_method: DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod::THRESHOLD,
24
+ }),
25
+ queries: [
26
+ DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery.new({
27
+ query: "source:source_here",
28
+ group_by_fields: [
29
+ "@userIdentity.assumed_role",
30
+ ],
31
+ distinct_fields: [],
32
+ aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT,
33
+ name: "",
34
+ }),
35
+ ],
36
+ tags: [
37
+ "env:prod",
38
+ "team:security",
39
+ ],
40
+ type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::LOG_DETECTION,
41
+ })
42
+ api_instance.validate_security_monitoring_rule(body)
@@ -5,6 +5,10 @@ api_instance = DatadogAPIClient::V2::ServiceDefinitionAPI.new
5
5
 
6
6
  body = DatadogAPIClient::V2::ServiceDefinitionV2Dot2.new({
7
7
  application: "my-app",
8
+ ci_pipeline_fingerprints: [
9
+ "j88xdEy0J5lc",
10
+ "eZ7LMljCk8vo",
11
+ ],
8
12
  contacts: [
9
13
  DatadogAPIClient::V2::ServiceDefinitionV2Dot2Contact.new({
10
14
  contact: "https://teams.microsoft.com/myteam",
@@ -0,0 +1,20 @@
1
+ # Create a new SLO report returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.create_slo_report_job".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::ServiceLevelObjectivesAPI.new
8
+
9
+ body = DatadogAPIClient::V2::SloReportCreateRequest.new({
10
+ data: DatadogAPIClient::V2::SloReportCreateRequestData.new({
11
+ attributes: DatadogAPIClient::V2::SloReportCreateRequestAttributes.new({
12
+ from_ts: 1690901870,
13
+ to_ts: 1706803070,
14
+ query: 'slo_type:metric "SLO Reporting Test"',
15
+ interval: DatadogAPIClient::V2::SLOReportInterval::MONTHLY,
16
+ timezone: "America/New_York",
17
+ }),
18
+ }),
19
+ })
20
+ p api_instance.create_slo_report_job(body)
@@ -0,0 +1,8 @@
1
+ # Get SLO report returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_slo_report".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::ServiceLevelObjectivesAPI.new
8
+ p api_instance.get_slo_report("9fb2dc2a-ead0-11ee-a174-9fe3a9d7627f")
@@ -0,0 +1,11 @@
1
+ # Get SLO report status returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ DatadogAPIClient.configure do |config|
5
+ config.unstable_operations["v2.get_slo_report_job_status".to_sym] = true
6
+ end
7
+ api_instance = DatadogAPIClient::V2::ServiceLevelObjectivesAPI.new
8
+
9
+ # there is a valid "report" in the system
10
+ REPORT_DATA_ID = ENV["REPORT_DATA_ID"]
11
+ p api_instance.get_slo_report_job_status(REPORT_DATA_ID)
@@ -230,6 +230,9 @@ module DatadogAPIClient
230
230
  "v2.get_incident_service": false,
231
231
  "v2.list_incident_services": false,
232
232
  "v2.update_incident_service": false,
233
+ "v2.create_slo_report_job": false,
234
+ "v2.get_slo_report": false,
235
+ "v2.get_slo_report_job_status": false,
233
236
  "v2.create_incident_team": false,
234
237
  "v2.delete_incident_team": false,
235
238
  "v2.get_incident_team": false,