datadog_api_client 2.33.0 → 2.35.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 (304) 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 +77 -6
  5. data/.generator/schemas/v2/openapi.yaml +3218 -855
  6. data/.generator/src/generator/formatter.py +2 -2
  7. data/.generator/src/generator/openapi.py +1 -1
  8. data/.generator/src/generator/templates/configuration.j2 +2 -2
  9. data/.github/workflows/publish.yml +16 -8
  10. data/.github/workflows/release.yml +57 -61
  11. data/CHANGELOG.md +35 -0
  12. data/Gemfile +3 -1
  13. data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
  14. data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
  15. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
  16. data/examples/v2/csm-threats/CreateCSMThreatsAgentPolicy.rb +21 -0
  17. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule.rb +7 -4
  18. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +32 -0
  19. data/examples/v2/csm-threats/CreateCloudWorkloadSecurityAgentRule.rb +3 -2
  20. data/examples/v2/csm-threats/DeleteCSMThreatsAgentPolicy.rb +8 -0
  21. data/examples/v2/csm-threats/DeleteCSMThreatsAgentRule.rb +8 -2
  22. data/examples/v2/csm-threats/DeleteCloudWorkloadSecurityAgentRule.rb +1 -1
  23. data/examples/v2/csm-threats/DownloadCSMThreatsPolicy.rb +1 -1
  24. data/examples/v2/csm-threats/DownloadCloudWorkloadPolicyFile.rb +1 -1
  25. data/examples/v2/csm-threats/GetCSMThreatsAgentPolicy.rb +8 -0
  26. data/examples/v2/csm-threats/GetCSMThreatsAgentRule.rb +8 -2
  27. data/examples/v2/csm-threats/GetCloudWorkloadSecurityAgentRule.rb +1 -1
  28. data/examples/v2/csm-threats/ListCSMThreatsAgentPolicies.rb +5 -0
  29. data/examples/v2/csm-threats/ListCSMThreatsAgentRules.rb +1 -1
  30. data/examples/v2/csm-threats/ListCloudWorkloadSecurityAgentRules.rb +1 -1
  31. data/examples/v2/csm-threats/UpdateCSMThreatsAgentPolicy.rb +25 -0
  32. data/examples/v2/csm-threats/UpdateCSMThreatsAgentRule.rb +12 -4
  33. data/examples/v2/csm-threats/UpdateCloudWorkloadSecurityAgentRule.rb +3 -4
  34. data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
  35. data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
  36. data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
  37. data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
  38. data/examples/v2/dora-metrics/GetDORADeployment.rb +5 -0
  39. data/examples/v2/dora-metrics/GetDORAFailure.rb +5 -0
  40. data/examples/v2/dora-metrics/ListDORADeployments.rb +16 -0
  41. data/examples/v2/dora-metrics/ListDORAFailures.rb +16 -0
  42. data/examples/v2/network-device-monitoring/ListDevices_2712868412.rb +5 -0
  43. data/examples/v2/on-call/CreateOnCallEscalationPolicy.rb +19 -17
  44. data/examples/v2/on-call/CreateOnCallSchedule.rb +11 -15
  45. data/examples/v2/on-call/DeleteOnCallEscalationPolicy.rb +2 -2
  46. data/examples/v2/on-call/DeleteOnCallSchedule.rb +2 -2
  47. data/examples/v2/on-call/GetOnCallEscalationPolicy.rb +6 -3
  48. data/examples/v2/on-call/GetOnCallSchedule.rb +2 -2
  49. data/examples/v2/on-call/GetOnCallTeamRoutingRules.rb +5 -0
  50. data/examples/v2/on-call/GetScheduleOnCallUser.rb +8 -0
  51. data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
  52. data/examples/v2/on-call/SetOnCallTeamRoutingRules.rb +57 -0
  53. data/examples/v2/on-call/UpdateOnCallEscalationPolicy.rb +8 -9
  54. data/examples/v2/on-call/UpdateOnCallSchedule.rb +11 -16
  55. data/examples/v2/on-call-paging/AcknowledgeOnCallPage.rb +5 -0
  56. data/examples/v2/on-call-paging/CreateOnCallPage.rb +23 -0
  57. data/examples/v2/on-call-paging/EscalateOnCallPage.rb +5 -0
  58. data/examples/v2/on-call-paging/ResolveOnCallPage.rb +5 -0
  59. data/examples/v2/rum-metrics/CreateRumMetric.rb +1 -1
  60. data/examples/v2/security-monitoring/GetResourceEvaluationFilters.rb +9 -0
  61. data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
  62. data/examples/v2/security-monitoring/UpdateResourceEvaluationFilters.rb +21 -0
  63. data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
  64. data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
  65. data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
  66. data/examples/v2/software-catalog/ListCatalogRelation.rb +5 -0
  67. data/examples/v2/software-catalog/ListCatalogRelation_1311054087.rb +8 -0
  68. data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
  69. data/examples/v2/workflow-automation/CreateWorkflow.rb +0 -1
  70. data/examples/v2/workflow-automation/UpdateWorkflow.rb +0 -1
  71. data/lib/datadog_api_client/configuration.rb +203 -17
  72. data/lib/datadog_api_client/inflector.rb +138 -49
  73. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
  74. data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
  75. data/lib/datadog_api_client/{v2/models/escalation_policy_create_request_data_attributes_steps_items_assignment.rb → v1/models/monitor_draft_status.rb} +11 -6
  76. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  77. data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
  78. data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
  79. data/lib/datadog_api_client/v1/models/synthetics_assertion_body_hash_target.rb +2 -2
  80. data/lib/datadog_api_client/v1/models/synthetics_assertion_json_path_target_target.rb +2 -2
  81. data/lib/datadog_api_client/v1/models/synthetics_assertion_target.rb +2 -2
  82. data/lib/datadog_api_client/v1/models/synthetics_assertion_target_value.rb +63 -0
  83. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb +2 -2
  84. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
  85. data/lib/datadog_api_client/v2/api/csm_threats_api.rb +424 -52
  86. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +344 -16
  87. data/lib/datadog_api_client/v2/api/metrics_api.rb +5 -5
  88. data/lib/datadog_api_client/v2/api/network_device_monitoring_api.rb +25 -3
  89. data/lib/datadog_api_client/v2/api/on_call_api.rb +301 -24
  90. data/lib/datadog_api_client/v2/api/on_call_paging_api.rb +292 -0
  91. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
  92. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +146 -0
  93. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +322 -0
  94. data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
  95. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_relationships_teams.rb → cloud_workload_security_agent_policies_list_response.rb} +5 -5
  96. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_attributes.rb +300 -0
  97. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_create_attributes.rb +167 -0
  98. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_create_data.rb +144 -0
  99. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_create_request.rb +123 -0
  100. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_data.rb +125 -0
  101. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_response.rb +105 -0
  102. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_type.rb +26 -0
  103. 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
  104. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_update_data.rb +154 -0
  105. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_update_request.rb +123 -0
  106. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_policy_updater_attributes.rb +123 -0
  107. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +24 -4
  108. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
  109. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_attributes_layers_items_restrictions_items.rb → cloud_workload_security_agent_rule_action_set.rb} +62 -33
  110. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +67 -19
  111. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +83 -5
  112. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_data.rb +2 -2
  113. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_request.rb +2 -2
  114. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_creator_attributes.rb +3 -3
  115. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_data.rb +4 -4
  116. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +1 -1
  117. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_response.rb +2 -2
  118. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_type.rb +1 -1
  119. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +85 -7
  120. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +4 -4
  121. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_request.rb +2 -2
  122. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_updater_attributes.rb +3 -3
  123. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rules_list_response.rb +2 -2
  124. data/lib/datadog_api_client/v2/models/create_page_request.rb +105 -0
  125. data/lib/datadog_api_client/v2/models/create_page_request_data.rb +133 -0
  126. data/lib/datadog_api_client/v2/models/create_page_request_data_attributes.rb +187 -0
  127. data/lib/datadog_api_client/v2/models/create_page_request_data_attributes_target.rb +115 -0
  128. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_relationships_teams_data_items_type.rb → create_page_request_data_type.rb} +3 -3
  129. data/lib/datadog_api_client/v2/models/create_page_response.rb +105 -0
  130. data/lib/datadog_api_client/v2/models/create_page_response_data.rb +133 -0
  131. data/lib/datadog_api_client/v2/models/create_page_response_data_type.rb +26 -0
  132. data/lib/datadog_api_client/v2/models/custom_framework_without_requirements.rb +2 -24
  133. data/lib/datadog_api_client/v2/models/{schedule_data_relationships_teams.rb → data_relationships_teams.rb} +3 -3
  134. data/lib/datadog_api_client/v2/models/{schedule_data_relationships_teams_data_items.rb → data_relationships_teams_data_items.rb} +3 -3
  135. data/lib/datadog_api_client/v2/models/{schedule_data_relationships_teams_data_items_type.rb → data_relationships_teams_data_items_type.rb} +1 -1
  136. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
  137. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_attributes_steps_items_targets_items.rb → dora_event.rb} +17 -7
  138. data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
  139. data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
  140. data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
  141. data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → dora_failure_response.rb} +5 -5
  142. data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
  143. data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
  144. data/lib/datadog_api_client/v2/models/dora_fetch_response.rb +105 -0
  145. data/lib/datadog_api_client/v2/models/dora_list_deployments_request.rb +123 -0
  146. data/lib/datadog_api_client/v2/models/dora_list_deployments_request_attributes.rb +163 -0
  147. data/lib/datadog_api_client/v2/models/dora_list_deployments_request_data.rb +133 -0
  148. data/lib/datadog_api_client/v2/models/dora_list_deployments_request_data_type.rb +26 -0
  149. data/lib/datadog_api_client/v2/models/dora_list_failures_request.rb +123 -0
  150. data/lib/datadog_api_client/v2/models/dora_list_failures_request_attributes.rb +163 -0
  151. data/lib/datadog_api_client/v2/models/dora_list_failures_request_data.rb +133 -0
  152. data/lib/datadog_api_client/v2/models/dora_list_failures_request_data_type.rb +26 -0
  153. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_relationships_teams.rb → dora_list_response.rb} +5 -5
  154. data/lib/datadog_api_client/v2/models/entity_v3_datadog_code_location_item.rb +1 -21
  155. data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
  156. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb +1 -11
  157. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb +2 -2
  158. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_relationships.rb +2 -2
  159. data/lib/datadog_api_client/v2/models/escalation_policy_data.rb +1 -1
  160. data/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb +2 -12
  161. data/lib/datadog_api_client/v2/models/escalation_policy_data_relationships.rb +2 -2
  162. data/lib/datadog_api_client/v2/models/escalation_policy_included.rb +2 -3
  163. data/lib/datadog_api_client/v2/models/escalation_policy_step_relationships.rb +2 -2
  164. 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
  165. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_attributes_steps_items_targets_items_type.rb → escalation_policy_step_target_type.rb} +1 -1
  166. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb +1 -11
  167. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb +2 -2
  168. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_relationships.rb +2 -2
  169. data/lib/datadog_api_client/v2/models/escalation_policy_user.rb +143 -0
  170. data/lib/datadog_api_client/v2/models/escalation_policy_user_attributes.rb +125 -0
  171. data/lib/datadog_api_client/v2/models/{team_reference_relationships_oncall_users_data_items_type.rb → escalation_policy_user_type.rb} +1 -1
  172. data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
  173. data/lib/datadog_api_client/v2/models/{team_reference_relationships_oncall_users.rb → escalation_relationships_responders.rb} +5 -5
  174. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_relationships_teams_data_items.rb → escalation_relationships_responders_data_items.rb} +6 -7
  175. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_relationships_teams_data_items_type.rb → escalation_relationships_responders_data_items_type.rb} +3 -3
  176. data/lib/datadog_api_client/v2/models/escalation_targets.rb +107 -0
  177. data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
  179. data/lib/datadog_api_client/v2/models/full_custom_framework_data_attributes.rb +2 -34
  180. data/lib/datadog_api_client/v2/models/get_resource_evaluation_filters_response.rb +123 -0
  181. data/lib/datadog_api_client/v2/models/get_resource_evaluation_filters_response_data.rb +125 -0
  182. data/lib/datadog_api_client/v2/models/historical_job_options.rb +2 -2
  183. data/lib/datadog_api_client/v2/models/historical_job_query.rb +1 -1
  184. data/lib/datadog_api_client/v2/models/http_integration.rb +0 -6
  185. data/lib/datadog_api_client/v2/models/http_integration_update.rb +1 -14
  186. data/lib/datadog_api_client/v2/models/incident_severity.rb +1 -0
  187. data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
  188. data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
  189. data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
  190. data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
  191. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_attributes_layers_items_members_items_user.rb → kind_response_meta.rb} +11 -11
  192. data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
  193. data/lib/datadog_api_client/v2/models/{escalation_policy_data_relationships_teams.rb → list_kind_catalog_response.rb} +17 -7
  194. data/lib/datadog_api_client/v2/models/list_relation_catalog_response.rb +139 -0
  195. data/lib/datadog_api_client/v2/models/list_relation_catalog_response_links.rb +125 -0
  196. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -16
  197. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -16
  198. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -16
  199. data/lib/datadog_api_client/v2/models/observability_pipeline_google_cloud_storage_destination.rb +2 -13
  200. data/lib/datadog_api_client/v2/models/observability_pipeline_metadata_entry.rb +1 -1
  201. data/lib/datadog_api_client/v2/models/on_call_page_target_type.rb +28 -0
  202. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_relationships_teams_data_items_type.rb → page_urgency.rb} +4 -3
  203. data/lib/datadog_api_client/v2/models/relation_attributes.rb +125 -0
  204. data/lib/datadog_api_client/v2/models/relation_entity.rb +125 -0
  205. data/lib/datadog_api_client/v2/models/relation_include_type.rb +27 -0
  206. data/lib/datadog_api_client/v2/models/relation_meta.rb +135 -0
  207. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_relationships_teams.rb → relation_relationships.rb} +21 -13
  208. data/lib/datadog_api_client/v2/models/relation_response.rb +155 -0
  209. data/lib/datadog_api_client/v2/models/relation_response_meta.rb +115 -0
  210. data/lib/datadog_api_client/v2/models/relation_response_type.rb +26 -0
  211. data/lib/datadog_api_client/v2/models/relation_to_entity.rb +115 -0
  212. data/lib/datadog_api_client/v2/models/resource_filter_attributes.rb +133 -0
  213. data/lib/datadog_api_client/v2/models/{escalation_policy_data_relationships_teams_data_items_type.rb → resource_filter_request_type.rb} +3 -3
  214. data/lib/datadog_api_client/v2/models/routing_rule.rb +153 -0
  215. data/lib/datadog_api_client/v2/models/routing_rule_action.rb +63 -0
  216. data/lib/datadog_api_client/v2/models/routing_rule_attributes.rb +137 -0
  217. data/lib/datadog_api_client/v2/models/routing_rule_relationships.rb +105 -0
  218. data/lib/datadog_api_client/v2/models/routing_rule_relationships_policy.rb +105 -0
  219. data/lib/datadog_api_client/v2/models/{team_reference_relationships_oncall_users_data_items.rb → routing_rule_relationships_policy_data.rb} +6 -6
  220. data/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data_type.rb +26 -0
  221. data/lib/datadog_api_client/v2/models/routing_rule_type.rb +26 -0
  222. data/lib/datadog_api_client/v2/models/schedule_create_request_data.rb +1 -1
  223. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes.rb +3 -15
  224. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +4 -4
  225. data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships.rb +2 -2
  226. data/lib/datadog_api_client/v2/models/schedule_data.rb +1 -1
  227. data/lib/datadog_api_client/v2/models/schedule_data_attributes.rb +2 -14
  228. data/lib/datadog_api_client/v2/models/schedule_data_relationships.rb +1 -1
  229. 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
  230. 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
  231. data/lib/datadog_api_client/v2/models/schedule_update_request.rb +1 -1
  232. data/lib/datadog_api_client/v2/models/schedule_update_request_data.rb +2 -2
  233. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes.rb +2 -14
  234. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +4 -4
  235. data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships.rb +2 -2
  236. data/lib/datadog_api_client/v2/models/schedule_user_attributes.rb +13 -3
  237. data/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb +1 -1
  238. data/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb +1 -1
  239. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +2 -2
  240. data/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb +2 -1
  241. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +1 -1
  242. data/lib/datadog_api_client/v2/models/send_slack_message_action.rb +165 -0
  243. data/lib/datadog_api_client/v2/models/send_slack_message_action_type.rb +26 -0
  244. data/lib/datadog_api_client/v2/models/send_teams_message_action.rb +186 -0
  245. 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
  246. data/lib/datadog_api_client/v2/models/{escalation_policy_create_request_data_relationships_teams.rb → shift.rb} +19 -9
  247. data/lib/datadog_api_client/v2/models/shift_data.rb +153 -0
  248. data/lib/datadog_api_client/v2/models/shift_data_attributes.rb +115 -0
  249. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_attributes_layers_items_members_items.rb → shift_data_relationships.rb} +5 -6
  250. data/lib/datadog_api_client/v2/models/shift_data_relationships_user.rb +123 -0
  251. data/lib/datadog_api_client/v2/models/{schedule_update_request_data_relationships_teams_data_items.rb → shift_data_relationships_user_data.rb} +6 -6
  252. data/lib/datadog_api_client/v2/models/shift_data_relationships_user_data_type.rb +26 -0
  253. data/lib/datadog_api_client/v2/models/shift_data_type.rb +26 -0
  254. data/lib/datadog_api_client/v2/models/shift_included.rb +62 -0
  255. data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
  256. data/lib/datadog_api_client/v2/models/{escalation_policy_update_request_data_relationships_teams_data_items.rb → team_on_call_responders_data.rb} +18 -19
  257. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
  258. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
  259. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
  260. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
  261. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
  262. data/lib/datadog_api_client/v2/models/{escalation_policy_data_relationships_teams_data_items.rb → team_on_call_responders_data_relationships_responders_data_items.rb} +6 -6
  263. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
  264. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
  265. data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
  266. data/lib/datadog_api_client/v2/models/team_reference.rb +1 -11
  267. data/lib/datadog_api_client/v2/models/team_routing_rules.rb +117 -0
  268. data/lib/datadog_api_client/v2/models/team_routing_rules_data.rb +143 -0
  269. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships.rb +105 -0
  270. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules.rb +107 -0
  271. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items.rb +144 -0
  272. data/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items_type.rb +26 -0
  273. data/lib/datadog_api_client/v2/models/team_routing_rules_data_type.rb +26 -0
  274. data/lib/datadog_api_client/v2/models/team_routing_rules_included.rb +62 -0
  275. data/lib/datadog_api_client/v2/models/team_routing_rules_request.rb +105 -0
  276. data/lib/datadog_api_client/v2/models/team_routing_rules_request_data.rb +143 -0
  277. data/lib/datadog_api_client/v2/models/team_routing_rules_request_data_attributes.rb +107 -0
  278. data/lib/datadog_api_client/v2/models/team_routing_rules_request_data_type.rb +26 -0
  279. data/lib/datadog_api_client/v2/models/team_routing_rules_request_rule.rb +147 -0
  280. data/lib/datadog_api_client/v2/models/{layer_attributes_restrictions_items.rb → time_restriction.rb} +9 -10
  281. data/lib/datadog_api_client/v2/models/{schedule_create_request_data_attributes_layers_items_interval.rb → time_restrictions.rb} +32 -30
  282. data/lib/datadog_api_client/v2/models/update_resource_evaluation_filters_request.rb +123 -0
  283. data/lib/datadog_api_client/v2/models/update_resource_evaluation_filters_request_data.rb +154 -0
  284. data/lib/datadog_api_client/v2/models/update_resource_evaluation_filters_response.rb +123 -0
  285. 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
  286. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
  287. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
  288. data/lib/datadog_api_client/v2/models/urgency.rb +28 -0
  289. data/lib/datadog_api_client/v2/models/user_attributes_status.rb +28 -0
  290. data/lib/datadog_api_client/v2/models/{layer_attributes_restrictions_items_end_day.rb → weekday.rb} +2 -2
  291. data/lib/datadog_api_client/version.rb +1 -1
  292. data/repository.datadog.yaml +8 -0
  293. metadata +171 -57
  294. data/.github/workflows/prepare_release.yml +0 -112
  295. data/RELEASING.md +0 -43
  296. data/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items_targets_items_type.rb +0 -28
  297. data/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items_assignment.rb +0 -27
  298. data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_start_day.rb +0 -32
  299. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_end_day.rb +0 -32
  300. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_start_day.rb +0 -32
  301. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_interval.rb +0 -144
  302. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_end_day.rb +0 -32
  303. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_start_day.rb +0 -32
  304. data/lib/datadog_api_client/v2/models/team_reference_relationships.rb +0 -105
