datadog_api_client 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +5 -0
  4. data/.generator/schemas/v1/openapi.yaml +333 -128
  5. data/.generator/schemas/v2/openapi.yaml +2450 -131
  6. data/CHANGELOG.md +28 -0
  7. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
  8. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
  10. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  11. data/examples/v2/case-management/ArchiveCase.rb +14 -0
  12. data/examples/v2/case-management/AssignCase.rb +20 -0
  13. data/examples/v2/case-management/CreateCase.rb +33 -0
  14. data/examples/v2/case-management/CreateProject.rb +15 -0
  15. data/examples/v2/case-management/DeleteProject.rb +5 -0
  16. data/examples/v2/case-management/GetCase.rb +8 -0
  17. data/examples/v2/case-management/GetProject.rb +5 -0
  18. data/examples/v2/case-management/GetProjects.rb +5 -0
  19. data/examples/v2/case-management/SearchCases.rb +5 -0
  20. data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
  21. data/examples/v2/case-management/UnarchiveCase.rb +14 -0
  22. data/examples/v2/case-management/UnassignCase.rb +14 -0
  23. data/examples/v2/case-management/UpdatePriority.rb +17 -0
  24. data/examples/v2/case-management/UpdateStatus.rb +17 -0
  25. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
  26. data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
  27. data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
  28. data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
  29. data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
  30. data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
  31. data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
  32. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
  33. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
  34. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
  35. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
  36. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
  37. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
  38. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
  39. data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
  40. data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
  41. data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
  42. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +18 -0
  43. data/examples/v2/metrics/ListMetricAssets.rb +5 -0
  44. data/lib/datadog_api_client/inflector.rb +112 -0
  45. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
  46. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  47. data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
  48. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -0
  49. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
  51. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +84 -4
  52. data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  54. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +1 -1
  55. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
  60. data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
  61. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
  62. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
  63. data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
  64. data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
  65. data/lib/datadog_api_client/v2/api/metrics_api.rb +69 -1
  66. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
  67. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  68. data/lib/datadog_api_client/v2/models/case.rb +150 -0
  69. data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
  70. data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
  73. data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
  74. data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
  75. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
  76. data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
  77. data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
  78. data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
  79. data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
  80. data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
  81. data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
  82. data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
  84. data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
  85. data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
  86. data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
  87. data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
  88. data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
  89. data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
  90. data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
  91. data/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +98 -0
  92. data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
  93. data/lib/datadog_api_client/v2/models/cases_response.rb +92 -0
  94. data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
  95. data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
  97. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
  99. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
  100. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
  101. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
  102. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
  103. data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
  104. data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
  105. data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
  106. data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
  107. data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
  108. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
  109. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
  110. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
  112. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
  113. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
  114. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
  115. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
  116. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
  117. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
  118. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
  119. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
  120. data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
  121. data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
  122. data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
  123. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
  124. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
  125. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
  126. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
  127. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
  129. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
  130. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
  131. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
  132. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
  134. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
  136. data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
  137. data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
  138. data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
  139. data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
  140. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
  141. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
  142. data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
  143. data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
  144. data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
  145. data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
  146. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
  147. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
  148. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
  149. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
  150. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
  151. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
  152. data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
  153. data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
  154. data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
  155. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
  156. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
  157. data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
  158. data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
  159. data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
  160. data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
  162. data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
  163. data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
  164. data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
  165. data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
  166. data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
  167. data/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +88 -0
  168. data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
  169. data/lib/datadog_api_client/v2/models/project.rb +150 -0
  170. data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
  171. data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
  172. data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
  173. data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
  174. data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
  175. data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
  176. data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
  177. data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
  179. data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
  180. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
  181. data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
  182. data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
  183. data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
  184. data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
  185. data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
  186. data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
  187. data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
  188. data/lib/datadog_api_client/version.rb +1 -1
  189. metadata +147 -2
@@ -100,7 +100,7 @@ module DatadogAPIClient::V2
100
100
 
101
101
  # Get a list of tests events.
102
102
  #
103
- # List endpoint returns CI Visibility test events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/).
103
+ # List endpoint returns CI Visibility test events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
104
104
  # [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
105
105
  #
