datadog_api_client 2.42.0 → 2.43.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 (195) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +3 -7
  3. data/.generator/schemas/v2/openapi.yaml +2981 -63
  4. data/.github/CODEOWNERS +4 -4
  5. data/.github/workflows/reusable-ci.yml +71 -0
  6. data/.github/workflows/reusable-examples.yml +40 -0
  7. data/.github/workflows/{test_integration.yml → reusable-integration-test.yml} +66 -17
  8. data/.github/workflows/reusable-pre-commit.yml +84 -0
  9. data/.github/workflows/reusable-ruby-test.yml +65 -0
  10. data/.github/workflows/test.yml +31 -89
  11. data/CHANGELOG.md +19 -0
  12. data/examples/v1/dashboards/CreateDashboard_607525069.rb +61 -0
  13. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsResourceCollection.rb +5 -0
  14. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsResourceCollection_1008672547.rb +5 -0
  15. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsStandard.rb +5 -0
  16. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissionsStandard_3136299151.rb +5 -0
  17. data/examples/v2/cloud-cost-management/CreateArbitraryCostRule.rb +63 -0
  18. data/examples/v2/cloud-cost-management/CreateCostAzureUCConfigs.rb +0 -1
  19. data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +1 -1
  20. data/examples/v2/cloud-cost-management/CreateRuleset.rb +32 -0
  21. data/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb +5 -0
  22. data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +1 -1
  23. data/examples/v2/cloud-cost-management/DeleteRuleset.rb +5 -0
  24. data/examples/v2/cloud-cost-management/GetArbitraryCostRule.rb +5 -0
  25. data/examples/v2/cloud-cost-management/GetCostAWSCURConfig.rb +5 -0
  26. data/examples/v2/cloud-cost-management/GetCostAzureUCConfig.rb +5 -0
  27. data/examples/v2/cloud-cost-management/GetCostGCPUsageCostConfig.rb +5 -0
  28. data/examples/v2/cloud-cost-management/GetRuleset.rb +5 -0
  29. data/examples/v2/cloud-cost-management/ListArbitraryCostRules.rb +5 -0
  30. data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +1 -1
  31. data/examples/v2/cloud-cost-management/ListRulesets.rb +5 -0
  32. data/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.rb +22 -0
  33. data/examples/v2/cloud-cost-management/ReorderRulesets.rb +13 -0
  34. data/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb +63 -0
  35. data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +1 -1
  36. data/examples/v2/cloud-cost-management/UpdateRuleset.rb +31 -0
  37. data/examples/v2/cloud-cost-management/ValidateQuery.rb +14 -0
  38. data/examples/v2/dora-metrics/DeleteDORADeployment.rb +5 -0
  39. data/examples/v2/dora-metrics/DeleteDORAFailure.rb +5 -0
  40. data/examples/v2/incidents/CreateIncidentImpact.rb +22 -0
  41. data/examples/v2/incidents/DeleteIncidentImpact.rb +12 -0
  42. data/examples/v2/incidents/ListIncidentImpacts.rb +11 -0
  43. data/examples/v2/key-management/GetCurrentUserApplicationKey.rb +4 -1
  44. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2899714190.rb +68 -0
  45. data/examples/v2/security-monitoring/ValidateSecurityMonitoringRule_4152369508.rb +70 -0
  46. data/lib/datadog_api_client/configuration.rb +3 -0
  47. data/lib/datadog_api_client/inflector.rb +104 -1
  48. data/lib/datadog_api_client/v1/api/synthetics_api.rb +1 -3
  49. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  50. data/lib/datadog_api_client/v2/api/aws_integration_api.rb +120 -0
  51. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +1211 -126
  52. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +130 -0
  53. data/lib/datadog_api_client/v2/api/incidents_api.rb +229 -0
  54. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +2 -0
  55. data/lib/datadog_api_client/v2/models/account_filtering_config.rb +8 -0
  56. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request.rb +105 -0
  57. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data.rb +143 -0
  58. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes.rb +241 -0
  59. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_costs_to_allocate_items.rb +174 -0
  60. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy.rb +215 -0
  61. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_filters_items.rb +174 -0
  62. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items.rb +146 -0
  63. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb +144 -0
  64. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_based_on_costs_items.rb +174 -0
  65. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_attributes_strategy_evaluate_grouped_by_filters_items.rb +174 -0
  66. data/lib/datadog_api_client/v2/models/arbitrary_cost_upsert_request_data_type.rb +26 -0
  67. data/lib/datadog_api_client/v2/models/arbitrary_rule_response.rb +105 -0
  68. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_array.rb +125 -0
  69. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data.rb +143 -0
  70. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes.rb +351 -0
  71. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_costs_to_allocate_items.rb +174 -0
  72. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy.rb +215 -0
  73. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_filters_items.rb +174 -0
  74. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items.rb +146 -0
  75. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_allocated_by_items_allocated_tags_items.rb +144 -0
  76. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_based_on_costs_items.rb +174 -0
  77. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items.rb +174 -0
  78. data/lib/datadog_api_client/v2/models/arbitrary_rule_response_data_type.rb +26 -0
  79. data/lib/datadog_api_client/v2/models/aws_cur_config_attributes.rb +8 -0
  80. data/lib/datadog_api_client/v2/models/aws_cur_config_post_data.rb +1 -12
  81. data/lib/datadog_api_client/v2/models/aws_cur_config_response.rb +5 -5
  82. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data.rb +143 -0
  83. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes.rb +225 -0
  84. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_attributes_account_filters.rb +137 -0
  85. data/lib/datadog_api_client/v2/models/aws_cur_config_response_data_type.rb +26 -0
  86. data/lib/datadog_api_client/v2/models/aws_cur_configs_response.rb +19 -1
  87. data/lib/datadog_api_client/v2/models/azure_uc_config.rb +9 -1
  88. data/lib/datadog_api_client/v2/models/azure_uc_config_patch_data.rb +1 -12
  89. data/lib/datadog_api_client/v2/models/azure_uc_config_post_data.rb +1 -12
  90. data/lib/datadog_api_client/v2/models/azure_uc_config_post_request_attributes.rb +3 -13
  91. data/lib/datadog_api_client/v2/models/azure_uc_configs_response.rb +19 -1
  92. data/lib/datadog_api_client/v2/models/create_ruleset_request.rb +105 -0
  93. data/lib/datadog_api_client/v2/models/create_ruleset_request_data.rb +143 -0
  94. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes.rb +135 -0
  95. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items.rb +195 -0
  96. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_mapping.rb +167 -0
  97. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query.rb +172 -0
  98. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_query_addition.rb +144 -0
  99. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table.rb +189 -0
  100. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
  101. data/lib/datadog_api_client/v2/models/create_ruleset_request_data_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/datastore_trigger.rb +105 -0
  103. data/lib/datadog_api_client/v2/models/datastore_trigger_wrapper.rb +135 -0
  104. data/lib/datadog_api_client/v2/models/full_api_key_attributes.rb +19 -1
  105. data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +12 -1
  106. data/lib/datadog_api_client/v2/models/gcp_uc_config_response.rb +105 -0
  107. data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data.rb +143 -0
  108. data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_attributes.rb +235 -0
  109. data/lib/datadog_api_client/v2/models/gcp_uc_config_response_data_type.rb +26 -0
  110. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +4 -4
  111. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +13 -13
  112. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +3 -3
  113. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +2 -2
  114. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +1 -1
  115. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +1 -1
  116. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +4 -15
  117. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +2 -2
  118. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +7 -7
  119. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +1 -1
  120. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +2 -2
  121. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +1 -1
  122. data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +21 -3
  123. data/lib/datadog_api_client/v2/models/historical_job_options.rb +11 -1
  124. data/lib/datadog_api_client/v2/models/incident_impact_attributes.rb +203 -0
  125. data/lib/datadog_api_client/v2/models/incident_impact_create_attributes.rb +173 -0
  126. data/lib/datadog_api_client/v2/models/incident_impact_create_data.rb +144 -0
  127. data/lib/datadog_api_client/v2/models/incident_impact_create_request.rb +123 -0
  128. data/lib/datadog_api_client/v2/models/incident_impact_related_object.rb +28 -0
  129. data/lib/datadog_api_client/v2/models/incident_impact_relationships.rb +125 -0
  130. data/lib/datadog_api_client/v2/models/incident_impact_response.rb +135 -0
  131. data/lib/datadog_api_client/v2/models/incident_impact_response_data.rb +164 -0
  132. data/lib/datadog_api_client/v2/models/incident_impact_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/incident_impacts_response.rb +137 -0
  134. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +33 -1
  135. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +11 -1
  136. data/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +2 -1
  137. data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination.rb +251 -0
  138. data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination_encoding.rb +27 -0
  139. data/lib/datadog_api_client/v2/models/observability_pipeline_google_pub_sub_destination_type.rb +26 -0
  140. data/lib/datadog_api_client/v2/models/partial_api_key_attributes.rb +19 -1
  141. data/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +12 -1
  142. data/lib/datadog_api_client/v2/models/relationship_to_incident.rb +123 -0
  143. data/lib/datadog_api_client/v2/models/relationship_to_incident_data.rb +144 -0
  144. data/lib/datadog_api_client/v2/models/reorder_rule_resource_array.rb +125 -0
  145. data/lib/datadog_api_client/v2/models/reorder_rule_resource_data.rb +133 -0
  146. data/lib/datadog_api_client/v2/models/reorder_rule_resource_data_type.rb +26 -0
  147. data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_array.rb +125 -0
  148. data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data.rb +133 -0
  149. data/lib/datadog_api_client/v2/models/reorder_ruleset_resource_data_type.rb +26 -0
  150. data/lib/datadog_api_client/v2/models/rules_validate_query_request.rb +105 -0
  151. data/lib/datadog_api_client/v2/models/rules_validate_query_request_data.rb +143 -0
  152. data/lib/datadog_api_client/v2/models/rules_validate_query_request_data_attributes.rb +123 -0
  153. data/lib/datadog_api_client/v2/models/rules_validate_query_request_data_type.rb +26 -0
  154. data/lib/datadog_api_client/v2/models/rules_validate_query_response.rb +105 -0
  155. data/lib/datadog_api_client/v2/models/rules_validate_query_response_data.rb +143 -0
  156. data/lib/datadog_api_client/v2/models/rules_validate_query_response_data_attributes.rb +123 -0
  157. data/lib/datadog_api_client/v2/models/rules_validate_query_response_data_type.rb +26 -0
  158. data/lib/datadog_api_client/v2/models/ruleset_resp.rb +105 -0
  159. data/lib/datadog_api_client/v2/models/ruleset_resp_array.rb +125 -0
  160. data/lib/datadog_api_client/v2/models/ruleset_resp_data.rb +143 -0
  161. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes.rb +276 -0
  162. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_created.rb +133 -0
  163. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_modified.rb +133 -0
  164. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items.rb +195 -0
  165. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_mapping.rb +167 -0
  166. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query.rb +172 -0
  167. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_query_addition.rb +144 -0
  168. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table.rb +189 -0
  169. data/lib/datadog_api_client/v2/models/ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
  170. data/lib/datadog_api_client/v2/models/ruleset_resp_data_type.rb +26 -0
  171. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +22 -1
  172. data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
  173. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
  174. data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_options.rb +119 -0
  175. data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_step.rb +126 -0
  176. data/lib/datadog_api_client/v2/models/security_monitoring_rule_sequence_detection_step_transition.rb +126 -0
  177. data/lib/datadog_api_client/v2/models/trigger.rb +1 -0
  178. data/lib/datadog_api_client/v2/models/uc_config_pair.rb +105 -0
  179. data/lib/datadog_api_client/v2/models/uc_config_pair_data.rb +143 -0
  180. data/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes.rb +107 -0
  181. data/lib/datadog_api_client/v2/models/uc_config_pair_data_attributes_configs_items.rb +255 -0
  182. data/lib/datadog_api_client/v2/models/uc_config_pair_data_type.rb +26 -0
  183. data/lib/datadog_api_client/v2/models/update_ruleset_request.rb +105 -0
  184. data/lib/datadog_api_client/v2/models/update_ruleset_request_data.rb +143 -0
  185. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes.rb +156 -0
  186. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items.rb +195 -0
  187. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_mapping.rb +167 -0
  188. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query.rb +172 -0
  189. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_query_addition.rb +144 -0
  190. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table.rb +189 -0
  191. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_attributes_rules_items_reference_table_field_pairs_items.rb +144 -0
  192. data/lib/datadog_api_client/v2/models/update_ruleset_request_data_type.rb +26 -0
  193. data/lib/datadog_api_client/version.rb +1 -1
  194. metadata +137 -3
  195. data/examples/v1/synthetics/SearchTests_195957771.rb +0 -14