@@ -308,13 +308,13 @@ def format_data_with_schema_dict(
308
308
  )
309
309
  parameters += f"{escape_reserved_keyword(snake_case(k))}: {value},\n"
310
310
 
311
- if schema.get("additionalProperties"):
311
+ if (additionalProperties := schema.get("additionalProperties", {})) and additionalProperties != False:
312
312
  for k, v in data.items():
313
313
  if has_properties and k in schema["properties"]:
314
314
  continue
315
315
  value = format_data_with_schema(
316
316
  v,
317
- schema["additionalProperties"],
317
+ additionalProperties,
318
318
  name_prefix=name_prefix,
319
319
  replace_values=replace_values,
320
320
  )
@@ -33,7 +33,7 @@ def type_to_ruby(schema, alternative_name=None):
33
33
  if "enum" in schema:
34
34
  return name
35
35
  if (
36
- not (schema.get("additionalProperties") and not schema.get("properties"))
36
+ not (schema.get("additionalProperties") not in (None, False) and not schema.get("properties"))
37
37
  and schema.get("type", "object") == "object"
38
38
  ):
39
39
  return name
@@ -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 "${versions[$package]}" | grep -qvE '^[0-9]+\.[0-9]+\.[0-9]+$' && 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,40 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.35.0/2025-06-16
4
+
5
+ ### Fixed
6
+ * Fix generation for additionalProperties containers [#2469](https://github.com/DataDog/datadog-api-client-ruby/pull/2469)
7
+
8
+ ### Changed
9
+ * Add billing read permission [#2456](https://github.com/DataDog/datadog-api-client-ruby/pull/2456)
10
+ * Update DORA endpoints [#2434](https://github.com/DataDog/datadog-api-client-ruby/pull/2434)
11
+
12
+ ### Added
13
+ * Add `form` field for `multipart/form-data` HTTP API tests [#2452](https://github.com/DataDog/datadog-api-client-ruby/pull/2452)
14
+ * Add new endpoint to upsert/list/delete custom kinds [#2445](https://github.com/DataDog/datadog-api-client-ruby/pull/2445)
15
+ * Add spec for team on-call endpoint [#2443](https://github.com/DataDog/datadog-api-client-ruby/pull/2443)
16
+ * Add support for all subtypes in multistep steps [#2415](https://github.com/DataDog/datadog-api-client-ruby/pull/2415)
17
+ * Added new optional field definition to include more detail in findings for '/api/v2/posture_management/findings' [#2413](https://github.com/DataDog/datadog-api-client-ruby/pull/2413)
18
+ * Exposing set action on Terraform V2 [#2412](https://github.com/DataDog/datadog-api-client-ruby/pull/2412)
19
+ * Add monitor draft status field [#2410](https://github.com/DataDog/datadog-api-client-ruby/pull/2410)
20
+ * Add rum application to restriction policy [#2292](https://github.com/DataDog/datadog-api-client-ruby/pull/2292)
21
+
22
+ ## 2.34.0/2025-05-28
23
+
24
+ ### Fixed
25
+ * add `include` parameter to On-Call team rules test [#2426](https://github.com/DataDog/datadog-api-client-ruby/pull/2426)
26
+ * fix On-Call spec [#2417](https://github.com/DataDog/datadog-api-client-ruby/pull/2417)
27
+ * Fix frozen string errors again, more durably this time [#2407](https://github.com/DataDog/datadog-api-client-ruby/pull/2407)
28
+ * Fix incorrect pattern for url [#2399](https://github.com/DataDog/datadog-api-client-ruby/pull/2399)
29
+
30
+ ### Added
31
+ * Add support for Datadog Events as a data source for rules [#2421](https://github.com/DataDog/datadog-api-client-ruby/pull/2421)
32
+ * Add public APIs to search DORA events [#2418](https://github.com/DataDog/datadog-api-client-ruby/pull/2418)
33
+ * Adding endpoints to manage Resource Evaluation Filters [#2411](https://github.com/DataDog/datadog-api-client-ruby/pull/2411)
34
+ * Add Sev0 as a supported incident severity [#2403](https://github.com/DataDog/datadog-api-client-ruby/pull/2403)
35
+ * Share timerestriction object [#2397](https://github.com/DataDog/datadog-api-client-ruby/pull/2397)
36
+ * add On-Call Paging spec [#2391](https://github.com/DataDog/datadog-api-client-ruby/pull/2391)
37
+
3
38
  ## 2.33.0 / 2025-05-01
4
39
 
5
40
  ### Fixed
data/Gemfile CHANGED
@@ -6,10 +6,12 @@ gemspec
6
6
 
7
7
  group :development, :test do
8
8
  gem 'activesupport'
9
- gem 'cucumber', '~> 9.1.1'
9
+ gem 'bigdecimal', '= 3.1.9'
10
+ gem 'cucumber', '~> 9.2.1'
10
11
  gem 'datadog-ci', '~> 1.11'
11
12
  gem 'gem-release'
12
13
  gem 'rake', '~> 13.0.1'
14
+ gem 'ostruct'
13
15
  gem 'rspec-expectations'
14
16
  gem 'rubocop'
15
17
  gem 'rufo'
@@ -31,5 +31,6 @@ body = DatadogAPIClient::V1::Monitor.new({
31
31
  }),
32
32
  }),
33
33
  type: DatadogAPIClient::V1::MonitorType::QUERY_ALERT,
34
+ draft_status: DatadogAPIClient::V1::MonitorDraftStatus::PUBLISHED,
34
35
  })
35
36
  p api_instance.create_monitor(body)
@@ -18,5 +18,6 @@ body = DatadogAPIClient::V1::Monitor.new({
18
18
  critical: 1,
19
19
  }),
20
20
  }),
21
+ draft_status: DatadogAPIClient::V1::MonitorDraftStatus::DRAFT,
21
22
  })
22
23
  p api_instance.create_monitor(body)
@@ -83,6 +83,148 @@ body = DatadogAPIClient::V1::SyntheticsAPITest.new({
83
83
  call_type: DatadogAPIClient::V1::SyntheticsTestCallType::UNARY,
84
84
  }),
85
85
  }),
86
+ DatadogAPIClient::V1::SyntheticsAPITestStep.new({
87
+ name: "SSL step",
88
+ subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::SSL,
89
+ allow_failure: false,
90
+ is_critical: true,
91
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
92
+ count: 0,
93
+ interval: 300,
94
+ }),
95
+ assertions: [
96
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
97
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS_IN_MORE_DAYS_THAN,
98
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::CERTIFICATE,
99
+ target: 10,
100
+ }),
101
+ ],
102
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
103
+ check_certificate_revocation: true,
104
+ host: "example.org",
105
+ port: 443,
106
+ }),
107
+ }),
108
+ DatadogAPIClient::V1::SyntheticsAPITestStep.new({
109
+ name: "DNS step",
110
+ subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::DNS,
111
+ allow_failure: false,
112
+ is_critical: true,
113
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
114
+ count: 0,
115
+ interval: 300,
116
+ }),
117
+ assertions: [
118
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
119
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
120
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
121
+ target: 1000,
122
+ }),
123
+ ],
124
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
125
+ host: "troisdizaines.com",
126
+ dns_server: "8.8.8.8",
127
+ dns_server_port: "53",
128
+ }),
129
+ }),
130
+ DatadogAPIClient::V1::SyntheticsAPITestStep.new({
131
+ name: "TCP step",
132
+ subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::TCP,
133
+ allow_failure: false,
134
+ is_critical: true,
135
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
136
+ count: 0,
137
+ interval: 300,
138
+ }),
139
+ assertions: [
140
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
141
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
142
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
143
+ target: 1000,
144
+ }),
145
+ ],
146
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
147
+ host: "34.95.79.70",
148
+ port: 80,
149
+ should_track_hops: true,
150
+ timeout: 32,
151
+ }),
152
+ }),
153
+ DatadogAPIClient::V1::SyntheticsAPITestStep.new({
154
+ name: "ICMP step",
155
+ subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::ICMP,
156
+ allow_failure: false,
157
+ is_critical: true,
158
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
159
+ count: 0,
160
+ interval: 300,
161
+ }),
162
+ assertions: [
163
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
164
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::IS,
165
+ target: 0,
166
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::PACKET_LOSS_PERCENTAGE,
167
+ }),
168
+ ],
169
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
170
+ host: "34.95.79.70",
171
+ number_of_packets: 4,
172
+ should_track_hops: true,
173
+ timeout: 38,
174
+ }),
175
+ }),
176
+ DatadogAPIClient::V1::SyntheticsAPITestStep.new({
177
+ name: "Websocket step",
178
+ subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::WEBSOCKET,
179
+ allow_failure: false,
180
+ is_critical: true,
181
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
182
+ count: 0,
183
+ interval: 300,
184
+ }),
185
+ assertions: [
186
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
187
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
188
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
189
+ target: 1000,
190
+ }),
191
+ ],
192
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
193
+ url: "ws://34.95.79.70/web-socket",
194
+ message: "My message",
195
+ is_message_base64_encoded: true,
196
+ headers: {
197
+ f: "g",
198
+ },
199
+ basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
200
+ type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
201
+ username: "user",
202
+ password: "password",
203
+ }),
204
+ }),
205
+ }),
206
+ DatadogAPIClient::V1::SyntheticsAPITestStep.new({
207
+ name: "UDP step",
208
+ subtype: DatadogAPIClient::V1::SyntheticsAPITestStepSubtype::UDP,
209
+ allow_failure: false,
210
+ is_critical: true,
211
+ _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({
212
+ count: 0,
213
+ interval: 300,
214
+ }),
215
+ assertions: [
216
+ DatadogAPIClient::V1::SyntheticsAssertionTarget.new({
217
+ operator: DatadogAPIClient::V1::SyntheticsAssertionOperator::LESS_THAN,
218
+ type: DatadogAPIClient::V1::SyntheticsAssertionType::RESPONSE_TIME,
219
+ target: 1000,
220
+ }),
221
+ ],
222
+ request: DatadogAPIClient::V1::SyntheticsTestRequest.new({
223
+ host: "8.8.8.8",
224
+ port: 53,
225
+ message: "A image.google.com",
226
+ }),
227
+ }),
86
228
  ],
87
229
  }),
88
230
  locations: [
@@ -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
  }),
@@ -0,0 +1,32 @@
1
+ # Create a Workload Protection agent rule with set action 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::CloudWorkloadSecurityAgentRuleCreateRequest.new({
10
+ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
11
+ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
12
+ description: "My Agent rule with set action",
13
+ enabled: true,
14
+ expression: 'exec.file.name == "sh"',
15
+ filters: [],
16
+ name: "examplecsmthreat",
17
+ policy_id: POLICY_DATA_ID,
18
+ product_tags: [],
19
+ actions: [
20
+ DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleAction.new({
21
+ set: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleActionSet.new({
22
+ name: "test_set",
23
+ value: "test_value",
24
+ scope: "process",
25
+ }),
26
+ }),
27
+ ],
28
+ }),
29
+ type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
30
+ }),
31
+ })
32
+ p api_instance.create_csm_threats_agent_rule(body)
@@ -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