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
@@ -31,10 +31,10 @@ jobs:
31
31
  git config user.name "${GIT_AUTHOR_NAME}"
32
32
  git config user.email "${GIT_AUTHOR_EMAIL}"
33
33
 
34
- - name: Set up Ruby 2.6
34
+ - name: Set up Ruby 2.7
35
35
  uses: ruby/setup-ruby@v1
36
36
  with:
37
- ruby-version: 2.6
37
+ ruby-version: 2.7
38
38
 
39
39
  - name: Calculate version
40
40
  id: get_version
@@ -15,10 +15,10 @@ jobs:
15
15
  with:
16
16
  ref: ${{ github.event.release.tag_name }}
17
17
 
18
- - name: Set up Ruby 2.6
18
+ - name: Set up Ruby 2.7
19
19
  uses: ruby/setup-ruby@v1
20
20
  with:
21
- ruby-version: 2.6
21
+ ruby-version: 2.7
22
22
 
23
23
  - run: bundle install
24
24
 
@@ -54,10 +54,10 @@ jobs:
54
54
  git config user.name "${GIT_AUTHOR_NAME}"
55
55
  git config user.email "${GIT_AUTHOR_EMAIL}"
56
56
 
57
- - name: Set up Ruby 2.6
57
+ - name: Set up Ruby 2.7
58
58
  uses: ruby/setup-ruby@v1
59
59
  with:
60
- ruby-version: 2.6
60
+ ruby-version: 2.7
61
61
 
62
62
  - name: Bump Gem version
63
63
  run: |
@@ -74,7 +74,7 @@ jobs:
74
74
  test:
75
75
  strategy:
76
76
  matrix:
77
- ruby-version: ["2.6", "3.2", "jruby"]
77
+ ruby-version: ["2.7", "3.2", "jruby"]
78
78
  platform: [ubuntu-latest]
79
79
  runs-on: ${{ matrix.platform }}
80
80
  if: (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci/skip') && !contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/')) || github.event_name == 'schedule'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.22.0 / 2024-04-11
4
+
5
+ ### Fixed
6
+ * Update Cleanup script to use GCP STS endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1762
7
+ * Add include data to get team memberships response by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1748
8
+ ### Added
9
+ * Add `ci-pipeline-fingerprints` field in v2.2 by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1768
10
+ * Add validation endpoint for Security Monitoring Rules by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1787
11
+ * Add UA documentation for online_archive and incident_management by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1789
12
+ * Mark `unit` as nullable by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1791
13
+ * Add query_interval_seconds to time-slice SLO condition parameters by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1793
14
+ * Support providing files for the file upload feature when creating a Synthetic API test by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1792
15
+ * Adding SLO Reporting API Documentation by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1764
16
+ * Security Monitoring Suppression - Add data_exclusion_query field by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1797
17
+ * aws api adding extended and deprecating old resource collection field by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1795
18
+ ### Changed
19
+ * Add Team relationship to AuthNMappings by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1726
20
+ ### Deprecated
21
+ * Remove deprecated /api/v1/usage/attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1778
22
+ * Deprecate legacy hourly usage metering endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1774
23
+
24
+
25
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.21.0...v2.22.0
26
+
27
+ ## 2.21.0 / 2024-03-13
28
+
29
+ ### Fixed
30
+ * Move under common tag Case Management by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1728
31
+ * Include user data with team membership resource by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1724
32
+ * Disable additionalProperties for Downtime Schedule UpdateRequest oneOfs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1733
33
+ * Fix ListServiceDefinitions pagination information by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1756
34
+ ### Added
35
+ * Case Management Public API documentation by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1708
36
+ * Make grpc steps available for synthetics api multisteps tests by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1727
37
+ * Add cloud run filter to GCP v1 and v2 spec by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1705
38
+ * add ASM serverless to usage metering API docs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1736
39
+ * Add new products to usage API docs by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1739
40
+ * Adds support for `ListMetricAssets` endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1745
41
+ * Add support for new CRUD agent rules endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1751
42
+ * Add documentation for workflow usage attribution by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1757
43
+ * Add Custom Destinations Public API by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1761
44
+ ### Changed
45
+ * Update spec for DORA Metrics Incident endpoint by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1725
46
+ ### Deprecated
47
+ * Deprecate the pattern property for SDS Standard Pattern Attributes by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1752
48
+ * Deprecate Incident Services endpoints by @api-clients-generation-pipeline in https://github.com/DataDog/datadog-api-client-ruby/pull/1763
49
+
50
+ ## New Contributors
51
+ * @antonio-ramadas-dd made their first contribution in https://github.com/DataDog/datadog-api-client-ruby/pull/1760
52
+
53
+ **Full Changelog**: https://github.com/DataDog/datadog-api-client-ruby/compare/v2.20.0...v2.21.0
54
+
3
55
  ## 2.20.0 / 2024-02-06