@@ -242,6 +242,136 @@ module DatadogAPIClient::V2
242
242
  return data, status_code, headers
243
243
  end
244
244
 
245
+ # Delete a deployment event.
246
+ #
247
+ # @see #delete_dora_deployment_with_http_info
248
+ def delete_dora_deployment(deployment_id, opts = {})
249
+ delete_dora_deployment_with_http_info(deployment_id, opts)
250
+ nil
251
+ end
252
+
253
+ # Delete a deployment event.
254
+ #
255
+ # Use this API endpoint to delete a deployment event.
256
+ #
257
+ # @param deployment_id [String] The ID of the deployment event to delete.
258
+ # @param opts [Hash] the optional parameters
259
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
260
+ def delete_dora_deployment_with_http_info(deployment_id, opts = {})
261
+
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug 'Calling API: DORAMetricsAPI.delete_dora_deployment ...'
264
+ end
265
+ # verify the required parameter 'deployment_id' is set
266
+ if @api_client.config.client_side_validation && deployment_id.nil?
267
+ fail ArgumentError, "Missing the required parameter 'deployment_id' when calling DORAMetricsAPI.delete_dora_deployment"
268
+ end
269
+ # resource path
270
+ local_var_path = '/api/v2/dora/deployment/{deployment_id}'.sub('{deployment_id}', CGI.escape(deployment_id.to_s).gsub('%2F', '/'))
271
+
272
+ # query parameters
273
+ query_params = opts[:query_params] || {}
274
+
275
+ # header parameters
276
+ header_params = opts[:header_params] || {}
277
+ # HTTP header 'Accept' (if needed)
278
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
279
+
280
+ # form parameters
281
+ form_params = opts[:form_params] || {}
282
+
283
+ # http body (model)
284
+ post_body = opts[:debug_body]
285
+
286
+ # return_type
287
+ return_type = opts[:debug_return_type]
288
+
289
+ # auth_names
290
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
291
+
292
+ new_options = opts.merge(
293
+ :operation => :delete_dora_deployment,
294
+ :header_params => header_params,
295
+ :query_params => query_params,
296
+ :form_params => form_params,
297
+ :body => post_body,
298
+ :auth_names => auth_names,
299
+ :return_type => return_type,
300
+ :api_version => "V2"
301
+ )
302
+
303
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug "API called: DORAMetricsAPI#delete_dora_deployment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306
+ end
307
+ return data, status_code, headers
308
+ end
309
+
310
+ # Delete a failure event.
311
+ #
312
+ # @see #delete_dora_failure_with_http_info
313
+ def delete_dora_failure(failure_id, opts = {})
314
+ delete_dora_failure_with_http_info(failure_id, opts)
315
+ nil
316
+ end
317
+
318
+ # Delete a failure event.
319
+ #
320
+ # Use this API endpoint to delete a failure event.
321
+ #
322
+ # @param failure_id [String] The ID of the failure event to delete.
323
+ # @param opts [Hash] the optional parameters
324
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
325
+ def delete_dora_failure_with_http_info(failure_id, opts = {})
326
+
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug 'Calling API: DORAMetricsAPI.delete_dora_failure ...'
329
+ end
330
+ # verify the required parameter 'failure_id' is set
331
+ if @api_client.config.client_side_validation && failure_id.nil?
332
+ fail ArgumentError, "Missing the required parameter 'failure_id' when calling DORAMetricsAPI.delete_dora_failure"
333
+ end
334
+ # resource path
335
+ local_var_path = '/api/v2/dora/failure/{failure_id}'.sub('{failure_id}', CGI.escape(failure_id.to_s).gsub('%2F', '/'))
336
+
337
+ # query parameters
338
+ query_params = opts[:query_params] || {}
339
+
340
+ # header parameters
341
+ header_params = opts[:header_params] || {}
342
+ # HTTP header 'Accept' (if needed)
343
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
344
+
345
+ # form parameters
346
+ form_params = opts[:form_params] || {}
347
+
348
+ # http body (model)
349
+ post_body = opts[:debug_body]
350
+
351
+ # return_type
352
+ return_type = opts[:debug_return_type]
353
+
354
+ # auth_names
355
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
356
+
357
+ new_options = opts.merge(
358
+ :operation => :delete_dora_failure,
359
+ :header_params => header_params,
360
+ :query_params => query_params,
361
+ :form_params => form_params,
362
+ :body => post_body,
363
+ :auth_names => auth_names,
364
+ :return_type => return_type,
365
+ :api_version => "V2"
366
+ )
367
+
368
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug "API called: DORAMetricsAPI#delete_dora_failure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
371
+ end
372
+ return data, status_code, headers
373
+ end
374
+
245
375
  # Get a deployment event.
