datadog_api_client 2.33.0 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +2 -1
  4. data/.generator/schemas/v1/openapi.yaml +18 -3
  5. data/.generator/schemas/v2/openapi.yaml +2577 -883
  6. data/.generator/src/generator/templates/configuration.j2 +2 -2
  7. data/.github/workflows/publish.yml +16 -8
  8. data/.github/workflows/release.yml +57 -61
  9. data/CHANGELOG.md +16 -0
  10. data/Gemfile +2 -1
  11. data/examples/v2/csm-threats/CreateCSMThreatsAgentPolicy.rb +21 -0
  12. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule.rb +7 -4
  13. data/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.rb +3 -2
  14. data/examples/v2/csm-threats/DeleteCSMThreatsAgentPolicy.rb +8 -0
  15. data/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.rb +8 -2
  16. data/examples/v2/csm-threats/DeleteCloudWorkloadSecurityAgentRule.rb +1 -1
  17. data/examples/v2/csm-threats/DownloadCSMThreatsPolicy.rb +1 -1
  18. data/examples/v2/csm-threats/DownloadCloudWorkloadPolicyFile.rb +1 -1
  19. data/examples/v2/csm-threats/GetCSMThreatsAgentPolicy.rb +8 -0
  20. data/examples/v2/csm-threats/GetCSMThreatsAgentRule.rb +8 -2
  21. data/examples/v2/csm-threats/GetCloudWorkloadSecurityAgentRule.rb +1 -1
  22. data/examples/v2/csm-threats/ListCSMThreatsAgentPolicies.rb +5 -0
  23. data/examples/v2/csm-threats/ListCSMThreatsAgentRules.rb +1 -1
  24. data/examples/v2/csm-threats/ListCloudWorkloadSecurityAgentRules.rb +1 -1
  25. data/examples/v2/csm-threats/UpdateCSMThreatsAgentPolicy.rb +25 -0
  26. data/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.rb +12 -4
  27. data/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.rb +3 -4
  28. data/examples/v2/dora-metrics/GetDORADeployment.rb +5 -0
  29. data/examples/v2/dora-metrics/GetDORAFailure.rb +5 -0
  30. data/examples/v2/dora-metrics/ListDORADeployments.rb +16 -0
  31. data/examples/v2/dora-metrics/ListDORAFailures.rb +16 -0
  32. data/examples/v2/network-device-monitoring/ListDevices_2712868412.rb +5 -0
  33. data/examples/v2/on-call/CreateOnCallEscalationPolicy.rb +19 -17
  34. data/examples/v2/on-call/CreateOnCallSchedule.rb +11 -15
  35. data/examples/v2/on-call/DeleteOnCallEscalationPolicy.rb +2 -2
  36. data/examples/v2/on-call/DeleteOnCallSchedule.rb +2 -2
  37. data/examples/v2/on-call/GetOnCallEscalationPolicy.rb +6 -3
  38. data/examples/v2/on-call/GetOnCallSchedule.rb +2 -2
  39. data/examples/v2/on-call/GetOnCallTeamRoutingRules.rb +5 -0
  40. data/examples/v2/on-call/GetScheduleOnCallUser.rb +8 -0
  41. data/examples/v2/on-call/SetOnCallTeamRoutingRules.rb +57 -0
  42. data/examples/v2/on-call/UpdateOnCallEscalationPolicy.rb +8 -9
  43. data/examples/v2/on-call/UpdateOnCallSchedule.rb +11 -16
  44. data/examples/v2/on-call-paging/AcknowledgeOnCallPage.rb +5 -0
  45. data/examples/v2/on-call-paging/CreateOnCallPage.rb +23 -0
  46. data/examples/v2/on-call-paging/EscalateOnCallPage.rb +5 -0
  47. data/examples/v2/on-call-paging/ResolveOnCallPage.rb +5 -0
  48. data/examples/v2/rum-metrics/CreateRumMetric.rb +1 -1
  49. data/examples/v2/security-monitoring/GetResourceEvaluationFilters.rb +9 -0
  50. data/examples/v2/security-monitoring/UpdateResourceEvaluationFilters.rb +21 -0
  51. data/examples/v2/software-catalog/ListCatalogRelation.rb +5 -0
  52. data/examples/v2/software-catalog/ListCatalogRelation_1311054087.rb +8 -0
  53. data/examples/v2/workflow-automation/CreateWorkflow.rb +0 -1
  54. data/examples/v2/workflow-automation/UpdateWorkflow.rb +0 -1
  55. data/lib/datadog_api_client/configuration.rb +203 -15
  56. data/lib/datadog_api_client/inflector.rb +104 -43
  57. data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb +2 -2
  58. data/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb +2 -2
  59. data/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb +2 -2
  60. data/lib/datadog_api_client/v1/models/synthetics_assertion_target_value.rb +63 -0
  61. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb +2 -2
  62. data/lib/datadog_api_client/v2/api/csm_threats_api.rb +424 -52
  63. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +265 -1
  64. data/lib/datadog_api_client/v2/api/metrics_api.rb +5 -5
  65. data/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb +25 -3
  66. data/lib/datadog_api_client/v2/api/on_call_api.rb +234 -24
  67. data/lib/datadog_api_client/v2/api/on_call_paging_api.rb +292 -0
  68. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +133 -0
  69. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +101 -0
  70. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_relationships_teams.rb → cloud_workload_security_agent_policies_list_response.rb} +5 -5
  71. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_attributes.rb +300 -0
  72. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_create_attributes.rb +167 -0
  73. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_relationships_teams_data_items.rb → cloud_workload_security_agent_policy_create_data.rb} +19 -19
  74. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_create_request.rb +123 -0
  75. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_data.rb +125 -0
  76. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_response.rb +105 -0
  77. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_type.rb +26 -0
  78. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_attributes_layers_items_restrictions_items.rb → cloud_workload_security_agent_policy_update_attributes.rb} +46 -33
  79. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_update_data.rb +154 -0
  80. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_update_request.rb +123 -0
  81. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_updater_attributes.rb +123 -0
  82. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +1 -1
  83. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +31 -19
  84. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +27 -5
  85. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_data.rb +2 -2
  86. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_request.rb +2 -2
  87. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb +3 -3
  88. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_data.rb +4 -4
  89. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +1 -1
  90. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_response.rb +2 -2
  91. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_type.rb +1 -1
  92. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +29 -7
  93. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +4 -4
  94. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_request.rb +2 -2
  95. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb +3 -3
  96. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rules_list_response.rb +2 -2
  97. data/lib/datadog_api_client/v2/models/create_page_request.rb +105 -0
  98. data/lib/datadog_api_client/v2/models/create_page_request_data.rb +133 -0
  99. data/lib/datadog_api_client/v2/models/create_page_request_data_attributes.rb +187 -0
  100. data/lib/datadog_api_client/v2/models/create_page_request_data_attributes_target.rb +115 -0
  101. data/lib/datadog_api_client/v2/models/create_page_request_data_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/create_page_response.rb +105 -0
  103. data/lib/datadog_api_client/v2/models/create_page_response_data.rb +133 -0
  104. data/lib/datadog_api_client/v2/models/create_page_response_data_type.rb +26 -0
  105. data/lib/datadog_api_client/v2/models/custom_framework_without_requirements.rb +2 -24
  106. data/lib/datadog_api_client/v2/models/{schedule_data_relationships_teams.rb → data_relationships_teams.rb} +3 -3
  107. data/lib/datadog_api_client/v2/models/{schedule_data_relationships_teams_data_items.rb → data_relationships_teams_data_items.rb} +3 -3
  108. data/lib/datadog_api_client/v2/models/{schedule_data_relationships_teams_data_items_type.rb → data_relationships_teams_data_items_type.rb} +1 -1
  109. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_attributes_steps_items_targets_items.rb → dora_event.rb} +17 -7
  110. data/lib/datadog_api_client/v2/models/dora_fetch_response.rb +105 -0
  111. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +1 -1
  112. data/lib/datadog_api_client/v2/models/dora_list_deployments_request.rb +123 -0
  113. data/lib/datadog_api_client/v2/models/dora_list_deployments_request_attributes.rb +163 -0
  114. data/lib/datadog_api_client/v2/models/dora_list_deployments_request_data.rb +133 -0
  115. data/lib/datadog_api_client/v2/models/dora_list_deployments_request_data_type.rb +26 -0
  116. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_relationships_teams.rb → dora_list_failures_request.rb} +25 -9
  117. data/lib/datadog_api_client/v2/models/dora_list_failures_request_attributes.rb +163 -0
  118. data/lib/datadog_api_client/v2/models/dora_list_failures_request_data.rb +133 -0
  119. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_relationships_teams_data_items_type.rb → dora_list_failures_request_data_type.rb} +3 -3
  120. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_relationships_teams.rb → dora_list_response.rb} +5 -5
  121. data/lib/datadog_api_client/v2/models/entity_v3_datadog_code_location_item.rb +1 -21
  122. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb +1 -11
  123. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb +2 -2
  124. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_relationships.rb +2 -2
  125. data/lib/datadog_api_client/v2/models/escalation_policy_data.rb +1 -1
  126. data/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb +2 -12
  127. data/lib/datadog_api_client/v2/models/escalation_policy_data_relationships.rb +2 -2
  128. data/lib/datadog_api_client/v2/models/escalation_policy_included.rb +2 -3
  129. data/lib/datadog_api_client/v2/models/escalation_policy_step_relationships.rb +2 -2
  130. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_attributes_steps_items_targets_items.rb → escalation_policy_step_target.rb} +3 -3
  131. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_attributes_steps_items_targets_items_type.rb → escalation_policy_step_target_type.rb} +1 -1
  132. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb +1 -11
  133. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb +2 -2
  134. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_relationships.rb +2 -2
  135. data/lib/datadog_api_client/v2/models/escalation_policy_user.rb +143 -0
  136. data/lib/datadog_api_client/v2/models/escalation_policy_user_attributes.rb +125 -0
  137. data/lib/datadog_api_client/v2/models/{team_reference_relationships_oncall_users_data_items_type.rb → escalation_policy_user_type.rb} +1 -1
  138. data/lib/datadog_api_client/v2/models/{team_reference_relationships_oncall_users.rb → escalation_targets.rb} +5 -5
  139. data/lib/datadog_api_client/v2/models/full_custom_framework_data_attributes.rb +2 -34
  140. data/lib/datadog_api_client/v2/models/get_resource_evaluation_filters_response.rb +123 -0
  141. data/lib/datadog_api_client/v2/models/get_resource_evaluation_filters_response_data.rb +125 -0
  142. data/lib/datadog_api_client/v2/models/historical_job_options.rb +2 -2
  143. data/lib/datadog_api_client/v2/models/historical_job_query.rb +1 -1
  144. data/lib/datadog_api_client/v2/models/http_integration.rb +0 -6
  145. data/lib/datadog_api_client/v2/models/http_integration_update.rb +1 -14
  146. data/lib/datadog_api_client/v2/models/incident_severity.rb +1 -0
  147. data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
  148. data/lib/datadog_api_client/v2/models/list_relation_catalog_response.rb +139 -0
  149. data/lib/datadog_api_client/v2/models/list_relation_catalog_response_links.rb +125 -0
  150. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -16
  151. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -16
  152. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -16
  153. data/lib/datadog_api_client/v2/models/observability_pipeline_google_cloud_storage_destination.rb +2 -13
  154. data/lib/datadog_api_client/v2/models/observability_pipeline_metadata_entry.rb +1 -1
  155. data/lib/datadog_api_client/v2/models/on_call_page_target_type.rb +28 -0
  156. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_relationships_teams_data_items_type.rb → page_urgency.rb} +4 -3
  157. data/lib/datadog_api_client/v2/models/relation_attributes.rb +125 -0
  158. data/lib/datadog_api_client/v2/models/relation_entity.rb +125 -0
  159. data/lib/datadog_api_client/v2/models/relation_include_type.rb +27 -0
  160. data/lib/datadog_api_client/v2/models/relation_meta.rb +135 -0
  161. data/lib/datadog_api_client/v2/models/relation_relationships.rb +115 -0
  162. data/lib/datadog_api_client/v2/models/relation_response.rb +155 -0
  163. data/lib/datadog_api_client/v2/models/{escalation_policy_data_relationships_teams.rb → relation_response_meta.rb} +21 -13
  164. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_relationships_teams_data_items_type.rb → relation_response_type.rb} +3 -3
  165. data/lib/datadog_api_client/v2/models/relation_to_entity.rb +115 -0
  166. data/lib/datadog_api_client/v2/models/resource_filter_attributes.rb +133 -0
  167. data/lib/datadog_api_client/v2/models/{escalation_policy_data_relationships_teams_data_items_type.rb → resource_filter_request_type.rb} +3 -3
  168. data/lib/datadog_api_client/v2/models/routing_rule.rb +153 -0
  169. data/lib/datadog_api_client/v2/models/routing_rule_action.rb +63 -0
  170. data/lib/datadog_api_client/v2/models/routing_rule_attributes.rb +137 -0
  171. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_attributes_layers_items_members_items_user.rb → routing_rule_relationships.rb} +11 -11
  172. data/lib/datadog_api_client/v2/models/routing_rule_relationships_policy.rb +105 -0
  173. data/lib/datadog_api_client/v2/models/{team_reference_relationships_oncall_users_data_items.rb → routing_rule_relationships_policy_data.rb} +6 -6
  174. data/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data_type.rb +26 -0
  175. data/lib/datadog_api_client/v2/models/routing_rule_type.rb +26 -0
  176. data/lib/datadog_api_client/v2/models/schedule_create_request_data.rb +1 -1
  177. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes.rb +3 -15
  178. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +4 -4
  179. data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships.rb +2 -2
  180. data/lib/datadog_api_client/v2/models/schedule_data.rb +1 -1
  181. data/lib/datadog_api_client/v2/models/schedule_data_attributes.rb +2 -14
  182. data/lib/datadog_api_client/v2/models/schedule_data_relationships.rb +1 -1
  183. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_attributes_layers_items_members_items.rb → schedule_request_data_attributes_layers_items_members_items.rb} +3 -3
  184. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_attributes_layers_items_members_items_user.rb → schedule_request_data_attributes_layers_items_members_items_user.rb} +2 -2
  185. data/lib/datadog_api_client/v2/models/schedule_update_request.rb +1 -1
  186. data/lib/datadog_api_client/v2/models/schedule_update_request_data.rb +2 -2
  187. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes.rb +2 -14
  188. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +4 -4
  189. data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships.rb +2 -2
  190. data/lib/datadog_api_client/v2/models/schedule_user_attributes.rb +13 -3
  191. data/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb +1 -1
  192. data/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb +1 -1
  193. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +2 -2
  194. data/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb +2 -1
  195. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +1 -1
  196. data/lib/datadog_api_client/v2/models/send_slack_message_action.rb +165 -0
  197. data/lib/datadog_api_client/v2/models/send_slack_message_action_type.rb +26 -0
  198. data/lib/datadog_api_client/v2/models/send_teams_message_action.rb +186 -0
  199. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_relationships_teams_data_items_type.rb → send_teams_message_action_type.rb} +3 -3
  200. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_relationships_teams.rb → shift.rb} +19 -9
  201. data/lib/datadog_api_client/v2/models/shift_data.rb +153 -0
  202. data/lib/datadog_api_client/v2/models/shift_data_attributes.rb +115 -0
  203. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_attributes_layers_items_members_items.rb → shift_data_relationships.rb} +5 -6
  204. data/lib/datadog_api_client/v2/models/shift_data_relationships_user.rb +123 -0
  205. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_relationships_teams_data_items.rb → shift_data_relationships_user_data.rb} +6 -6
  206. data/lib/datadog_api_client/v2/models/shift_data_relationships_user_data_type.rb +26 -0
  207. data/lib/datadog_api_client/v2/models/shift_data_type.rb +26 -0
  208. data/lib/datadog_api_client/v2/models/shift_included.rb +62 -0
  209. data/lib/datadog_api_client/v2/models/team_reference.rb +1 -11
  210. data/lib/datadog_api_client/v2/models/team_routing_rules.rb +117 -0
  211. data/lib/datadog_api_client/v2/models/team_routing_rules_data.rb +143 -0
  212. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships.rb +105 -0
  213. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules.rb +107 -0
  214. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_relationships_teams_data_items.rb → team_routing_rules_data_relationships_rules_data_items.rb} +6 -7
  215. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items_type.rb +26 -0
  216. data/lib/datadog_api_client/v2/models/team_routing_rules_data_type.rb +26 -0
  217. data/lib/datadog_api_client/v2/models/team_routing_rules_included.rb +62 -0
  218. data/lib/datadog_api_client/v2/models/team_routing_rules_request.rb +105 -0
  219. data/lib/datadog_api_client/v2/models/{escalation_policy_data_relationships_teams_data_items.rb → team_routing_rules_request_data.rb} +18 -19
  220. data/lib/datadog_api_client/v2/models/team_routing_rules_request_data_attributes.rb +107 -0
  221. data/lib/datadog_api_client/v2/models/team_routing_rules_request_data_type.rb +26 -0
  222. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_attributes_layers_items_restrictions_items.rb → team_routing_rules_request_rule.rb} +44 -33
  223. data/lib/datadog_api_client/v2/models/{layer_attributes_restrictions_items.rb → time_restriction.rb} +9 -10
  224. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_attributes_layers_items_interval.rb → time_restrictions.rb} +32 -30
  225. data/lib/datadog_api_client/v2/models/update_resource_evaluation_filters_request.rb +123 -0
  226. data/lib/datadog_api_client/v2/models/update_resource_evaluation_filters_request_data.rb +154 -0
  227. data/lib/datadog_api_client/v2/models/update_resource_evaluation_filters_response.rb +123 -0
  228. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_relationships_teams_data_items.rb → update_resource_evaluation_filters_response_data.rb} +24 -14
  229. data/lib/datadog_api_client/v2/models/urgency.rb +28 -0
  230. data/lib/datadog_api_client/v2/models/user_attributes_status.rb +28 -0
  231. data/lib/datadog_api_client/v2/models/{layer_attributes_restrictions_items_end_day.rb → weekday.rb} +2 -2
  232. data/lib/datadog_api_client/version.rb +1 -1
  233. metadata +128 -51
  234. data/.github/workflows/prepare_release.yml +0 -112
  235. data/RELEASING.md +0 -43
  236. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items_assignment.rb +0 -27
  237. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items_assignment.rb +0 -27
  238. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items_targets_items_type.rb +0 -28
  239. data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_start_day.rb +0 -32
  240. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_end_day.rb +0 -32
  241. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_start_day.rb +0 -32
  242. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_interval.rb +0 -144
  243. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_end_day.rb +0 -32
  244. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_start_day.rb +0 -32
  245. data/lib/datadog_api_client/v2/models/team_reference_relationships.rb +0 -105
