From 7c85a9cf4d96f7d5d824788b7dd3ea83420a1d44 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 10 Oct 2025 16:42:08 +0000 Subject: [PATCH] Regenerate client from commit 71b8c65 of spec repo --- .generator/schemas/v2/openapi.yaml | 334 +++- ...e.java => CreateCustomAllocationRule.java} | 7 +- ...et.java => CreateTagPipelinesRuleset.java} | 6 +- ...t.java => DeleteCustomAllocationRule.java} | 7 +- ...le.java => DeleteTagPipelinesRuleset.java} | 6 +- ...Rule.java => GetCustomAllocationRule.java} | 6 +- ...leset.java => GetTagPipelinesRuleset.java} | 4 +- .../GetTagPipelinesRuleset_2339377367.java | 25 + ...es.java => ListCustomAllocationRules.java} | 6 +- ...ets.java => ListTagPipelinesRulesets.java} | 6 +- ...java => ReorderCustomAllocationRules.java} | 7 +- ....java => ReorderTagPipelinesRulesets.java} | 21 +- ...e.java => UpdateCustomAllocationRule.java} | 7 +- ...et.java => UpdateTagPipelinesRuleset.java} | 10 +- .../client/v2/api/CloudCostManagementApi.java | 1425 +++++++++-------- .../v2/model/ArbitraryRuleResponseArray.java | 34 +- .../model/ArbitraryRuleResponseArrayMeta.java | 137 ++ .../ArbitraryRuleResponseDataAttributes.java | 29 + .../v2/model/RulesetRespDataAttributes.java | 28 + ...trary_cost_rule_returns_OK_response.freeze | 1 - ...allocation_rule_returns_OK_response.freeze | 1 + ...m_allocation_rule_returns_OK_response.json | 32 + .../Create_ruleset_returns_OK_response.freeze | 1 - ...ipeline_ruleset_returns_OK_response.freeze | 1 + ...pipeline_ruleset_returns_OK_response.json} | 2 +- ...st_rule_returns_No_Content_response.freeze | 1 - ...on_rule_returns_No_Content_response.freeze | 1 + ...ion_rule_returns_No_Content_response.json} | 4 +- ...ruleset_returns_No_Content_response.freeze | 1 - ...ruleset_returns_No_Content_response.freeze | 1 + ..._ruleset_returns_No_Content_response.json} | 4 +- ...trary_cost_rule_returns_OK_response.freeze | 1 - ...bitrary_cost_rule_returns_OK_response.json | 28 - ...allocation_rule_returns_OK_response.freeze | 1 + ...m_allocation_rule_returns_OK_response.json | 28 + .../v2/Get_ruleset_returns_OK_response.freeze | 1 - .../v2/Get_ruleset_returns_OK_response.json | 28 - ...ipeline_ruleset_returns_OK_response.freeze | 1 + ..._pipeline_ruleset_returns_OK_response.json | 28 + ...rary_cost_rules_returns_OK_response.freeze | 1 - ...itrary_cost_rules_returns_OK_response.json | 28 - ...llocation_rules_returns_OK_response.freeze | 1 + ..._allocation_rules_returns_OK_response.json | 28 + .../List_rulesets_returns_OK_response.freeze | 1 - .../v2/List_rulesets_returns_OK_response.json | 28 - ...peline_rulesets_returns_OK_response.freeze | 1 + ...pipeline_rulesets_returns_OK_response.json | 28 + ...trary_cost_rule_returns_OK_response.freeze | 1 - ...bitrary_cost_rule_returns_OK_response.json | 32 - ...allocation_rule_returns_OK_response.freeze | 1 + ..._allocation_rule_returns_OK_response.json} | 8 +- .../Update_ruleset_returns_OK_response.freeze | 1 - .../Update_ruleset_returns_OK_response.json | 32 - ...ipeline_ruleset_returns_OK_response.freeze | 1 + ..._pipeline_ruleset_returns_OK_response.json | 32 + .../v2/api/cloud_cost_management.feature | 209 +-- .../com/datadog/api/client/v2/api/undo.json | 24 +- 57 files changed, 1633 insertions(+), 1095 deletions(-) rename examples/v2/cloud-cost-management/{CreateArbitraryCostRule.java => CreateCustomAllocationRule.java} (93%) rename examples/v2/cloud-cost-management/{CreateRuleset.java => CreateTagPipelinesRuleset.java} (94%) rename examples/v2/cloud-cost-management/{DeleteRuleset.java => DeleteCustomAllocationRule.java} (73%) rename examples/v2/cloud-cost-management/{DeleteArbitraryCostRule.java => DeleteTagPipelinesRuleset.java} (79%) rename examples/v2/cloud-cost-management/{GetArbitraryCostRule.java => GetCustomAllocationRule.java} (82%) rename examples/v2/cloud-cost-management/{GetRuleset.java => GetTagPipelinesRuleset.java} (87%) create mode 100644 examples/v2/cloud-cost-management/GetTagPipelinesRuleset_2339377367.java rename examples/v2/cloud-cost-management/{ListArbitraryCostRules.java => ListCustomAllocationRules.java} (82%) rename examples/v2/cloud-cost-management/{ListRulesets.java => ListTagPipelinesRulesets.java} (83%) rename examples/v2/cloud-cost-management/{ReorderArbitraryCostRules.java => ReorderCustomAllocationRules.java} (85%) rename examples/v2/cloud-cost-management/{ReorderRulesets.java => ReorderTagPipelinesRulesets.java} (51%) rename examples/v2/cloud-cost-management/{UpdateArbitraryCostRule.java => UpdateCustomAllocationRule.java} (93%) rename examples/v2/cloud-cost-management/{UpdateRuleset.java => UpdateTagPipelinesRuleset.java} (89%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArrayMeta.java delete mode 100644 src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.freeze rename src/test/resources/cassettes/features/v2/{Create_ruleset_returns_OK_response.json => Create_tag_pipeline_ruleset_returns_OK_response.json} (81%) delete mode 100644 src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.freeze rename src/test/resources/cassettes/features/v2/{Delete_arbitrary_cost_rule_returns_No_Content_response.json => Delete_custom_allocation_rule_returns_No_Content_response.json} (77%) delete mode 100644 src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.freeze rename src/test/resources/cassettes/features/v2/{Delete_ruleset_returns_No_Content_response.json => Delete_tag_pipeline_ruleset_returns_No_Content_response.json} (72%) delete mode 100644 src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.json delete mode 100644 src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.freeze rename src/test/resources/cassettes/features/v2/{Create_arbitrary_cost_rule_returns_OK_response.json => Update_custom_allocation_rule_returns_OK_response.json} (61%) delete mode 100644 src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze delete mode 100644 src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 10a5a5875cd..82aecd68139 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4260,7 +4260,7 @@ components: provider: - aws - gcp - rule_name: Example Arbitrary Cost Rule + rule_name: Example custom allocation rule strategy: allocated_by_tag_keys: - team @@ -4289,15 +4289,145 @@ components: type: object ArbitraryRuleResponseArray: description: The definition of `ArbitraryRuleResponseArray` object. + example: + data: + - attributes: + costs_to_allocate: + - condition: like + tag: service + value: orgstore-csm* + values: null + created: '2024-11-20T03:44:37Z' + enabled: true + last_modified_user_uuid: user-example-uuid + order_id: 1 + processing_status: done + provider: + - gcp + rule_name: gcp-orgstore-csm-team-allocation + strategy: + allocated_by: + - allocated_tags: + - key: team + value: csm-activation + percentage: 0.34 + - allocated_tags: + - key: team + value: csm-agentless + percentage: 0.66 + method: percent + type: shared + updated: '2025-09-02T21:28:32Z' + version: 1 + id: '19' + type: arbitrary_rule + - attributes: + costs_to_allocate: + - condition: is + tag: env + value: staging + values: null + created: '2025-05-27T18:48:05Z' + enabled: true + last_modified_user_uuid: user-example-uuid-2 + order_id: 2 + processing_status: done + provider: + - aws + rule_name: test-even-2 + strategy: + allocated_by_tag_keys: + - team + based_on_costs: + - condition: is + tag: aws_product + value: s3 + values: null + granularity: daily + method: even + type: shared + updated: '2025-09-03T21:00:49Z' + version: 1 + id: '311' + type: arbitrary_rule + - attributes: + costs_to_allocate: + - condition: is + tag: servicename + value: s3 + values: null + created: '2025-03-21T20:42:40Z' + enabled: false + last_modified_user_uuid: user-example-uuid-3 + order_id: 3 + processing_status: done + provider: + - aws + rule_name: test-s3-timeseries + strategy: + granularity: daily + method: proportional_timeseries + type: shared + updated: '2025-09-02T21:16:50Z' + version: 1 + id: '289' + type: arbitrary_rule + - attributes: + costs_to_allocate: + - condition: '=' + tag: aws_product + value: msk + values: null + - condition: is + tag: product + value: 'null' + values: null + created: '2025-08-27T14:39:31Z' + enabled: true + last_modified_user_uuid: user-example-uuid-4 + order_id: 4 + processing_status: done + provider: + - aws + rule_name: azure-unallocated-by-product-2 + strategy: + allocated_by_tag_keys: + - aws_product + based_on_costs: + - condition: '=' + tag: aws_product + value: msk + values: null + - condition: is not + tag: product + value: 'null' + values: null + granularity: daily + method: proportional + type: shared + updated: '2025-09-02T21:28:32Z' + version: 1 + id: '523' + type: arbitrary_rule properties: data: description: The `ArbitraryRuleResponseArray` `data`. items: $ref: '#/components/schemas/ArbitraryRuleResponseData' type: array + meta: + $ref: '#/components/schemas/ArbitraryRuleResponseArrayMeta' required: - data type: object + ArbitraryRuleResponseArrayMeta: + description: The `ArbitraryRuleResponseArray` `meta`. + properties: + total_count: + description: The `meta` `total_count`. + format: int64 + type: integer + type: object ArbitraryRuleResponseData: description: The definition of `ArbitraryRuleResponseData` object. properties: @@ -4337,6 +4467,10 @@ components: example: 0 format: int64 type: integer + processing_status: + description: The `attributes` `processing_status`. + example: '' + type: string provider: description: The `attributes` `provider`. example: @@ -38486,6 +38620,14 @@ components: - ARBITRARY_RULE ReorderRulesetResourceArray: description: The definition of `ReorderRulesetResourceArray` object. + example: + data: + - id: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: ruleset + - id: a7b8c9d0-1234-5678-9abc-def012345678 + type: ruleset + - id: f1e2d3c4-b5a6-9780-1234-567890abcdef + type: ruleset properties: data: description: The `ReorderRulesetResourceArray` `data`. @@ -39746,6 +39888,82 @@ components: type: object RulesetRespArray: description: The definition of `RulesetRespArray` object. + example: + data: + - attributes: + created: null + enabled: true + last_modified_user_uuid: '' + modified: null + name: Production Cost Allocation Rules + position: 0 + rules: + - enabled: true + mapping: null + metadata: null + name: AWS Production Account Tagging + query: + addition: + key: environment + value: production + case_insensitivity: false + if_not_exists: true + query: billingcurrency:"USD" AND account_name:"prod-account" + reference_table: null + - enabled: true + mapping: + destination_key: team_owner + if_not_exists: true + source_keys: + - account_name + - service + metadata: null + name: Team Mapping Rule + query: null + reference_table: null + - enabled: true + mapping: null + metadata: null + name: New table rule with new UI + query: null + reference_table: + case_insensitivity: true + field_pairs: + - input_column: status_type + output_key: status + - input_column: status_description + output_key: dess + if_not_exists: false + source_keys: + - http_status + - status_description + table_name: http_status_codes + version: 2 + id: 55ef2385-9ae1-4410-90c4-5ac1b60fec10 + type: ruleset + - attributes: + created: null + enabled: true + last_modified_user_uuid: '' + modified: null + name: Development Environment Rules + position: 0 + rules: + - enabled: true + mapping: null + metadata: null + name: Dev Account Cost Center + query: + addition: + key: cost_center + value: engineering + case_insensitivity: true + if_not_exists: true + query: account_name:"dev-*" + reference_table: null + version: 1 + id: a7b8c9d0-1234-5678-9abc-def012345678 + type: ruleset properties: data: description: The `RulesetRespArray` `data`. @@ -39793,6 +40011,10 @@ components: format: int32 maximum: 2147483647 type: integer + processing_status: + description: The `attributes` `processing_status`. + example: '' + type: string rules: description: The `attributes` `rules`. items: @@ -49984,7 +50206,20 @@ components: attributes: enabled: true last_version: 1 + name: Updated Ruleset rules: + - enabled: true + mapping: null + metadata: null + name: Add Cost Center Tag + query: + addition: + key: cost_center + value: engineering + case_insensitivity: false + if_not_exists: true + query: account_id:"123456789" AND service:"web-api" + reference_table: null - enabled: true mapping: destination_key: team_owner @@ -49996,6 +50231,23 @@ components: name: Account Name Mapping query: null reference_table: null + - enabled: true + mapping: null + metadata: null + name: New table rule with new UI + query: null + reference_table: + case_insensitivity: true + field_pairs: + - input_column: status_type + output_key: status + - input_column: status_description + output_key: dess + if_not_exists: false + source_keys: + - http_status + - status_description + table_name: http_status_codes type: update_ruleset properties: data: @@ -56472,9 +56724,9 @@ paths: permissions: [] /api/v2/cost/arbitrary_rule: get: - description: List all arbitrary cost rules - Retrieve a list of all arbitrary - cost rules for the organization - operationId: ListArbitraryCostRules + description: List all custom allocation rules - Retrieve a list of all custom + allocation rules for the organization + operationId: ListCustomAllocationRules responses: '200': content: @@ -56489,12 +56741,12 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: List arbitrary cost rules + summary: List custom allocation rules tags: - Cloud Cost Management post: - description: 'Create a new arbitrary cost rule with the specified filters and - allocation strategy. + description: 'Create a new custom allocation rule with the specified filters + and allocation strategy. **Strategy Methods:** @@ -56522,7 +56774,7 @@ paths: **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like' - operationId: CreateArbitraryCostRule + operationId: CreateCustomAllocationRule requestBody: content: application/json: @@ -56543,20 +56795,20 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Create arbitrary cost rule + summary: Create custom allocation rule tags: - Cloud Cost Management /api/v2/cost/arbitrary_rule/reorder: post: - description: "Reorder arbitrary cost rules - Change the execution order of arbitrary - cost rules.\n\n**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.\n\nRules are executed in the order specified, with - lower indices (earlier in the array) having higher priority.\n\n**Example**: + description: "Reorder custom allocation rules - Change the execution order of + custom allocation rules.\n\n**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.\n\nRules are executed in the + order specified, with lower indices (earlier in the array) having higher priority.\n\n**Example**: If you have rules with IDs [123, 456, 789] and want to change order from 123\u2192456\u2192789 to 456\u2192123\u2192789, send: [{\"id\": \"456\"}, {\"id\": \"123\"}, {\"id\": \"789\"}]" - operationId: ReorderArbitraryCostRules + operationId: ReorderCustomAllocationRules requestBody: content: application/json: @@ -56573,16 +56825,16 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Reorder arbitrary cost rules + summary: Reorder custom allocation rules tags: - Cloud Cost Management /api/v2/cost/arbitrary_rule/{rule_id}: delete: - description: Delete an arbitrary cost rule - Delete an existing arbitrary cost + description: Delete a custom allocation rule - Delete an existing custom allocation rule by its ID - operationId: DeleteArbitraryCostRule + operationId: DeleteCustomAllocationRule parameters: - - description: The unique identifier of the arbitrary cost rule + - description: The unique identifier of the custom allocation rule in: path name: rule_id required: true @@ -56599,15 +56851,15 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Delete arbitrary cost rule + summary: Delete custom allocation rule tags: - Cloud Cost Management get: - description: Get a specific arbitrary cost rule - Retrieve a specific arbitrary - cost rule by its ID - operationId: GetArbitraryCostRule + description: Get a specific custom allocation rule - Retrieve a specific custom + allocation rule by its ID + operationId: GetCustomAllocationRule parameters: - - description: The unique identifier of the arbitrary cost rule + - description: The unique identifier of the custom allocation rule in: path name: rule_id required: true @@ -56628,12 +56880,12 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: Get arbitrary cost rule + summary: Get custom allocation rule tags: - Cloud Cost Management patch: - description: 'Update an existing arbitrary cost rule with new filters and allocation - strategy. + description: 'Update an existing custom allocation rule with new filters and + allocation strategy. **Strategy Methods:** @@ -56663,9 +56915,9 @@ paths: **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like' - operationId: UpdateArbitraryCostRule + operationId: UpdateCustomAllocationRule parameters: - - description: The unique identifier of the arbitrary cost rule + - description: The unique identifier of the custom allocation rule in: path name: rule_id required: true @@ -56692,7 +56944,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Update arbitrary cost rule + summary: Update custom allocation rule tags: - Cloud Cost Management /api/v2/cost/aws_cur_config: @@ -74842,7 +75094,7 @@ paths: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline rulesets for the organization - operationId: ListRulesets + operationId: ListTagPipelinesRulesets responses: '200': content: @@ -74857,13 +75109,13 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_read - summary: List rulesets + summary: List tag pipeline rulesets tags: - Cloud Cost Management post: description: Create a new tag pipeline ruleset with the specified rules and configuration - operationId: CreateRuleset + operationId: CreateTagPipelinesRuleset requestBody: content: application/json: @@ -74884,14 +75136,14 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Create ruleset + summary: Create tag pipeline ruleset tags: - Cloud Cost Management /api/v2/tags/enrichment/reorder: post: description: Reorder tag pipeline rulesets - Change the execution order of tag pipeline rulesets - operationId: ReorderRulesets + operationId: ReorderTagPipelinesRulesets requestBody: content: application/json: @@ -74908,7 +75160,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Reorder rulesets + summary: Reorder tag pipeline rulesets tags: - Cloud Cost Management /api/v2/tags/enrichment/validate-query: @@ -74943,7 +75195,7 @@ paths: delete: description: Delete a tag pipeline ruleset - Delete an existing tag pipeline ruleset by its ID - operationId: DeleteRuleset + operationId: DeleteTagPipelinesRuleset parameters: - description: The unique identifier of the ruleset in: path @@ -74961,13 +75213,13 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Delete ruleset + summary: Delete tag pipeline ruleset tags: - Cloud Cost Management get: description: Get a specific tag pipeline ruleset - Retrieve a specific tag pipeline ruleset by its ID - operationId: GetRuleset + operationId: GetTagPipelinesRuleset parameters: - description: The unique identifier of the ruleset in: path @@ -74995,7 +75247,7 @@ paths: patch: description: Update a tag pipeline ruleset - Update an existing tag pipeline ruleset with new rules and configuration - operationId: UpdateRuleset + operationId: UpdateTagPipelinesRuleset parameters: - description: The unique identifier of the ruleset in: path @@ -75023,7 +75275,7 @@ paths: appKeyAuth: [] - AuthZ: - cloud_cost_management_write - summary: Update ruleset + summary: Update tag pipeline ruleset tags: - Cloud Cost Management /api/v2/team: diff --git a/examples/v2/cloud-cost-management/CreateArbitraryCostRule.java b/examples/v2/cloud-cost-management/CreateCustomAllocationRule.java similarity index 93% rename from examples/v2/cloud-cost-management/CreateArbitraryCostRule.java rename to examples/v2/cloud-cost-management/CreateCustomAllocationRule.java index 9baef79324e..1dd5d1783ab 100644 --- a/examples/v2/cloud-cost-management/CreateArbitraryCostRule.java +++ b/examples/v2/cloud-cost-management/CreateCustomAllocationRule.java @@ -1,4 +1,4 @@ -// Create arbitrary cost rule returns "OK" response +// Create custom allocation rule returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -59,10 +59,11 @@ public static void main(String[] args) { .type(ArbitraryCostUpsertRequestDataType.UPSERT_ARBITRARY_RULE)); try { - ArbitraryRuleResponse result = apiInstance.createArbitraryCostRule(body); + ArbitraryRuleResponse result = apiInstance.createCustomAllocationRule(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#createArbitraryCostRule"); + System.err.println( + "Exception when calling CloudCostManagementApi#createCustomAllocationRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/CreateRuleset.java b/examples/v2/cloud-cost-management/CreateTagPipelinesRuleset.java similarity index 94% rename from examples/v2/cloud-cost-management/CreateRuleset.java rename to examples/v2/cloud-cost-management/CreateTagPipelinesRuleset.java index 360b3e8b90e..9f921e6fef7 100644 --- a/examples/v2/cloud-cost-management/CreateRuleset.java +++ b/examples/v2/cloud-cost-management/CreateTagPipelinesRuleset.java @@ -1,4 +1,4 @@ -// Create ruleset returns "OK" response +// Create tag pipeline ruleset returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -48,10 +48,10 @@ public static void main(String[] args) { .type(CreateRulesetRequestDataType.CREATE_RULESET)); try { - RulesetResp result = apiInstance.createRuleset(body); + RulesetResp result = apiInstance.createTagPipelinesRuleset(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#createRuleset"); + System.err.println("Exception when calling CloudCostManagementApi#createTagPipelinesRuleset"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/DeleteRuleset.java b/examples/v2/cloud-cost-management/DeleteCustomAllocationRule.java similarity index 73% rename from examples/v2/cloud-cost-management/DeleteRuleset.java rename to examples/v2/cloud-cost-management/DeleteCustomAllocationRule.java index e0f32c17ddc..3c6a21c12bb 100644 --- a/examples/v2/cloud-cost-management/DeleteRuleset.java +++ b/examples/v2/cloud-cost-management/DeleteCustomAllocationRule.java @@ -1,4 +1,4 @@ -// Delete ruleset returns "No Content" response +// Delete custom allocation rule returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -10,9 +10,10 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - apiInstance.deleteRuleset("1c5dae14-237d-4b9a-a515-aa55b3939142"); + apiInstance.deleteCustomAllocationRule(683L); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#deleteRuleset"); + System.err.println( + "Exception when calling CloudCostManagementApi#deleteCustomAllocationRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java b/examples/v2/cloud-cost-management/DeleteTagPipelinesRuleset.java similarity index 79% rename from examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java rename to examples/v2/cloud-cost-management/DeleteTagPipelinesRuleset.java index 7cbc13e5209..99c1b9ecf0e 100644 --- a/examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java +++ b/examples/v2/cloud-cost-management/DeleteTagPipelinesRuleset.java @@ -1,4 +1,4 @@ -// Delete arbitrary cost rule returns "No Content" response +// Delete tag pipeline ruleset returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -10,9 +10,9 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - apiInstance.deleteArbitraryCostRule(123456L); + apiInstance.deleteTagPipelinesRuleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1"); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#deleteArbitraryCostRule"); + System.err.println("Exception when calling CloudCostManagementApi#deleteTagPipelinesRuleset"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/GetArbitraryCostRule.java b/examples/v2/cloud-cost-management/GetCustomAllocationRule.java similarity index 82% rename from examples/v2/cloud-cost-management/GetArbitraryCostRule.java rename to examples/v2/cloud-cost-management/GetCustomAllocationRule.java index c19bc14117f..1b182bae935 100644 --- a/examples/v2/cloud-cost-management/GetArbitraryCostRule.java +++ b/examples/v2/cloud-cost-management/GetCustomAllocationRule.java @@ -1,4 +1,4 @@ -// Get arbitrary cost rule returns "OK" response +// Get custom allocation rule returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,10 +11,10 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - ArbitraryRuleResponse result = apiInstance.getArbitraryCostRule(123456L); + ArbitraryRuleResponse result = apiInstance.getCustomAllocationRule(683L); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#getArbitraryCostRule"); + System.err.println("Exception when calling CloudCostManagementApi#getCustomAllocationRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/GetRuleset.java b/examples/v2/cloud-cost-management/GetTagPipelinesRuleset.java similarity index 87% rename from examples/v2/cloud-cost-management/GetRuleset.java rename to examples/v2/cloud-cost-management/GetTagPipelinesRuleset.java index 90e4a028629..421f5241102 100644 --- a/examples/v2/cloud-cost-management/GetRuleset.java +++ b/examples/v2/cloud-cost-management/GetTagPipelinesRuleset.java @@ -11,10 +11,10 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - RulesetResp result = apiInstance.getRuleset("da0e30e2-615d-4dae-9a22-38cf86a87dde"); + RulesetResp result = apiInstance.getTagPipelinesRuleset("ruleset_id"); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#getRuleset"); + System.err.println("Exception when calling CloudCostManagementApi#getTagPipelinesRuleset"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/GetTagPipelinesRuleset_2339377367.java b/examples/v2/cloud-cost-management/GetTagPipelinesRuleset_2339377367.java new file mode 100644 index 00000000000..c2952f8fab6 --- /dev/null +++ b/examples/v2/cloud-cost-management/GetTagPipelinesRuleset_2339377367.java @@ -0,0 +1,25 @@ +// Get tag pipeline ruleset returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CloudCostManagementApi; +import com.datadog.api.client.v2.model.RulesetResp; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); + + try { + RulesetResp result = + apiInstance.getTagPipelinesRuleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CloudCostManagementApi#getTagPipelinesRuleset"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/cloud-cost-management/ListArbitraryCostRules.java b/examples/v2/cloud-cost-management/ListCustomAllocationRules.java similarity index 82% rename from examples/v2/cloud-cost-management/ListArbitraryCostRules.java rename to examples/v2/cloud-cost-management/ListCustomAllocationRules.java index f112a796cb1..ed5ac03f89b 100644 --- a/examples/v2/cloud-cost-management/ListArbitraryCostRules.java +++ b/examples/v2/cloud-cost-management/ListCustomAllocationRules.java @@ -1,4 +1,4 @@ -// List arbitrary cost rules returns "OK" response +// List custom allocation rules returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,10 +11,10 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - ArbitraryRuleResponseArray result = apiInstance.listArbitraryCostRules(); + ArbitraryRuleResponseArray result = apiInstance.listCustomAllocationRules(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#listArbitraryCostRules"); + System.err.println("Exception when calling CloudCostManagementApi#listCustomAllocationRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/ListRulesets.java b/examples/v2/cloud-cost-management/ListTagPipelinesRulesets.java similarity index 83% rename from examples/v2/cloud-cost-management/ListRulesets.java rename to examples/v2/cloud-cost-management/ListTagPipelinesRulesets.java index 3a22908a4e5..a7f01845b16 100644 --- a/examples/v2/cloud-cost-management/ListRulesets.java +++ b/examples/v2/cloud-cost-management/ListTagPipelinesRulesets.java @@ -1,4 +1,4 @@ -// List rulesets returns "OK" response +// List tag pipeline rulesets returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,10 +11,10 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - RulesetRespArray result = apiInstance.listRulesets(); + RulesetRespArray result = apiInstance.listTagPipelinesRulesets(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#listRulesets"); + System.err.println("Exception when calling CloudCostManagementApi#listTagPipelinesRulesets"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.java b/examples/v2/cloud-cost-management/ReorderCustomAllocationRules.java similarity index 85% rename from examples/v2/cloud-cost-management/ReorderArbitraryCostRules.java rename to examples/v2/cloud-cost-management/ReorderCustomAllocationRules.java index 5a7430bba9b..caff212bc43 100644 --- a/examples/v2/cloud-cost-management/ReorderArbitraryCostRules.java +++ b/examples/v2/cloud-cost-management/ReorderCustomAllocationRules.java @@ -1,4 +1,4 @@ -// Reorder arbitrary cost rules returns "Successfully reordered rules" response +// Reorder custom allocation rules returns "Successfully reordered rules" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -28,9 +28,10 @@ public static void main(String[] args) { .type(ReorderRuleResourceDataType.ARBITRARY_RULE))); try { - apiInstance.reorderArbitraryCostRules(body); + apiInstance.reorderCustomAllocationRules(body); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#reorderArbitraryCostRules"); + System.err.println( + "Exception when calling CloudCostManagementApi#reorderCustomAllocationRules"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/ReorderRulesets.java b/examples/v2/cloud-cost-management/ReorderTagPipelinesRulesets.java similarity index 51% rename from examples/v2/cloud-cost-management/ReorderRulesets.java rename to examples/v2/cloud-cost-management/ReorderTagPipelinesRulesets.java index 0305c10f340..ff6cf207de7 100644 --- a/examples/v2/cloud-cost-management/ReorderRulesets.java +++ b/examples/v2/cloud-cost-management/ReorderTagPipelinesRulesets.java @@ -1,4 +1,4 @@ -// Reorder rulesets returns "Successfully reordered rulesets" response +// Reorder tag pipeline rulesets returns "Successfully reordered rulesets" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -6,7 +6,7 @@ import com.datadog.api.client.v2.model.ReorderRulesetResourceArray; import com.datadog.api.client.v2.model.ReorderRulesetResourceData; import com.datadog.api.client.v2.model.ReorderRulesetResourceDataType; -import java.util.Collections; +import java.util.Arrays; public class Example { public static void main(String[] args) { @@ -16,13 +16,22 @@ public static void main(String[] args) { ReorderRulesetResourceArray body = new ReorderRulesetResourceArray() .data( - Collections.singletonList( - new ReorderRulesetResourceData().type(ReorderRulesetResourceDataType.RULESET))); + Arrays.asList( + new ReorderRulesetResourceData() + .id("55ef2385-9ae1-4410-90c4-5ac1b60fec10") + .type(ReorderRulesetResourceDataType.RULESET), + new ReorderRulesetResourceData() + .id("a7b8c9d0-1234-5678-9abc-def012345678") + .type(ReorderRulesetResourceDataType.RULESET), + new ReorderRulesetResourceData() + .id("f1e2d3c4-b5a6-9780-1234-567890abcdef") + .type(ReorderRulesetResourceDataType.RULESET))); try { - apiInstance.reorderRulesets(body); + apiInstance.reorderTagPipelinesRulesets(body); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#reorderRulesets"); + System.err.println( + "Exception when calling CloudCostManagementApi#reorderTagPipelinesRulesets"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.java b/examples/v2/cloud-cost-management/UpdateCustomAllocationRule.java similarity index 93% rename from examples/v2/cloud-cost-management/UpdateArbitraryCostRule.java rename to examples/v2/cloud-cost-management/UpdateCustomAllocationRule.java index 0302db608a6..2223dd726c7 100644 --- a/examples/v2/cloud-cost-management/UpdateArbitraryCostRule.java +++ b/examples/v2/cloud-cost-management/UpdateCustomAllocationRule.java @@ -1,4 +1,4 @@ -// Update arbitrary cost rule returns "OK" response +// Update custom allocation rule returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -59,10 +59,11 @@ public static void main(String[] args) { .type(ArbitraryCostUpsertRequestDataType.UPSERT_ARBITRARY_RULE)); try { - ArbitraryRuleResponse result = apiInstance.updateArbitraryCostRule(123456L, body); + ArbitraryRuleResponse result = apiInstance.updateCustomAllocationRule(683L, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#updateArbitraryCostRule"); + System.err.println( + "Exception when calling CloudCostManagementApi#updateCustomAllocationRule"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/cloud-cost-management/UpdateRuleset.java b/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java similarity index 89% rename from examples/v2/cloud-cost-management/UpdateRuleset.java rename to examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java index 10b1d1d3712..934be510385 100644 --- a/examples/v2/cloud-cost-management/UpdateRuleset.java +++ b/examples/v2/cloud-cost-management/UpdateTagPipelinesRuleset.java @@ -1,4 +1,4 @@ -// Update ruleset returns "OK" response +// Update tag pipeline ruleset returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -25,7 +25,7 @@ public static void main(String[] args) { .attributes( new UpdateRulesetRequestDataAttributes() .enabled(true) - .lastVersion(3601919L) + .lastVersion(3611102L) .rules( Collections.singletonList( new UpdateRulesetRequestDataAttributesRulesItems() @@ -39,13 +39,15 @@ public static void main(String[] args) { .name("Account Name Mapping") .query(null) .referenceTable(null)))) + .id("New Ruleset") .type(UpdateRulesetRequestDataType.UPDATE_RULESET)); try { - RulesetResp result = apiInstance.updateRuleset("1c5dae14-237d-4b9a-a515-aa55b3939142", body); + RulesetResp result = + apiInstance.updateTagPipelinesRuleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1", body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CloudCostManagementApi#updateRuleset"); + System.err.println("Exception when calling CloudCostManagementApi#updateTagPipelinesRuleset"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java index 616af9916a7..96f805cd5bb 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java @@ -74,153 +74,6 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /** - * Create arbitrary cost rule. - * - *

See {@link #createArbitraryCostRuleWithHttpInfo}. - * - * @param body (required) - * @return ArbitraryRuleResponse - * @throws ApiException if fails to make API call - */ - public ArbitraryRuleResponse createArbitraryCostRule(ArbitraryCostUpsertRequest body) - throws ApiException { - return createArbitraryCostRuleWithHttpInfo(body).getData(); - } - - /** - * Create arbitrary cost rule. - * - *

See {@link #createArbitraryCostRuleWithHttpInfoAsync}. - * - * @param body (required) - * @return CompletableFuture<ArbitraryRuleResponse> - */ - public CompletableFuture createArbitraryCostRuleAsync( - ArbitraryCostUpsertRequest body) { - return createArbitraryCostRuleWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Create a new arbitrary cost rule with the specified filters and allocation strategy. - * - *

Strategy Methods: - 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. - PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES: - * Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: - * evaluate_grouped_by_tag_keys. - PERCENT: Allocates fixed percentages to - * specific tags. Requires: allocated_by (array of percentage allocations). - * - *

Filter Conditions: - Use value for single-value - * conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is - * all values", "is untagged" - Use values for multi-value conditions: "in", "not - * in" - Cannot use both value and values simultaneously. - * - *

Supported operators: is, is not, is all values, is untagged, contains, does - * not contain, in, not in, =, !=, like, not like - * - * @param body (required) - * @return ApiResponse<ArbitraryRuleResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse createArbitraryCostRuleWithHttpInfo( - ArbitraryCostUpsertRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling createArbitraryCostRule"); - } - // create path and map variables - String localVarPath = "/api/v2/cost/arbitrary_rule"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudCostManagementApi.createArbitraryCostRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Create arbitrary cost rule. - * - *

See {@link #createArbitraryCostRuleWithHttpInfo}. - * - * @param body (required) - * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> - */ - public CompletableFuture> - createArbitraryCostRuleWithHttpInfoAsync(ArbitraryCostUpsertRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling createArbitraryCostRule")); - return result; - } - // create path and map variables - String localVarPath = "/api/v2/cost/arbitrary_rule"; - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.CloudCostManagementApi.createArbitraryCostRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - /** * Create Cloud Cost Management AWS CUR config. * @@ -622,28 +475,30 @@ public ApiResponse createCostGCPUsageCostConfigWithH } /** - * Create ruleset. + * Create custom allocation rule. * - *

See {@link #createRulesetWithHttpInfo}. + *

See {@link #createCustomAllocationRuleWithHttpInfo}. * * @param body (required) - * @return RulesetResp + * @return ArbitraryRuleResponse * @throws ApiException if fails to make API call */ - public RulesetResp createRuleset(CreateRulesetRequest body) throws ApiException { - return createRulesetWithHttpInfo(body).getData(); + public ArbitraryRuleResponse createCustomAllocationRule(ArbitraryCostUpsertRequest body) + throws ApiException { + return createCustomAllocationRuleWithHttpInfo(body).getData(); } /** - * Create ruleset. + * Create custom allocation rule. * - *

See {@link #createRulesetWithHttpInfoAsync}. + *

See {@link #createCustomAllocationRuleWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<RulesetResp> + * @return CompletableFuture<ArbitraryRuleResponse> */ - public CompletableFuture createRulesetAsync(CreateRulesetRequest body) { - return createRulesetWithHttpInfoAsync(body) + public CompletableFuture createCustomAllocationRuleAsync( + ArbitraryCostUpsertRequest body) { + return createCustomAllocationRuleWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -651,10 +506,26 @@ public CompletableFuture createRulesetAsync(CreateRulesetRequest bo } /** - * Create a new tag pipeline ruleset with the specified rules and configuration + * Create a new custom allocation rule with the specified filters and allocation strategy. + * + *

Strategy Methods: - 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. - PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES: + * Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: + * evaluate_grouped_by_tag_keys. - PERCENT: Allocates fixed percentages to + * specific tags. Requires: allocated_by (array of percentage allocations). + * + *

Filter Conditions: - Use value for single-value + * conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is + * all values", "is untagged" - Use values for multi-value conditions: "in", "not + * in" - Cannot use both value and values simultaneously. + * + *

Supported operators: is, is not, is all values, is untagged, contains, does + * not contain, in, not in, =, !=, like, not like * * @param body (required) - * @return ApiResponse<RulesetResp> + * @return ApiResponse<ArbitraryRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -664,23 +535,23 @@ public CompletableFuture createRulesetAsync(CreateRulesetRequest bo * *
429 Too many requests -
*/ - public ApiResponse createRulesetWithHttpInfo(CreateRulesetRequest body) - throws ApiException { + public ApiResponse createCustomAllocationRuleWithHttpInfo( + ArbitraryCostUpsertRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling createRuleset"); + 400, "Missing the required parameter 'body' when calling createCustomAllocationRule"); } // create path and map variables - String localVarPath = "/api/v2/tags/enrichment"; + String localVarPath = "/api/v2/cost/arbitrary_rule"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.createRuleset", + "v2.CloudCostManagementApi.createCustomAllocationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -695,31 +566,32 @@ public ApiResponse createRulesetWithHttpInfo(CreateRulesetRequest b localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create ruleset. + * Create custom allocation rule. * - *

See {@link #createRulesetWithHttpInfo}. + *

See {@link #createCustomAllocationRuleWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<RulesetResp>> + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> */ - public CompletableFuture> createRulesetWithHttpInfoAsync( - CreateRulesetRequest body) { + public CompletableFuture> + createCustomAllocationRuleWithHttpInfoAsync(ArbitraryCostUpsertRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling createRuleset")); + 400, + "Missing the required parameter 'body' when calling createCustomAllocationRule")); return result; } // create path and map variables - String localVarPath = "/api/v2/tags/enrichment"; + String localVarPath = "/api/v2/cost/arbitrary_rule"; Map localVarHeaderParams = new HashMap(); @@ -727,7 +599,7 @@ public CompletableFuture> createRulesetWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.createRuleset", + "v2.CloudCostManagementApi.createCustomAllocationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -735,7 +607,7 @@ public CompletableFuture> createRulesetWithHttpInfoAsyn new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -747,31 +619,32 @@ public CompletableFuture> createRulesetWithHttpInfoAsyn localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Delete arbitrary cost rule. + * Create tag pipeline ruleset. * - *

See {@link #deleteArbitraryCostRuleWithHttpInfo}. + *

See {@link #createTagPipelinesRulesetWithHttpInfo}. * - * @param ruleId The unique identifier of the arbitrary cost rule (required) + * @param body (required) + * @return RulesetResp * @throws ApiException if fails to make API call */ - public void deleteArbitraryCostRule(Long ruleId) throws ApiException { - deleteArbitraryCostRuleWithHttpInfo(ruleId); + public RulesetResp createTagPipelinesRuleset(CreateRulesetRequest body) throws ApiException { + return createTagPipelinesRulesetWithHttpInfo(body).getData(); } /** - * Delete arbitrary cost rule. + * Create tag pipeline ruleset. * - *

See {@link #deleteArbitraryCostRuleWithHttpInfoAsync}. + *

See {@link #createTagPipelinesRulesetWithHttpInfoAsync}. * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return CompletableFuture + * @param body (required) + * @return CompletableFuture<RulesetResp> */ - public CompletableFuture deleteArbitraryCostRuleAsync(Long ruleId) { - return deleteArbitraryCostRuleWithHttpInfoAsync(ruleId) + public CompletableFuture createTagPipelinesRulesetAsync(CreateRulesetRequest body) { + return createTagPipelinesRulesetWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -779,78 +652,75 @@ public CompletableFuture deleteArbitraryCostRuleAsync(Long ruleId) { } /** - * Delete an arbitrary cost rule - Delete an existing arbitrary cost rule by its ID + * Create a new tag pipeline ruleset with the specified rules and configuration * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return ApiResponse<Void> + * @param body (required) + * @return ApiResponse<RulesetResp> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * *
Response details
Status Code Description Response Headers
204 No Content -
200 OK -
429 Too many requests -
*/ - public ApiResponse deleteArbitraryCostRuleWithHttpInfo(Long ruleId) throws ApiException { - Object localVarPostBody = null; + public ApiResponse createTagPipelinesRulesetWithHttpInfo(CreateRulesetRequest body) + throws ApiException { + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling deleteArbitraryCostRule"); + 400, "Missing the required parameter 'body' when calling createTagPipelinesRuleset"); } // create path and map variables - String localVarPath = - "/api/v2/cost/arbitrary_rule/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/tags/enrichment"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteArbitraryCostRule", + "v2.CloudCostManagementApi.createTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Delete arbitrary cost rule. + * Create tag pipeline ruleset. * - *

See {@link #deleteArbitraryCostRuleWithHttpInfo}. + *

See {@link #createTagPipelinesRulesetWithHttpInfo}. * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body (required) + * @return CompletableFuture<ApiResponse<RulesetResp>> */ - public CompletableFuture> deleteArbitraryCostRuleWithHttpInfoAsync( - Long ruleId) { - Object localVarPostBody = null; + public CompletableFuture> createTagPipelinesRulesetWithHttpInfoAsync( + CreateRulesetRequest body) { + Object localVarPostBody = body; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'ruleId' when calling deleteArbitraryCostRule")); + 400, "Missing the required parameter 'body' when calling createTagPipelinesRuleset")); return result; } // create path and map variables - String localVarPath = - "/api/v2/cost/arbitrary_rule/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + String localVarPath = "/api/v2/tags/enrichment"; Map localVarHeaderParams = new HashMap(); @@ -858,27 +728,27 @@ public CompletableFuture> deleteArbitraryCostRuleWithHttpInfoA try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteArbitraryCostRule", + "v2.CloudCostManagementApi.createTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** @@ -1437,27 +1307,27 @@ public CompletableFuture> deleteCostGCPUsageCostConfigWithHttp } /** - * Delete Custom Costs file. + * Delete custom allocation rule. * - *

See {@link #deleteCustomCostsFileWithHttpInfo}. + *

See {@link #deleteCustomAllocationRuleWithHttpInfo}. * - * @param fileId File ID. (required) + * @param ruleId The unique identifier of the custom allocation rule (required) * @throws ApiException if fails to make API call */ - public void deleteCustomCostsFile(String fileId) throws ApiException { - deleteCustomCostsFileWithHttpInfo(fileId); + public void deleteCustomAllocationRule(Long ruleId) throws ApiException { + deleteCustomAllocationRuleWithHttpInfo(ruleId); } /** - * Delete Custom Costs file. + * Delete custom allocation rule. * - *

See {@link #deleteCustomCostsFileWithHttpInfoAsync}. + *

See {@link #deleteCustomAllocationRuleWithHttpInfoAsync}. * - * @param fileId File ID. (required) + * @param ruleId The unique identifier of the custom allocation rule (required) * @return CompletableFuture */ - public CompletableFuture deleteCustomCostsFileAsync(String fileId) { - return deleteCustomCostsFileWithHttpInfoAsync(fileId) + public CompletableFuture deleteCustomAllocationRuleAsync(Long ruleId) { + return deleteCustomAllocationRuleWithHttpInfoAsync(ruleId) .thenApply( response -> { return response.getData(); @@ -1465,9 +1335,9 @@ public CompletableFuture deleteCustomCostsFileAsync(String fileId) { } /** - * Delete the specified Custom Costs file. + * Delete a custom allocation rule - Delete an existing custom allocation rule by its ID * - * @param fileId File ID. (required) + * @param ruleId The unique identifier of the custom allocation rule (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -1475,29 +1345,27 @@ public CompletableFuture deleteCustomCostsFileAsync(String fileId) { * Response details * Status Code Description Response Headers * 204 No Content - - * 403 Forbidden - - * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse deleteCustomCostsFileWithHttpInfo(String fileId) throws ApiException { + public ApiResponse deleteCustomAllocationRuleWithHttpInfo(Long ruleId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'fileId' is set - if (fileId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile"); + 400, "Missing the required parameter 'ruleId' when calling deleteCustomAllocationRule"); } // create path and map variables String localVarPath = - "/api/v2/cost/custom_costs/{file_id}" - .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCustomCostsFile", + "v2.CloudCostManagementApi.deleteCustomAllocationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1516,29 +1384,30 @@ public ApiResponse deleteCustomCostsFileWithHttpInfo(String fileId) throws } /** - * Delete Custom Costs file. + * Delete custom allocation rule. * - *

See {@link #deleteCustomCostsFileWithHttpInfo}. + *

See {@link #deleteCustomAllocationRuleWithHttpInfo}. * - * @param fileId File ID. (required) + * @param ruleId The unique identifier of the custom allocation rule (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsync( - String fileId) { + public CompletableFuture> deleteCustomAllocationRuleWithHttpInfoAsync( + Long ruleId) { Object localVarPostBody = null; - // verify the required parameter 'fileId' is set - if (fileId == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile")); + 400, + "Missing the required parameter 'ruleId' when calling deleteCustomAllocationRule")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/custom_costs/{file_id}" - .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1546,7 +1415,7 @@ public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsy try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteCustomCostsFile", + "v2.CloudCostManagementApi.deleteCustomAllocationRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1570,27 +1439,27 @@ public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsy } /** - * Delete ruleset. + * Delete Custom Costs file. * - *

See {@link #deleteRulesetWithHttpInfo}. + *

See {@link #deleteCustomCostsFileWithHttpInfo}. * - * @param rulesetId The unique identifier of the ruleset (required) + * @param fileId File ID. (required) * @throws ApiException if fails to make API call */ - public void deleteRuleset(String rulesetId) throws ApiException { - deleteRulesetWithHttpInfo(rulesetId); + public void deleteCustomCostsFile(String fileId) throws ApiException { + deleteCustomCostsFileWithHttpInfo(fileId); } /** - * Delete ruleset. + * Delete Custom Costs file. * - *

See {@link #deleteRulesetWithHttpInfoAsync}. + *

See {@link #deleteCustomCostsFileWithHttpInfoAsync}. * - * @param rulesetId The unique identifier of the ruleset (required) + * @param fileId File ID. (required) * @return CompletableFuture */ - public CompletableFuture deleteRulesetAsync(String rulesetId) { - return deleteRulesetWithHttpInfoAsync(rulesetId) + public CompletableFuture deleteCustomCostsFileAsync(String fileId) { + return deleteCustomCostsFileWithHttpInfoAsync(fileId) .thenApply( response -> { return response.getData(); @@ -1598,9 +1467,9 @@ public CompletableFuture deleteRulesetAsync(String rulesetId) { } /** - * Delete a tag pipeline ruleset - Delete an existing tag pipeline ruleset by its ID + * Delete the specified Custom Costs file. * - * @param rulesetId The unique identifier of the ruleset (required) + * @param fileId File ID. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -1608,27 +1477,29 @@ public CompletableFuture deleteRulesetAsync(String rulesetId) { * Response details * Status Code Description Response Headers * 204 No Content - + * 403 Forbidden - + * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse deleteRulesetWithHttpInfo(String rulesetId) throws ApiException { + public ApiResponse deleteCustomCostsFileWithHttpInfo(String fileId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'rulesetId' is set - if (rulesetId == null) { + // verify the required parameter 'fileId' is set + if (fileId == null) { throw new ApiException( - 400, "Missing the required parameter 'rulesetId' when calling deleteRuleset"); + 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile"); } // create path and map variables String localVarPath = - "/api/v2/tags/enrichment/{ruleset_id}" - .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); + "/api/v2/cost/custom_costs/{file_id}" + .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteRuleset", + "v2.CloudCostManagementApi.deleteCustomCostsFile", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1647,28 +1518,29 @@ public ApiResponse deleteRulesetWithHttpInfo(String rulesetId) throws ApiE } /** - * Delete ruleset. + * Delete Custom Costs file. * - *

See {@link #deleteRulesetWithHttpInfo}. + *

See {@link #deleteCustomCostsFileWithHttpInfo}. * - * @param rulesetId The unique identifier of the ruleset (required) + * @param fileId File ID. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteRulesetWithHttpInfoAsync(String rulesetId) { + public CompletableFuture> deleteCustomCostsFileWithHttpInfoAsync( + String fileId) { Object localVarPostBody = null; - // verify the required parameter 'rulesetId' is set - if (rulesetId == null) { + // verify the required parameter 'fileId' is set + if (fileId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'rulesetId' when calling deleteRuleset")); + 400, "Missing the required parameter 'fileId' when calling deleteCustomCostsFile")); return result; } // create path and map variables String localVarPath = - "/api/v2/tags/enrichment/{ruleset_id}" - .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); + "/api/v2/cost/custom_costs/{file_id}" + .replaceAll("\\{" + "file_id" + "\\}", apiClient.escapeString(fileId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1676,7 +1548,7 @@ public CompletableFuture> deleteRulesetWithHttpInfoAsync(Strin try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.deleteRuleset", + "v2.CloudCostManagementApi.deleteCustomCostsFile", localVarPath, new ArrayList(), localVarHeaderParams, @@ -1700,28 +1572,27 @@ public CompletableFuture> deleteRulesetWithHttpInfoAsync(Strin } /** - * Get arbitrary cost rule. + * Delete tag pipeline ruleset. * - *

See {@link #getArbitraryCostRuleWithHttpInfo}. + *

See {@link #deleteTagPipelinesRulesetWithHttpInfo}. * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return ArbitraryRuleResponse + * @param rulesetId The unique identifier of the ruleset (required) * @throws ApiException if fails to make API call */ - public ArbitraryRuleResponse getArbitraryCostRule(Long ruleId) throws ApiException { - return getArbitraryCostRuleWithHttpInfo(ruleId).getData(); + public void deleteTagPipelinesRuleset(String rulesetId) throws ApiException { + deleteTagPipelinesRulesetWithHttpInfo(rulesetId); } /** - * Get arbitrary cost rule. + * Delete tag pipeline ruleset. * - *

See {@link #getArbitraryCostRuleWithHttpInfoAsync}. + *

See {@link #deleteTagPipelinesRulesetWithHttpInfoAsync}. * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return CompletableFuture<ArbitraryRuleResponse> + * @param rulesetId The unique identifier of the ruleset (required) + * @return CompletableFuture */ - public CompletableFuture getArbitraryCostRuleAsync(Long ruleId) { - return getArbitraryCostRuleWithHttpInfoAsync(ruleId) + public CompletableFuture deleteTagPipelinesRulesetAsync(String rulesetId) { + return deleteTagPipelinesRulesetWithHttpInfoAsync(rulesetId) .thenApply( response -> { return response.getData(); @@ -1729,79 +1600,80 @@ public CompletableFuture getArbitraryCostRuleAsync(Long r } /** - * Get a specific arbitrary cost rule - Retrieve a specific arbitrary cost rule by its ID + * Delete a tag pipeline ruleset - Delete an existing tag pipeline ruleset by its ID * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return ApiResponse<ArbitraryRuleResponse> + * @param rulesetId The unique identifier of the ruleset (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * *
Response details
Status Code Description Response Headers
200 OK -
204 No Content -
429 Too many requests -
*/ - public ApiResponse getArbitraryCostRuleWithHttpInfo(Long ruleId) + public ApiResponse deleteTagPipelinesRulesetWithHttpInfo(String rulesetId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getArbitraryCostRule"); + 400, "Missing the required parameter 'rulesetId' when calling deleteTagPipelinesRuleset"); } // create path and map variables String localVarPath = - "/api/v2/cost/arbitrary_rule/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getArbitraryCostRule", + "v2.CloudCostManagementApi.deleteTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get arbitrary cost rule. + * Delete tag pipeline ruleset. * - *

See {@link #getArbitraryCostRuleWithHttpInfo}. + *

See {@link #deleteTagPipelinesRulesetWithHttpInfo}. * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> + * @param rulesetId The unique identifier of the ruleset (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getArbitraryCostRuleWithHttpInfoAsync(Long ruleId) { + public CompletableFuture> deleteTagPipelinesRulesetWithHttpInfoAsync( + String rulesetId) { Object localVarPostBody = null; - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'rulesetId' is set + if (rulesetId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'ruleId' when calling getArbitraryCostRule")); + 400, + "Missing the required parameter 'rulesetId' when calling deleteTagPipelinesRuleset")); return result; } // create path and map variables String localVarPath = - "/api/v2/cost/arbitrary_rule/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + "/api/v2/tags/enrichment/{ruleset_id}" + .replaceAll("\\{" + "ruleset_id" + "\\}", apiClient.escapeString(rulesetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -1809,27 +1681,27 @@ public ApiResponse getArbitraryCostRuleWithHttpInfo(Long try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getArbitraryCostRule", + "v2.CloudCostManagementApi.deleteTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** @@ -2383,6 +2255,139 @@ public ApiResponse getCostGCPUsageCostConfigWithHttpInfo(Lo new GenericType() {}); } + /** + * Get custom allocation rule. + * + *

See {@link #getCustomAllocationRuleWithHttpInfo}. + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @return ArbitraryRuleResponse + * @throws ApiException if fails to make API call + */ + public ArbitraryRuleResponse getCustomAllocationRule(Long ruleId) throws ApiException { + return getCustomAllocationRuleWithHttpInfo(ruleId).getData(); + } + + /** + * Get custom allocation rule. + * + *

See {@link #getCustomAllocationRuleWithHttpInfoAsync}. + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @return CompletableFuture<ArbitraryRuleResponse> + */ + public CompletableFuture getCustomAllocationRuleAsync(Long ruleId) { + return getCustomAllocationRuleWithHttpInfoAsync(ruleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a specific custom allocation rule - Retrieve a specific custom allocation rule by its ID + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @return ApiResponse<ArbitraryRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse getCustomAllocationRuleWithHttpInfo(Long ruleId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'ruleId' when calling getCustomAllocationRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCustomAllocationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get custom allocation rule. + * + *

See {@link #getCustomAllocationRuleWithHttpInfo}. + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> + */ + public CompletableFuture> + getCustomAllocationRuleWithHttpInfoAsync(Long ruleId) { + Object localVarPostBody = null; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'ruleId' when calling getCustomAllocationRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.getCustomAllocationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get Custom Costs file. * @@ -2521,26 +2526,26 @@ public ApiResponse getCustomCostsFileWithHttpInfo(St /** * Get ruleset. * - *

See {@link #getRulesetWithHttpInfo}. + *

See {@link #getTagPipelinesRulesetWithHttpInfo}. * * @param rulesetId The unique identifier of the ruleset (required) * @return RulesetResp * @throws ApiException if fails to make API call */ - public RulesetResp getRuleset(String rulesetId) throws ApiException { - return getRulesetWithHttpInfo(rulesetId).getData(); + public RulesetResp getTagPipelinesRuleset(String rulesetId) throws ApiException { + return getTagPipelinesRulesetWithHttpInfo(rulesetId).getData(); } /** * Get ruleset. * - *

See {@link #getRulesetWithHttpInfoAsync}. + *

See {@link #getTagPipelinesRulesetWithHttpInfoAsync}. * * @param rulesetId The unique identifier of the ruleset (required) * @return CompletableFuture<RulesetResp> */ - public CompletableFuture getRulesetAsync(String rulesetId) { - return getRulesetWithHttpInfoAsync(rulesetId) + public CompletableFuture getTagPipelinesRulesetAsync(String rulesetId) { + return getTagPipelinesRulesetWithHttpInfoAsync(rulesetId) .thenApply( response -> { return response.getData(); @@ -2561,13 +2566,14 @@ public CompletableFuture getRulesetAsync(String rulesetId) { * 429 Too many requests - * */ - public ApiResponse getRulesetWithHttpInfo(String rulesetId) throws ApiException { + public ApiResponse getTagPipelinesRulesetWithHttpInfo(String rulesetId) + throws ApiException { Object localVarPostBody = null; // verify the required parameter 'rulesetId' is set if (rulesetId == null) { throw new ApiException( - 400, "Missing the required parameter 'rulesetId' when calling getRuleset"); + 400, "Missing the required parameter 'rulesetId' when calling getTagPipelinesRuleset"); } // create path and map variables String localVarPath = @@ -2578,7 +2584,7 @@ public ApiResponse getRulesetWithHttpInfo(String rulesetId) throws Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getRuleset", + "v2.CloudCostManagementApi.getTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2599,12 +2605,13 @@ public ApiResponse getRulesetWithHttpInfo(String rulesetId) throws /** * Get ruleset. * - *

See {@link #getRulesetWithHttpInfo}. + *

See {@link #getTagPipelinesRulesetWithHttpInfo}. * * @param rulesetId The unique identifier of the ruleset (required) * @return CompletableFuture<ApiResponse<RulesetResp>> */ - public CompletableFuture> getRulesetWithHttpInfoAsync(String rulesetId) { + public CompletableFuture> getTagPipelinesRulesetWithHttpInfoAsync( + String rulesetId) { Object localVarPostBody = null; // verify the required parameter 'rulesetId' is set @@ -2612,7 +2619,8 @@ public CompletableFuture> getRulesetWithHttpInfoAsync(S CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'rulesetId' when calling getRuleset")); + 400, + "Missing the required parameter 'rulesetId' when calling getTagPipelinesRuleset")); return result; } // create path and map variables @@ -2626,7 +2634,7 @@ public CompletableFuture> getRulesetWithHttpInfoAsync(S try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.getRuleset", + "v2.CloudCostManagementApi.getTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2650,26 +2658,26 @@ public CompletableFuture> getRulesetWithHttpInfoAsync(S } /** - * List arbitrary cost rules. + * List budgets. * - *

See {@link #listArbitraryCostRulesWithHttpInfo}. + *

See {@link #listBudgetsWithHttpInfo}. * - * @return ArbitraryRuleResponseArray + * @return BudgetArray * @throws ApiException if fails to make API call */ - public ArbitraryRuleResponseArray listArbitraryCostRules() throws ApiException { - return listArbitraryCostRulesWithHttpInfo().getData(); + public BudgetArray listBudgets() throws ApiException { + return listBudgetsWithHttpInfo().getData(); } /** - * List arbitrary cost rules. + * List budgets. * - *

See {@link #listArbitraryCostRulesWithHttpInfoAsync}. + *

See {@link #listBudgetsWithHttpInfoAsync}. * - * @return CompletableFuture<ArbitraryRuleResponseArray> + * @return CompletableFuture<BudgetArray> */ - public CompletableFuture listArbitraryCostRulesAsync() { - return listArbitraryCostRulesWithHttpInfoAsync() + public CompletableFuture listBudgetsAsync() { + return listBudgetsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -2677,10 +2685,9 @@ public CompletableFuture listArbitraryCostRulesAsync } /** - * List all arbitrary cost rules - Retrieve a list of all arbitrary cost rules for the - * organization + * List budgets. * - * @return ApiResponse<ArbitraryRuleResponseArray> + * @return ApiResponse<BudgetArray> * @throws ApiException if fails to make API call * @http.response.details * @@ -2690,17 +2697,16 @@ public CompletableFuture listArbitraryCostRulesAsync * *
429 Too many requests -
*/ - public ApiResponse listArbitraryCostRulesWithHttpInfo() - throws ApiException { + public ApiResponse listBudgetsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/arbitrary_rule"; + String localVarPath = "/api/v2/cost/budgets"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listArbitraryCostRules", + "v2.CloudCostManagementApi.listBudgets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2715,21 +2721,20 @@ public ApiResponse listArbitraryCostRulesWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List arbitrary cost rules. + * List budgets. * - *

See {@link #listArbitraryCostRulesWithHttpInfo}. + *

See {@link #listBudgetsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<ArbitraryRuleResponseArray>> + * @return CompletableFuture<ApiResponse<BudgetArray>> */ - public CompletableFuture> - listArbitraryCostRulesWithHttpInfoAsync() { + public CompletableFuture> listBudgetsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/arbitrary_rule"; + String localVarPath = "/api/v2/cost/budgets"; Map localVarHeaderParams = new HashMap(); @@ -2737,7 +2742,7 @@ public ApiResponse listArbitraryCostRulesWithHttpInf try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listArbitraryCostRules", + "v2.CloudCostManagementApi.listBudgets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2745,7 +2750,7 @@ public ApiResponse listArbitraryCostRulesWithHttpInf new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2757,30 +2762,30 @@ public ApiResponse listArbitraryCostRulesWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List budgets. + * List Cloud Cost Management AWS CUR configs. * - *

See {@link #listBudgetsWithHttpInfo}. + *

See {@link #listCostAWSCURConfigsWithHttpInfo}. * - * @return BudgetArray + * @return AwsCURConfigsResponse * @throws ApiException if fails to make API call */ - public BudgetArray listBudgets() throws ApiException { - return listBudgetsWithHttpInfo().getData(); + public AwsCURConfigsResponse listCostAWSCURConfigs() throws ApiException { + return listCostAWSCURConfigsWithHttpInfo().getData(); } /** - * List budgets. + * List Cloud Cost Management AWS CUR configs. * - *

See {@link #listBudgetsWithHttpInfoAsync}. + *

See {@link #listCostAWSCURConfigsWithHttpInfoAsync}. * - * @return CompletableFuture<BudgetArray> + * @return CompletableFuture<AwsCURConfigsResponse> */ - public CompletableFuture listBudgetsAsync() { - return listBudgetsWithHttpInfoAsync() + public CompletableFuture listCostAWSCURConfigsAsync() { + return listCostAWSCURConfigsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -2788,28 +2793,30 @@ public CompletableFuture listBudgetsAsync() { } /** - * List budgets. + * List the AWS CUR configs. * - * @return ApiResponse<BudgetArray> + * @return ApiResponse<AwsCURConfigsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * + * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listBudgetsWithHttpInfo() throws ApiException { + public ApiResponse listCostAWSCURConfigsWithHttpInfo() + throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/budgets"; + String localVarPath = "/api/v2/cost/aws_cur_config"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listBudgets", + "v2.CloudCostManagementApi.listCostAWSCURConfigs", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2824,20 +2831,21 @@ public ApiResponse listBudgetsWithHttpInfo() throws ApiException { localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List budgets. + * List Cloud Cost Management AWS CUR configs. * - *

See {@link #listBudgetsWithHttpInfo}. + *

See {@link #listCostAWSCURConfigsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<BudgetArray>> + * @return CompletableFuture<ApiResponse<AwsCURConfigsResponse>> */ - public CompletableFuture> listBudgetsWithHttpInfoAsync() { + public CompletableFuture> + listCostAWSCURConfigsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/budgets"; + String localVarPath = "/api/v2/cost/aws_cur_config"; Map localVarHeaderParams = new HashMap(); @@ -2845,7 +2853,7 @@ public CompletableFuture> listBudgetsWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listBudgets", + "v2.CloudCostManagementApi.listCostAWSCURConfigs", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2853,7 +2861,7 @@ public CompletableFuture> listBudgetsWithHttpInfoAsync( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2865,30 +2873,30 @@ public CompletableFuture> listBudgetsWithHttpInfoAsync( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management AWS CUR configs. + * List Cloud Cost Management Azure configs. * - *

See {@link #listCostAWSCURConfigsWithHttpInfo}. + *

See {@link #listCostAzureUCConfigsWithHttpInfo}. * - * @return AwsCURConfigsResponse + * @return AzureUCConfigsResponse * @throws ApiException if fails to make API call */ - public AwsCURConfigsResponse listCostAWSCURConfigs() throws ApiException { - return listCostAWSCURConfigsWithHttpInfo().getData(); + public AzureUCConfigsResponse listCostAzureUCConfigs() throws ApiException { + return listCostAzureUCConfigsWithHttpInfo().getData(); } /** - * List Cloud Cost Management AWS CUR configs. + * List Cloud Cost Management Azure configs. * - *

See {@link #listCostAWSCURConfigsWithHttpInfoAsync}. + *

See {@link #listCostAzureUCConfigsWithHttpInfoAsync}. * - * @return CompletableFuture<AwsCURConfigsResponse> + * @return CompletableFuture<AzureUCConfigsResponse> */ - public CompletableFuture listCostAWSCURConfigsAsync() { - return listCostAWSCURConfigsWithHttpInfoAsync() + public CompletableFuture listCostAzureUCConfigsAsync() { + return listCostAzureUCConfigsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -2896,9 +2904,9 @@ public CompletableFuture listCostAWSCURConfigsAsync() { } /** - * List the AWS CUR configs. + * List the Azure configs. * - * @return ApiResponse<AwsCURConfigsResponse> + * @return ApiResponse<AzureUCConfigsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -2909,17 +2917,17 @@ public CompletableFuture listCostAWSCURConfigsAsync() { * *
429 Too many requests -
*/ - public ApiResponse listCostAWSCURConfigsWithHttpInfo() + public ApiResponse listCostAzureUCConfigsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/aws_cur_config"; + String localVarPath = "/api/v2/cost/azure_uc_config"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAWSCURConfigs", + "v2.CloudCostManagementApi.listCostAzureUCConfigs", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2934,21 +2942,21 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management AWS CUR configs. + * List Cloud Cost Management Azure configs. * - *

See {@link #listCostAWSCURConfigsWithHttpInfo}. + *

See {@link #listCostAzureUCConfigsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<AwsCURConfigsResponse>> + * @return CompletableFuture<ApiResponse<AzureUCConfigsResponse>> */ - public CompletableFuture> - listCostAWSCURConfigsWithHttpInfoAsync() { + public CompletableFuture> + listCostAzureUCConfigsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/aws_cur_config"; + String localVarPath = "/api/v2/cost/azure_uc_config"; Map localVarHeaderParams = new HashMap(); @@ -2956,7 +2964,7 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAWSCURConfigs", + "v2.CloudCostManagementApi.listCostAzureUCConfigs", localVarPath, new ArrayList(), localVarHeaderParams, @@ -2964,7 +2972,7 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2976,30 +2984,30 @@ public ApiResponse listCostAWSCURConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management Azure configs. + * List Google Cloud Usage Cost configs. * - *

See {@link #listCostAzureUCConfigsWithHttpInfo}. + *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. * - * @return AzureUCConfigsResponse + * @return GCPUsageCostConfigsResponse * @throws ApiException if fails to make API call */ - public AzureUCConfigsResponse listCostAzureUCConfigs() throws ApiException { - return listCostAzureUCConfigsWithHttpInfo().getData(); + public GCPUsageCostConfigsResponse listCostGCPUsageCostConfigs() throws ApiException { + return listCostGCPUsageCostConfigsWithHttpInfo().getData(); } /** - * List Cloud Cost Management Azure configs. + * List Google Cloud Usage Cost configs. * - *

See {@link #listCostAzureUCConfigsWithHttpInfoAsync}. + *

See {@link #listCostGCPUsageCostConfigsWithHttpInfoAsync}. * - * @return CompletableFuture<AzureUCConfigsResponse> + * @return CompletableFuture<GCPUsageCostConfigsResponse> */ - public CompletableFuture listCostAzureUCConfigsAsync() { - return listCostAzureUCConfigsWithHttpInfoAsync() + public CompletableFuture listCostGCPUsageCostConfigsAsync() { + return listCostGCPUsageCostConfigsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -3007,9 +3015,9 @@ public CompletableFuture listCostAzureUCConfigsAsync() { } /** - * List the Azure configs. + * List the Google Cloud Usage Cost configs. * - * @return ApiResponse<AzureUCConfigsResponse> + * @return ApiResponse<GCPUsageCostConfigsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -3020,17 +3028,17 @@ public CompletableFuture listCostAzureUCConfigsAsync() { * *
429 Too many requests -
*/ - public ApiResponse listCostAzureUCConfigsWithHttpInfo() + public ApiResponse listCostGCPUsageCostConfigsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/azure_uc_config"; + String localVarPath = "/api/v2/cost/gcp_uc_config"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAzureUCConfigs", + "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3045,21 +3053,21 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Cloud Cost Management Azure configs. + * List Google Cloud Usage Cost configs. * - *

See {@link #listCostAzureUCConfigsWithHttpInfo}. + *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<AzureUCConfigsResponse>> + * @return CompletableFuture<ApiResponse<GCPUsageCostConfigsResponse>> */ - public CompletableFuture> - listCostAzureUCConfigsWithHttpInfoAsync() { + public CompletableFuture> + listCostGCPUsageCostConfigsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/azure_uc_config"; + String localVarPath = "/api/v2/cost/gcp_uc_config"; Map localVarHeaderParams = new HashMap(); @@ -3067,7 +3075,7 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostAzureUCConfigs", + "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3075,7 +3083,8 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -3087,30 +3096,30 @@ public ApiResponse listCostAzureUCConfigsWithHttpInfo() localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Google Cloud Usage Cost configs. + * List custom allocation rules. * - *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. + *

See {@link #listCustomAllocationRulesWithHttpInfo}. * - * @return GCPUsageCostConfigsResponse + * @return ArbitraryRuleResponseArray * @throws ApiException if fails to make API call */ - public GCPUsageCostConfigsResponse listCostGCPUsageCostConfigs() throws ApiException { - return listCostGCPUsageCostConfigsWithHttpInfo().getData(); + public ArbitraryRuleResponseArray listCustomAllocationRules() throws ApiException { + return listCustomAllocationRulesWithHttpInfo().getData(); } /** - * List Google Cloud Usage Cost configs. + * List custom allocation rules. * - *

See {@link #listCostGCPUsageCostConfigsWithHttpInfoAsync}. + *

See {@link #listCustomAllocationRulesWithHttpInfoAsync}. * - * @return CompletableFuture<GCPUsageCostConfigsResponse> + * @return CompletableFuture<ArbitraryRuleResponseArray> */ - public CompletableFuture listCostGCPUsageCostConfigsAsync() { - return listCostGCPUsageCostConfigsWithHttpInfoAsync() + public CompletableFuture listCustomAllocationRulesAsync() { + return listCustomAllocationRulesWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -3118,30 +3127,30 @@ public CompletableFuture listCostGCPUsageCostConfig } /** - * List the Google Cloud Usage Cost configs. + * List all custom allocation rules - Retrieve a list of all custom allocation rules for the + * organization * - * @return ApiResponse<GCPUsageCostConfigsResponse> + * @return ApiResponse<ArbitraryRuleResponseArray> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
*/ - public ApiResponse listCostGCPUsageCostConfigsWithHttpInfo() + public ApiResponse listCustomAllocationRulesWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/gcp_uc_config"; + String localVarPath = "/api/v2/cost/arbitrary_rule"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", + "v2.CloudCostManagementApi.listCustomAllocationRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3156,21 +3165,21 @@ public ApiResponse listCostGCPUsageCostConfigsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List Google Cloud Usage Cost configs. + * List custom allocation rules. * - *

See {@link #listCostGCPUsageCostConfigsWithHttpInfo}. + *

See {@link #listCustomAllocationRulesWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<GCPUsageCostConfigsResponse>> + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponseArray>> */ - public CompletableFuture> - listCostGCPUsageCostConfigsWithHttpInfoAsync() { + public CompletableFuture> + listCustomAllocationRulesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/v2/cost/gcp_uc_config"; + String localVarPath = "/api/v2/cost/arbitrary_rule"; Map localVarHeaderParams = new HashMap(); @@ -3178,7 +3187,7 @@ public ApiResponse listCostGCPUsageCostConfigsWithH try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listCostGCPUsageCostConfigs", + "v2.CloudCostManagementApi.listCustomAllocationRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3186,8 +3195,7 @@ public ApiResponse listCostGCPUsageCostConfigsWithH new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -3199,7 +3207,7 @@ public ApiResponse listCostGCPUsageCostConfigsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listCustomCostsFiles. */ @@ -3421,26 +3429,26 @@ public ApiResponse listCustomCostsFilesWithHttpInfo } /** - * List rulesets. + * List tag pipeline rulesets. * - *

See {@link #listRulesetsWithHttpInfo}. + *

See {@link #listTagPipelinesRulesetsWithHttpInfo}. * * @return RulesetRespArray * @throws ApiException if fails to make API call */ - public RulesetRespArray listRulesets() throws ApiException { - return listRulesetsWithHttpInfo().getData(); + public RulesetRespArray listTagPipelinesRulesets() throws ApiException { + return listTagPipelinesRulesetsWithHttpInfo().getData(); } /** - * List rulesets. + * List tag pipeline rulesets. * - *

See {@link #listRulesetsWithHttpInfoAsync}. + *

See {@link #listTagPipelinesRulesetsWithHttpInfoAsync}. * * @return CompletableFuture<RulesetRespArray> */ - public CompletableFuture listRulesetsAsync() { - return listRulesetsWithHttpInfoAsync() + public CompletableFuture listTagPipelinesRulesetsAsync() { + return listTagPipelinesRulesetsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -3461,7 +3469,7 @@ public CompletableFuture listRulesetsAsync() { * 429 Too many requests - * */ - public ApiResponse listRulesetsWithHttpInfo() throws ApiException { + public ApiResponse listTagPipelinesRulesetsWithHttpInfo() throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/tags/enrichment"; @@ -3470,7 +3478,7 @@ public ApiResponse listRulesetsWithHttpInfo() throws ApiExcept Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listRulesets", + "v2.CloudCostManagementApi.listTagPipelinesRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3489,13 +3497,14 @@ public ApiResponse listRulesetsWithHttpInfo() throws ApiExcept } /** - * List rulesets. + * List tag pipeline rulesets. * - *

See {@link #listRulesetsWithHttpInfo}. + *

See {@link #listTagPipelinesRulesetsWithHttpInfo}. * * @return CompletableFuture<ApiResponse<RulesetRespArray>> */ - public CompletableFuture> listRulesetsWithHttpInfoAsync() { + public CompletableFuture> + listTagPipelinesRulesetsWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/tags/enrichment"; @@ -3506,7 +3515,7 @@ public CompletableFuture> listRulesetsWithHttpInfo try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.listRulesets", + "v2.CloudCostManagementApi.listTagPipelinesRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3530,27 +3539,27 @@ public CompletableFuture> listRulesetsWithHttpInfo } /** - * Reorder arbitrary cost rules. + * Reorder custom allocation rules. * - *

See {@link #reorderArbitraryCostRulesWithHttpInfo}. + *

See {@link #reorderCustomAllocationRulesWithHttpInfo}. * * @param body (required) * @throws ApiException if fails to make API call */ - public void reorderArbitraryCostRules(ReorderRuleResourceArray body) throws ApiException { - reorderArbitraryCostRulesWithHttpInfo(body); + public void reorderCustomAllocationRules(ReorderRuleResourceArray body) throws ApiException { + reorderCustomAllocationRulesWithHttpInfo(body); } /** - * Reorder arbitrary cost rules. + * Reorder custom allocation rules. * - *

See {@link #reorderArbitraryCostRulesWithHttpInfoAsync}. + *

See {@link #reorderCustomAllocationRulesWithHttpInfoAsync}. * * @param body (required) * @return CompletableFuture */ - public CompletableFuture reorderArbitraryCostRulesAsync(ReorderRuleResourceArray body) { - return reorderArbitraryCostRulesWithHttpInfoAsync(body) + public CompletableFuture reorderCustomAllocationRulesAsync(ReorderRuleResourceArray body) { + return reorderCustomAllocationRulesWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -3558,7 +3567,7 @@ public CompletableFuture reorderArbitraryCostRulesAsync(ReorderRuleResourc } /** - * Reorder arbitrary cost rules - Change the execution order of arbitrary cost rules. + * Reorder custom allocation rules - Change the execution order of custom allocation rules. * *

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 @@ -3581,14 +3590,14 @@ public CompletableFuture reorderArbitraryCostRulesAsync(ReorderRuleResourc * 429 Too many requests - * */ - public ApiResponse reorderArbitraryCostRulesWithHttpInfo(ReorderRuleResourceArray body) + public ApiResponse reorderCustomAllocationRulesWithHttpInfo(ReorderRuleResourceArray body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling reorderArbitraryCostRules"); + 400, "Missing the required parameter 'body' when calling reorderCustomAllocationRules"); } // create path and map variables String localVarPath = "/api/v2/cost/arbitrary_rule/reorder"; @@ -3597,7 +3606,7 @@ public ApiResponse reorderArbitraryCostRulesWithHttpInfo(ReorderRuleResour Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.reorderArbitraryCostRules", + "v2.CloudCostManagementApi.reorderCustomAllocationRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3616,14 +3625,14 @@ public ApiResponse reorderArbitraryCostRulesWithHttpInfo(ReorderRuleResour } /** - * Reorder arbitrary cost rules. + * Reorder custom allocation rules. * - *

See {@link #reorderArbitraryCostRulesWithHttpInfo}. + *

See {@link #reorderCustomAllocationRulesWithHttpInfo}. * * @param body (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> reorderArbitraryCostRulesWithHttpInfoAsync( + public CompletableFuture> reorderCustomAllocationRulesWithHttpInfoAsync( ReorderRuleResourceArray body) { Object localVarPostBody = body; @@ -3632,7 +3641,8 @@ public CompletableFuture> reorderArbitraryCostRulesWithHttpInf CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling reorderArbitraryCostRules")); + 400, + "Missing the required parameter 'body' when calling reorderCustomAllocationRules")); return result; } // create path and map variables @@ -3644,7 +3654,7 @@ public CompletableFuture> reorderArbitraryCostRulesWithHttpInf try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.reorderArbitraryCostRules", + "v2.CloudCostManagementApi.reorderCustomAllocationRules", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3668,27 +3678,28 @@ public CompletableFuture> reorderArbitraryCostRulesWithHttpInf } /** - * Reorder rulesets. + * Reorder tag pipeline rulesets. * - *

See {@link #reorderRulesetsWithHttpInfo}. + *

See {@link #reorderTagPipelinesRulesetsWithHttpInfo}. * * @param body (required) * @throws ApiException if fails to make API call */ - public void reorderRulesets(ReorderRulesetResourceArray body) throws ApiException { - reorderRulesetsWithHttpInfo(body); + public void reorderTagPipelinesRulesets(ReorderRulesetResourceArray body) throws ApiException { + reorderTagPipelinesRulesetsWithHttpInfo(body); } /** - * Reorder rulesets. + * Reorder tag pipeline rulesets. * - *

See {@link #reorderRulesetsWithHttpInfoAsync}. + *

See {@link #reorderTagPipelinesRulesetsWithHttpInfoAsync}. * * @param body (required) * @return CompletableFuture */ - public CompletableFuture reorderRulesetsAsync(ReorderRulesetResourceArray body) { - return reorderRulesetsWithHttpInfoAsync(body) + public CompletableFuture reorderTagPipelinesRulesetsAsync( + ReorderRulesetResourceArray body) { + return reorderTagPipelinesRulesetsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -3709,14 +3720,14 @@ public CompletableFuture reorderRulesetsAsync(ReorderRulesetResourceArray * 429 Too many requests - * */ - public ApiResponse reorderRulesetsWithHttpInfo(ReorderRulesetResourceArray body) + public ApiResponse reorderTagPipelinesRulesetsWithHttpInfo(ReorderRulesetResourceArray body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling reorderRulesets"); + 400, "Missing the required parameter 'body' when calling reorderTagPipelinesRulesets"); } // create path and map variables String localVarPath = "/api/v2/tags/enrichment/reorder"; @@ -3725,7 +3736,7 @@ public ApiResponse reorderRulesetsWithHttpInfo(ReorderRulesetResourceArray Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.reorderRulesets", + "v2.CloudCostManagementApi.reorderTagPipelinesRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3744,14 +3755,14 @@ public ApiResponse reorderRulesetsWithHttpInfo(ReorderRulesetResourceArray } /** - * Reorder rulesets. + * Reorder tag pipeline rulesets. * - *

See {@link #reorderRulesetsWithHttpInfo}. + *

See {@link #reorderTagPipelinesRulesetsWithHttpInfo}. * * @param body (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> reorderRulesetsWithHttpInfoAsync( + public CompletableFuture> reorderTagPipelinesRulesetsWithHttpInfoAsync( ReorderRulesetResourceArray body) { Object localVarPostBody = body; @@ -3760,7 +3771,8 @@ public CompletableFuture> reorderRulesetsWithHttpInfoAsync( CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling reorderRulesets")); + 400, + "Missing the required parameter 'body' when calling reorderTagPipelinesRulesets")); return result; } // create path and map variables @@ -3772,7 +3784,7 @@ public CompletableFuture> reorderRulesetsWithHttpInfoAsync( try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.reorderRulesets", + "v2.CloudCostManagementApi.reorderTagPipelinesRulesets", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3795,177 +3807,6 @@ public CompletableFuture> reorderRulesetsWithHttpInfoAsync( null); } - /** - * Update arbitrary cost rule. - * - *

See {@link #updateArbitraryCostRuleWithHttpInfo}. - * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @param body (required) - * @return ArbitraryRuleResponse - * @throws ApiException if fails to make API call - */ - public ArbitraryRuleResponse updateArbitraryCostRule(Long ruleId, ArbitraryCostUpsertRequest body) - throws ApiException { - return updateArbitraryCostRuleWithHttpInfo(ruleId, body).getData(); - } - - /** - * Update arbitrary cost rule. - * - *

See {@link #updateArbitraryCostRuleWithHttpInfoAsync}. - * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @param body (required) - * @return CompletableFuture<ArbitraryRuleResponse> - */ - public CompletableFuture updateArbitraryCostRuleAsync( - Long ruleId, ArbitraryCostUpsertRequest body) { - return updateArbitraryCostRuleWithHttpInfoAsync(ruleId, body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Update an existing arbitrary cost rule with new filters and allocation strategy. - * - *

Strategy Methods: - 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. - PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES: - * Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: - * evaluate_grouped_by_tag_keys. - PERCENT: Allocates fixed percentages to - * specific tags. Requires: allocated_by (array of percentage allocations). - - * USAGE_METRIC: Allocates based on usage metrics (implementation varies). - * - *

Filter Conditions: - Use value for single-value - * conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is - * all values", "is untagged" - Use values for multi-value conditions: "in", "not - * in" - Cannot use both value and values simultaneously. - * - *

Supported operators: is, is not, is all values, is untagged, contains, does - * not contain, in, not in, =, !=, like, not like - * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @param body (required) - * @return ApiResponse<ArbitraryRuleResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
- */ - public ApiResponse updateArbitraryCostRuleWithHttpInfo( - Long ruleId, ArbitraryCostUpsertRequest body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'ruleId' when calling updateArbitraryCostRule"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateArbitraryCostRule"); - } - // create path and map variables - String localVarPath = - "/api/v2/cost/arbitrary_rule/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.CloudCostManagementApi.updateArbitraryCostRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Update arbitrary cost rule. - * - *

See {@link #updateArbitraryCostRuleWithHttpInfo}. - * - * @param ruleId The unique identifier of the arbitrary cost rule (required) - * @param body (required) - * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> - */ - public CompletableFuture> - updateArbitraryCostRuleWithHttpInfoAsync(Long ruleId, ArbitraryCostUpsertRequest body) { - Object localVarPostBody = body; - - // verify the required parameter 'ruleId' is set - if (ruleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'ruleId' when calling updateArbitraryCostRule")); - return result; - } - - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'body' when calling updateArbitraryCostRule")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/cost/arbitrary_rule/{rule_id}" - .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.CloudCostManagementApi.updateArbitraryCostRule", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - /** * Update Cloud Cost Management AWS CUR config. * @@ -4463,32 +4304,205 @@ public ApiResponse updateCostGCPUsageCostConfigWithH } /** - * Update ruleset. + * Update custom allocation rule. + * + *

See {@link #updateCustomAllocationRuleWithHttpInfo}. + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @param body (required) + * @return ArbitraryRuleResponse + * @throws ApiException if fails to make API call + */ + public ArbitraryRuleResponse updateCustomAllocationRule( + Long ruleId, ArbitraryCostUpsertRequest body) throws ApiException { + return updateCustomAllocationRuleWithHttpInfo(ruleId, body).getData(); + } + + /** + * Update custom allocation rule. + * + *

See {@link #updateCustomAllocationRuleWithHttpInfoAsync}. + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @param body (required) + * @return CompletableFuture<ArbitraryRuleResponse> + */ + public CompletableFuture updateCustomAllocationRuleAsync( + Long ruleId, ArbitraryCostUpsertRequest body) { + return updateCustomAllocationRuleWithHttpInfoAsync(ruleId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing custom allocation rule with new filters and allocation strategy. + * + *

Strategy Methods: - 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. - PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES: + * Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: + * evaluate_grouped_by_tag_keys. - PERCENT: Allocates fixed percentages to + * specific tags. Requires: allocated_by (array of percentage allocations). - + * USAGE_METRIC: Allocates based on usage metrics (implementation varies). + * + *

Filter Conditions: - Use value for single-value + * conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is + * all values", "is untagged" - Use values for multi-value conditions: "in", "not + * in" - Cannot use both value and values simultaneously. + * + *

Supported operators: is, is not, is all values, is untagged, contains, does + * not contain, in, not in, =, !=, like, not like + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @param body (required) + * @return ApiResponse<ArbitraryRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
429 Too many requests -
+ */ + public ApiResponse updateCustomAllocationRuleWithHttpInfo( + Long ruleId, ArbitraryCostUpsertRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'ruleId' when calling updateCustomAllocationRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateCustomAllocationRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.updateCustomAllocationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update custom allocation rule. + * + *

See {@link #updateCustomAllocationRuleWithHttpInfo}. + * + * @param ruleId The unique identifier of the custom allocation rule (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<ArbitraryRuleResponse>> + */ + public CompletableFuture> + updateCustomAllocationRuleWithHttpInfoAsync(Long ruleId, ArbitraryCostUpsertRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling updateCustomAllocationRule")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateCustomAllocationRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/cost/arbitrary_rule/{rule_id}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CloudCostManagementApi.updateCustomAllocationRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update tag pipeline ruleset. * - *

See {@link #updateRulesetWithHttpInfo}. + *

See {@link #updateTagPipelinesRulesetWithHttpInfo}. * * @param rulesetId The unique identifier of the ruleset (required) * @param body (required) * @return RulesetResp * @throws ApiException if fails to make API call */ - public RulesetResp updateRuleset(String rulesetId, UpdateRulesetRequest body) + public RulesetResp updateTagPipelinesRuleset(String rulesetId, UpdateRulesetRequest body) throws ApiException { - return updateRulesetWithHttpInfo(rulesetId, body).getData(); + return updateTagPipelinesRulesetWithHttpInfo(rulesetId, body).getData(); } /** - * Update ruleset. + * Update tag pipeline ruleset. * - *

See {@link #updateRulesetWithHttpInfoAsync}. + *

See {@link #updateTagPipelinesRulesetWithHttpInfoAsync}. * * @param rulesetId The unique identifier of the ruleset (required) * @param body (required) * @return CompletableFuture<RulesetResp> */ - public CompletableFuture updateRulesetAsync( + public CompletableFuture updateTagPipelinesRulesetAsync( String rulesetId, UpdateRulesetRequest body) { - return updateRulesetWithHttpInfoAsync(rulesetId, body) + return updateTagPipelinesRulesetWithHttpInfoAsync(rulesetId, body) .thenApply( response -> { return response.getData(); @@ -4511,20 +4525,20 @@ public CompletableFuture updateRulesetAsync( * 429 Too many requests - * */ - public ApiResponse updateRulesetWithHttpInfo( + public ApiResponse updateTagPipelinesRulesetWithHttpInfo( String rulesetId, UpdateRulesetRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'rulesetId' is set if (rulesetId == null) { throw new ApiException( - 400, "Missing the required parameter 'rulesetId' when calling updateRuleset"); + 400, "Missing the required parameter 'rulesetId' when calling updateTagPipelinesRuleset"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateRuleset"); + 400, "Missing the required parameter 'body' when calling updateTagPipelinesRuleset"); } // create path and map variables String localVarPath = @@ -4535,7 +4549,7 @@ public ApiResponse updateRulesetWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.updateRuleset", + "v2.CloudCostManagementApi.updateTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -4554,15 +4568,15 @@ public ApiResponse updateRulesetWithHttpInfo( } /** - * Update ruleset. + * Update tag pipeline ruleset. * - *

See {@link #updateRulesetWithHttpInfo}. + *

See {@link #updateTagPipelinesRulesetWithHttpInfo}. * * @param rulesetId The unique identifier of the ruleset (required) * @param body (required) * @return CompletableFuture<ApiResponse<RulesetResp>> */ - public CompletableFuture> updateRulesetWithHttpInfoAsync( + public CompletableFuture> updateTagPipelinesRulesetWithHttpInfoAsync( String rulesetId, UpdateRulesetRequest body) { Object localVarPostBody = body; @@ -4571,7 +4585,8 @@ public CompletableFuture> updateRulesetWithHttpInfoAsyn CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'rulesetId' when calling updateRuleset")); + 400, + "Missing the required parameter 'rulesetId' when calling updateTagPipelinesRuleset")); return result; } @@ -4580,7 +4595,7 @@ public CompletableFuture> updateRulesetWithHttpInfoAsyn CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateRuleset")); + 400, "Missing the required parameter 'body' when calling updateTagPipelinesRuleset")); return result; } // create path and map variables @@ -4594,7 +4609,7 @@ public CompletableFuture> updateRulesetWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.CloudCostManagementApi.updateRuleset", + "v2.CloudCostManagementApi.updateTagPipelinesRuleset", localVarPath, new ArrayList(), localVarHeaderParams, diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java index 78e153a2e80..93d54455b61 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArray.java @@ -20,7 +20,10 @@ import java.util.Objects; /** The definition of ArbitraryRuleResponseArray object. */ -@JsonPropertyOrder({ArbitraryRuleResponseArray.JSON_PROPERTY_DATA}) +@JsonPropertyOrder({ + ArbitraryRuleResponseArray.JSON_PROPERTY_DATA, + ArbitraryRuleResponseArray.JSON_PROPERTY_META +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ArbitraryRuleResponseArray { @@ -28,6 +31,9 @@ public class ArbitraryRuleResponseArray { public static final String JSON_PROPERTY_DATA = "data"; private List data = new ArrayList<>(); + public static final String JSON_PROPERTY_META = "meta"; + private ArbitraryRuleResponseArrayMeta meta; + public ArbitraryRuleResponseArray() {} @JsonCreator @@ -66,6 +72,28 @@ public void setData(List data) { this.data = data; } + public ArbitraryRuleResponseArray meta(ArbitraryRuleResponseArrayMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * The ArbitraryRuleResponseArray meta. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ArbitraryRuleResponseArrayMeta getMeta() { + return meta; + } + + public void setMeta(ArbitraryRuleResponseArrayMeta meta) { + this.meta = meta; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -123,13 +151,14 @@ public boolean equals(Object o) { } ArbitraryRuleResponseArray arbitraryRuleResponseArray = (ArbitraryRuleResponseArray) o; return Objects.equals(this.data, arbitraryRuleResponseArray.data) + && Objects.equals(this.meta, arbitraryRuleResponseArray.meta) && Objects.equals( this.additionalProperties, arbitraryRuleResponseArray.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, additionalProperties); + return Objects.hash(data, meta, additionalProperties); } @Override @@ -137,6 +166,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ArbitraryRuleResponseArray {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArrayMeta.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArrayMeta.java new file mode 100644 index 00000000000..c5431fff5a3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseArrayMeta.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The ArbitraryRuleResponseArray meta. */ +@JsonPropertyOrder({ArbitraryRuleResponseArrayMeta.JSON_PROPERTY_TOTAL_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ArbitraryRuleResponseArrayMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + private Long totalCount; + + public ArbitraryRuleResponseArrayMeta totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The meta total_count. + * + * @return totalCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ArbitraryRuleResponseArrayMeta + */ + @JsonAnySetter + public ArbitraryRuleResponseArrayMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ArbitraryRuleResponseArrayMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ArbitraryRuleResponseArrayMeta arbitraryRuleResponseArrayMeta = + (ArbitraryRuleResponseArrayMeta) o; + return Objects.equals(this.totalCount, arbitraryRuleResponseArrayMeta.totalCount) + && Objects.equals( + this.additionalProperties, arbitraryRuleResponseArrayMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ArbitraryRuleResponseArrayMeta {\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java index 10aed596aea..32f1f9e9af5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ArbitraryRuleResponseDataAttributes.java @@ -27,6 +27,7 @@ ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_ENABLED, ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_LAST_MODIFIED_USER_UUID, ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_ORDER_ID, + ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_PROCESSING_STATUS, ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_PROVIDER, ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_REJECTED, ArbitraryRuleResponseDataAttributes.JSON_PROPERTY_RULE_NAME, @@ -55,6 +56,9 @@ public class ArbitraryRuleResponseDataAttributes { public static final String JSON_PROPERTY_ORDER_ID = "order_id"; private Long orderId; + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + private String processingStatus; + public static final String JSON_PROPERTY_PROVIDER = "provider"; private List provider = new ArrayList<>(); @@ -220,6 +224,27 @@ public void setOrderId(Long orderId) { this.orderId = orderId; } + public ArbitraryRuleResponseDataAttributes processingStatus(String processingStatus) { + this.processingStatus = processingStatus; + return this; + } + + /** + * The attributes processing_status. + * + * @return processingStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessingStatus() { + return processingStatus; + } + + public void setProcessingStatus(String processingStatus) { + this.processingStatus = processingStatus; + } + public ArbitraryRuleResponseDataAttributes provider(List provider) { this.provider = provider; return this; @@ -431,6 +456,8 @@ public boolean equals(Object o) { && Objects.equals( this.lastModifiedUserUuid, arbitraryRuleResponseDataAttributes.lastModifiedUserUuid) && Objects.equals(this.orderId, arbitraryRuleResponseDataAttributes.orderId) + && Objects.equals( + this.processingStatus, arbitraryRuleResponseDataAttributes.processingStatus) && Objects.equals(this.provider, arbitraryRuleResponseDataAttributes.provider) && Objects.equals(this.rejected, arbitraryRuleResponseDataAttributes.rejected) && Objects.equals(this.ruleName, arbitraryRuleResponseDataAttributes.ruleName) @@ -450,6 +477,7 @@ public int hashCode() { enabled, lastModifiedUserUuid, orderId, + processingStatus, provider, rejected, ruleName, @@ -471,6 +499,7 @@ public String toString() { .append(toIndentedString(lastModifiedUserUuid)) .append("\n"); sb.append(" orderId: ").append(toIndentedString(orderId)).append("\n"); + sb.append(" processingStatus: ").append(toIndentedString(processingStatus)).append("\n"); sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); sb.append(" rejected: ").append(toIndentedString(rejected)).append("\n"); sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java index 5c512b412d6..39856a978ad 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RulesetRespDataAttributes.java @@ -27,6 +27,7 @@ RulesetRespDataAttributes.JSON_PROPERTY_MODIFIED, RulesetRespDataAttributes.JSON_PROPERTY_NAME, RulesetRespDataAttributes.JSON_PROPERTY_POSITION, + RulesetRespDataAttributes.JSON_PROPERTY_PROCESSING_STATUS, RulesetRespDataAttributes.JSON_PROPERTY_RULES, RulesetRespDataAttributes.JSON_PROPERTY_VERSION }) @@ -52,6 +53,9 @@ public class RulesetRespDataAttributes { public static final String JSON_PROPERTY_POSITION = "position"; private Integer position; + public static final String JSON_PROPERTY_PROCESSING_STATUS = "processing_status"; + private String processingStatus; + public static final String JSON_PROPERTY_RULES = "rules"; private List rules = new ArrayList<>(); @@ -208,6 +212,27 @@ public void setPosition(Integer position) { this.position = position; } + public RulesetRespDataAttributes processingStatus(String processingStatus) { + this.processingStatus = processingStatus; + return this; + } + + /** + * The attributes processing_status. + * + * @return processingStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProcessingStatus() { + return processingStatus; + } + + public void setProcessingStatus(String processingStatus) { + this.processingStatus = processingStatus; + } + public RulesetRespDataAttributes rules(List rules) { this.rules = rules; for (RulesetRespDataAttributesRulesItems item : rules) { @@ -319,6 +344,7 @@ public boolean equals(Object o) { && Objects.equals(this.modified, rulesetRespDataAttributes.modified) && Objects.equals(this.name, rulesetRespDataAttributes.name) && Objects.equals(this.position, rulesetRespDataAttributes.position) + && Objects.equals(this.processingStatus, rulesetRespDataAttributes.processingStatus) && Objects.equals(this.rules, rulesetRespDataAttributes.rules) && Objects.equals(this.version, rulesetRespDataAttributes.version) && Objects.equals( @@ -334,6 +360,7 @@ public int hashCode() { modified, name, position, + processingStatus, rules, version, additionalProperties); @@ -351,6 +378,7 @@ public String toString() { sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" position: ").append(toIndentedString(position)).append("\n"); + sb.append(" processingStatus: ").append(toIndentedString(processingStatus)).append("\n"); sb.append(" rules: ").append(toIndentedString(rules)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze deleted file mode 100644 index 694e0deed84..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-15T20:24:10.628Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..d9f8ee1fb96 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:31:23.072Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.json new file mode 100644 index 00000000000..fad06e15016 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_custom_allocation_rule_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"costs_to_allocate\":[{\"condition\":\"is\",\"tag\":\"account_id\",\"value\":\"123456789\"},{\"condition\":\"in\",\"tag\":\"environment\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"enabled\":true,\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"allocated_by_tag_keys\":[\"team\",\"environment\"],\"based_on_costs\":[{\"condition\":\"is\",\"tag\":\"service\",\"value\":\"web-api\"},{\"condition\":\"not in\",\"tag\":\"team\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"granularity\":\"daily\",\"method\":\"proportional\"},\"type\":\"shared\"},\"type\":\"upsert_arbitrary_rule\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cost/arbitrary_rule", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"683\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-10-08T19:31:23.246204745Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-10-08T19:31:23.246204745Z\",\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9d41f496-6e72-bfbb-fc5e-2e7c5f3e870b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze deleted file mode 100644 index 8be30f84af4..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-16T16:51:02.186Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.freeze new file mode 100644 index 00000000000..335cd5995fc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T18:26:06.563Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.json similarity index 81% rename from src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.json index 89d1fe4d4c0..02d36197278 100644 --- a/src/test/resources/cassettes/features/v2/Create_ruleset_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_tag_pipeline_ruleset_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"1b680ec0-8e29-4b79-bb01-45f0c645a789\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1758041403,\"nanos\":117388000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1758041403,\"nanos\":117388000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3603412}}}", + "body": "{\"data\":{\"id\":\"ee10c3ff-312f-464c-b4f6-46adaa6d00a1\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1759947966,\"nanos\":679638000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1759947966,\"nanos\":679638000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3611102}}}", "headers": { "Content-Type": [ "application/vnd.api+json" diff --git a/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze deleted file mode 100644 index 5bba6c73e72..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T21:01:36.419Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.freeze new file mode 100644 index 00000000000..3f009521ff8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:35:19.003Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.json similarity index 77% rename from src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.json rename to src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.json index c91d97d6ce3..3e21cda5b7b 100644 --- a/src/test/resources/cassettes/features/v2/Delete_arbitrary_cost_rule_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_custom_allocation_rule_returns_No_Content_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/cost/arbitrary_rule/123456", + "path": "/api/v2/cost/arbitrary_rule/683", "keepAlive": false, "secure": true }, @@ -18,6 +18,6 @@ "timeToLive": { "unlimited": true }, - "id": "fe566107-8455-0285-b637-2c39e2b6b8f5" + "id": "e708aa98-8ed3-0e2a-1632-c4f0fad22620" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze deleted file mode 100644 index 9ddc2f58a49..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T20:43:38.898Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.freeze new file mode 100644 index 00000000000..9d25abe53b8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:17:11.635Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.json similarity index 72% rename from src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.json rename to src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.json index e601dbdf406..a4d66f2e4e5 100644 --- a/src/test/resources/cassettes/features/v2/Delete_ruleset_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_tag_pipeline_ruleset_returns_No_Content_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/tags/enrichment/1c5dae14-237d-4b9a-a515-aa55b3939142", + "path": "/api/v2/tags/enrichment/ee10c3ff-312f-464c-b4f6-46adaa6d00a1", "keepAlive": false, "secure": true }, @@ -18,6 +18,6 @@ "timeToLive": { "unlimited": true }, - "id": "761b458d-79fe-c4fa-b299-56d33c5a4353" + "id": "a72a7ba3-bce3-9219-3545-8ff85c4a9452" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze deleted file mode 100644 index 19ddeadc142..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T18:25:21.818Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json deleted file mode 100644 index 487048a9672..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_arbitrary_cost_rule_returns_OK_response.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/cost/arbitrary_rule/123456", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"123456\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-11T18:23:20.518112Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-11T18:23:20.518112Z\",\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "067887c5-0a54-547f-c713-e41ccebe186b" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..b1615e44693 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:33:08.375Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.json new file mode 100644 index 00000000000..514483d7573 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_custom_allocation_rule_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/arbitrary_rule/683", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"683\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-10-08T19:31:23.246204Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"processing_status\":\"error\",\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-10-08T19:31:23.246204Z\",\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c0a2afdf-f2d7-f3f0-6a1d-0460b37e86e3" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze deleted file mode 100644 index bd05b8d6aa1..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T18:54:36.821Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json deleted file mode 100644 index 9270a4a08a2..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_ruleset_returns_OK_response.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/tags/enrichment/da0e30e2-615d-4dae-9a22-38cf86a87dde", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"da0e30e2-615d-4dae-9a22-38cf86a87dde\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1757616255,\"nanos\":64603000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1757616255,\"nanos\":64603000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3601897}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "0231df81-f41f-2201-958d-0ae49fd6ffab" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.freeze new file mode 100644 index 00000000000..4ef65e062fe --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T18:38:56.657Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.json new file mode 100644 index 00000000000..06c35a91d4e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_tag_pipeline_ruleset_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/tags/enrichment/ee10c3ff-312f-464c-b4f6-46adaa6d00a1", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"ee10c3ff-312f-464c-b4f6-46adaa6d00a1\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1759947966,\"nanos\":679638000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1759947966,\"nanos\":679638000},\"name\":\"New Ruleset\",\"position\":1,\"processing_status\":\"error\",\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3611102}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c20c89e6-60d2-f5c8-c627-b4b722a7b841" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze deleted file mode 100644 index ee4c66fe2ff..00000000000 --- a/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T18:24:00.228Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json deleted file mode 100644 index f2b9adaf40a..00000000000 --- a/src/test/resources/cassettes/features/v2/List_arbitrary_cost_rules_returns_OK_response.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/cost/arbitrary_rule", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":[{\"id\":\"123456\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-11T18:23:20.518112Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-11T18:23:20.518112Z\",\"version\":1}}]}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "0d76ade9-5e6f-d157-c7da-baba79388791" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.freeze new file mode 100644 index 00000000000..fd84464618d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:33:51.784Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.json new file mode 100644 index 00000000000..70087c5e6b5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_custom_allocation_rules_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/arbitrary_rule", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"683\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-10-08T19:31:23.246204Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"processing_status\":\"error\",\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-10-08T19:31:23.246204Z\",\"version\":1}}],\"meta\":{\"total_count\":1}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0d76ade9-5e6f-d157-c7da-baba79388791" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze deleted file mode 100644 index 8bf4b1854aa..00000000000 --- a/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T20:35:14.784Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json deleted file mode 100644 index 5a643ea1e66..00000000000 --- a/src/test/resources/cassettes/features/v2/List_rulesets_returns_OK_response.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/tags/enrichment", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":[{\"id\":\"1c5dae14-237d-4b9a-a515-aa55b3939142\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1757622359,\"nanos\":552132000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1757622359,\"nanos\":552132000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3601919}}]}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "3006d123-616e-cf71-5de6-71c1753690c2" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.freeze new file mode 100644 index 00000000000..273f890ec7c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T18:35:31.385Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.json new file mode 100644 index 00000000000..4af31cb4cf8 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_pipeline_rulesets_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/tags/enrichment", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"ee10c3ff-312f-464c-b4f6-46adaa6d00a1\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1759947966,\"nanos\":679638000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1759947966,\"nanos\":679638000},\"name\":\"New Ruleset\",\"position\":1,\"processing_status\":\"error\",\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3611102}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3006d123-616e-cf71-5de6-71c1753690c2" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze deleted file mode 100644 index ecb5b7648d8..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T21:00:21.176Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json deleted file mode 100644 index 5dd68fe3d38..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_arbitrary_cost_rule_returns_OK_response.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"costs_to_allocate\":[{\"condition\":\"is\",\"tag\":\"account_id\",\"value\":\"123456789\",\"values\":[]},{\"condition\":\"in\",\"tag\":\"environment\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"enabled\":true,\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"allocated_by_tag_keys\":[\"team\",\"environment\"],\"based_on_costs\":[{\"condition\":\"is\",\"tag\":\"service\",\"value\":\"web-api\",\"values\":[]},{\"condition\":\"not in\",\"tag\":\"team\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"granularity\":\"daily\",\"method\":\"proportional\"},\"type\":\"shared\"},\"type\":\"upsert_arbitrary_rule\"}}" - }, - "headers": {}, - "method": "PATCH", - "path": "/api/v2/cost/arbitrary_rule/123456", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"123456\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-11T20:59:19.952563Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-11T21:00:21.353162Z\",\"version\":1}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "a8cb74f5-a061-90da-8201-9079a314b320" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..3c37372ce8d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:34:38.940Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.json similarity index 61% rename from src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.json index dc97db70f22..4108c1b354a 100644 --- a/src/test/resources/cassettes/features/v2/Create_arbitrary_cost_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_custom_allocation_rule_returns_OK_response.json @@ -6,13 +6,13 @@ "json": "{\"data\":{\"attributes\":{\"costs_to_allocate\":[{\"condition\":\"is\",\"tag\":\"account_id\",\"value\":\"123456789\",\"values\":[]},{\"condition\":\"in\",\"tag\":\"environment\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"enabled\":true,\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"allocated_by_tag_keys\":[\"team\",\"environment\"],\"based_on_costs\":[{\"condition\":\"is\",\"tag\":\"service\",\"value\":\"web-api\",\"values\":[]},{\"condition\":\"not in\",\"tag\":\"team\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"granularity\":\"daily\",\"method\":\"proportional\"},\"type\":\"shared\"},\"type\":\"upsert_arbitrary_rule\"}}" }, "headers": {}, - "method": "POST", - "path": "/api/v2/cost/arbitrary_rule", + "method": "PATCH", + "path": "/api/v2/cost/arbitrary_rule/683", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"435\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-15T20:23:11.705977625Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-15T20:23:11.705977625Z\",\"version\":1}}}", + "body": "{\"data\":{\"id\":\"683\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-10-08T19:31:23.246204Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-10-08T19:34:39.054605Z\",\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "bb520c0c-d608-1a10-34c1-5ed0b3d5d0c3" + "id": "e2a348c2-1f0b-1c26-c7cf-fd2a2fa0d838" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze deleted file mode 100644 index 1d97407de7a..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-09-11T20:42:36.765Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json deleted file mode 100644 index ba68d9dcb80..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_ruleset_returns_OK_response.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"last_version\":3601919,\"rules\":[{\"enabled\":true,\"mapping\":{\"destination_key\":\"team_owner\",\"if_not_exists\":true,\"source_keys\":[\"account_name\",\"account_id\"]},\"name\":\"Account Name Mapping\",\"query\":null,\"reference_table\":null}]},\"type\":\"update_ruleset\"}}" - }, - "headers": {}, - "method": "PATCH", - "path": "/api/v2/tags/enrichment/1c5dae14-237d-4b9a-a515-aa55b3939142", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"1c5dae14-237d-4b9a-a515-aa55b3939142\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1757623356,\"nanos\":940863000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1757623356,\"nanos\":940863000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Account Name Mapping\",\"enabled\":true,\"query\":null,\"mapping\":{\"source_keys\":[\"account_name\",\"account_id\"],\"destination_key\":\"team_owner\",\"if_not_exists\":true},\"reference_table\":null,\"metadata\":null}],\"version\":3601923}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "25bc7203-6375-074a-5dfe-6e27a86f9f1d" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.freeze new file mode 100644 index 00000000000..3de83d42681 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-10-08T19:15:10.916Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.json new file mode 100644 index 00000000000..ec0c26fb27e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_tag_pipeline_ruleset_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"last_version\":3611102,\"rules\":[{\"enabled\":true,\"mapping\":{\"destination_key\":\"team_owner\",\"if_not_exists\":true,\"source_keys\":[\"account_name\",\"account_id\"]},\"name\":\"Account Name Mapping\",\"query\":null,\"reference_table\":null}]},\"id\":\"New Ruleset\",\"type\":\"update_ruleset\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/tags/enrichment/ee10c3ff-312f-464c-b4f6-46adaa6d00a1", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"ee10c3ff-312f-464c-b4f6-46adaa6d00a1\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1759950911,\"nanos\":31873000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1759950911,\"nanos\":31873000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Account Name Mapping\",\"enabled\":true,\"query\":null,\"mapping\":{\"source_keys\":[\"account_name\",\"account_id\"],\"destination_key\":\"team_owner\",\"if_not_exists\":true},\"reference_table\":null,\"metadata\":null}],\"version\":3611113}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5817a423-81a8-0104-44d8-390801a503c7" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature index 78309ae90bc..ba6cdda25c3 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature @@ -13,14 +13,14 @@ Feature: Cloud Cost Management And a valid "appKeyAuth" key in the system And an instance of "CloudCostManagement" API - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Create Cloud Cost Management AWS CUR config returns "Bad Request" response Given new "CreateCostAWSCURConfig" request And body with value {"data": {"attributes": {"account_filters": {"excluded_accounts": ["123456789123", "123456789143"], "include_new_accounts": true, "included_accounts": ["123456789123", "123456789143"]}, "account_id": "123456789123", "bucket_name": "dd-cost-bucket", "bucket_region": "us-east-1", "report_name": "dd-report-name", "report_prefix": "dd-report-prefix"}, "type": "aws_cur_config_post_request"}} When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Create Cloud Cost Management AWS CUR config returns "OK" response Given new "CreateCostAWSCURConfig" request And body with value {"data": {"attributes": {"account_id": "123456789123", "bucket_name": "dd-cost-bucket", "bucket_region": "us-east-1", "report_name": "dd-report-name", "report_prefix": "dd-report-prefix"}, "type": "aws_cur_config_post_request"}} @@ -28,14 +28,14 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456789123" - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Create Cloud Cost Management Azure configs returns "Bad Request" response Given new "CreateCostAzureUCConfigs" request And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "this_is_an_invalid_scope"}, "type": "azure_uc_config_post_request"}} When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Create Cloud Cost Management Azure configs returns "OK" response Given new "CreateCostAzureUCConfigs" request And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} @@ -43,14 +43,14 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.configs[0].account_id" is equal to "1234abcd-1234-abcd-1234-1234abcd1234" - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Create Google Cloud Usage Cost config returns "Bad Request" response Given new "CreateCostGCPUsageCostConfig" request And body with value {"data": {"attributes": {"billing_account_id": "123456_A123BC_12AB34", "bucket_name": "dd-cost-bucket", "export_dataset_name": "billing", "export_prefix": "datadog_cloud_cost_usage_export", "export_project_name": "dd-cloud-cost-report", "service_account": "InvalidServiceAccount"}, "type": "gcp_uc_config_post_request"}} When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Create Google Cloud Usage Cost config returns "OK" response Given new "CreateCostGCPUsageCostConfig" request And body with value {"data": {"attributes": {"billing_account_id": "123456_A123BC_12AB34", "bucket_name": "dd-cost-bucket", "export_dataset_name": "billing", "export_prefix": "datadog_cloud_cost_usage_export", "export_project_name": "dd-cloud-cost-report", "service_account": "dd-ccm-gcp-integration@my-environment.iam.gserviceaccount.com"}, "type": "gcp_uc_config_post_request"}} @@ -58,158 +58,158 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34" - @replay-only @team:Datadog/cloud-cost-management - Scenario: Create arbitrary cost rule returns "OK" response - Given new "CreateArbitraryCostRule" request - And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789", "values":[]}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api", "values":[]}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} + @replay-only @team:DataDog/cloud-cost-management + Scenario: Create custom allocation rule returns "OK" response + Given new "CreateCustomAllocationRule" request + And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789"}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api"}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "arbitrary_rule" And the response "data.attributes.rule_name" is equal to "example-arbitrary-cost-rule" - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Create or update a budget returns "Bad Request" response Given new "UpsertBudget" request And body with value {"data": {"attributes": {"created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"amount": 500, "month": 202501, "tag_filters": [{"tag_key": "service", "tag_value": "ec2"}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a"}} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Create or update a budget returns "Not Found" response Given new "UpsertBudget" request And body with value {"data": {"attributes": {"created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"amount": 500, "month": 202501, "tag_filters": [{"tag_key": "service", "tag_value": "ec2"}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a"}} When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Create or update a budget returns "OK" response Given new "UpsertBudget" request And body with value {"data": {"attributes": {"created_at": 1738258683590, "created_by": "00000000-0a0a-0a0a-aaa0-00000000000a", "end_month": 202502, "entries": [{"amount": 500, "month": 202501, "tag_filters": [{"tag_key": "service", "tag_value": "ec2"}]}], "metrics_query": "aws.cost.amortized{service:ec2} by {service}", "name": "my budget", "org_id": 123, "start_month": 202501, "total_amount": 1000, "updated_at": 1738258683590, "updated_by": "00000000-0a0a-0a0a-aaa0-00000000000a"}, "id": "00000000-0a0a-0a0a-aaa0-00000000000a"}} When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management - Scenario: Create ruleset returns "OK" response - Given new "CreateRuleset" request + @replay-only @team:DataDog/cloud-cost-management + Scenario: Create tag pipeline ruleset returns "OK" response + Given new "CreateTagPipelinesRuleset" request And body with value {"data": {"attributes": {"enabled": true, "rules": [{"enabled": true, "mapping": null, "name": "Add Cost Center Tag", "query": {"addition": {"key": "cost_center", "value": "engineering"}, "case_insensitivity": false, "if_not_exists": true, "query": "account_id:\"123456789\" AND service:\"web-api\""}, "reference_table": null}]}, "id": "New Ruleset", "type": "create_ruleset"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "ruleset" And the response "data.attributes.name" is equal to "New Ruleset" - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "Bad Request" response Given new "DeleteCostAWSCURConfig" request And request contains "cloud_account_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "No Content" response Given new "DeleteCostAWSCURConfig" request And request contains "cloud_account_id" parameter with value 100 When the request is sent Then the response status is 204 No Content - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "Not Found" response Given new "DeleteCostAWSCURConfig" request And request contains "cloud_account_id" parameter with value 123456 When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Delete Cloud Cost Management Azure config returns "Bad Request" response Given new "DeleteCostAzureUCConfig" request And request contains "cloud_account_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Delete Cloud Cost Management Azure config returns "No Content" response Given new "DeleteCostAzureUCConfig" request And request contains "cloud_account_id" parameter with value 100 When the request is sent Then the response status is 204 No Content - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Delete Cloud Cost Management Azure config returns "Not Found" response Given new "DeleteCostAzureUCConfig" request And request contains "cloud_account_id" parameter with value 123456 When the request is sent Then the response status is 404 Not Found - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Delete Custom Costs File returns "No Content" response Given new "DeleteCustomCostsFile" request And request contains "file_id" parameter with value "9d055d22-a838-4e9f-bc34-a4f9ab66280c" When the request is sent Then the response status is 204 No Content - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Delete Custom Costs file returns "No Content" response Given new "DeleteCustomCostsFile" request And request contains "file_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Delete Custom Costs file returns "Not Found" response Given new "DeleteCustomCostsFile" request And request contains "file_id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Delete Google Cloud Usage Cost config returns "Bad Request" response Given new "DeleteCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Delete Google Cloud Usage Cost config returns "No Content" response Given new "DeleteCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 100 When the request is sent Then the response status is 204 No Content - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Delete Google Cloud Usage Cost config returns "Not Found" response Given new "DeleteCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 123456 When the request is sent Then the response status is 404 Not Found - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Delete a budget returns "Bad Request" response Given new "DeleteBudget" request And request contains "budget_id" parameter with value "1" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Delete a budget returns "No Content" response Given new "DeleteBudget" request And request contains "budget_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @replay-only @team:Datadog/cloud-cost-management - Scenario: Delete arbitrary cost rule returns "No Content" response - Given new "DeleteArbitraryCostRule" request - And request contains "rule_id" parameter with value 123456 + @replay-only @team:DataDog/cloud-cost-management + Scenario: Delete custom allocation rule returns "No Content" response + Given new "DeleteCustomAllocationRule" request + And request contains "rule_id" parameter with value 683 When the request is sent Then the response status is 204 No Content - @replay-only @team:Datadog/cloud-cost-management - Scenario: Delete ruleset returns "No Content" response - Given new "DeleteRuleset" request - And request contains "ruleset_id" parameter with value "1c5dae14-237d-4b9a-a515-aa55b3939142" + @replay-only @team:DataDog/cloud-cost-management + Scenario: Delete tag pipeline ruleset returns "No Content" response + Given new "DeleteTagPipelinesRuleset" request + And request contains "ruleset_id" parameter with value "ee10c3ff-312f-464c-b4f6-46adaa6d00a1" When the request is sent Then the response status is 204 No Content - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Get Custom Costs File returns "OK" response Given new "GetCustomCostsFile" request And request contains "file_id" parameter with value "9d055d22-a838-4e9f-bc34-a4f9ab66280c" @@ -218,21 +218,21 @@ Feature: Cloud Cost Management And the response "data.attributes.name" is equal to "data.json" And the response "data.attributes.content[0].ChargeDescription" is equal to "my_description" - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Get Custom Costs file returns "Not Found" response Given new "GetCustomCostsFile" request And request contains "file_id" parameter with value "00000000-0000-0000-0000-000000000000" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Get Custom Costs file returns "OK" response Given new "GetCustomCostsFile" request And request contains "file_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Get Google Cloud Usage Cost config returns "OK" response Given new "GetCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 123456 @@ -241,35 +241,28 @@ Feature: Cloud Cost Management And the response "data.type" is equal to "gcp_uc_config" And the response "data.attributes.account_id" is equal to "123456_ABCDEF_123ABC" - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Get a budget returns "Bad Request" response Given new "GetBudget" request And request contains "budget_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Get a budget returns "Not Found" response Given new "GetBudget" request And request contains "budget_id" parameter with value "9d055d22-0a0a-0a0a-aaa0-00000000000a" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Get a budget returns "OK" response Given new "GetBudget" request And request contains "budget_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management - Scenario: Get arbitrary cost rule returns "OK" response - Given new "GetArbitraryCostRule" request - And request contains "rule_id" parameter with value 123456 - When the request is sent - Then the response status is 200 OK - - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Get cost AWS CUR config returns "OK" response Given new "GetCostAWSCURConfig" request And request contains "cloud_account_id" parameter with value 123456 @@ -278,7 +271,7 @@ Feature: Cloud Cost Management And the response "data.type" is equal to "aws_cur_config" And the response "data.attributes.account_id" is equal to "123456123456" - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Get cost Azure UC config returns "OK" response Given new "GetCostAzureUCConfig" request And request contains "cloud_account_id" parameter with value 123456 @@ -288,90 +281,104 @@ Feature: Cloud Cost Management And the response "data.attributes.configs[0].dataset_type" is equal to "amortized" And the response "data.attributes.configs[1].dataset_type" is equal to "actual" - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management + Scenario: Get custom allocation rule returns "OK" response + Given new "GetCustomAllocationRule" request + And request contains "rule_id" parameter with value 683 + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/cloud-cost-management Scenario: Get ruleset returns "OK" response - Given new "GetRuleset" request - And request contains "ruleset_id" parameter with value "da0e30e2-615d-4dae-9a22-38cf86a87dde" + Given new "GetTagPipelinesRuleset" request + And request contains "ruleset_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @replay-only @team:DataDog/cloud-cost-management + Scenario: Get tag pipeline ruleset returns "OK" response + Given new "GetTagPipelinesRuleset" request + And request contains "ruleset_id" parameter with value "ee10c3ff-312f-464c-b4f6-46adaa6d00a1" When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "ruleset" And the response "data.attributes.name" is equal to "New Ruleset" - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management AWS CUR configs returns "OK" response Given new "ListCostAWSCURConfigs" request When the request is sent Then the response status is 200 OK And the response "data[0].attributes.bucket_name" is equal to "test_bucket_name" - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: List Cloud Cost Management Azure configs returns "OK" response Given new "ListCostAzureUCConfigs" request When the request is sent Then the response status is 200 OK And the response "data[0].attributes.configs[0].export_name" is equal to "test_export_name" - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: List Custom Costs Files returns "OK" response Given new "ListCustomCostsFiles" request When the request is sent Then the response status is 200 OK And the response "data[0].attributes.name" is equal to "data.json" - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: List Custom Costs files returns "Bad Request" response Given new "ListCustomCostsFiles" request And request contains "filter[status]" parameter with value "invalid_file_status" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: List Custom Costs files returns "OK" response Given new "ListCustomCostsFiles" request When the request is sent Then the response status is 200 OK - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: List Google Cloud Usage Cost configs returns "OK" response Given new "ListCostGCPUsageCostConfigs" request When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management - Scenario: List arbitrary cost rules returns "OK" response - Given new "ListArbitraryCostRules" request + @team:DataDog/cloud-cost-management + Scenario: List budgets returns "OK" response + Given new "ListBudgets" request When the request is sent Then the response status is 200 OK - And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" - @team:Datadog/cloud-cost-management - Scenario: List budgets returns "OK" response - Given new "ListBudgets" request + @replay-only @team:DataDog/cloud-cost-management + Scenario: List custom allocation rules returns "OK" response + Given new "ListCustomAllocationRules" request When the request is sent Then the response status is 200 OK + And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule" - @replay-only @team:Datadog/cloud-cost-management - Scenario: List rulesets returns "OK" response - Given new "ListRulesets" request + @replay-only @team:DataDog/cloud-cost-management + Scenario: List tag pipeline rulesets returns "OK" response + Given new "ListTagPipelinesRulesets" request When the request is sent Then the response status is 200 OK And the response "data[0].attributes.name" is equal to "New Ruleset" - @generated @skip @team:Datadog/cloud-cost-management - Scenario: Reorder arbitrary cost rules returns "Successfully reordered rules" response - Given new "ReorderArbitraryCostRules" request + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Reorder custom allocation rules returns "Successfully reordered rules" response + Given new "ReorderCustomAllocationRules" request And body with value {"data": [{"id": "456", "type": "arbitrary_rule"}, {"id": "123", "type": "arbitrary_rule"}, {"id": "789", "type": "arbitrary_rule"}]} When the request is sent Then the response status is 204 Successfully reordered rules - @generated @skip @team:Datadog/cloud-cost-management - Scenario: Reorder rulesets returns "Successfully reordered rulesets" response - Given new "ReorderRulesets" request - And body with value {"data": [{"type": "ruleset"}]} + @generated @skip @team:DataDog/cloud-cost-management + Scenario: Reorder tag pipeline rulesets returns "Successfully reordered rulesets" response + Given new "ReorderTagPipelinesRulesets" request + And body with value {"data": [{"id": "55ef2385-9ae1-4410-90c4-5ac1b60fec10", "type": "ruleset"}, {"id": "a7b8c9d0-1234-5678-9abc-def012345678", "type": "ruleset"}, {"id": "f1e2d3c4-b5a6-9780-1234-567890abcdef", "type": "ruleset"}]} When the request is sent Then the response status is 204 Successfully reordered rulesets - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response Given new "UpdateCostAWSCURConfig" request And request contains "cloud_account_id" parameter with value 123456 @@ -379,7 +386,7 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response Given new "UpdateCostAWSCURConfig" request And request contains "cloud_account_id" parameter with value 100 @@ -388,7 +395,7 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.account_id" is equal to "000000000000" - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "Bad Request" response Given new "UpdateCostAzureUCConfigs" request And request contains "cloud_account_id" parameter from "REPLACE.ME" @@ -396,7 +403,7 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 400 Bad Request - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "Not Found" response Given new "UpdateCostAzureUCConfigs" request And request contains "cloud_account_id" parameter with value 123456 @@ -404,7 +411,7 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "OK" response Given new "UpdateCostAzureUCConfigs" request And request contains "cloud_account_id" parameter with value 100 @@ -413,7 +420,7 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.type" is equal to "azure_uc_configs" - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Update Google Cloud Usage Cost config returns "Bad Request" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter from "REPLACE.ME" @@ -421,7 +428,7 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 400 Bad Request - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Update Google Cloud Usage Cost config returns "Not Found" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 123456 @@ -429,7 +436,7 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 404 Not Found - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Update Google Cloud Usage Cost config returns "OK" response Given new "UpdateCostGCPUsageCostConfig" request And request contains "cloud_account_id" parameter with value 100 @@ -438,23 +445,23 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456_A123BC_12AB34" - @replay-only @team:Datadog/cloud-cost-management - Scenario: Update arbitrary cost rule returns "OK" response - Given new "UpdateArbitraryCostRule" request - And request contains "rule_id" parameter with value 123456 + @replay-only @team:DataDog/cloud-cost-management + Scenario: Update custom allocation rule returns "OK" response + Given new "UpdateCustomAllocationRule" request + And request contains "rule_id" parameter with value 683 And body with value {"data": {"attributes": {"costs_to_allocate": [{"condition": "is", "tag": "account_id", "value": "123456789", "values":[]}, {"condition": "in", "tag": "environment", "value": "", "values": ["production", "staging"]}], "enabled": true, "order_id": 1, "provider": ["aws", "gcp"], "rule_name": "example-arbitrary-cost-rule", "strategy": {"allocated_by_tag_keys": ["team", "environment"], "based_on_costs": [{"condition": "is", "tag": "service", "value": "web-api", "values":[]}, {"condition": "not in", "tag": "team", "value": "", "values": ["legacy", "deprecated"]}], "granularity": "daily", "method": "proportional"}, "type": "shared"}, "type": "upsert_arbitrary_rule"}} When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management - Scenario: Update ruleset returns "OK" response - Given new "UpdateRuleset" request - And request contains "ruleset_id" parameter with value "1c5dae14-237d-4b9a-a515-aa55b3939142" - And body with value {"data": {"attributes": {"enabled": true, "last_version": 3601919, "rules": [{"enabled": true, "mapping": {"destination_key": "team_owner", "if_not_exists": true, "source_keys": ["account_name", "account_id"]}, "name": "Account Name Mapping", "query": null, "reference_table": null}]}, "type": "update_ruleset"}} + @replay-only @team:DataDog/cloud-cost-management + Scenario: Update tag pipeline ruleset returns "OK" response + Given new "UpdateTagPipelinesRuleset" request + And request contains "ruleset_id" parameter with value "ee10c3ff-312f-464c-b4f6-46adaa6d00a1" + And body with value {"data": {"attributes": {"enabled": true, "last_version": 3611102, "rules": [{"enabled": true, "mapping": {"destination_key": "team_owner", "if_not_exists": true, "source_keys": ["account_name", "account_id"]}, "name": "Account Name Mapping", "query": null, "reference_table": null}]}, "id": "New Ruleset", "type": "update_ruleset"}} When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Upload Custom Costs File returns "Accepted" response Given new "UploadCustomCostsFile" request And body with value [{ "ProviderName": "my_provider", "ChargePeriodStart": "2023-05-06", "ChargePeriodEnd": "2023-06-06","ChargeDescription": "my_description","BilledCost": 250,"BillingCurrency": "USD","Tags": {"key": "value"}}] @@ -462,21 +469,21 @@ Feature: Cloud Cost Management Then the response status is 202 Accepted And the response "data.attributes.name" is equal to "data.json" - @generated @skip @team:Datadog/cloud-cost-management + @generated @skip @team:DataDog/cloud-cost-management Scenario: Upload Custom Costs file returns "Accepted" response Given new "UploadCustomCostsFile" request And body with value [{"BilledCost": 100.5, "BillingCurrency": "USD", "ChargeDescription": "Monthly usage charge for my service", "ChargePeriodEnd": "2023-02-28", "ChargePeriodStart": "2023-02-01"}] When the request is sent Then the response status is 202 Accepted - @team:Datadog/cloud-cost-management + @team:DataDog/cloud-cost-management Scenario: Upload Custom Costs file returns "Bad Request" response Given new "UploadCustomCostsFile" request And body with value [{"BilledCost": 100.5, "BillingCurrency": "USD", "ChargeDescription": "Monthly usage charge for my service", "ChargePeriodEnd": "2023-02-28", "ChargePeriodStart": "2023-02-01"}] When the request is sent Then the response status is 400 Bad Request - @replay-only @team:Datadog/cloud-cost-management + @replay-only @team:DataDog/cloud-cost-management Scenario: Validate query returns "OK" response Given new "ValidateQuery" request And body with value {"data": {"attributes": {"Query": "example:query AND test:true"}, "type": "validate_query"}} diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index f57ef906513..931b7e63794 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -737,37 +737,37 @@ "type": "safe" } }, - "ListArbitraryCostRules": { + "ListCustomAllocationRules": { "tag": "Cloud Cost Management", "undo": { "type": "safe" } }, - "CreateArbitraryCostRule": { + "CreateCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" } }, - "ReorderArbitraryCostRules": { + "ReorderCustomAllocationRules": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" } }, - "DeleteArbitraryCostRule": { + "DeleteCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" } }, - "GetArbitraryCostRule": { + "GetCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { "type": "safe" } }, - "UpdateArbitraryCostRule": { + "UpdateCustomAllocationRule": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" @@ -3841,19 +3841,19 @@ "type": "safe" } }, - "ListRulesets": { + "ListTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": { "type": "safe" } }, - "CreateRuleset": { + "CreateTagPipelinesRuleset": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" } }, - "ReorderRulesets": { + "ReorderTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" @@ -3865,19 +3865,19 @@ "type": "safe" } }, - "DeleteRuleset": { + "DeleteTagPipelinesRuleset": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent" } }, - "GetRuleset": { + "GetTagPipelinesRuleset": { "tag": "Cloud Cost Management", "undo": { "type": "safe" } }, - "UpdateRuleset": { + "UpdateTagPipelinesRuleset": { "tag": "Cloud Cost Management", "undo": { "type": "idempotent"