246
376
  #
247
377
  # @see #get_dora_deployment_with_http_info
@@ -96,6 +96,86 @@ module DatadogAPIClient::V2
96
96
  return data, status_code, headers
97
97
  end
98
98
 
99
+ # Create an incident impact.
100
+ #
101
+ # @see #create_incident_impact_with_http_info
102
+ def create_incident_impact(incident_id, body, opts = {})
103
+ data, _status_code, _headers = create_incident_impact_with_http_info(incident_id, body, opts)
104
+ data
105
+ end
106
+
107
+ # Create an incident impact.
108
+ #
109
+ # Create an impact for an incident.
110
+ #
111
+ # @param incident_id [String] The UUID of the incident.
112
+ # @param body [IncidentImpactCreateRequest] Incident impact payload.
113
+ # @param opts [Hash] the optional parameters
114
+ # @option opts [Array<IncidentImpactRelatedObject>] :include Specifies which related resources should be included in the response.
115
+ # @return [Array<(IncidentImpactResponse, Integer, Hash)>] IncidentImpactResponse data, response status code and response headers
116
+ def create_incident_impact_with_http_info(incident_id, body, opts = {})
117
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_impact".to_sym]
118
+ if unstable_enabled
119
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_impact")
120
+ else
121
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_impact"))
122
+ end
123
+
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_impact ...'
126
+ end
127
+ # verify the required parameter 'incident_id' is set
128
+ if @api_client.config.client_side_validation && incident_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_impact"
130
+ end
131
+ # verify the required parameter 'body' is set
132
+ if @api_client.config.client_side_validation && body.nil?
133
+ fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_impact"
134
+ end
135
+ # resource path
136
+ local_var_path = '/api/v2/incidents/{incident_id}/impacts'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/'))
137
+
138
+ # query parameters
139
+ query_params = opts[:query_params] || {}
140
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
141
+
142
+ # header parameters
143
+ header_params = opts[:header_params] || {}
144
+ # HTTP header 'Accept' (if needed)
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
146
+ # HTTP header 'Content-Type'
147
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
148
+
149
+ # form parameters
150
+ form_params = opts[:form_params] || {}
151
+
152
+ # http body (model)
153
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
154
+
155
+ # return_type
156
+ return_type = opts[:debug_return_type] || 'IncidentImpactResponse'
157
+
158
+ # auth_names
159
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
160
+
161
+ new_options = opts.merge(
162
+ :operation => :create_incident_impact,
163
+ :header_params => header_params,
164
+ :query_params => query_params,
165
+ :form_params => form_params,
166
+ :body => post_body,
167
+ :auth_names => auth_names,
168
+ :return_type => return_type,
169
+ :api_version => "V2"
170
+ )
171
+
172
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
175
+ end
176
+ return data, status_code, headers
177
+ end
178
+
99
179
  # Create an incident integration metadata.