@@ -312,7 +312,7 @@ module {{ module_name }}
312
312
  # Returns an array of Server setting
313
313
  {%- macro server_configuration(server) -%}
314
314
  {
315
- url: "{{ server.url }}",
315
+ url: +"{{ server.url }}",
316
316
  description: "{{ server.description|default("No description provided") }}",
317
317
  variables: {
318
318
  {%- for name, variable in server.get("variables", {}).items() %}
@@ -353,7 +353,7 @@ module {{ module_name }}
353
353
  "{{ version }}.{{ operation.operationId|snake_case }}": [
354
354
  {%- endif %}
355
355
  {{ server_configuration(server)|indent(10) }}{% if not loop.last %},{% endif %}
356
- {%- if loop.last %}
356
+ {%- if loop.last %}
357
357
  ],
358
358
  {%- endif %}
359
359
  {%- endfor %}
@@ -19,18 +19,26 @@ jobs:
19
19
  id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
20
20
  contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
21
21
 
22
- if: github.event_name == 'workflow_dispatch' || (github.event_name == 'release' && github.event.action == 'published')
23
22
  steps:
24
- - uses: actions/checkout@v3
23
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25
24
  with:
26
- ref: ${{ github.event.release.tag_name }}
25
+ fetch-depth: 1
27
26
 
28
- - name: Set up Ruby 2.7
29
- uses: ruby/setup-ruby@v1
27
+ - name: Set up Ruby 3.4.3
28
+ uses: ruby/setup-ruby@eaecf785f6a34567a6d97f686bbb7bccc1ac1e5c # v1.237.0
30
29
  with:
31
- ruby-version: 2.7
30
+ ruby-version: 3.4.3
32
31
 
33
- - run: bundle install
32
+ - name: Install dependencies ${{ github.event.release.tag_name }}
33
+ run: |
34
+ # Get tag name from event
35
+ tag_name="${{ github.event.release.tag_name }}"
34
36
 
35
- - name: Publish to RubyGems
37
+ if [[ ! "$tag_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
38
+ cd $(echo $tag_name | rev | cut -d'/' -f2- | rev)
39
+ fi
40
+
41
+ bundle install
42
+
43
+ - name: Publishing tag ${{ github.event.release.tag_name }} to RubyGems
36
44
  uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
@@ -22,75 +22,71 @@ jobs:
22
22
  steps:
23
23
  - name: Get GitHub App token
24
24
  id: get_token
25
- uses: actions/create-github-app-token@v1
25
+ uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 #v1.11.1
26
26
  with:
27
27
  app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
28
28
  private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
29
29
 
30
- - name: Create release
31
- uses: actions/github-script@v6
32
- env:
33
- RELEASE_BRANCH: ${{ github.head_ref }}
34
- with:
35
- github-token: ${{ steps.get_token.outputs.token }}
36
- script: |
37
- const tagName = `v${process.env.RELEASE_BRANCH.split("/")[1]}`;
38
- await github.rest.git.createRef({
39
- owner: context.repo.owner,
40
- repo: context.repo.repo,
41
- ref: `refs/tags/${tagName}`,
42
- sha: context.payload.pull_request.merge_commit_sha,
43
- });
44
- await github.rest.repos.createRelease({
45
- owner: context.repo.owner,
46
- repo: context.repo.repo,
47
- generate_release_notes: true,
48
- tag_name: tagName,
49
- });
50
-
51
- - uses: actions/checkout@v3
30
+ - name: Checkout ${{ github.event.pull_request.base.ref }}
31
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52
32
  with:
53
- fetch-depth: 0
54
33
  token: ${{ steps.get_token.outputs.token }}
34
+ ref: ${{ github.event.pull_request.base.ref }}
35
+ fetch-depth: 0
55
36
 
56
- - name: Setup Git
37
+ - name: Release packages
38
+ env:
39
+ HEAD_SHA: ${{ github.event.pull_request.merge_commit_sha }}
40
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
41
+ GH_TOKEN: ${{ steps.get_token.outputs.token }}
42
+ shell: bash
57
43
  run: |
58
- git config user.name "${GIT_AUTHOR_NAME}"
59
- git config user.email "${GIT_AUTHOR_EMAIL}"
44
+ CHANGED_VERSION_RB_FILES=$(git diff --diff-filter=MACR --name-only $BASE_SHA...$HEAD_SHA \
45
+ | grep -E 'version\.rb$' \
46
+ | xargs dirname | xargs dirname | xargs dirname \
47
+ | sort \
48
+ | uniq)
60
49
 
61
- - name: Set up Ruby 2.7
62
- uses: ruby/setup-ruby@v1
63
- with:
64
- ruby-version: 2.7
50
+ declare -A versions
51
+ for package in $CHANGED_VERSION_RB_FILES; do
52
+ version_dir=$(find $package/lib/*/version.rb -name "version.rb" | head -n 1)
53
+ base_version=$(git show $BASE_SHA:$version_dir | grep "VERSION =" | sed "s/.*'\(.*\)'.*/\1/")
54
+ head_version=$(git show $HEAD_SHA:$version_dir | grep "VERSION =" | sed "s/.*'\(.*\)'.*/\1/")
65
55
 
66
- - name: Bump Gem version
67
- run: |
68
- git switch -c "${POST_RELEASE_BRANCH}"
69
- bundle install
70
- bundle exec gem bump -v dev
71
- git push -f --set-upstream origin "${POST_RELEASE_BRANCH}"
72
- env:
73
- POST_RELEASE_BRANCH: post-${{ github.head_ref }}
56
+ if [ "$base_version" != "$head_version" ]; then
57
+ versions[$package]=$head_version
58
+ fi
59
+ done
74
60
 
75
- - name: Create PR
76
- uses: actions/github-script@v6
77
- env:
78
- POST_RELEASE_BRANCH: post-${{ github.head_ref }}
79
- BASE: master
80
- with:
81
- github-token: ${{ steps.get_token.outputs.token }}
82
- script: |
83
- const { data: pr } = await github.rest.pulls.create({
84
- owner: context.repo.owner,
85
- repo: context.repo.repo,
86
- head: process.env.POST_RELEASE_BRANCH,
87
- base: process.env.BASE,
88
- title: "Post release",
89
- body: "Bump to dev version",
90
- });
91
- await github.rest.issues.addLabels({
92
- issue_number: pr.number,
93
- owner: context.repo.owner,
94
- repo: context.repo.repo,
95
- labels: ["changelog/no-changelog"],
96
- });
61
+ for package in "${!versions[@]}"; do
62
+ echo "Releasing $package at version ${versions[$package]}"
63
+
64
+ # Build the tag name
65
+ if [[ "$package" == "." ]]; then
66
+ # If the package is the root, use the version as the tag name
67
+ tag_name="v${versions[$package]}"
68
+ else
69
+ # If the package is not the root, use the package name and version as the tag name
70
+ tag_name="$package/${versions[$package]}"
71
+ fi
72
+
73
+ # Get the changelog entries since last release
74
+ # TODO: Implement this
75
+ # changelog_content=$(git diff $BASE_REF...$HEAD_REF -- $package/CHANGELOG.md | grep -A 1000 "^+##" | grep -v "^+++" | sed 's/^+//')
76
+
77
+ is_prerelease=$(echo $package | grep -q "beta" && echo true || echo false)
78
+ # Create the tag
79
+ gh api repos/{owner}/{repo}/git/refs \
80
+ -f ref="refs/tags/$tag_name" \
81
+ -f sha=$HEAD_SHA
82
+
83
+ # Create the release
84
+ gh api repos/{owner}/{repo}/releases --input - << EOF
85
+ {
86
+ "tag_name": "$tag_name",
87
+ "name": "$tag_name",
88
+ "body": "See $package/CHANGELOG.md for details",
89
+ "prerelease": $is_prerelease
90
+ }
91
+ EOF
92
+ done
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.34.0/2025-05-28
4
+
5
+ ### Fixed
6
+ * add `include` parameter to On-Call team rules test [#2426](https://github.com/DataDog/datadog-api-client-ruby/pull/2426)
7
+ * fix On-Call spec [#2417](https://github.com/DataDog/datadog-api-client-ruby/pull/2417)
8
+ * Fix frozen string errors again, more durably this time [#2407](https://github.com/DataDog/datadog-api-client-ruby/pull/2407)
9
+ * Fix incorrect pattern for url [#2399](https://github.com/DataDog/datadog-api-client-ruby/pull/2399)
10
+
11
+ ### Added
12
+ * Add support for Datadog Events as a data source for rules [#2421](https://github.com/DataDog/datadog-api-client-ruby/pull/2421)
13
+ * Add public APIs to search DORA events [#2418](https://github.com/DataDog/datadog-api-client-ruby/pull/2418)
14
+ * Adding endpoints to manage Resource Evaluation Filters [#2411](https://github.com/DataDog/datadog-api-client-ruby/pull/2411)
15
+ * Add Sev0 as a supported incident severity [#2403](https://github.com/DataDog/datadog-api-client-ruby/pull/2403)
16
+ * Share timerestriction object [#2397](https://github.com/DataDog/datadog-api-client-ruby/pull/2397)
17
+ * add On-Call Paging spec [#2391](https://github.com/DataDog/datadog-api-client-ruby/pull/2391)
18
+
3
19
  ## 2.33.0 / 2025-05-01
4
20
 
5
21
  ### Fixed
data/Gemfile CHANGED
@@ -6,10 +6,11 @@ gemspec
6
6
 
7
7
  group :development, :test do
8
8
  gem 'activesupport'
9
- gem 'cucumber', '~> 9.1.1'
9
+ gem 'cucumber', '~> 9.2.1'
10
10
  gem 'datadog-ci', '~> 1.11'
11
11
  gem 'gem-release'
12
12
  gem 'rake', '~> 13.0.1'
13
+ gem 'ostruct'
13
14
  gem 'rspec-expectations'
14
15
  gem 'rubocop'
15
16
  gem 'rufo'
@@ -0,0 +1,21 @@
1
+ # Create a Workload Protection policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyCreateRequest.new({
7
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyCreateData.new({
8
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyCreateAttributes.new({
9
+ description: "My agent policy",
10
+ enabled: true,
11
+ host_tags_lists: [
12
+ [
13
+ "env:test",
14
+ ],
15
+ ],
16
+ name: "my_agent_policy",
17
+ }),
18
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyType::POLICY,
19
+ }),
20
+ })
21
+ p api_instance.create_csm_threats_agent_policy(body)
@@ -1,18 +1,21 @@
1
- # Create a CSM Threats Agent rule returns "OK" response
1
+ # Create a Workload Protection agent rule returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
5
 
6
+ # there is a valid "policy_rc" in the system
7
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
8
+
6
9
  body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({
7
10
  data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
8
11
  attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
9
12
  description: "My Agent rule",
10
13
  enabled: true,
11
14
  expression: 'exec.file.name == "sh"',
12
- filters: [
13
- 'os == "linux"',
14
- ],
15
+ filters: [],
15
16
  name: "examplecsmthreat",
17
+ policy_id: POLICY_DATA_ID,
18
+ product_tags: [],
16
19
  }),
17
20
  type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
18
21
  }),
@@ -1,4 +1,4 @@
1
- # Create a Cloud Workload Security Agent rule returns "OK" response
1
+ # Create a Workload Protection agent rule (US1-FED) returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -6,9 +6,10 @@ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
6
6
  body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({
7
7
  data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
8
8
  attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
9
- description: "Test Agent rule",
9
+ description: "My Agent rule",
10
10
  enabled: true,
11
11
  expression: 'exec.file.name == "sh"',
12
+ filters: [],
12
13
  name: "examplecsmthreat",
13
14
  }),
14
15
  type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
@@ -0,0 +1,8 @@
1
+ # Delete a Workload Protection policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
+
6
+ # there is a valid "policy_rc" in the system
7
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
8
+ api_instance.delete_csm_threats_agent_policy(POLICY_DATA_ID)
@@ -1,8 +1,14 @@
1
- # Delete a CSM Threats Agent rule returns "OK" response
1
+ # Delete a Workload Protection agent rule returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
5
 
6
6
  # there is a valid "agent_rule_rc" in the system
7
7
  AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
- api_instance.delete_csm_threats_agent_rule(AGENT_RULE_DATA_ID)
8
+
9
+ # there is a valid "policy_rc" in the system
10
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
11
+ opts = {
12
+ policy_id: POLICY_DATA_ID,
13
+ }
14
+ api_instance.delete_csm_threats_agent_rule(AGENT_RULE_DATA_ID, opts)
@@ -1,4 +1,4 @@
1
- # Delete a Cloud Workload Security Agent rule returns "OK" response
1
+ # Delete a Workload Protection agent rule (US1-FED) returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -1,4 +1,4 @@
1
- # Get the latest CSM Threats policy returns "OK" response
1
+ # Download the Workload Protection policy returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -1,4 +1,4 @@
1
- # Get the latest Cloud Workload Security policy returns "OK" response
1
+ # Download the Workload Protection policy (US1-FED) returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -0,0 +1,8 @@
1
+ # Get a Workload Protection policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
+
6
+ # there is a valid "policy_rc" in the system
7
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
8
+ p api_instance.get_csm_threats_agent_policy(POLICY_DATA_ID)
@@ -1,8 +1,14 @@
1
- # Get a CSM Threats Agent rule returns "OK" response
1
+ # Get a Workload Protection agent rule returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
5
 
6
6
  # there is a valid "agent_rule_rc" in the system
7
7
  AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
- p api_instance.get_csm_threats_agent_rule(AGENT_RULE_DATA_ID)
8
+
9
+ # there is a valid "policy_rc" in the system
10
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
11
+ opts = {
12
+ policy_id: POLICY_DATA_ID,
13
+ }
14
+ p api_instance.get_csm_threats_agent_rule(AGENT_RULE_DATA_ID, opts)
@@ -1,4 +1,4 @@
1
- # Get a Cloud Workload Security Agent rule returns "OK" response
1
+ # Get a Workload Protection agent rule (US1-FED) returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -0,0 +1,5 @@
1
+ # Get all Workload Protection policies returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
+ p api_instance.list_csm_threats_agent_policies()
@@ -1,4 +1,4 @@
1
- # Get all CSM Threats Agent rules returns "OK" response
1
+ # Get all Workload Protection agent rules returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -1,4 +1,4 @@
1
- # Get all Cloud Workload Security Agent rules returns "OK" response
1
+ # Get all Workload Protection agent rules (US1-FED) returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -0,0 +1,25 @@
1
+ # Update a Workload Protection policy returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
5
+
6
+ # there is a valid "policy_rc" in the system
7
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
8
+
9
+ body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyUpdateRequest.new({
10
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyUpdateData.new({
11
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyUpdateAttributes.new({
12
+ description: "Updated agent policy",
13
+ enabled: true,
14
+ host_tags_lists: [
15
+ [
16
+ "env:test",
17
+ ],
18
+ ],
19
+ name: "updated_agent_policy",
20
+ }),
21
+ id: POLICY_DATA_ID,
22
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentPolicyType::POLICY,
23
+ }),
24
+ })
25
+ p api_instance.update_csm_threats_agent_policy(POLICY_DATA_ID, body)
@@ -1,4 +1,4 @@
1
- # Update a CSM Threats Agent rule returns "OK" response
1
+ # Update a Workload Protection agent rule returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -6,15 +6,23 @@ api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
6
6
  # there is a valid "agent_rule_rc" in the system
7
7
  AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
8
8
 
9
+ # there is a valid "policy_rc" in the system
10
+ POLICY_DATA_ID = ENV["POLICY_DATA_ID"]
11
+
9
12
  body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest.new({
10
13
  data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData.new({
11
14
  attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes.new({
12
- description: "Test Agent rule",
15
+ description: "My Agent rule",
13
16
  enabled: true,
14
17
  expression: 'exec.file.name == "sh"',
18
+ policy_id: POLICY_DATA_ID,
19
+ product_tags: [],
15
20
  }),
16
- type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
17
21
  id: AGENT_RULE_DATA_ID,
22
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
18
23
  }),
19
24
  })
20
- p api_instance.update_csm_threats_agent_rule(AGENT_RULE_DATA_ID, body)
25
+ opts = {
26
+ policy_id: POLICY_DATA_ID,
27
+ }
28
+ p api_instance.update_csm_threats_agent_rule(AGENT_RULE_DATA_ID, body, opts)
@@ -1,4 +1,4 @@
1
- # Update a Cloud Workload Security Agent rule returns "OK" response
1
+ # Update a Workload Protection agent rule (US1-FED) returns "OK" response
2
2
 
3
3
  require "datadog_api_client"
4
4
  api_instance = DatadogAPIClient::V2::CSMThreatsAPI.new
@@ -9,12 +9,11 @@ AGENT_RULE_DATA_ID = ENV["AGENT_RULE_DATA_ID"]
9
9
  body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest.new({
10
10
  data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData.new({
11
11
  attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes.new({
12
- description: "Test Agent rule",
13
- enabled: true,
12
+ description: "Updated Agent rule",
14
13
  expression: 'exec.file.name == "sh"',
15
14
  }),
16
- type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
17
15
  id: AGENT_RULE_DATA_ID,
16
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
18
17
  }),
19
18
  })
20
19
  p api_instance.update_cloud_workload_security_agent_rule(AGENT_RULE_DATA_ID, body)
@@ -0,0 +1,5 @@
1
+ # Get a deployment event returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
5
+ p api_instance.get_dora_deployment("deployment_id")
@@ -0,0 +1,5 @@
1
+ # Get a failure event returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
5
+ p api_instance.get_dora_failure("failure_id")
@@ -0,0 +1,16 @@
1
+ # Get a list of deployment events returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::DORAListDeploymentsRequest.new({
7
+ data: DatadogAPIClient::V2::DORAListDeploymentsRequestData.new({
8
+ attributes: DatadogAPIClient::V2::DORAListDeploymentsRequestAttributes.new({
9
+ from: "2025-03-23T00:00:00Z",
10
+ limit: 1,
11
+ to: "2025-03-24T00:00:00Z",
12
+ }),
13
+ type: DatadogAPIClient::V2::DORAListDeploymentsRequestDataType::DORA_DEPLOYMENTS_LIST_REQUEST,
14
+ }),
15
+ })
16
+ p api_instance.list_dora_deployments(body)
@@ -0,0 +1,16 @@
1
+ # Get a list of failure events returns "OK" response
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new
5
+
6
+ body = DatadogAPIClient::V2::DORAListFailuresRequest.new({
7
+ data: DatadogAPIClient::V2::DORAListFailuresRequestData.new({
8
+ attributes: DatadogAPIClient::V2::DORAListFailuresRequestAttributes.new({
9
+ from: "2025-03-23T00:00:00Z",
10
+ limit: 1,
11
+ to: "2025-03-24T00:00:00Z",
12
+ }),
13
+ type: DatadogAPIClient::V2::DORAListFailuresRequestDataType::DORA_FAILURES_LIST_REQUEST,
14
+ }),
15
+ })
16
+ p api_instance.list_dora_failures(body)
@@ -0,0 +1,5 @@
1
+ # Get the list of devices returns "OK" response with pagination
2
+
3
+ require "datadog_api_client"
4
+ api_instance = DatadogAPIClient::V2::NetworkDeviceMonitoringAPI.new
5
+ api_instance.list_devices_with_pagination() { |item| puts item }
@@ -1,7 +1,7 @@
1
- # Create on-call escalation policy returns "Created" response
1
+ # Create On-Call escalation policy returns "Created" response
2
2
 
3
3
  require "datadog_api_client"
4
- api_instance = DatadogAPIClient::V2::On - CallAPI.new
4
+ api_instance = DatadogAPIClient::V2::OnCallAPI.new
5
5
 
6
6
  # there is a valid "user" in the system
7
7
  USER_DATA_ID = ENV["USER_DATA_ID"]
@@ -15,47 +15,46 @@ DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"]
15
15
  body = DatadogAPIClient::V2::EscalationPolicyCreateRequest.new({
16
16
  data: DatadogAPIClient::V2::EscalationPolicyCreateRequestData.new({
17
17
  attributes: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributes.new({
18
- description: "Escalation Policy 1 description",
19
18
  name: "Example-On-Call",
20
19
  resolve_page_on_policy_end: true,
21
20
  retries: 2,
22
21
  steps: [
23
22
  DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItems.new({
24
- assignment: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsAssignment::DEFAULT,
23
+ assignment: DatadogAPIClient::V2::EscalationPolicyStepAttributesAssignment::DEFAULT,
25
24
  escalate_after_seconds: 3600,
26
25
  targets: [
27
- DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems.new({
26
+ DatadogAPIClient::V2::EscalationPolicyStepTarget.new({
28
27
  id: USER_DATA_ID,
29
- type: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItemsType::USERS,
28
+ type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::USERS,
30
29
  }),
31
- DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems.new({
30
+ DatadogAPIClient::V2::EscalationPolicyStepTarget.new({
32
31
  id: SCHEDULE_DATA_ID,
33
- type: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItemsType::SCHEDULES,
32
+ type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::SCHEDULES,
34
33
  }),
35
- DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems.new({
34
+ DatadogAPIClient::V2::EscalationPolicyStepTarget.new({
36
35
  id: DD_TEAM_DATA_ID,
37
- type: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItemsType::TEAMS,
36
+ type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::TEAMS,
38
37
  }),
39
38
  ],
40
39
  }),
41
40
  DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItems.new({
42
- assignment: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsAssignment::ROUND_ROBIN,
41
+ assignment: DatadogAPIClient::V2::EscalationPolicyStepAttributesAssignment::ROUND_ROBIN,
43
42
  escalate_after_seconds: 3600,
44
43
  targets: [
45
- DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems.new({
44
+ DatadogAPIClient::V2::EscalationPolicyStepTarget.new({
46
45
  id: DD_TEAM_DATA_ID,
47
- type: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItemsType::TEAMS,
46
+ type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::TEAMS,
48
47
  }),
49
48
  ],
50
49
  }),
51
50
  ],
52
51
  }),
53
52
  relationships: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataRelationships.new({
54
- teams: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataRelationshipsTeams.new({
53
+ teams: DatadogAPIClient::V2::DataRelationshipsTeams.new({
55
54
  data: [
56
- DatadogAPIClient::V2::EscalationPolicyCreateRequestDataRelationshipsTeamsDataItems.new({
55
+ DatadogAPIClient::V2::DataRelationshipsTeamsDataItems.new({
57
56
  id: DD_TEAM_DATA_ID,
58
- type: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataRelationshipsTeamsDataItemsType::TEAMS,
57
+ type: DatadogAPIClient::V2::DataRelationshipsTeamsDataItemsType::TEAMS,
59
58
  }),
60
59
  ],
61
60
  }),
@@ -63,4 +62,7 @@ body = DatadogAPIClient::V2::EscalationPolicyCreateRequest.new({
63
62
  type: DatadogAPIClient::V2::EscalationPolicyCreateRequestDataType::POLICIES,
64
63
  }),
65
64
  })
66
- p api_instance.create_on_call_escalation_policy(body)
65
+ opts = {
66
+ include: "steps.targets",
67
+ }
68
+ p api_instance.create_on_call_escalation_policy(body, opts)