4
56
 
5
57
  ### Fixed
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec
6
6
 
7
7
  group :development, :test do
8
8
  gem 'activesupport'
9
- gem 'cucumber'
9
+ gem 'cucumber', '~> 9.1.1'
10
10
  gem 'ddtrace', '>=1.0.0.beta1'
11
11
  gem 'gem-release'
12
12
  gem 'rake', '~> 13.0.1'
@@ -13,6 +13,7 @@ body = DatadogAPIClient::V1::AWSAccount.new({
13
13
  "us-east-1",
14
14
  "us-west-2",
15
15
  ],
16
+ extended_resource_collection_enabled: true,
16
17
  filter_tags: [
17
18
  "$KEY:$VALUE",
18
19
  ],
@@ -20,7 +21,6 @@ body = DatadogAPIClient::V1::AWSAccount.new({
20
21
  "$KEY:$VALUE",
21
22
  ],
22
23
  metrics_collection_enabled: false,
23
- resource_collection_enabled: true,
24
24
  role_name: "DatadogAWSIntegrationRole",
25
25
  })
26
26
  p api_instance.create_aws_account(body)
@@ -13,6 +13,7 @@ body = DatadogAPIClient::V1::AWSAccount.new({
13
13
  "us-east-1",
14
14
  "us-west-2",
15
15
  ],
16
+ extended_resource_collection_enabled: true,
16
17
  filter_tags: [
17
18
  "$KEY:$VALUE",
18
19
  ],
@@ -13,6 +13,7 @@ body = DatadogAPIClient::V1::AWSAccount.new({
13
13
  "us-east-1",
14
14
  "us-west-2",
15
15
  ],
16
+ extended_resource_collection_enabled: true,
16
17
  filter_tags: [
17
18
  "$KEY:$VALUE",
18
19
  ],
@@ -20,7 +21,6 @@ body = DatadogAPIClient::V1::AWSAccount.new({
20
21
  "$KEY:$VALUE",
21
22
  ],
22
23
  metrics_collection_enabled: true,
23
- resource_collection_enabled: true,
24
24
  role_name: "DatadogAWSIntegrationRole",
25
25
  })
26
26
  opts = {
@@ -10,6 +10,9 @@ body = DatadogAPIClient::V1::GCPAccount.new({
10
10
  client_id: "163662907116366290710",
11
11
  client_x509_cert_url: "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
12
12
  host_filters: "key:value,filter:example",
13
+ cloud_run_revision_filters: [
14
+ "dr:dre",
15
+ ],
13
16
  is_cspm_enabled: true,
14
17
  is_security_command_center_enabled: true,
15
18
  private_key: "private_key",
@@ -0,0 +1,25 @@
1
+ # Update a GCP integration cloud run revision filters returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V1::GCPIntegrationAPI.new
5
+
6
+ body = DatadogAPIClient::V1::GCPAccount.new({
7
+ auth_provider_x509_cert_url: "https://www.googleapis.com/oauth2/v1/certs",
8
+ auth_uri: "https://accounts.google.com/o/oauth2/auth",
9
+ client_email: "252bf553ef04b351@example.com",
10
+ client_id: "163662907116366290710",
11
+ client_x509_cert_url: "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
12
+ host_filters: "key:value,filter:example",
13
+ cloud_run_revision_filters: [
14
+ "merp:derp",
15
+ ],
16
+ is_cspm_enabled: true,
17
+ is_security_command_center_enabled: true,
18
+ private_key: "private_key",
19
+ private_key_id: "123456789abcdefghi123456789abcdefghijklm",
20
+ project_id: "datadog-apitest",
21
+ resource_collection_enabled: true,
22
+ token_uri: "https://accounts.google.com/o/oauth2/token",
23
+ type: "service_account",
24
+ })
25
+ p api_instance.update_gcp_integration(body)
@@ -0,0 +1,118 @@
1
+ # Create an API test with a file payload 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::SyntheticsAPITest.new({
7
+ config: DatadogAPIClient::V1::SyntheticsAPITestConfig.new({
8
+ assertions: [
9
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
10
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
11
+ property: "{{ PROPERTY }}",
12
+ target: "text/html",
13
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::HEADER,
14
+ }),
15
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
16
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
17
+ target: 2000,
18
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
19
+ timings_scope: DatadogAPIClient::V1::SyntheticsAssertionTimingsScope::WITHOUT_DNS,
20
+ }),
21
+ DatadogAPIClient::V1::SyntheticsAssertionJSONPathTarget.new({
22
+ operator: DatadogAPIClient::V1::SyntheticsAssertionJSONPathOperator::VALIDATES_JSON_PATH,
23
+ target: DatadogAPIClient::V1::SyntheticsAssertionJSONPathTargetTarget.new({
24
+ json_path: "topKey",
25
+ operator: "isNot",
26
+ target_value: "0",
27
+ }),
28
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::BODY,
29
+ }),
30
+ DatadogAPIClient::V1::SyntheticsAssertionXPathTarget.new({
31
+ operator: DatadogAPIClient::V1::SyntheticsAssertionXPathOperator::VALIDATES_X_PATH,
32
+ target: DatadogAPIClient::V1::SyntheticsAssertionXPathTargetTarget.new({
33
+ x_path: "target-xpath",
34
+ target_value: "0",
35
+ operator: "contains",
36
+ }),
37
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::BODY,
38
+ }),
39
+ ],
40
+ config_variables: [
41
+ DatadogAPIClient::V1::SyntheticsConfigVariable.new({
42
+ example: "content-type",
43
+ name: "PROPERTY",
44
+ pattern: "content-type",
45
+ type: DatadogAPIClient::V1::SyntheticsConfigVariableType::TEXT,
46
+ }),
47
+ ],
48
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
49
+ certificate: DatadogAPIClient::V1::SyntheticsTestRequestCertificate.new({
50
+ cert: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({
51
+ content: "cert-content",
52
+ filename: "cert-filename",
53
+ updated_at: "2020-10-16T09:23:24.857Z",
54
+ }),
55
+ key: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({
56
+ content: "key-content",
57
+ filename: "key-filename",
58
+ updated_at: "2020-10-16T09:23:24.857Z",
59
+ }),
60
+ }),
61
+ headers: {
62
+ unique: "examplesynthetic",
63
+ },
64
+ method: "GET",
65
+ timeout: 10,
66
+ url: "https://datadoghq.com",
67
+ proxy: DatadogAPIClient::V1::SyntheticsTestRequestProxy.new({
68
+ url: "https://datadoghq.com",
69
+ headers: {},
70
+ }),
71
+ body_type: DatadogAPIClient::V1::SyntheticsTestRequestBodyType::APPLICATION_OCTET_STREAM,
72
+ files: [
73
+ DatadogAPIClient::V1::SyntheticsTestRequestBodyFile.new({
74
+ name: "file name",
75
+ content: "file content",
76
+ type: "file type",
77
+ }),
78
+ ],
79
+ basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClient.new({
80
+ access_token_url: "https://datadog-token.com",
81
+ audience: "audience",
82
+ client_id: "client-id",
83
+ client_secret: "client-secret",
84
+ resource: "resource",
85
+ scope: "yoyo",
86
+ token_api_authentication: DatadogAPIClient::V1::SyntheticsBasicAuthOauthTokenApiAuthentication::HEADER,
87
+ type: DatadogAPIClient::V1::SyntheticsBasicAuthOauthClientType::OAUTH_CLIENT,
88
+ }),
89
+ persist_cookies: true,
90
+ }),
91
+ }),
92
+ locations: [
93
+ "aws:us-east-2",
94
+ ],
95
+ message: "BDD test payload: synthetics_api_http_test_payload.json",
96
+ name: "Example-Synthetic",
97
+ options: DatadogAPIClient::V1::SyntheticsTestOptions.new({
98
+ accept_self_signed: false,
99
+ allow_insecure: true,
100
+ follow_redirects: true,
101
+ min_failure_duration: 10,
102
+ min_location_failed: 1,
103
+ monitor_name: "Example-Synthetic",
104
+ monitor_priority: 5,
105
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
106
+ count: 3,
107
+ interval: 10,
108
+ }),
109
+ tick_every: 60,
110
+ http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP2,
111
+ }),
112
+ subtype: DatadogAPIClient::V1::SyntheticsTestDetailsSubType::HTTP,
113
+ tags: [
114
+ "testing:api",
115
+ ],
116
+ type: DatadogAPIClient::V1::SyntheticsAPITestType::API,
117
+ })
118
+ p api_instance.create_synthetics_api_test(body)
@@ -40,6 +40,7 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
40
40
  method: "GET",