100
180
  #
101
181
  # @see #create_incident_integration_with_http_info
@@ -542,6 +622,82 @@ module DatadogAPIClient::V2
542
622
  return data, status_code, headers
543
623
  end
544
624
 
625
+ # Delete an incident impact.
626
+ #
627
+ # @see #delete_incident_impact_with_http_info
628
+ def delete_incident_impact(incident_id, impact_id, opts = {})
629
+ delete_incident_impact_with_http_info(incident_id, impact_id, opts)
630
+ nil
631
+ end
632
+
633
+ # Delete an incident impact.
634
+ #
635
+ # Delete an incident impact.
636
+ #
637
+ # @param incident_id [String] The UUID of the incident.
638
+ # @param impact_id [String] The UUID of the incident impact.
639
+ # @param opts [Hash] the optional parameters
640
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
641
+ def delete_incident_impact_with_http_info(incident_id, impact_id, opts = {})
642
+ unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_impact".to_sym]
643
+ if unstable_enabled
644
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_impact")
645
+ else
646
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_impact"))
647
+ end
648
+
649
+ if @api_client.config.debugging
650
+ @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_impact ...'
651
+ end
652
+ # verify the required parameter 'incident_id' is set
653
+ if @api_client.config.client_side_validation && incident_id.nil?
654
+ fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_impact"
655
+ end
656
+ # verify the required parameter 'impact_id' is set
657
+ if @api_client.config.client_side_validation && impact_id.nil?
658
+ fail ArgumentError, "Missing the required parameter 'impact_id' when calling IncidentsAPI.delete_incident_impact"
659
+ end
660
+ # resource path
661
+ local_var_path = '/api/v2/incidents/{incident_id}/impacts/{impact_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{impact_id}', CGI.escape(impact_id.to_s).gsub('%2F', '/'))
662
+
663
+ # query parameters
664
+ query_params = opts[:query_params] || {}
665
+
666
+ # header parameters
667
+ header_params = opts[:header_params] || {}
668
+ # HTTP header 'Accept' (if needed)
669
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
670
+
671
+ # form parameters
672
+ form_params = opts[:form_params] || {}
673
+
674
+ # http body (model)
675
+ post_body = opts[:debug_body]
676
+
677
+ # return_type
678
+ return_type = opts[:debug_return_type]
679
+
680
+ # auth_names
681
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
682
+
683
+ new_options = opts.merge(
684
+ :operation => :delete_incident_impact,
685
+ :header_params => header_params,
686
+ :query_params => query_params,
687
+ :form_params => form_params,
688
+ :body => post_body,
689
+ :auth_names => auth_names,
690
+ :return_type => return_type,
691
+ :api_version => "V2"
692
+ )
693
+
694
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
695
+ if @api_client.config.debugging
696
+ @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
697
+ end
698
+ return data, status_code, headers
699
+ end
700
+
545
701
  # Delete an incident integration metadata.
