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
@@ -23,6 +23,85 @@ module DatadogAPIClient::V2
23
23
  @api_client = api_client
24
24
  end
25
25
 
26
+ # Create arbitrary cost rule.
27
+ #
28
+ # @see #create_arbitrary_cost_rule_with_http_info
29
+ def create_arbitrary_cost_rule(body, opts = {})
30
+ data, _status_code, _headers = create_arbitrary_cost_rule_with_http_info(body, opts)
31
+ data
32
+ end
33
+
34
+ # Create arbitrary cost rule.
35
+ #
36
+ # Create a new arbitrary cost rule with the specified filters and allocation strategy.
37
+ #
38
+ # **Strategy Methods:**
39
+ # - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters.
40
+ # - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys.
41
+ # - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by (array of percentage allocations).
42
+ #
43
+ # **Filter Conditions:**
44
+ # - Use **value** for single-value conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is all values", "is untagged"
45
+ # - Use **values** for multi-value conditions: "in", "not in"
46
+ # - Cannot use both value and values simultaneously.
47
+ #
48
+ # **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like
49
+ #
50
+ # @param body [ArbitraryCostUpsertRequest]
51
+ # @param opts [Hash] the optional parameters
52
+ # @return [Array<(ArbitraryRuleResponse, Integer, Hash)>] ArbitraryRuleResponse data, response status code and response headers
53
+ def create_arbitrary_cost_rule_with_http_info(body, opts = {})
54
+
55
+ if @api_client.config.debugging
56
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_arbitrary_cost_rule ...'
57
+ end
58
+ # verify the required parameter 'body' is set
59
+ if @api_client.config.client_side_validation && body.nil?
60
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_arbitrary_cost_rule"
61
+ end
62
+ # resource path
63
+ local_var_path = '/api/v2/cost/arbitrary_rule'
64
+
65
+ # query parameters
66
+ query_params = opts[:query_params] || {}
67
+
68
+ # header parameters
69
+ header_params = opts[:header_params] || {}
70
+ # HTTP header 'Accept' (if needed)
71
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
72
+ # HTTP header 'Content-Type'
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
74
+
75
+ # form parameters
76
+ form_params = opts[:form_params] || {}
77
+
78
+ # http body (model)
79
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
80
+
81
+ # return_type
82
+ return_type = opts[:debug_return_type] || 'ArbitraryRuleResponse'
83
+
84
+ # auth_names
85
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
86
+
87
+ new_options = opts.merge(
88
+ :operation => :create_arbitrary_cost_rule,
89
+ :header_params => header_params,
90
+ :query_params => query_params,
91
+ :form_params => form_params,
92
+ :body => post_body,
93
+ :auth_names => auth_names,
94
+ :return_type => return_type,
95
+ :api_version => "V2"
96
+ )
97
+
98
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#create_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
101
+ end
102
+ return data, status_code, headers
103
+ end
104
+
26
105
  # Create Cloud Cost Management AWS CUR config.
27
106
  #
28
107
  # @see #create_cost_awscur_config_with_http_info
@@ -37,7 +116,7 @@ module DatadogAPIClient::V2
37
116
  #
38
117
  # @param body [AwsCURConfigPostRequest]
39
118
  # @param opts [Hash] the optional parameters
40
- # @return [Array<(AwsCURConfigResponse, Integer, Hash)>] AwsCURConfigResponse data, response status code and response headers
119
+ # @return [Array<(AwsCurConfigResponse, Integer, Hash)>] AwsCurConfigResponse data, response status code and response headers
41
120
  def create_cost_awscur_config_with_http_info(body, opts = {})
42
121
 
43
122
  if @api_client.config.debugging
@@ -67,7 +146,7 @@ module DatadogAPIClient::V2
67
146
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
68
147
 
69
148
  # return_type
70
- return_type = opts[:debug_return_type] || 'AwsCURConfigResponse'
149
+ return_type = opts[:debug_return_type] || 'AwsCurConfigResponse'
71
150
 
72
151
  # auth_names
73
152
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
@@ -157,7 +236,7 @@ module DatadogAPIClient::V2
157
236
  return data, status_code, headers
158
237
  end
159
238
 
160
- # Create Cloud Cost Management GCP Usage Cost config.
239
+ # Create Google Cloud Usage Cost config.
161
240
  #
162
241
  # @see #create_cost_gcp_usage_cost_config_with_http_info
163
242
  def create_cost_gcp_usage_cost_config(body, opts = {})
@@ -165,9 +244,9 @@ module DatadogAPIClient::V2
165
244
  data
166
245
  end
167
246
 
168
- # Create Cloud Cost Management GCP Usage Cost config.
247
+ # Create Google Cloud Usage Cost config.
169
248
  #
170
- # Create a Cloud Cost Management account for an GCP Usage Cost config.
249
+ # Create a Cloud Cost Management account for an Google Cloud Usage Cost config.
171
250
  #
172
251
  # @param body [GCPUsageCostConfigPostRequest]
173
252
  # @param opts [Hash] the optional parameters
@@ -224,6 +303,138 @@ module DatadogAPIClient::V2
224
303
  return data, status_code, headers
225
304
  end
226
305
 