41
41
  timeout: 10,
42
42
  url: "https://datadoghq.com",
43
+ http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP2,
43
44
  }),
44
45
  _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
45
46
  count: 5,
@@ -47,6 +48,34 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
47
48
  }),
48
49
  subtype: DatadogAPIClient::V1::SyntheticsAPIStepSubtype::HTTP,
49
50
  }),
51
+ DatadogAPIClient::V1::SyntheticsAPIStep.new({
52
+ name: "GRPC CALL",
53
+ subtype: DatadogAPIClient::V1::SyntheticsAPIStepSubtype::GRPC,
54
+ extracted_values: [],
55
+ allow_failure: false,
56
+ is_critical: true,
57
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
58
+ count: 0,
59
+ interval: 300,
60
+ }),
61
+ assertions: [
62
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
63
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
64
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
65
+ target: 1000,
66
+ }),
67
+ ],
68
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
69
+ host: "grpcbin.test.k6.io",
70
+ port: 9000,
71
+ service: "grpcbin.GRPCBin",
72
+ method: "Index",
73
+ message: "{}",
74
+ compressed_json_descriptor: "eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==",
75
+ metadata: {},
76
+ call_type: DatadogAPIClient::V1::SyntheticsTestCallType::UNARY,
77
+ }),
78
+ }),
50
79
  ],