546
702
  #
547
703
  # @see #delete_incident_integration_with_http_info
@@ -1428,6 +1584,79 @@ module DatadogAPIClient::V2
1428
1584
  return data, status_code, headers
1429
1585
  end
1430
1586
 
1587
+ # List an incident's impacts.
1588
+ #
1589
+ # @see #list_incident_impacts_with_http_info
1590
+ def list_incident_impacts(incident_id, opts = {})
1591
+ data, _status_code, _headers = list_incident_impacts_with_http_info(incident_id, opts)
1592
+ data
1593
+ end
1594
+
1595
+ # List an incident's impacts.
1596
+ #
1597
+ # Get all impacts for an incident.
1598
+ #
1599
+ # @param incident_id [String] The UUID of the incident.
1600
+ # @param opts [Hash] the optional parameters
1601
+ # @option opts [Array<IncidentImpactRelatedObject>] :include Specifies which related resources should be included in the response.
1602
+ # @return [Array<(IncidentImpactsResponse, Integer, Hash)>] IncidentImpactsResponse data, response status code and response headers
1603
+ def list_incident_impacts_with_http_info(incident_id, opts = {})
1604
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_impacts".to_sym]
1605
+ if unstable_enabled
1606
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_impacts")
1607
+ else
1608
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_impacts"))
1609
+ end
1610
+
1611
+ if @api_client.config.debugging
1612
+ @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_impacts ...'
1613
+ end
1614
+ # verify the required parameter 'incident_id' is set
1615
+ if @api_client.config.client_side_validation && incident_id.nil?
1616
+ fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_impacts"
1617
+ end
1618
+ # resource path
1619
+ local_var_path = '/api/v2/incidents/{incident_id}/impacts'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/'))
1620
+
1621
+ # query parameters
1622
+ query_params = opts[:query_params] || {}
1623
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1624
+
1625
+ # header parameters
1626
+ header_params = opts[:header_params] || {}
1627
+ # HTTP header 'Accept' (if needed)
1628
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1629
+
1630
+ # form parameters
1631
+ form_params = opts[:form_params] || {}
1632
+
1633
+ # http body (model)
1634
+ post_body = opts[:debug_body]
1635
+
1636
+ # return_type
1637
+ return_type = opts[:debug_return_type] || 'IncidentImpactsResponse'
1638
+
1639
+ # auth_names
1640
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1641
+
1642
+ new_options = opts.merge(
1643
+ :operation => :list_incident_impacts,
1644
+ :header_params => header_params,
1645
+ :query_params => query_params,
1646
+ :form_params => form_params,
1647
+ :body => post_body,
1648
+ :auth_names => auth_names,
1649
+ :return_type => return_type,
1650
+ :api_version => "V2"
1651
+ )
1652
+
1653
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1654
+ if @api_client.config.debugging
1655
+ @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_impacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1656
+ end
1657
+ return data, status_code, headers
1658
+ end
1659
+
1431
1660
  # Get a list of an incident's integration metadata.