306
+ # Create ruleset.
307
+ #
308
+ # @see #create_ruleset_with_http_info
309
+ def create_ruleset(body, opts = {})
310
+ data, _status_code, _headers = create_ruleset_with_http_info(body, opts)
311
+ data
312
+ end
313
+
314
+ # Create ruleset.
315
+ #
316
+ # Create a new tag pipeline ruleset with the specified rules and configuration
317
+ #
318
+ # @param body [CreateRulesetRequest]
319
+ # @param opts [Hash] the optional parameters
320
+ # @return [Array<(RulesetResp, Integer, Hash)>] RulesetResp data, response status code and response headers
321
+ def create_ruleset_with_http_info(body, opts = {})
322
+
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.create_ruleset ...'
325
+ end
326
+ # verify the required parameter 'body' is set
327
+ if @api_client.config.client_side_validation && body.nil?
328
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.create_ruleset"
329
+ end
330
+ # resource path
331
+ local_var_path = '/api/v2/tags/enrichment'
332
+
333
+ # query parameters
334
+ query_params = opts[:query_params] || {}
335
+
336
+ # header parameters
337
+ header_params = opts[:header_params] || {}
338
+ # HTTP header 'Accept' (if needed)
339
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
340
+ # HTTP header 'Content-Type'
341
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
342
+
343
+ # form parameters
344
+ form_params = opts[:form_params] || {}
345
+
346
+ # http body (model)
347
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
348
+
349
+ # return_type
350
+ return_type = opts[:debug_return_type] || 'RulesetResp'
351
+
352
+ # auth_names
353
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
354
+
355
+ new_options = opts.merge(
356
+ :operation => :create_ruleset,
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :form_params => form_params,
360
+ :body => post_body,
361
+ :auth_names => auth_names,
362
+ :return_type => return_type,
363
+ :api_version => "V2"
364
+ )
365
+
366
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
367
+ if @api_client.config.debugging
368
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#create_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
369
+ end
370
+ return data, status_code, headers
371
+ end
372
+
373
+ # Delete arbitrary cost rule.
374
+ #
375
+ # @see #delete_arbitrary_cost_rule_with_http_info
376
+ def delete_arbitrary_cost_rule(rule_id, opts = {})
377
+ delete_arbitrary_cost_rule_with_http_info(rule_id, opts)
378
+ nil
379
+ end
380
+
381
+ # Delete arbitrary cost rule.
382
+ #
383
+ # Delete an arbitrary cost rule - Delete an existing arbitrary cost rule by its ID
384
+ #
385
+ # @param rule_id [Integer] The unique identifier of the arbitrary cost rule
386
+ # @param opts [Hash] the optional parameters
387
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
388
+ def delete_arbitrary_cost_rule_with_http_info(rule_id, opts = {})
389
+
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_arbitrary_cost_rule ...'
392
+ end
393
+ # verify the required parameter 'rule_id' is set
394
+ if @api_client.config.client_side_validation && rule_id.nil?
395
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudCostManagementAPI.delete_arbitrary_cost_rule"
396
+ end
397
+ # resource path
398
+ local_var_path = '/api/v2/cost/arbitrary_rule/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+
403
+ # header parameters
404
+ header_params = opts[:header_params] || {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
407
+
408
+ # form parameters
409
+ form_params = opts[:form_params] || {}
410
+
411
+ # http body (model)
412
+ post_body = opts[:debug_body]
413
+
414
+ # return_type
415
+ return_type = opts[:debug_return_type]
416
+
417
+ # auth_names
418
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
419
+
420
+ new_options = opts.merge(
421
+ :operation => :delete_arbitrary_cost_rule,
422
+ :header_params => header_params,
423
+ :query_params => query_params,
424
+ :form_params => form_params,
425
+ :body => post_body,
426
+ :auth_names => auth_names,
427
+ :return_type => return_type,
428
+ :api_version => "V2"
429
+ )
430
+
431
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
432
+ if @api_client.config.debugging
433
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
434
+ end
435
+ return data, status_code, headers
436
+ end
437
+
227
438
  # Delete a budget.
228
439
  #
229
440
  # @see #delete_budget_with_http_info
@@ -419,7 +630,7 @@ module DatadogAPIClient::V2
419
630
  return data, status_code, headers
420
631
  end
421
632
 
422
- # Delete Cloud Cost Management GCP Usage Cost config.
633
+ # Delete Google Cloud Usage Cost config.
423
634
  #
424
635
  # @see #delete_cost_gcp_usage_cost_config_with_http_info
425
636
  def delete_cost_gcp_usage_cost_config(cloud_account_id, opts = {})
@@ -427,7 +638,7 @@ module DatadogAPIClient::V2
427
638
  nil
428
639
  end
429
640
 
430
- # Delete Cloud Cost Management GCP Usage Cost config.
641
+ # Delete Google Cloud Usage Cost config.
431
642
  #
432
643
  # Archive a Cloud Cost Management account.
433
644
  #
@@ -549,32 +760,32 @@ module DatadogAPIClient::V2
549
760
  return data, status_code, headers
550
761
  end
551
762
 
552
- # Get a budget.
763
+ # Delete ruleset.
553
764
  #
554
- # @see #get_budget_with_http_info
555
- def get_budget(budget_id, opts = {})
556
- data, _status_code, _headers = get_budget_with_http_info(budget_id, opts)
557
- data
765
+ # @see #delete_ruleset_with_http_info
766
+ def delete_ruleset(ruleset_id, opts = {})
767
+ delete_ruleset_with_http_info(ruleset_id, opts)
768
+ nil
558
769
  end
559
770
 
560
- # Get a budget.
771
+ # Delete ruleset.
561
772
  #
562
- # Get a budget.
773
+ # Delete a tag pipeline ruleset - Delete an existing tag pipeline ruleset by its ID
563
774
  #
564
- # @param budget_id [String] Budget id.
775
+ # @param ruleset_id [String] The unique identifier of the ruleset
565
776
  # @param opts [Hash] the optional parameters
566
- # @return [Array<(BudgetWithEntries, Integer, Hash)>] BudgetWithEntries data, response status code and response headers
567
- def get_budget_with_http_info(budget_id, opts = {})
777
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
778
+ def delete_ruleset_with_http_info(ruleset_id, opts = {})
568
779
 
569
780
  if @api_client.config.debugging
570
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_budget ...'
781
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.delete_ruleset ...'
571
782
  end
572
- # verify the required parameter 'budget_id' is set
573
- if @api_client.config.client_side_validation && budget_id.nil?
574
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling CloudCostManagementAPI.get_budget"
783
+ # verify the required parameter 'ruleset_id' is set
784
+ if @api_client.config.client_side_validation && ruleset_id.nil?
785
+ fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling CloudCostManagementAPI.delete_ruleset"
575
786
  end
576
787
  # resource path
577
- local_var_path = '/api/v2/cost/budget/{budget_id}'.sub('{budget_id}', CGI.escape(budget_id.to_s).gsub('%2F', '/'))
788
+ local_var_path = '/api/v2/tags/enrichment/{ruleset_id}'.sub('{ruleset_id}', CGI.escape(ruleset_id.to_s).gsub('%2F', '/'))
578
789
 
579
790
  # query parameters
580
791
  query_params = opts[:query_params] || {}
@@ -582,7 +793,7 @@ module DatadogAPIClient::V2
582
793
  # header parameters
583
794
  header_params = opts[:header_params] || {}
584
795
  # HTTP header 'Accept' (if needed)
585
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
796
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
586
797
 
587
798
  # form parameters
588
799
  form_params = opts[:form_params] || {}
@@ -591,13 +802,13 @@ module DatadogAPIClient::V2
591
802
  post_body = opts[:debug_body]
592
803
 
593
804
  # return_type
594
- return_type = opts[:debug_return_type] || 'BudgetWithEntries'
805
+ return_type = opts[:debug_return_type]
595
806
 
596
807
  # auth_names
597
808
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
598
809
 
599
810
  new_options = opts.merge(
600
- :operation => :get_budget,
811
+ :operation => :delete_ruleset,
601
812
  :header_params => header_params,
602
813
  :query_params => query_params,
603
814
  :form_params => form_params,
@@ -607,39 +818,39 @@ module DatadogAPIClient::V2
607
818
  :api_version => "V2"
608
819
  )
609
820
 
610
- data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
821
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
611
822
  if @api_client.config.debugging
612
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
823
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#delete_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
613
824
  end
614
825
  return data, status_code, headers
615
826
  end
616
827
 
617
- # Get Custom Costs file.
828
+ # Get arbitrary cost rule.
618
829
  #
619
- # @see #get_custom_costs_file_with_http_info
620
- def get_custom_costs_file(file_id, opts = {})
621
- data, _status_code, _headers = get_custom_costs_file_with_http_info(file_id, opts)
830
+ # @see #get_arbitrary_cost_rule_with_http_info
831
+ def get_arbitrary_cost_rule(rule_id, opts = {})
832
+ data, _status_code, _headers = get_arbitrary_cost_rule_with_http_info(rule_id, opts)
622
833
  data
623
834
  end
624
835
 
625
- # Get Custom Costs file.
836
+ # Get arbitrary cost rule.
626
837
  #
627
- # Fetch the specified Custom Costs file.
838
+ # Get a specific arbitrary cost rule - Retrieve a specific arbitrary cost rule by its ID
628
839
  #
629
- # @param file_id [String] File ID.
840
+ # @param rule_id [Integer] The unique identifier of the arbitrary cost rule
630
841
  # @param opts [Hash] the optional parameters
631
- # @return [Array<(CustomCostsFileGetResponse, Integer, Hash)>] CustomCostsFileGetResponse data, response status code and response headers
632
- def get_custom_costs_file_with_http_info(file_id, opts = {})
842
+ # @return [Array<(ArbitraryRuleResponse, Integer, Hash)>] ArbitraryRuleResponse data, response status code and response headers
843
+ def get_arbitrary_cost_rule_with_http_info(rule_id, opts = {})
633
844
 
634
845
  if @api_client.config.debugging
635
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_custom_costs_file ...'
846
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_arbitrary_cost_rule ...'
636
847
  end
637
- # verify the required parameter 'file_id' is set
638
- if @api_client.config.client_side_validation && file_id.nil?
639
- fail ArgumentError, "Missing the required parameter 'file_id' when calling CloudCostManagementAPI.get_custom_costs_file"
848
+ # verify the required parameter 'rule_id' is set
849
+ if @api_client.config.client_side_validation && rule_id.nil?
850
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudCostManagementAPI.get_arbitrary_cost_rule"
640
851
  end
641
852
  # resource path
642
- local_var_path = '/api/v2/cost/custom_costs/{file_id}'.sub('{file_id}', CGI.escape(file_id.to_s).gsub('%2F', '/'))
853
+ local_var_path = '/api/v2/cost/arbitrary_rule/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
643
854
 
644
855
  # query parameters
645
856
  query_params = opts[:query_params] || {}
@@ -656,13 +867,13 @@ module DatadogAPIClient::V2
656
867
  post_body = opts[:debug_body]
657
868
 
658
869
  # return_type
659
- return_type = opts[:debug_return_type] || 'CustomCostsFileGetResponse'
870
+ return_type = opts[:debug_return_type] || 'ArbitraryRuleResponse'
660
871
 
661
872
  # auth_names
662
873
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
663
874
 
664
875
  new_options = opts.merge(
665
- :operation => :get_custom_costs_file,
876
+ :operation => :get_arbitrary_cost_rule,
666
877
  :header_params => header_params,
667
878
  :query_params => query_params,
668
879
  :form_params => form_params,
@@ -674,32 +885,37 @@ module DatadogAPIClient::V2
674
885
 
675
886
  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
676
887
  if @api_client.config.debugging
677
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_custom_costs_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
888
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
678
889
  end
679
890
  return data, status_code, headers
680
891
  end
681
892
 
682
- # List budgets.
893
+ # Get a budget.
683
894
  #
684
- # @see #list_budgets_with_http_info
685
- def list_budgets(opts = {})
686
- data, _status_code, _headers = list_budgets_with_http_info(opts)
895
+ # @see #get_budget_with_http_info
896
+ def get_budget(budget_id, opts = {})
897
+ data, _status_code, _headers = get_budget_with_http_info(budget_id, opts)
687
898
  data
688
899
  end
689
900
 
690
- # List budgets.
901
+ # Get a budget.
691
902
  #
692
- # List budgets.
903
+ # Get a budget.
693
904
  #
905
+ # @param budget_id [String] Budget id.
694
906
  # @param opts [Hash] the optional parameters
695
- # @return [Array<(BudgetArray, Integer, Hash)>] BudgetArray data, response status code and response headers
696
- def list_budgets_with_http_info(opts = {})
907
+ # @return [Array<(BudgetWithEntries, Integer, Hash)>] BudgetWithEntries data, response status code and response headers
908
+ def get_budget_with_http_info(budget_id, opts = {})
697
909
 
698
910
  if @api_client.config.debugging
699
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_budgets ...'
911
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_budget ...'
912
+ end
913
+ # verify the required parameter 'budget_id' is set
914
+ if @api_client.config.client_side_validation && budget_id.nil?
915
+ fail ArgumentError, "Missing the required parameter 'budget_id' when calling CloudCostManagementAPI.get_budget"
700
916
  end
701
917
  # resource path
702
- local_var_path = '/api/v2/cost/budgets'
918
+ local_var_path = '/api/v2/cost/budget/{budget_id}'.sub('{budget_id}', CGI.escape(budget_id.to_s).gsub('%2F', '/'))
703
919
 
704
920
  # query parameters
705
921
  query_params = opts[:query_params] || {}
@@ -716,13 +932,13 @@ module DatadogAPIClient::V2
716
932
  post_body = opts[:debug_body]
717
933
 
718
934
  # return_type
719
- return_type = opts[:debug_return_type] || 'BudgetArray'
935
+ return_type = opts[:debug_return_type] || 'BudgetWithEntries'
720
936
 
721
937
  # auth_names
722
938
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
723
939
 
724
940
  new_options = opts.merge(
725
- :operation => :list_budgets,
941
+ :operation => :get_budget,
726
942
  :header_params => header_params,
727
943
  :query_params => query_params,
728
944
  :form_params => form_params,
@@ -734,32 +950,37 @@ module DatadogAPIClient::V2
734
950
 
735
951
  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
736
952
  if @api_client.config.debugging
737
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
953
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
738
954
  end
739
955
  return data, status_code, headers
740
956
  end
741
957
 
742
- # List Cloud Cost Management AWS CUR configs.
958
+ # Get cost AWS CUR config.
743
959
  #
744
- # @see #list_cost_awscur_configs_with_http_info
745
- def list_cost_awscur_configs(opts = {})
746
- data, _status_code, _headers = list_cost_awscur_configs_with_http_info(opts)
960
+ # @see #get_cost_awscur_config_with_http_info
961
+ def get_cost_awscur_config(cloud_account_id, opts = {})
962
+ data, _status_code, _headers = get_cost_awscur_config_with_http_info(cloud_account_id, opts)
747
963
  data
748
964
  end
749
965
 
750
- # List Cloud Cost Management AWS CUR configs.
966
+ # Get cost AWS CUR config.
751
967
  #
752
- # List the AWS CUR configs.
968
+ # Get a specific AWS CUR config.
753
969
  #
970
+ # @param cloud_account_id [Integer] The unique identifier of the cloud account
754
971
  # @param opts [Hash] the optional parameters
755
- # @return [Array<(AwsCURConfigsResponse, Integer, Hash)>] AwsCURConfigsResponse data, response status code and response headers
756
- def list_cost_awscur_configs_with_http_info(opts = {})
972
+ # @return [Array<(AwsCurConfigResponse, Integer, Hash)>] AwsCurConfigResponse data, response status code and response headers
973
+ def get_cost_awscur_config_with_http_info(cloud_account_id, opts = {})
757
974
 
758
975
  if @api_client.config.debugging
759
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_awscur_configs ...'
976
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_awscur_config ...'
977
+ end
978
+ # verify the required parameter 'cloud_account_id' is set
979
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
980
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.get_cost_awscur_config"
760
981
  end
761
982
  # resource path
762
- local_var_path = '/api/v2/cost/aws_cur_config'
983
+ local_var_path = '/api/v2/cost/aws_cur_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
763
984
 
764
985
  # query parameters
765
986
  query_params = opts[:query_params] || {}
@@ -776,13 +997,13 @@ module DatadogAPIClient::V2
776
997
  post_body = opts[:debug_body]
777
998
 
778
999
  # return_type
779
- return_type = opts[:debug_return_type] || 'AwsCURConfigsResponse'
1000
+ return_type = opts[:debug_return_type] || 'AwsCurConfigResponse'
780
1001
 
781
1002
  # auth_names
782
1003
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
783
1004
 
784
1005
  new_options = opts.merge(
785
- :operation => :list_cost_awscur_configs,
1006
+ :operation => :get_cost_awscur_config,
786
1007
  :header_params => header_params,
787
1008
  :query_params => query_params,
788
1009
  :form_params => form_params,
@@ -794,32 +1015,660 @@ module DatadogAPIClient::V2
794
1015
 
795
1016
  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
796
1017
  if @api_client.config.debugging
797
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_awscur_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1018
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_awscur_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
798
1019
  end
799
1020
  return data, status_code, headers
800
1021
  end
801
1022
 
802
- # List Cloud Cost Management Azure configs.
1023
+ # Get cost Azure UC config.
803
1024
  #
804
- # @see #list_cost_azure_uc_configs_with_http_info
805
- def list_cost_azure_uc_configs(opts = {})
806
- data, _status_code, _headers = list_cost_azure_uc_configs_with_http_info(opts)
1025
+ # @see #get_cost_azure_uc_config_with_http_info
1026
+ def get_cost_azure_uc_config(cloud_account_id, opts = {})
1027
+ data, _status_code, _headers = get_cost_azure_uc_config_with_http_info(cloud_account_id, opts)
807
1028
  data
808
1029
  end
809
1030
 
810
- # List Cloud Cost Management Azure configs.
1031
+ # Get cost Azure UC config.
811
1032
  #
812
- # List the Azure configs.
1033
+ # Get a specific Azure config.
813
1034
  #
1035
+ # @param cloud_account_id [Integer] The unique identifier of the cloud account
814
1036
  # @param opts [Hash] the optional parameters
815
- # @return [Array<(AzureUCConfigsResponse, Integer, Hash)>] AzureUCConfigsResponse data, response status code and response headers
816
- def list_cost_azure_uc_configs_with_http_info(opts = {})
1037
+ # @return [Array<(UCConfigPair, Integer, Hash)>] UCConfigPair data, response status code and response headers
1038
+ def get_cost_azure_uc_config_with_http_info(cloud_account_id, opts = {})
817
1039
 
818
1040
  if @api_client.config.debugging
819
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_azure_uc_configs ...'
1041
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_azure_uc_config ...'
1042
+ end
1043
+ # verify the required parameter 'cloud_account_id' is set
1044
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
1045
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.get_cost_azure_uc_config"
1046
+ end
1047
+ # resource path
1048
+ local_var_path = '/api/v2/cost/azure_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
1049
+
1050
+ # query parameters
1051
+ query_params = opts[:query_params] || {}
1052
+
1053
+ # header parameters
1054
+ header_params = opts[:header_params] || {}
1055
+ # HTTP header 'Accept' (if needed)
1056
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1057
+
1058
+ # form parameters
1059
+ form_params = opts[:form_params] || {}
1060
+
1061
+ # http body (model)
1062
+ post_body = opts[:debug_body]
1063
+
1064
+ # return_type
1065
+ return_type = opts[:debug_return_type] || 'UCConfigPair'
1066
+
1067
+ # auth_names
1068
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1069
+
1070
+ new_options = opts.merge(
1071
+ :operation => :get_cost_azure_uc_config,
1072
+ :header_params => header_params,
1073
+ :query_params => query_params,
1074
+ :form_params => form_params,
1075
+ :body => post_body,
1076
+ :auth_names => auth_names,
1077
+ :return_type => return_type,
1078
+ :api_version => "V2"
1079
+ )
1080
+
1081
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1082
+ if @api_client.config.debugging
1083
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_azure_uc_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1084
+ end
1085
+ return data, status_code, headers
1086
+ end
1087
+
1088
+ # Get Google Cloud Usage Cost config.
1089
+ #
1090
+ # @see #get_cost_gcp_usage_cost_config_with_http_info
1091
+ def get_cost_gcp_usage_cost_config(cloud_account_id, opts = {})
1092
+ data, _status_code, _headers = get_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts)
1093
+ data
1094
+ end
1095
+
1096
+ # Get Google Cloud Usage Cost config.
1097
+ #
1098
+ # Get a specific Google Cloud Usage Cost config.
1099
+ #
1100
+ # @param cloud_account_id [Integer] The unique identifier of the cloud account
1101
+ # @param opts [Hash] the optional parameters
1102
+ # @return [Array<(GcpUcConfigResponse, Integer, Hash)>] GcpUcConfigResponse data, response status code and response headers
1103
+ def get_cost_gcp_usage_cost_config_with_http_info(cloud_account_id, opts = {})
1104
+
1105
+ if @api_client.config.debugging
1106
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_cost_gcp_usage_cost_config ...'
1107
+ end
1108
+ # verify the required parameter 'cloud_account_id' is set
1109
+ if @api_client.config.client_side_validation && cloud_account_id.nil?
1110
+ fail ArgumentError, "Missing the required parameter 'cloud_account_id' when calling CloudCostManagementAPI.get_cost_gcp_usage_cost_config"
1111
+ end
1112
+ # resource path
1113
+ local_var_path = '/api/v2/cost/gcp_uc_config/{cloud_account_id}'.sub('{cloud_account_id}', CGI.escape(cloud_account_id.to_s).gsub('%2F', '/'))
1114
+
1115
+ # query parameters
1116
+ query_params = opts[:query_params] || {}
1117
+
1118
+ # header parameters
1119
+ header_params = opts[:header_params] || {}
1120
+ # HTTP header 'Accept' (if needed)
1121
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1122
+
1123
+ # form parameters
1124
+ form_params = opts[:form_params] || {}
1125
+
1126
+ # http body (model)
1127
+ post_body = opts[:debug_body]
1128
+
1129
+ # return_type
1130
+ return_type = opts[:debug_return_type] || 'GcpUcConfigResponse'
1131
+
1132
+ # auth_names
1133
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1134
+
1135
+ new_options = opts.merge(
1136
+ :operation => :get_cost_gcp_usage_cost_config,
1137
+ :header_params => header_params,
1138
+ :query_params => query_params,
1139
+ :form_params => form_params,
1140
+ :body => post_body,
1141
+ :auth_names => auth_names,
1142
+ :return_type => return_type,
1143
+ :api_version => "V2"
1144
+ )
1145
+
1146
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1147
+ if @api_client.config.debugging
1148
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_cost_gcp_usage_cost_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1149
+ end
1150
+ return data, status_code, headers
1151
+ end
1152
+
1153
+ # Get Custom Costs file.
1154
+ #
1155
+ # @see #get_custom_costs_file_with_http_info
1156
+ def get_custom_costs_file(file_id, opts = {})
1157
+ data, _status_code, _headers = get_custom_costs_file_with_http_info(file_id, opts)
1158
+ data
1159
+ end
1160
+
1161
+ # Get Custom Costs file.
1162
+ #
1163
+ # Fetch the specified Custom Costs file.
1164
+ #
1165
+ # @param file_id [String] File ID.
1166
+ # @param opts [Hash] the optional parameters
1167
+ # @return [Array<(CustomCostsFileGetResponse, Integer, Hash)>] CustomCostsFileGetResponse data, response status code and response headers
1168
+ def get_custom_costs_file_with_http_info(file_id, opts = {})
1169
+
1170
+ if @api_client.config.debugging
1171
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_custom_costs_file ...'
1172
+ end
1173
+ # verify the required parameter 'file_id' is set
1174
+ if @api_client.config.client_side_validation && file_id.nil?
1175
+ fail ArgumentError, "Missing the required parameter 'file_id' when calling CloudCostManagementAPI.get_custom_costs_file"
1176
+ end
1177
+ # resource path
1178
+ local_var_path = '/api/v2/cost/custom_costs/{file_id}'.sub('{file_id}', CGI.escape(file_id.to_s).gsub('%2F', '/'))
1179
+
1180
+ # query parameters
1181
+ query_params = opts[:query_params] || {}
1182
+
1183
+ # header parameters
1184
+ header_params = opts[:header_params] || {}
1185
+ # HTTP header 'Accept' (if needed)
1186
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1187
+
1188
+ # form parameters
1189
+ form_params = opts[:form_params] || {}
1190
+
1191
+ # http body (model)
1192
+ post_body = opts[:debug_body]
1193
+
1194
+ # return_type
1195
+ return_type = opts[:debug_return_type] || 'CustomCostsFileGetResponse'
1196
+
1197
+ # auth_names
1198
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1199
+
1200
+ new_options = opts.merge(
1201
+ :operation => :get_custom_costs_file,
1202
+ :header_params => header_params,
1203
+ :query_params => query_params,
1204
+ :form_params => form_params,
1205
+ :body => post_body,
1206
+ :auth_names => auth_names,
1207
+ :return_type => return_type,
1208
+ :api_version => "V2"
1209
+ )
1210
+
1211
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1212
+ if @api_client.config.debugging
1213
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_custom_costs_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1214
+ end
1215
+ return data, status_code, headers
1216
+ end
1217
+
1218
+ # Get ruleset.
1219
+ #
1220
+ # @see #get_ruleset_with_http_info
1221
+ def get_ruleset(ruleset_id, opts = {})
1222
+ data, _status_code, _headers = get_ruleset_with_http_info(ruleset_id, opts)
1223
+ data
1224
+ end
1225
+
1226
+ # Get ruleset.
1227
+ #
1228
+ # Get a specific tag pipeline ruleset - Retrieve a specific tag pipeline ruleset by its ID
1229
+ #
1230
+ # @param ruleset_id [String] The unique identifier of the ruleset
1231
+ # @param opts [Hash] the optional parameters
1232
+ # @return [Array<(RulesetResp, Integer, Hash)>] RulesetResp data, response status code and response headers
1233
+ def get_ruleset_with_http_info(ruleset_id, opts = {})
1234
+
1235
+ if @api_client.config.debugging
1236
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.get_ruleset ...'
1237
+ end
1238
+ # verify the required parameter 'ruleset_id' is set
1239
+ if @api_client.config.client_side_validation && ruleset_id.nil?
1240
+ fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling CloudCostManagementAPI.get_ruleset"
1241
+ end
1242
+ # resource path
1243
+ local_var_path = '/api/v2/tags/enrichment/{ruleset_id}'.sub('{ruleset_id}', CGI.escape(ruleset_id.to_s).gsub('%2F', '/'))
1244
+
1245
+ # query parameters
1246
+ query_params = opts[:query_params] || {}
1247
+
1248
+ # header parameters
1249
+ header_params = opts[:header_params] || {}
1250
+ # HTTP header 'Accept' (if needed)
1251
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1252
+
1253
+ # form parameters
1254
+ form_params = opts[:form_params] || {}
1255
+
1256
+ # http body (model)
1257
+ post_body = opts[:debug_body]
1258
+
1259
+ # return_type
1260
+ return_type = opts[:debug_return_type] || 'RulesetResp'
1261
+
1262
+ # auth_names
1263
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1264
+
1265
+ new_options = opts.merge(
1266
+ :operation => :get_ruleset,
1267
+ :header_params => header_params,
1268
+ :query_params => query_params,
1269
+ :form_params => form_params,
1270
+ :body => post_body,
1271
+ :auth_names => auth_names,
1272
+ :return_type => return_type,
1273
+ :api_version => "V2"
1274
+ )
1275
+
1276
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1277
+ if @api_client.config.debugging
1278
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#get_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1279
+ end
1280
+ return data, status_code, headers
1281
+ end
1282
+
1283
+ # List arbitrary cost rules.
1284
+ #
1285
+ # @see #list_arbitrary_cost_rules_with_http_info
1286
+ def list_arbitrary_cost_rules(opts = {})
1287
+ data, _status_code, _headers = list_arbitrary_cost_rules_with_http_info(opts)
1288
+ data
1289
+ end
1290
+
1291
+ # List arbitrary cost rules.
1292
+ #
1293
+ # List all arbitrary cost rules - Retrieve a list of all arbitrary cost rules for the organization
1294
+ #
1295
+ # @param opts [Hash] the optional parameters
1296
+ # @return [Array<(ArbitraryRuleResponseArray, Integer, Hash)>] ArbitraryRuleResponseArray data, response status code and response headers
1297
+ def list_arbitrary_cost_rules_with_http_info(opts = {})
1298
+
1299
+ if @api_client.config.debugging
1300
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_arbitrary_cost_rules ...'
1301
+ end
1302
+ # resource path
1303
+ local_var_path = '/api/v2/cost/arbitrary_rule'
1304
+
1305
+ # query parameters
1306
+ query_params = opts[:query_params] || {}
1307
+
1308
+ # header parameters
1309
+ header_params = opts[:header_params] || {}
1310
+ # HTTP header 'Accept' (if needed)
1311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1312
+
1313
+ # form parameters
1314
+ form_params = opts[:form_params] || {}
1315
+
1316
+ # http body (model)
1317
+ post_body = opts[:debug_body]
1318
+
1319
+ # return_type
1320
+ return_type = opts[:debug_return_type] || 'ArbitraryRuleResponseArray'
1321
+
1322
+ # auth_names
1323
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1324
+
1325
+ new_options = opts.merge(
1326
+ :operation => :list_arbitrary_cost_rules,
1327
+ :header_params => header_params,
1328
+ :query_params => query_params,
1329
+ :form_params => form_params,
1330
+ :body => post_body,
1331
+ :auth_names => auth_names,
1332
+ :return_type => return_type,
1333
+ :api_version => "V2"
1334
+ )
1335
+
1336
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1337
+ if @api_client.config.debugging
1338
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_arbitrary_cost_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1339
+ end
1340
+ return data, status_code, headers
1341
+ end
1342
+
1343
+ # List budgets.
1344
+ #
1345
+ # @see #list_budgets_with_http_info
1346
+ def list_budgets(opts = {})
1347
+ data, _status_code, _headers = list_budgets_with_http_info(opts)
1348
+ data
1349
+ end
1350
+
1351
+ # List budgets.
1352
+ #
1353
+ # List budgets.
1354
+ #
1355
+ # @param opts [Hash] the optional parameters
1356
+ # @return [Array<(BudgetArray, Integer, Hash)>] BudgetArray data, response status code and response headers
1357
+ def list_budgets_with_http_info(opts = {})
1358
+
1359
+ if @api_client.config.debugging
1360
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_budgets ...'
1361
+ end
1362
+ # resource path
1363
+ local_var_path = '/api/v2/cost/budgets'
1364
+
1365
+ # query parameters
1366
+ query_params = opts[:query_params] || {}
1367
+
1368
+ # header parameters
1369
+ header_params = opts[:header_params] || {}
1370
+ # HTTP header 'Accept' (if needed)
1371
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1372
+
1373
+ # form parameters
1374
+ form_params = opts[:form_params] || {}
1375
+
1376
+ # http body (model)
1377
+ post_body = opts[:debug_body]
1378
+
1379
+ # return_type
1380
+ return_type = opts[:debug_return_type] || 'BudgetArray'
1381
+
1382
+ # auth_names
1383
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1384
+
1385
+ new_options = opts.merge(
1386
+ :operation => :list_budgets,
1387
+ :header_params => header_params,
1388
+ :query_params => query_params,
1389
+ :form_params => form_params,
1390
+ :body => post_body,
1391
+ :auth_names => auth_names,
1392
+ :return_type => return_type,
1393
+ :api_version => "V2"
1394
+ )
1395
+
1396
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1397
+ if @api_client.config.debugging
1398
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1399
+ end
1400
+ return data, status_code, headers
1401
+ end
1402
+
1403
+ # List Cloud Cost Management AWS CUR configs.
1404
+ #
1405
+ # @see #list_cost_awscur_configs_with_http_info
1406
+ def list_cost_awscur_configs(opts = {})
1407
+ data, _status_code, _headers = list_cost_awscur_configs_with_http_info(opts)
1408
+ data
1409
+ end
1410
+
1411
+ # List Cloud Cost Management AWS CUR configs.
1412
+ #
1413
+ # List the AWS CUR configs.
1414
+ #
1415
+ # @param opts [Hash] the optional parameters
1416
+ # @return [Array<(AwsCURConfigsResponse, Integer, Hash)>] AwsCURConfigsResponse data, response status code and response headers
1417
+ def list_cost_awscur_configs_with_http_info(opts = {})
1418
+
1419
+ if @api_client.config.debugging
1420
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_awscur_configs ...'
1421
+ end
1422
+ # resource path
1423
+ local_var_path = '/api/v2/cost/aws_cur_config'
1424
+
1425
+ # query parameters
1426
+ query_params = opts[:query_params] || {}
1427
+
1428
+ # header parameters
1429
+ header_params = opts[:header_params] || {}
1430
+ # HTTP header 'Accept' (if needed)
1431
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1432
+
1433
+ # form parameters
1434
+ form_params = opts[:form_params] || {}
1435
+
1436
+ # http body (model)
1437
+ post_body = opts[:debug_body]
1438
+
1439
+ # return_type
1440
+ return_type = opts[:debug_return_type] || 'AwsCURConfigsResponse'
1441
+
1442
+ # auth_names
1443
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1444
+
1445
+ new_options = opts.merge(
1446
+ :operation => :list_cost_awscur_configs,
1447
+ :header_params => header_params,
1448
+ :query_params => query_params,
1449
+ :form_params => form_params,
1450
+ :body => post_body,
1451
+ :auth_names => auth_names,
1452
+ :return_type => return_type,
1453
+ :api_version => "V2"
1454
+ )
1455
+
1456
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1457
+ if @api_client.config.debugging
1458
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_awscur_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1459
+ end
1460
+ return data, status_code, headers
1461
+ end
1462
+
1463
+ # List Cloud Cost Management Azure configs.
1464
+ #
1465
+ # @see #list_cost_azure_uc_configs_with_http_info
1466
+ def list_cost_azure_uc_configs(opts = {})
1467
+ data, _status_code, _headers = list_cost_azure_uc_configs_with_http_info(opts)
1468
+ data
1469
+ end
1470
+
1471
+ # List Cloud Cost Management Azure configs.
1472
+ #
1473
+ # List the Azure configs.
1474
+ #
1475
+ # @param opts [Hash] the optional parameters
1476
+ # @return [Array<(AzureUCConfigsResponse, Integer, Hash)>] AzureUCConfigsResponse data, response status code and response headers
1477
+ def list_cost_azure_uc_configs_with_http_info(opts = {})
1478
+
1479
+ if @api_client.config.debugging
1480
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_azure_uc_configs ...'
1481
+ end
1482
+ # resource path
1483
+ local_var_path = '/api/v2/cost/azure_uc_config'
1484
+
1485
+ # query parameters
1486
+ query_params = opts[:query_params] || {}
1487
+
1488
+ # header parameters
1489
+ header_params = opts[:header_params] || {}
1490
+ # HTTP header 'Accept' (if needed)
1491
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1492
+
1493
+ # form parameters
1494
+ form_params = opts[:form_params] || {}
1495
+
1496
+ # http body (model)
1497
+ post_body = opts[:debug_body]
1498
+
1499
+ # return_type
1500
+ return_type = opts[:debug_return_type] || 'AzureUCConfigsResponse'
1501
+
1502
+ # auth_names
1503
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1504
+
1505
+ new_options = opts.merge(
1506
+ :operation => :list_cost_azure_uc_configs,
1507
+ :header_params => header_params,
1508
+ :query_params => query_params,
1509
+ :form_params => form_params,
1510
+ :body => post_body,
1511
+ :auth_names => auth_names,
1512
+ :return_type => return_type,
1513
+ :api_version => "V2"
1514
+ )
1515
+
1516
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1517
+ if @api_client.config.debugging
1518
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1519
+ end
1520
+ return data, status_code, headers
1521
+ end
1522
+
1523
+ # List Google Cloud Usage Cost configs.
1524
+ #
1525
+ # @see #list_cost_gcp_usage_cost_configs_with_http_info
1526
+ def list_cost_gcp_usage_cost_configs(opts = {})
1527
+ data, _status_code, _headers = list_cost_gcp_usage_cost_configs_with_http_info(opts)
1528
+ data
1529
+ end
1530
+
1531
+ # List Google Cloud Usage Cost configs.
1532
+ #
1533
+ # List the Google Cloud Usage Cost configs.
1534
+ #
1535
+ # @param opts [Hash] the optional parameters
1536
+ # @return [Array<(GCPUsageCostConfigsResponse, Integer, Hash)>] GCPUsageCostConfigsResponse data, response status code and response headers
1537
+ def list_cost_gcp_usage_cost_configs_with_http_info(opts = {})
1538
+
1539
+ if @api_client.config.debugging
1540
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_gcp_usage_cost_configs ...'
1541
+ end
1542
+ # resource path
1543
+ local_var_path = '/api/v2/cost/gcp_uc_config'
1544
+
1545
+ # query parameters
1546
+ query_params = opts[:query_params] || {}
1547
+
1548
+ # header parameters
1549
+ header_params = opts[:header_params] || {}
1550
+ # HTTP header 'Accept' (if needed)
1551
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1552
+
1553
+ # form parameters
1554
+ form_params = opts[:form_params] || {}
1555
+
1556
+ # http body (model)
1557
+ post_body = opts[:debug_body]
1558
+
1559
+ # return_type
1560
+ return_type = opts[:debug_return_type] || 'GCPUsageCostConfigsResponse'
1561
+
1562
+ # auth_names
1563
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1564
+
1565
+ new_options = opts.merge(
1566
+ :operation => :list_cost_gcp_usage_cost_configs,
1567
+ :header_params => header_params,
1568
+ :query_params => query_params,
1569
+ :form_params => form_params,
1570
+ :body => post_body,
1571
+ :auth_names => auth_names,
1572
+ :return_type => return_type,
1573
+ :api_version => "V2"
1574
+ )
1575
+
1576
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1577
+ if @api_client.config.debugging
1578
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_gcp_usage_cost_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1579
+ end
1580
+ return data, status_code, headers
1581
+ end
1582
+
1583
+ # List Custom Costs files.
1584
+ #
1585
+ # @see #list_custom_costs_files_with_http_info
1586
+ def list_custom_costs_files(opts = {})
1587
+ data, _status_code, _headers = list_custom_costs_files_with_http_info(opts)
1588
+ data
1589
+ end
1590
+
1591
+ # List Custom Costs files.
1592
+ #
1593
+ # List the Custom Costs files.
1594
+ #
1595
+ # @param opts [Hash] the optional parameters
1596
+ # @option opts [Integer] :page_number Page number for pagination
1597
+ # @option opts [Integer] :page_size Page size for pagination
1598
+ # @option opts [String] :filter_status Filter by file status
1599
+ # @option opts [String] :sort Sort key with optional descending prefix
1600
+ # @return [Array<(CustomCostsFileListResponse, Integer, Hash)>] CustomCostsFileListResponse data, response status code and response headers
1601
+ def list_custom_costs_files_with_http_info(opts = {})
1602
+
1603
+ if @api_client.config.debugging
1604
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_custom_costs_files ...'
1605
+ end
1606
+ # resource path
1607
+ local_var_path = '/api/v2/cost/custom_costs'
1608
+
1609
+ # query parameters
1610
+ query_params = opts[:query_params] || {}
1611
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
1612
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
1613
+ query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
1614
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1615
+
1616
+ # header parameters
1617
+ header_params = opts[:header_params] || {}
1618
+ # HTTP header 'Accept' (if needed)
1619
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1620
+
1621
+ # form parameters
1622
+ form_params = opts[:form_params] || {}
1623
+
1624
+ # http body (model)
1625
+ post_body = opts[:debug_body]
1626
+
1627
+ # return_type
1628
+ return_type = opts[:debug_return_type] || 'CustomCostsFileListResponse'
1629
+
1630
+ # auth_names
1631
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1632
+
1633
+ new_options = opts.merge(
1634
+ :operation => :list_custom_costs_files,
1635
+ :header_params => header_params,
1636
+ :query_params => query_params,
1637
+ :form_params => form_params,
1638
+ :body => post_body,
1639
+ :auth_names => auth_names,
1640
+ :return_type => return_type,
1641
+ :api_version => "V2"
1642
+ )
1643
+
1644
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1645
+ if @api_client.config.debugging
1646
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_custom_costs_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1647
+ end
1648
+ return data, status_code, headers
1649
+ end
1650
+
1651
+ # List rulesets.
1652
+ #
1653
+ # @see #list_rulesets_with_http_info
1654
+ def list_rulesets(opts = {})
1655
+ data, _status_code, _headers = list_rulesets_with_http_info(opts)
1656
+ data
1657
+ end
1658
+
1659
+ # List rulesets.
1660
+ #
1661
+ # List all tag pipeline rulesets - Retrieve a list of all tag pipeline rulesets for the organization
1662
+ #
1663
+ # @param opts [Hash] the optional parameters
1664
+ # @return [Array<(RulesetRespArray, Integer, Hash)>] RulesetRespArray data, response status code and response headers
1665
+ def list_rulesets_with_http_info(opts = {})
1666
+
1667
+ if @api_client.config.debugging
1668
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_rulesets ...'
820
1669
  end
821
1670
  # resource path
822
- local_var_path = '/api/v2/cost/azure_uc_config'
1671
+ local_var_path = '/api/v2/tags/enrichment'
823
1672
 
824
1673
  # query parameters
825
1674
  query_params = opts[:query_params] || {}
@@ -836,13 +1685,13 @@ module DatadogAPIClient::V2
836
1685
  post_body = opts[:debug_body]
837
1686
 
838
1687
  # return_type
839
- return_type = opts[:debug_return_type] || 'AzureUCConfigsResponse'
1688
+ return_type = opts[:debug_return_type] || 'RulesetRespArray'
840
1689
 
841
1690
  # auth_names
842
1691
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
843
1692
 
844
1693
  new_options = opts.merge(
845
- :operation => :list_cost_azure_uc_configs,
1694
+ :operation => :list_rulesets,
846
1695
  :header_params => header_params,
847
1696
  :query_params => query_params,
848
1697
  :form_params => form_params,
@@ -854,32 +1703,43 @@ module DatadogAPIClient::V2
854
1703
 
855
1704
  data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
856
1705
  if @api_client.config.debugging
857
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_azure_uc_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1706
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
858
1707
  end
859
1708
  return data, status_code, headers
860
1709
  end
861
1710
 
862
- # List Cloud Cost Management GCP Usage Cost configs.
1711
+ # Reorder arbitrary cost rules.
863
1712
  #
864
- # @see #list_cost_gcp_usage_cost_configs_with_http_info
865
- def list_cost_gcp_usage_cost_configs(opts = {})
866
- data, _status_code, _headers = list_cost_gcp_usage_cost_configs_with_http_info(opts)
867
- data
1713
+ # @see #reorder_arbitrary_cost_rules_with_http_info
1714
+ def reorder_arbitrary_cost_rules(body, opts = {})
1715
+ reorder_arbitrary_cost_rules_with_http_info(body, opts)
1716
+ nil
868
1717
  end
869
1718
 
870
- # List Cloud Cost Management GCP Usage Cost configs.
1719
+ # Reorder arbitrary cost rules.
871
1720
  #
872
- # List the GCP Usage Cost configs.
1721
+ # Reorder arbitrary cost rules - Change the execution order of arbitrary cost rules.
873
1722
  #
1723
+ # **Important**: You must provide the **complete list** of all rule IDs in the desired execution order. The API will reorder ALL rules according to the provided sequence.
1724
+ #
1725
+ # Rules are executed in the order specified, with lower indices (earlier in the array) having higher priority.
1726
+ #
1727
+ # **Example**: If you have rules with IDs [123, 456, 789] and want to change order from 123→456→789 to 456→123→789, send: [{"id": "456"}, {"id": "123"}, {"id": "789"}]
1728
+ #
1729
+ # @param body [ReorderRuleResourceArray]
874
1730
  # @param opts [Hash] the optional parameters
875
- # @return [Array<(GCPUsageCostConfigsResponse, Integer, Hash)>] GCPUsageCostConfigsResponse data, response status code and response headers
876
- def list_cost_gcp_usage_cost_configs_with_http_info(opts = {})
1731
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1732
+ def reorder_arbitrary_cost_rules_with_http_info(body, opts = {})
877
1733
 
878
1734
  if @api_client.config.debugging
879
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_gcp_usage_cost_configs ...'
1735
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.reorder_arbitrary_cost_rules ...'
1736
+ end
1737
+ # verify the required parameter 'body' is set
1738
+ if @api_client.config.client_side_validation && body.nil?
1739
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.reorder_arbitrary_cost_rules"
880
1740
  end
881
1741
  # resource path
882
- local_var_path = '/api/v2/cost/gcp_uc_config'
1742
+ local_var_path = '/api/v2/cost/arbitrary_rule/reorder'
883
1743
 
884
1744
  # query parameters
885
1745
  query_params = opts[:query_params] || {}
@@ -887,22 +1747,24 @@ module DatadogAPIClient::V2
887
1747
  # header parameters
888
1748
  header_params = opts[:header_params] || {}
889
1749
  # HTTP header 'Accept' (if needed)
890
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1750
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1751
+ # HTTP header 'Content-Type'
1752
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
891
1753
 
892
1754
  # form parameters
893
1755
  form_params = opts[:form_params] || {}
894
1756
 
895
1757
  # http body (model)
896
- post_body = opts[:debug_body]
1758
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
897
1759
 
898
1760
  # return_type
899
- return_type = opts[:debug_return_type] || 'GCPUsageCostConfigsResponse'
1761
+ return_type = opts[:debug_return_type]
900
1762
 
901
1763
  # auth_names
902
1764
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
903
1765
 
904
1766
  new_options = opts.merge(
905
- :operation => :list_cost_gcp_usage_cost_configs,
1767
+ :operation => :reorder_arbitrary_cost_rules,
906
1768
  :header_params => header_params,
907
1769
  :query_params => query_params,
908
1770
  :form_params => form_params,
@@ -912,65 +1774,149 @@ module DatadogAPIClient::V2
912
1774
  :api_version => "V2"
913
1775
  )
914
1776
 
915
- data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1777
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
916
1778
  if @api_client.config.debugging
917
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_gcp_usage_cost_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1779
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#reorder_arbitrary_cost_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
918
1780
  end
919
1781
  return data, status_code, headers
920
1782
  end
921
1783
 
922
- # List Custom Costs files.
1784
+ # Reorder rulesets.
923
1785
  #
924
- # @see #list_custom_costs_files_with_http_info
925
- def list_custom_costs_files(opts = {})
926
- data, _status_code, _headers = list_custom_costs_files_with_http_info(opts)
1786
+ # @see #reorder_rulesets_with_http_info
1787
+ def reorder_rulesets(body, opts = {})
1788
+ reorder_rulesets_with_http_info(body, opts)
1789
+ nil
1790
+ end
1791
+
1792
+ # Reorder rulesets.
1793
+ #
1794
+ # Reorder tag pipeline rulesets - Change the execution order of tag pipeline rulesets
1795
+ #
1796
+ # @param body [ReorderRulesetResourceArray]
1797
+ # @param opts [Hash] the optional parameters
1798
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1799
+ def reorder_rulesets_with_http_info(body, opts = {})
1800
+
1801
+ if @api_client.config.debugging
1802
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.reorder_rulesets ...'
1803
+ end
1804
+ # verify the required parameter 'body' is set
1805
+ if @api_client.config.client_side_validation && body.nil?
1806
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.reorder_rulesets"
1807
+ end
1808
+ # resource path
1809
+ local_var_path = '/api/v2/tags/enrichment/reorder'
1810
+
1811
+ # query parameters
1812
+ query_params = opts[:query_params] || {}
1813
+
1814
+ # header parameters
1815
+ header_params = opts[:header_params] || {}
1816
+ # HTTP header 'Accept' (if needed)
1817
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1818
+ # HTTP header 'Content-Type'
1819
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1820
+
1821
+ # form parameters
1822
+ form_params = opts[:form_params] || {}
1823
+
1824
+ # http body (model)
1825
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
1826
+
1827
+ # return_type
1828
+ return_type = opts[:debug_return_type]
1829
+
1830
+ # auth_names
1831
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1832
+
1833
+ new_options = opts.merge(
1834
+ :operation => :reorder_rulesets,
1835
+ :header_params => header_params,
1836
+ :query_params => query_params,
1837
+ :form_params => form_params,
1838
+ :body => post_body,
1839
+ :auth_names => auth_names,
1840
+ :return_type => return_type,
1841
+ :api_version => "V2"
1842
+ )
1843
+
1844
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
1845
+ if @api_client.config.debugging
1846
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#reorder_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1847
+ end
1848
+ return data, status_code, headers
1849
+ end
1850
+
1851
+ # Update arbitrary cost rule.
1852
+ #
1853
+ # @see #update_arbitrary_cost_rule_with_http_info
1854
+ def update_arbitrary_cost_rule(rule_id, body, opts = {})
1855
+ data, _status_code, _headers = update_arbitrary_cost_rule_with_http_info(rule_id, body, opts)
927
1856
  data
928
1857
  end
929
1858
 
930
- # List Custom Costs files.
1859
+ # Update arbitrary cost rule.
931
1860
  #
932
- # List the Custom Costs files.
1861
+ # Update an existing arbitrary cost rule with new filters and allocation strategy.
1862
+ #
1863
+ # **Strategy Methods:**
1864
+ # - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters.
1865
+ # - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys.
1866
+ # - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by (array of percentage allocations).
1867
+ # - **USAGE_METRIC**: Allocates based on usage metrics (implementation varies).
933
1868
  #
1869
+ # **Filter Conditions:**
1870
+ # - Use **value** for single-value conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is all values", "is untagged"
1871
+ # - Use **values** for multi-value conditions: "in", "not in"
1872
+ # - Cannot use both value and values simultaneously.
1873
+ #
1874
+ # **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like
1875
+ #
1876
+ # @param rule_id [Integer] The unique identifier of the arbitrary cost rule
1877
+ # @param body [ArbitraryCostUpsertRequest]
934
1878
  # @param opts [Hash] the optional parameters
935
- # @option opts [Integer] :page_number Page number for pagination
936
- # @option opts [Integer] :page_size Page size for pagination
937
- # @option opts [String] :filter_status Filter by file status
938
- # @option opts [String] :sort Sort key with optional descending prefix
939
- # @return [Array<(CustomCostsFileListResponse, Integer, Hash)>] CustomCostsFileListResponse data, response status code and response headers
940
- def list_custom_costs_files_with_http_info(opts = {})
1879
+ # @return [Array<(ArbitraryRuleResponse, Integer, Hash)>] ArbitraryRuleResponse data, response status code and response headers
1880
+ def update_arbitrary_cost_rule_with_http_info(rule_id, body, opts = {})
941
1881
 
942
1882
  if @api_client.config.debugging
943
- @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_custom_costs_files ...'
1883
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_arbitrary_cost_rule ...'
1884
+ end
1885
+ # verify the required parameter 'rule_id' is set
1886
+ if @api_client.config.client_side_validation && rule_id.nil?
1887
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudCostManagementAPI.update_arbitrary_cost_rule"
1888
+ end
1889
+ # verify the required parameter 'body' is set
1890
+ if @api_client.config.client_side_validation && body.nil?
1891
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_arbitrary_cost_rule"
944
1892
  end
945
1893
  # resource path
946
- local_var_path = '/api/v2/cost/custom_costs'
1894
+ local_var_path = '/api/v2/cost/arbitrary_rule/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
947
1895
 
948
1896
  # query parameters
949
1897
  query_params = opts[:query_params] || {}
950
- query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
951
- query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
952
- query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
953
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
954
1898
 
955
1899
  # header parameters
956
1900
  header_params = opts[:header_params] || {}
957
1901
  # HTTP header 'Accept' (if needed)
958
1902
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1903
+ # HTTP header 'Content-Type'
1904
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
959
1905
 
960
1906
  # form parameters
961
1907
  form_params = opts[:form_params] || {}
962
1908
 
963
1909
  # http body (model)
964
- post_body = opts[:debug_body]
1910
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
965
1911
 
966
1912
  # return_type
967
- return_type = opts[:debug_return_type] || 'CustomCostsFileListResponse'
1913
+ return_type = opts[:debug_return_type] || 'ArbitraryRuleResponse'
968
1914
 
969
1915
  # auth_names
970
1916
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
971
1917
 
972
1918
  new_options = opts.merge(
973
- :operation => :list_custom_costs_files,
1919
+ :operation => :update_arbitrary_cost_rule,
974
1920
  :header_params => header_params,
975
1921
  :query_params => query_params,
976
1922
  :form_params => form_params,
@@ -980,9 +1926,9 @@ module DatadogAPIClient::V2
980
1926
  :api_version => "V2"
981
1927
  )
982
1928
 
983
- data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
1929
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
984
1930
  if @api_client.config.debugging
985
- @api_client.config.logger.debug "API called: CloudCostManagementAPI#list_custom_costs_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1931
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#update_arbitrary_cost_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
986
1932
  end
987
1933
  return data, status_code, headers
988
1934
  end
@@ -1131,7 +2077,7 @@ module DatadogAPIClient::V2
1131
2077
  return data, status_code, headers
1132
2078
  end
1133
2079
 
1134
- # Update Cloud Cost Management GCP Usage Cost config.
2080
+ # Update Google Cloud Usage Cost config.
1135
2081
  #
1136
2082
  # @see #update_cost_gcp_usage_cost_config_with_http_info
1137
2083
  def update_cost_gcp_usage_cost_config(cloud_account_id, body, opts = {})
@@ -1139,9 +2085,9 @@ module DatadogAPIClient::V2
1139
2085
  data
1140
2086
  end
1141
2087
 
1142
- # Update Cloud Cost Management GCP Usage Cost config.
2088
+ # Update Google Cloud Usage Cost config.
1143
2089
  #
1144
- # Update the status of an GCP Usage Cost config (active/archived).
2090
+ # Update the status of an Google Cloud Usage Cost config (active/archived).
1145
2091
  #
1146
2092
  # @param cloud_account_id [Integer] Cloud Account id.
1147
2093
  # @param body [GCPUsageCostConfigPatchRequest]
@@ -1203,6 +2149,78 @@ module DatadogAPIClient::V2
1203
2149
  return data, status_code, headers
1204
2150
  end
1205
2151
 
2152
+ # Update ruleset.
2153
+ #
2154
+ # @see #update_ruleset_with_http_info
2155
+ def update_ruleset(ruleset_id, body, opts = {})
2156
+ data, _status_code, _headers = update_ruleset_with_http_info(ruleset_id, body, opts)
2157
+ data
2158
+ end
2159
+
2160
+ # Update ruleset.
2161
+ #
2162
+ # Update a tag pipeline ruleset - Update an existing tag pipeline ruleset with new rules and configuration
2163
+ #
2164
+ # @param ruleset_id [String] The unique identifier of the ruleset
2165
+ # @param body [UpdateRulesetRequest]
2166
+ # @param opts [Hash] the optional parameters
2167
+ # @return [Array<(RulesetResp, Integer, Hash)>] RulesetResp data, response status code and response headers
2168
+ def update_ruleset_with_http_info(ruleset_id, body, opts = {})
2169
+
2170
+ if @api_client.config.debugging
2171
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.update_ruleset ...'
2172
+ end
2173
+ # verify the required parameter 'ruleset_id' is set
2174
+ if @api_client.config.client_side_validation && ruleset_id.nil?
2175
+ fail ArgumentError, "Missing the required parameter 'ruleset_id' when calling CloudCostManagementAPI.update_ruleset"
2176
+ end
2177
+ # verify the required parameter 'body' is set
2178
+ if @api_client.config.client_side_validation && body.nil?
2179
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.update_ruleset"
2180
+ end
2181
+ # resource path
2182
+ local_var_path = '/api/v2/tags/enrichment/{ruleset_id}'.sub('{ruleset_id}', CGI.escape(ruleset_id.to_s).gsub('%2F', '/'))
2183
+
2184
+ # query parameters
2185
+ query_params = opts[:query_params] || {}
2186
+
2187
+ # header parameters
2188
+ header_params = opts[:header_params] || {}
2189
+ # HTTP header 'Accept' (if needed)
2190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2191
+ # HTTP header 'Content-Type'
2192
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2193
+
2194
+ # form parameters
2195
+ form_params = opts[:form_params] || {}
2196
+
2197
+ # http body (model)
2198
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2199
+
2200
+ # return_type
2201
+ return_type = opts[:debug_return_type] || 'RulesetResp'
2202
+
2203
+ # auth_names
2204
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
2205
+
2206
+ new_options = opts.merge(
2207
+ :operation => :update_ruleset,
2208
+ :header_params => header_params,
2209
+ :query_params => query_params,
2210
+ :form_params => form_params,
2211
+ :body => post_body,
2212
+ :auth_names => auth_names,
2213
+ :return_type => return_type,
2214
+ :api_version => "V2"
2215
+ )
2216
+
2217
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
2218
+ if @api_client.config.debugging
2219
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#update_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2220
+ end
2221
+ return data, status_code, headers
2222
+ end
2223
+
1206
2224
  # Upload Custom Costs file.
1207
2225
  #
1208
2226
  # @see #upload_custom_costs_file_with_http_info
@@ -1336,5 +2354,72 @@ module DatadogAPIClient::V2
1336
2354
  end
1337
2355
  return data, status_code, headers
1338
2356
  end
2357
+
2358
+ # Validate query.
2359
+ #
2360
+ # @see #validate_query_with_http_info
2361
+ def validate_query(body, opts = {})
2362
+ data, _status_code, _headers = validate_query_with_http_info(body, opts)
2363
+ data
2364
+ end
2365
+
2366
+ # Validate query.
2367
+ #
2368
+ # Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query
2369
+ #
2370
+ # @param body [RulesValidateQueryRequest]
2371
+ # @param opts [Hash] the optional parameters
2372
+ # @return [Array<(RulesValidateQueryResponse, Integer, Hash)>] RulesValidateQueryResponse data, response status code and response headers
2373
+ def validate_query_with_http_info(body, opts = {})
2374
+
2375
+ if @api_client.config.debugging
2376
+ @api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.validate_query ...'
2377
+ end
2378
+ # verify the required parameter 'body' is set
2379
+ if @api_client.config.client_side_validation && body.nil?
2380
+ fail ArgumentError, "Missing the required parameter 'body' when calling CloudCostManagementAPI.validate_query"
2381
+ end
2382
+ # resource path
2383
+ local_var_path = '/api/v2/tags/enrichment/validate-query'
2384
+
2385
+ # query parameters
2386
+ query_params = opts[:query_params] || {}
2387
+
2388
+ # header parameters
2389
+ header_params = opts[:header_params] || {}
2390
+ # HTTP header 'Accept' (if needed)
2391
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2392
+ # HTTP header 'Content-Type'
2393
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2394
+
2395
+ # form parameters
2396
+ form_params = opts[:form_params] || {}
2397
+
2398
+ # http body (model)
2399
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2400
+
2401
+ # return_type
2402
+ return_type = opts[:debug_return_type] || 'RulesValidateQueryResponse'
2403
+
2404
+ # auth_names
2405
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
2406
+
2407
+ new_options = opts.merge(
2408
+ :operation => :validate_query,
2409
+ :header_params => header_params,
2410
+ :query_params => query_params,
2411
+ :form_params => form_params,
2412
+ :body => post_body,
2413
+ :auth_names => auth_names,
2414
+ :return_type => return_type,
2415
+ :api_version => "V2"
2416
+ )
2417
+
2418
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
2419
+ if @api_client.config.debugging
2420
+ @api_client.config.logger.debug "API called: CloudCostManagementAPI#validate_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2421
+ end
2422
+ return data, status_code, headers
2423
+ end
1339
2424
  end
1340
2425
  end