51
80
  }),
52
81
  locations: [
@@ -26,6 +26,10 @@ body = DatadogAPIClient::V1::SyntheticsBrowserTest.new({
26
26
  key: DatadogAPIClient::V1::SyntheticsTestRequestCertificateItem.new({}),
27
27
  }),
28
28
  certificate_domains: [],
29
+ files: [
30
+ DatadogAPIClient::V1::SyntheticsTestRequestBodyFile.new({}),
31
+ ],
32
+ http_version: DatadogAPIClient::V1::SyntheticsTestOptionsHTTPVersion::HTTP1,
29
33
  proxy: DatadogAPIClient::V1::SyntheticsTestRequestProxy.new({
30
34
  url: "https://example.com",
31
35
  }),
@@ -8,14 +8,14 @@ RETENTION_FILTER_DATA_ID = ENV["RETENTION_FILTER_DATA_ID"]
8
8
 
9
9
  body = DatadogAPIClient::V2::RetentionFilterUpdateRequest.new({
10
10
  data: DatadogAPIClient::V2::RetentionFilterUpdateData.new({
11
- attributes: DatadogAPIClient::V2::RetentionFilterCreateAttributes.new({
11
+ attributes: DatadogAPIClient::V2::RetentionFilterUpdateAttributes.new({
12
12
  name: "test",
13
13
  rate: 0.9,
14
14
  filter: DatadogAPIClient::V2::SpansFilterCreate.new({
15
15
  query: "@_top_level:1 test:service-demo",
16
16
  }),
17
17
  enabled: true,
18
- filter_type: DatadogAPIClient::V2::RetentionFilterType::SPANS_SAMPLING_PROCESSOR,
18
+ filter_type: DatadogAPIClient::V2::RetentionFilterAllType::SPANS_SAMPLING_PROCESSOR,
19
19
  }),
20
20
  id: "test-id",
21
21
  type: DatadogAPIClient::V2::ApmRetentionFilterType::APM_RETENTION_FILTER,
@@ -12,7 +12,7 @@ body = DatadogAPIClient::V2::AuthNMappingCreateRequest.new({
12
12
  attribute_key: "exampleauthnmapping",
13
13
  attribute_value: "Example-AuthN-Mapping",
14
14
  }),
15
- relationships: DatadogAPIClient::V2::AuthNMappingCreateRelationships.new({
15
+ relationships: DatadogAPIClient::V2::AuthNMappingRelationshipToRole.new({
16
16
  role: DatadogAPIClient::V2::RelationshipToRole.new({
17
17
  data: DatadogAPIClient::V2::RelationshipToRoleData.new({
18
18
  id: ROLE_DATA_ID,
@@ -16,7 +16,7 @@ body = DatadogAPIClient::V2::AuthNMappingUpdateRequest.new({
16
16
  attribute_value: "Development",
17
17
  }),
18
18
  id: AUTHN_MAPPING_DATA_ID,
19
- relationships: DatadogAPIClient::V2::AuthNMappingUpdateRelationships.new({
19
+ relationships: DatadogAPIClient::V2::AuthNMappingRelationshipToRole.new({
20
20
  role: DatadogAPIClient::V2::RelationshipToRole.new({
21
21
  data: DatadogAPIClient::V2::RelationshipToRoleData.new({
22
22
  id: ROLE_DATA_ID,
@@ -0,0 +1,14 @@
1
+ # Archive case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseEmptyRequest.new({
10
+ data: DatadogAPIClient::V2::CaseEmpty.new({
11
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
12
+ }),
13
+ })
14
+ p api_instance.archive_case(CASE_ID, body)
@@ -0,0 +1,20 @@
1
+ # Assign case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ # there is a valid "user" in the system
10
+ USER_DATA_ID = ENV["USER_DATA_ID"]
11
+
12
+ body = DatadogAPIClient::V2::CaseAssignRequest.new({
13
+ data: DatadogAPIClient::V2::CaseAssign.new({
14
+ attributes: DatadogAPIClient::V2::CaseAssignAttributes.new({
15
+ assignee_id: USER_DATA_ID,
16
+ }),
17
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
18
+ }),
19
+ })
20
+ p api_instance.assign_case(CASE_ID, body)
@@ -0,0 +1,33 @@
1
+ # Create a case returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "user" in the system
7
+ USER_DATA_ID = ENV["USER_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseCreateRequest.new({
10
+ data: DatadogAPIClient::V2::CaseCreate.new({
11
+ attributes: DatadogAPIClient::V2::CaseCreateAttributes.new({
12
+ priority: DatadogAPIClient::V2::CasePriority::NOT_DEFINED,
13
+ title: "Security breach investigation in 0cfbc5cbc676ee71",
14
+ type: DatadogAPIClient::V2::CaseType::STANDARD,
15
+ }),
16
+ relationships: DatadogAPIClient::V2::CaseCreateRelationships.new({
17
+ assignee: DatadogAPIClient::V2::NullableUserRelationship.new({
18
+ data: DatadogAPIClient::V2::NullableUserRelationshipData.new({
19
+ id: USER_DATA_ID,
20
+ type: DatadogAPIClient::V2::UserResourceType::USER,
21
+ }),
22
+ }),
23
+ project: DatadogAPIClient::V2::ProjectRelationship.new({
24
+ data: DatadogAPIClient::V2::ProjectRelationshipData.new({
25
+ id: "d4bbe1af-f36e-42f1-87c1-493ca35c320e",
26
+ type: DatadogAPIClient::V2::ProjectResourceType::PROJECT,
27
+ }),
28
+ }),
29
+ }),
30
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
31
+ }),
32
+ })
33
+ p api_instance.create_case(body)
@@ -0,0 +1,15 @@
1
+ # Create a project returns "CREATED" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ body = DatadogAPIClient::V2::ProjectCreateRequest.new({
7
+ data: DatadogAPIClient::V2::ProjectCreate.new({
8
+ attributes: DatadogAPIClient::V2::ProjectCreateAttributes.new({
9
+ key: "SEC",
10
+ name: "Security Investigation",
11
+ }),
12
+ type: DatadogAPIClient::V2::ProjectResourceType::PROJECT,
13
+ }),
14
+ })
15
+ p api_instance.create_project(body)
@@ -0,0 +1,5 @@
1
+ # Remove a project returns "No Content" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ api_instance.delete_project("project_id")
@@ -0,0 +1,8 @@
1
+ # Get the details of a case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+ p api_instance.get_case(CASE_ID)
@@ -0,0 +1,5 @@
1
+ # Get the details of a project returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ p api_instance.get_project("project_id")
@@ -0,0 +1,5 @@
1
+ # Get all projects returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ p api_instance.get_projects()
@@ -0,0 +1,5 @@
1
+ # Search cases returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ p api_instance.search_cases()
@@ -0,0 +1,5 @@
1
+ # Search cases returns "OK" response with pagination
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+ api_instance.search_cases_with_pagination() { |item| puts item }
@@ -0,0 +1,14 @@
1
+ # Unarchive case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseEmptyRequest.new({
10
+ data: DatadogAPIClient::V2::CaseEmpty.new({
11
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
12
+ }),
13
+ })
14
+ p api_instance.unarchive_case(CASE_ID, body)
@@ -0,0 +1,14 @@
1
+ # Unassign case returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseEmptyRequest.new({
10
+ data: DatadogAPIClient::V2::CaseEmpty.new({
11
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
12
+ }),
13
+ })
14
+ p api_instance.unassign_case(CASE_ID, body)
@@ -0,0 +1,17 @@
1
+ # Update case priority returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseUpdatePriorityRequest.new({
10
+ data: DatadogAPIClient::V2::CaseUpdatePriority.new({
11
+ attributes: DatadogAPIClient::V2::CaseUpdatePriorityAttributes.new({
12
+ priority: DatadogAPIClient::V2::CasePriority::P3,
13
+ }),
14
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
15
+ }),
16
+ })
17
+ p api_instance.update_priority(CASE_ID, body)
@@ -0,0 +1,17 @@
1
+ # Update case status returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CaseManagementAPI.new
5
+
6
+ # there is a valid "case" in the system
7
+ CASE_ID = ENV["CASE_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CaseUpdateStatusRequest.new({
10
+ data: DatadogAPIClient::V2::CaseUpdateStatus.new({
11
+ attributes: DatadogAPIClient::V2::CaseUpdateStatusAttributes.new({
12
+ status: DatadogAPIClient::V2::CaseStatus::IN_PROGRESS,
13
+ }),
14
+ type: DatadogAPIClient::V2::CaseResourceType::CASE,
15
+ }),
16
+ })
17
+ p api_instance.update_status(CASE_ID, body)
@@ -0,0 +1,17 @@
1
+ # Create a CSM Threats Agent rule returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
8
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
9
+ description: "My Agent rule",
10
+ enabled: true,
11
+ expression: 'exec.file.name == "sh"',
12
+ name: "examplecloudworkloadsecurity",
13
+ }),
14
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
15
+ }),
16
+ })
17
+ p api_instance.create_csm_threats_agent_rule(body)
@@ -0,0 +1,8 @@
1
+ # Delete 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
+ api_instance.delete_csm_threats_agent_rule(AGENT_RULE_DATA_ID)
@@ -0,0 +1,5 @@
1
+ # Get the latest CSM Threats policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
5
+ p api_instance.download_csm_threats_policy()