1432
1661
  #
1433
1662
  # @see #list_incident_integrations_with_http_info
@@ -3319,6 +3319,7 @@ module DatadogAPIClient::V2
3319
3319
  # Get the list of all suppression rules.
3320
3320
  #
3321
3321
  # @param opts [Hash] the optional parameters
3322
+ # @option opts [String] :query Query string.
3322
3323
  # @return [Array<(SecurityMonitoringSuppressionsResponse, Integer, Hash)>] SecurityMonitoringSuppressionsResponse data, response status code and response headers
3323
3324
  def list_security_monitoring_suppressions_with_http_info(opts = {})
3324
3325
 
@@ -3330,6 +3331,7 @@ module DatadogAPIClient::V2
3330
3331
 
3331
3332
  # query parameters
3332
3333
  query_params = opts[:query_params] || {}
3334
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
3333
3335
 
3334
3336
  # header parameters
3335
3337
  header_params = opts[:header_params] || {}
@@ -52,6 +52,14 @@ module DatadogAPIClient::V2
52
52
  }
53
53
  end
54
54
 
55
+ # List of attributes with nullable: true
56
+ # @!visibility private
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ :'include_new_accounts',
60
+ ])
61
+ end
62
+
55
63
  # Initializes the object
56
64
  # @param attributes [Hash] Model attributes in the form of hash