106
106
  # Use this endpoint to see your latest test events.
@@ -203,7 +203,7 @@ module DatadogAPIClient::V2
203
203
 
204
204
  # Search tests events.
205
205
  #
206
- # List endpoint returns CI Visibility test events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/).
206
+ # List endpoint returns CI Visibility test events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
207
207
  # [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
208
208
  #
209
209
  # Use this endpoint to build complex events filtering and search.
@@ -90,6 +90,73 @@ module DatadogAPIClient::V2
90
90
  return data, status_code, headers
91
91
  end
92
92
 
93
+ # Create a CSM Threats Agent rule.
94
+ #
95
+ # @see #create_csm_threats_agent_rule_with_http_info
96
+ def create_csm_threats_agent_rule(body, opts = {})
97
+ data, _status_code, _headers = create_csm_threats_agent_rule_with_http_info(body, opts)
98
+ data
99
+ end
100
+
101
+ # Create a CSM Threats Agent rule.
102
+ #
103
+ # Create a new Cloud Security Management Threats Agent rule with the given parameters.
104
+ #
105
+ # @param body [CloudWorkloadSecurityAgentRuleCreateRequest] The definition of the new Agent rule.
106
+ # @param opts [Hash] the optional parameters
107
+ # @return [Array<(CloudWorkloadSecurityAgentRuleResponse, Integer, Hash)>] CloudWorkloadSecurityAgentRuleResponse data, response status code and response headers
108
+ def create_csm_threats_agent_rule_with_http_info(body, opts = {})
109
+
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.create_csm_threats_agent_rule ...'
112
+ end
113
+ # verify the required parameter 'body' is set
114
+ if @api_client.config.client_side_validation && body.nil?
115
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudWorkloadSecurityAPI.create_csm_threats_agent_rule"
116
+ end
117
+ # resource path
118
+ local_var_path = '/api/v2/remote_config/products/cws/agent_rules'
119
+
120
+ # query parameters
121
+ query_params = opts[:query_params] || {}
122
+
123
+ # header parameters
124
+ header_params = opts[:header_params] || {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+ # HTTP header 'Content-Type'
128
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
129
+
130
+ # form parameters
131
+ form_params = opts[:form_params] || {}
132
+
133
+ # http body (model)
134
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
135
+
136
+ # return_type
137
+ return_type = opts[:debug_return_type] || 'CloudWorkloadSecurityAgentRuleResponse'
138
+
139
+ # auth_names
140
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
141
+
142
+ new_options = opts.merge(
143
+ :operation => :create_csm_threats_agent_rule,
144
+ :header_params => header_params,
145
+ :query_params => query_params,
146
+ :form_params => form_params,
147
+ :body => post_body,
148
+ :auth_names => auth_names,
149
+ :return_type => return_type,
150
+ :api_version => "V2"
151
+ )
152
+
153
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
154
+ if @api_client.config.debugging
155
+ @api_client.config.logger.debug "API called: CloudWorkloadSecurityAPI#create_csm_threats_agent_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ end
157
+ return data, status_code, headers
158
+ end
159
+
93
160
  # Delete a Cloud Workload Security Agent rule.
94
161
  #
95
162
  # @see #delete_cloud_workload_security_agent_rule_with_http_info
@@ -155,6 +222,71 @@ module DatadogAPIClient::V2
155
222
  return data, status_code, headers
156
223
  end
157
224
 
225
+ # Delete a CSM Threats Agent rule.
226
+ #
227
+ # @see #delete_csm_threats_agent_rule_with_http_info
228
+ def delete_csm_threats_agent_rule(agent_rule_id, opts = {})
229
+ delete_csm_threats_agent_rule_with_http_info(agent_rule_id, opts)
230
+ nil
231
+ end
232
+
233
+ # Delete a CSM Threats Agent rule.
234
+ #
235
+ # Delete a specific Cloud Security Management Threats Agent rule.
236
+ #
237
+ # @param agent_rule_id [String] The ID of the Agent rule.
238
+ # @param opts [Hash] the optional parameters
239
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
240
+ def delete_csm_threats_agent_rule_with_http_info(agent_rule_id, opts = {})
241
+
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.delete_csm_threats_agent_rule ...'
244
+ end
245
+ # verify the required parameter 'agent_rule_id' is set
246
+ if @api_client.config.client_side_validation && agent_rule_id.nil?
247
+ fail ArgumentError, "Missing the required parameter 'agent_rule_id' when calling CloudWorkloadSecurityAPI.delete_csm_threats_agent_rule"
248
+ end
249
+ # resource path
250
+ local_var_path = '/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}'.sub('{agent_rule_id}', CGI.escape(agent_rule_id.to_s).gsub('%2F', '/'))
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
259
+
260
+ # form parameters
261
+ form_params = opts[:form_params] || {}
262
+
263
+ # http body (model)
264
+ post_body = opts[:debug_body]
265
+
266
+ # return_type
267
+ return_type = opts[:debug_return_type]
268
+
269
+ # auth_names
270
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
271
+
272
+ new_options = opts.merge(
273
+ :operation => :delete_csm_threats_agent_rule,
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => return_type,
280
+ :api_version => "V2"
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: CloudWorkloadSecurityAPI#delete_csm_threats_agent_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
158
290
  # Get the latest Cloud Workload Security policy.
159
291
  #
160
292
  # @see #download_cloud_workload_policy_file_with_http_info
@@ -217,6 +349,68 @@ module DatadogAPIClient::V2
217
349
  return data, status_code, headers
218
350
  end
219
351
 
352
+ # Get the latest CSM Threats policy.
353
+ #
354
+ # @see #download_csm_threats_policy_with_http_info
355
+ def download_csm_threats_policy(opts = {})
356
+ data, _status_code, _headers = download_csm_threats_policy_with_http_info(opts)
357
+ data
358
+ end
359
+
360
+ # Get the latest CSM Threats policy.
361
+ #
362
+ # The download endpoint generates a CSM Threats policy file from your currently active
363
+ # CSM Threats rules, and downloads them as a `.policy` file. This file can then be deployed to
364
+ # your Agents to update the policy running in your environment.
365
+ #
366
+ # @param opts [Hash] the optional parameters
367
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
368
+ def download_csm_threats_policy_with_http_info(opts = {})
369
+
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.download_csm_threats_policy ...'
372
+ end
373
+ # resource path
374
+ local_var_path = '/api/v2/remote_config/products/cws/policy/download'
375
+
376
+ # query parameters
377
+ query_params = opts[:query_params] || {}
378
+
379
+ # header parameters
380
+ header_params = opts[:header_params] || {}
381
+ # HTTP header 'Accept' (if needed)
382
+ header_params['Accept'] = @api_client.select_header_accept(['application/zip', 'application/json'])
383
+
384
+ # form parameters
385
+ form_params = opts[:form_params] || {}
386
+
387
+ # http body (model)
388
+ post_body = opts[:debug_body]
389
+
390
+ # return_type
391
+ return_type = opts[:debug_return_type] || 'File'
392
+
393
+ # auth_names
394
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
395
+
396
+ new_options = opts.merge(
397
+ :operation => :download_csm_threats_policy,
398
+ :header_params => header_params,
399
+ :query_params => query_params,
400
+ :form_params => form_params,
401
+ :body => post_body,
402
+ :auth_names => auth_names,
403
+ :return_type => return_type,
404
+ :api_version => "V2"
405
+ )
406
+
407
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug "API called: CloudWorkloadSecurityAPI#download_csm_threats_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
410
+ end
411
+ return data, status_code, headers
412
+ end
413
+
220
414
  # Get a Cloud Workload Security Agent rule.
221
415
  #
222
416
  # @see #get_cloud_workload_security_agent_rule_with_http_info
@@ -282,6 +476,71 @@ module DatadogAPIClient::V2
282
476
  return data, status_code, headers
283
477
  end
284
478
 
479
+ # Get a CSM Threats Agent rule.
480
+ #
481
+ # @see #get_csm_threats_agent_rule_with_http_info
482
+ def get_csm_threats_agent_rule(agent_rule_id, opts = {})
483
+ data, _status_code, _headers = get_csm_threats_agent_rule_with_http_info(agent_rule_id, opts)
484
+ data
485
+ end
486
+
487
+ # Get a CSM Threats Agent rule.
488
+ #
489
+ # Get the details of a specific Cloud Security Management Threats Agent rule.
490
+ #
491
+ # @param agent_rule_id [String] The ID of the Agent rule.
492
+ # @param opts [Hash] the optional parameters
493
+ # @return [Array<(CloudWorkloadSecurityAgentRuleResponse, Integer, Hash)>] CloudWorkloadSecurityAgentRuleResponse data, response status code and response headers
494
+ def get_csm_threats_agent_rule_with_http_info(agent_rule_id, opts = {})
495
+
496
+ if @api_client.config.debugging
497
+ @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.get_csm_threats_agent_rule ...'
498
+ end
499
+ # verify the required parameter 'agent_rule_id' is set
500
+ if @api_client.config.client_side_validation && agent_rule_id.nil?
501
+ fail ArgumentError, "Missing the required parameter 'agent_rule_id' when calling CloudWorkloadSecurityAPI.get_csm_threats_agent_rule"
502
+ end
503
+ # resource path
504
+ local_var_path = '/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}'.sub('{agent_rule_id}', CGI.escape(agent_rule_id.to_s).gsub('%2F', '/'))
505
+
506
+ # query parameters
507
+ query_params = opts[:query_params] || {}
508
+
509
+ # header parameters
510
+ header_params = opts[:header_params] || {}
511
+ # HTTP header 'Accept' (if needed)
512
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
513
+
514
+ # form parameters
515
+ form_params = opts[:form_params] || {}
516
+
517
+ # http body (model)
518
+ post_body = opts[:debug_body]
519
+
520
+ # return_type
521
+ return_type = opts[:debug_return_type] || 'CloudWorkloadSecurityAgentRuleResponse'
522
+
523
+ # auth_names
524
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
525
+
526
+ new_options = opts.merge(
527
+ :operation => :get_csm_threats_agent_rule,
528
+ :header_params => header_params,
529
+ :query_params => query_params,
530
+ :form_params => form_params,
531
+ :body => post_body,
532
+ :auth_names => auth_names,
533
+ :return_type => return_type,
534
+ :api_version => "V2"
535
+ )
536
+
537
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
538
+ if @api_client.config.debugging
539
+ @api_client.config.logger.debug "API called: CloudWorkloadSecurityAPI#get_csm_threats_agent_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
540
+ end
541
+ return data, status_code, headers
542
+ end
543
+
285
544
  # Get all Cloud Workload Security Agent rules.
286
545
  #
287
546
  # @see #list_cloud_workload_security_agent_rules_with_http_info
@@ -342,6 +601,66 @@ module DatadogAPIClient::V2
342
601
  return data, status_code, headers
343
602
  end
344
603
 
604
+ # Get all CSM Threats Agent rules.
605
+ #
606
+ # @see #list_csm_threats_agent_rules_with_http_info
607
+ def list_csm_threats_agent_rules(opts = {})
608
+ data, _status_code, _headers = list_csm_threats_agent_rules_with_http_info(opts)
609
+ data
610
+ end
611
+
612
+ # Get all CSM Threats Agent rules.
613
+ #
614
+ # Get the list of Cloud Security Management Threats Agent rules.
615
+ #
616
+ # @param opts [Hash] the optional parameters
617
+ # @return [Array<(CloudWorkloadSecurityAgentRulesListResponse, Integer, Hash)>] CloudWorkloadSecurityAgentRulesListResponse data, response status code and response headers
618
+ def list_csm_threats_agent_rules_with_http_info(opts = {})
619
+
620
+ if @api_client.config.debugging
621
+ @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.list_csm_threats_agent_rules ...'
622
+ end
623
+ # resource path
624
+ local_var_path = '/api/v2/remote_config/products/cws/agent_rules'
625
+
626
+ # query parameters
627
+ query_params = opts[:query_params] || {}
628
+
629
+ # header parameters
630
+ header_params = opts[:header_params] || {}
631
+ # HTTP header 'Accept' (if needed)
632
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
633
+
634
+ # form parameters
635
+ form_params = opts[:form_params] || {}
636
+
637
+ # http body (model)
638
+ post_body = opts[:debug_body]
639
+
640
+ # return_type
641
+ return_type = opts[:debug_return_type] || 'CloudWorkloadSecurityAgentRulesListResponse'
642
+
643
+ # auth_names
644
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
645
+
646
+ new_options = opts.merge(
647
+ :operation => :list_csm_threats_agent_rules,
648
+ :header_params => header_params,
649
+ :query_params => query_params,
650
+ :form_params => form_params,
651
+ :body => post_body,
652
+ :auth_names => auth_names,
653
+ :return_type => return_type,
654
+ :api_version => "V2"
655
+ )
656
+
657
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
658
+ if @api_client.config.debugging
659
+ @api_client.config.logger.debug "API called: CloudWorkloadSecurityAPI#list_csm_threats_agent_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
660
+ end
661
+ return data, status_code, headers
662
+ end
663
+
345
664
  # Update a Cloud Workload Security Agent rule.
346
665
  #
347
666
  # @see #update_cloud_workload_security_agent_rule_with_http_info
@@ -414,5 +733,78 @@ module DatadogAPIClient::V2
414
733
  end
415
734
  return data, status_code, headers
416
735
  end
736
+
737
+ # Update a CSM Threats Agent rule.
738
+ #
739
+ # @see #update_csm_threats_agent_rule_with_http_info
740
+ def update_csm_threats_agent_rule(agent_rule_id, body, opts = {})
741
+ data, _status_code, _headers = update_csm_threats_agent_rule_with_http_info(agent_rule_id, body, opts)
742
+ data
743
+ end
744
+
745
+ # Update a CSM Threats Agent rule.
746
+ #
747
+ # Update a specific Cloud Security Management Threats Agent rule.
748
+ # Returns the Agent rule object when the request is successful.
749
+ #
750
+ # @param agent_rule_id [String] The ID of the Agent rule.
751
+ # @param body [CloudWorkloadSecurityAgentRuleUpdateRequest] New definition of the Agent rule.
752
+ # @param opts [Hash] the optional parameters
753
+ # @return [Array<(CloudWorkloadSecurityAgentRuleResponse, Integer, Hash)>] CloudWorkloadSecurityAgentRuleResponse data, response status code and response headers
754
+ def update_csm_threats_agent_rule_with_http_info(agent_rule_id, body, opts = {})
755
+
756
+ if @api_client.config.debugging
757
+ @api_client.config.logger.debug 'Calling API: CloudWorkloadSecurityAPI.update_csm_threats_agent_rule ...'
758
+ end
759
+ # verify the required parameter 'agent_rule_id' is set
760
+ if @api_client.config.client_side_validation && agent_rule_id.nil?
761
+ fail ArgumentError, "Missing the required parameter 'agent_rule_id' when calling CloudWorkloadSecurityAPI.update_csm_threats_agent_rule"
762
+ end
763
+ # verify the required parameter 'body' is set
764
+ if @api_client.config.client_side_validation && body.nil?
765
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudWorkloadSecurityAPI.update_csm_threats_agent_rule"
766
+ end
767
+ # resource path
768
+ local_var_path = '/api/v2/remote_config/products/cws/agent_rules/{agent_rule_id}'.sub('{agent_rule_id}', CGI.escape(agent_rule_id.to_s).gsub('%2F', '/'))
769
+
770
+ # query parameters
771
+ query_params = opts[:query_params] || {}
772
+
773
+ # header parameters
774
+ header_params = opts[:header_params] || {}
775
+ # HTTP header 'Accept' (if needed)
776
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
777
+ # HTTP header 'Content-Type'
778
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
779
+
780
+ # form parameters
781
+ form_params = opts[:form_params] || {}
782
+
783
+ # http body (model)
784
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
785
+
786
+ # return_type
787
+ return_type = opts[:debug_return_type] || 'CloudWorkloadSecurityAgentRuleResponse'
788
+
789
+ # auth_names
790
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
791
+
792
+ new_options = opts.merge(
793
+ :operation => :update_csm_threats_agent_rule,
794
+ :header_params => header_params,
795
+ :query_params => query_params,
796
+ :form_params => form_params,
797
+ :body => post_body,
798
+ :auth_names => auth_names,
799
+ :return_type => return_type,
800
+ :api_version => "V2"
801
+ )
802
+
803
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
804
+ if @api_client.config.debugging
805
+ @api_client.config.logger.debug "API called: CloudWorkloadSecurityAPI#update_csm_threats_agent_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
806
+ end
807
+ return data, status_code, headers
808
+ end
417
809
  end
418
810
  end
@@ -35,10 +35,13 @@ module DatadogAPIClient::V2
35
35
  #
36
36
  # Creates a new incident service.
37
37
  #
38
+ # @deprecated This API is deprecated.
39
+ #
38
40
  # @param body [IncidentServiceCreateRequest] Incident Service Payload.
39
41
  # @param opts [Hash] the optional parameters
40
42
  # @return [Array<(IncidentServiceResponse, Integer, Hash)>] IncidentServiceResponse data, response status code and response headers
41
43
  def create_incident_service_with_http_info(body, opts = {})
44
+ warn "[DEPRECATION] `CreateIncidentService` is deprecated."
42
45
  unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_service".to_sym]
43
46
  if unstable_enabled
44
47
  @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_service")
@@ -108,10 +111,13 @@ module DatadogAPIClient::V2
108
111
  #
109
112
  # Deletes an existing incident service.
110
113
  #
114
+ # @deprecated This API is deprecated.
115
+ #
111
116
  # @param service_id [String] The ID of the incident service.
112
117
  # @param opts [Hash] the optional parameters
113
118
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
114
119
  def delete_incident_service_with_http_info(service_id, opts = {})
120
+ warn "[DEPRECATION] `DeleteIncidentService` is deprecated."
115
121
  unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_service".to_sym]
116
122
  if unstable_enabled
117
123
  @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_service")
@@ -180,11 +186,14 @@ module DatadogAPIClient::V2
180
186
  # Get details of an incident service. If the `include[users]` query parameter is provided,
181
187
  # the included attribute will contain the users related to these incident services.
182
188
  #
189
+ # @deprecated This API is deprecated.
190
+ #
183
191
  # @param service_id [String] The ID of the incident service.
184
192
  # @param opts [Hash] the optional parameters
185
193
  # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response.
186
194
  # @return [Array<(IncidentServiceResponse, Integer, Hash)>] IncidentServiceResponse data, response status code and response headers
187
195
  def get_incident_service_with_http_info(service_id, opts = {})
196
+ warn "[DEPRECATION] `GetIncidentService` is deprecated."
188
197
  unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_service".to_sym]
189
198
  if unstable_enabled
190
199
  @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_service")
@@ -257,6 +266,8 @@ module DatadogAPIClient::V2
257
266
  #
258
267
  # Get all incident services uploaded for the requesting user's organization. If the `include[users]` query parameter is provided, the included attribute will contain the users related to these incident services.
259
268
  #
269
+ # @deprecated This API is deprecated.
270
+ #
260
271
  # @param opts [Hash] the optional parameters
261
272
  # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response.
262
273
  # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
@@ -264,6 +275,7 @@ module DatadogAPIClient::V2
264
275
  # @option opts [String] :filter A search query that filters services by name.
265
276
  # @return [Array<(IncidentServicesResponse, Integer, Hash)>] IncidentServicesResponse data, response status code and response headers
266
277
  def list_incident_services_with_http_info(opts = {})
278
+ warn "[DEPRECATION] `ListIncidentServices` is deprecated."
267
279
  unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_services".to_sym]
268
280
  if unstable_enabled
269
281
  @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_services")
@@ -335,11 +347,14 @@ module DatadogAPIClient::V2
335
347
  #
336
348
  # Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update.
337
349
  #
350
+ # @deprecated This API is deprecated.
351
+ #
338
352
  # @param service_id [String] The ID of the incident service.
339
353
  # @param body [IncidentServiceUpdateRequest] Incident Service Payload.
340
354
  # @param opts [Hash] the optional parameters
341
355
  # @return [Array<(IncidentServiceResponse, Integer, Hash)>] IncidentServiceResponse data, response status code and response headers
342
356
  def update_incident_service_with_http_info(service_id, body, opts = {})
357
+ warn "[DEPRECATION] `UpdateIncidentService` is deprecated."
343
358
  unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_service".to_sym]
344
359
  if unstable_enabled
345
360
  @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_service")