57
65
  # @!visibility private
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The definition of `ArbitraryCostUpsertRequest` object.
21
+ class ArbitraryCostUpsertRequest
22
+ include BaseGenericModel
23
+
24
+ # The definition of `ArbitraryCostUpsertRequestData` object.
25
+ attr_accessor :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'ArbitraryCostUpsertRequestData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ArbitraryCostUpsertRequest` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ data == o.data &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [data, additional_properties].hash
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,143 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The definition of `ArbitraryCostUpsertRequestData` object.
21
+ class ArbitraryCostUpsertRequestData
22
+ include BaseGenericModel
23
+
24
+ # The definition of `ArbitraryCostUpsertRequestDataAttributes` object.
25
+ attr_accessor :attributes
26
+
27
+ # The `ArbitraryCostUpsertRequestData` `id`.
28
+ attr_accessor :id
29
+
30
+ # Upsert arbitrary rule resource type.
31
+ attr_reader :type
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'attributes' => :'attributes',
40
+ :'id' => :'id',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'attributes' => :'ArbitraryCostUpsertRequestDataAttributes',
50
+ :'id' => :'String',
51
+ :'type' => :'ArbitraryCostUpsertRequestDataType'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ArbitraryCostUpsertRequestData` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'attributes')
74
+ self.attributes = attributes[:'attributes']
75
+ end
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ # @!visibility private
89
+ def valid?
90
+ return false if @type.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param type [Object] Object to be assigned
96
+ # @!visibility private
97
+ def type=(type)
98
+ if type.nil?
99
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
100
+ end
101
+ @type = type
102
+ end
103
+
104
+ # Returns the object in the form of hash, with additionalProperties support.
105
+ # @return [Hash] Returns the object in the form of hash
106
+ # @!visibility private
107
+ def to_hash
108
+ hash = {}
109
+ self.class.attribute_map.each_pair do |attr, param|
110
+ value = self.send(attr)
111
+ if value.nil?
112
+ is_nullable = self.class.openapi_nullable.include?(attr)
113
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
114
+ end
115
+
116
+ hash[param] = _to_hash(value)
117
+ end
118
+ self.additional_properties.each_pair do |attr, value|
119
+ hash[attr] = value
120
+ end
121
+ hash
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param o [Object] Object to be compared
126
+ # @!visibility private
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ attributes == o.attributes &&
131
+ id == o.id &&
132
+ type == o.type &&
133
+ additional_properties == o.additional_properties
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ # @!visibility private
139
+ def hash
140
+ [attributes, id, type, additional_properties].hash
141
+ end
142
+ end
143
+ end