Skip to content

Commit 7195ab0

Browse files
author
awstools
committed
feat(client-budgets): Releasing the new Budget FilterExpression and Metrics fields to support more granular filtering options. These new fields are intended to replace CostFilters and CostTypes, which are deprecated as of 2025/18/04.
1 parent 82e08e1 commit 7195ab0

File tree

7 files changed

+1378
-235
lines changed

7 files changed

+1378
-235
lines changed

clients/client-budgets/src/commands/CreateBudgetCommand.ts

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ export interface CreateBudgetCommandOutput extends CreateBudgetResponse, __Metad
3030
/**
3131
* <p>Creates a budget and, if included, notifications and subscribers. </p>
3232
* <important>
33-
* <p>Only one of <code>BudgetLimit</code> or <code>PlannedBudgetLimits</code> can be present in the syntax at one time. Use the syntax that matches your case. The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_CreateBudget.html#API_CreateBudget_Examples">Examples</a> section. </p>
33+
* <p>Only one of <code>BudgetLimit</code> or <code>PlannedBudgetLimits</code> can be present in
34+
* the syntax at one time. Use the syntax that matches your use case. The Request Syntax
35+
* section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>,
36+
* see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_CreateBudget.html#API_CreateBudget_Examples">Examples</a> section.</p>
37+
* <p>Similarly, only one set of filter and metric selections can be present in the syntax
38+
* at one time. Either <code>FilterExpression</code> and <code>Metrics</code> or
39+
* <code>CostFilters</code> and <code>CostTypes</code>, not both or a different
40+
* combination. We recommend using <code>FilterExpression</code> and <code>Metrics</code>
41+
* as they provide more flexible and powerful filtering capabilities. The Request Syntax
42+
* section shows the <code>FilterExpression</code>/<code>Metrics</code> syntax.</p>
3443
* </important>
3544
* @example
3645
* Use a bare-bones client and the command you need to make an API call.
@@ -95,6 +104,76 @@ export interface CreateBudgetCommandOutput extends CreateBudgetResponse, __Metad
95104
* },
96105
* LastAutoAdjustTime: new Date("TIMESTAMP"),
97106
* },
107+
* FilterExpression: { // Expression
108+
* Or: [ // Expressions
109+
* {
110+
* Or: [
111+
* "<Expression>",
112+
* ],
113+
* And: [
114+
* "<Expression>",
115+
* ],
116+
* Not: "<Expression>",
117+
* Dimensions: { // ExpressionDimensionValues
118+
* Key: "AZ" || "INSTANCE_TYPE" || "LINKED_ACCOUNT" || "LINKED_ACCOUNT_NAME" || "OPERATION" || "PURCHASE_TYPE" || "REGION" || "SERVICE" || "SERVICE_CODE" || "USAGE_TYPE" || "USAGE_TYPE_GROUP" || "RECORD_TYPE" || "OPERATING_SYSTEM" || "TENANCY" || "SCOPE" || "PLATFORM" || "SUBSCRIPTION_ID" || "LEGAL_ENTITY_NAME" || "INVOICING_ENTITY" || "DEPLOYMENT_OPTION" || "DATABASE_ENGINE" || "CACHE_ENGINE" || "INSTANCE_TYPE_FAMILY" || "BILLING_ENTITY" || "RESERVATION_ID" || "RESOURCE_ID" || "RIGHTSIZING_TYPE" || "SAVINGS_PLANS_TYPE" || "SAVINGS_PLAN_ARN" || "PAYMENT_OPTION" || "RESERVATION_MODIFIED" || "TAG_KEY" || "COST_CATEGORY_NAME", // required
119+
* Values: [ // Values // required
120+
* "STRING_VALUE",
121+
* ],
122+
* MatchOptions: [ // MatchOptions
123+
* "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
124+
* ],
125+
* },
126+
* Tags: { // TagValues
127+
* Key: "STRING_VALUE",
128+
* Values: [
129+
* "STRING_VALUE",
130+
* ],
131+
* MatchOptions: [
132+
* "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
133+
* ],
134+
* },
135+
* CostCategories: { // CostCategoryValues
136+
* Key: "STRING_VALUE",
137+
* Values: [
138+
* "STRING_VALUE",
139+
* ],
140+
* MatchOptions: [
141+
* "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
142+
* ],
143+
* },
144+
* },
145+
* ],
146+
* And: [
147+
* "<Expression>",
148+
* ],
149+
* Not: "<Expression>",
150+
* Dimensions: {
151+
* Key: "AZ" || "INSTANCE_TYPE" || "LINKED_ACCOUNT" || "LINKED_ACCOUNT_NAME" || "OPERATION" || "PURCHASE_TYPE" || "REGION" || "SERVICE" || "SERVICE_CODE" || "USAGE_TYPE" || "USAGE_TYPE_GROUP" || "RECORD_TYPE" || "OPERATING_SYSTEM" || "TENANCY" || "SCOPE" || "PLATFORM" || "SUBSCRIPTION_ID" || "LEGAL_ENTITY_NAME" || "INVOICING_ENTITY" || "DEPLOYMENT_OPTION" || "DATABASE_ENGINE" || "CACHE_ENGINE" || "INSTANCE_TYPE_FAMILY" || "BILLING_ENTITY" || "RESERVATION_ID" || "RESOURCE_ID" || "RIGHTSIZING_TYPE" || "SAVINGS_PLANS_TYPE" || "SAVINGS_PLAN_ARN" || "PAYMENT_OPTION" || "RESERVATION_MODIFIED" || "TAG_KEY" || "COST_CATEGORY_NAME", // required
152+
* Values: [ // required
153+
* "STRING_VALUE",
154+
* ],
155+
* MatchOptions: [
156+
* "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
157+
* ],
158+
* },
159+
* Tags: {
160+
* Key: "STRING_VALUE",
161+
* Values: [
162+
* "STRING_VALUE",
163+
* ],
164+
* MatchOptions: [
165+
* "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
166+
* ],
167+
* },
168+
* CostCategories: {
169+
* Key: "STRING_VALUE",
170+
* Values: "<Values>",
171+
* MatchOptions: "<MatchOptions>",
172+
* },
173+
* },
174+
* Metrics: [ // Metrics
175+
* "BlendedCost" || "UnblendedCost" || "AmortizedCost" || "NetUnblendedCost" || "NetAmortizedCost" || "UsageQuantity" || "NormalizedUsageAmount" || "Hours",
176+
* ],
98177
* },
99178
* NotificationsWithSubscribers: [ // NotificationWithSubscribersList
100179
* { // NotificationWithSubscribers

clients/client-budgets/src/commands/DescribeBudgetCommand.ts

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export interface DescribeBudgetCommandOutput extends DescribeBudgetResponse, __M
3030
/**
3131
* <p>Describes a budget.</p>
3232
* <important>
33-
* <p>The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudget.html#API_DescribeBudget_Examples">Examples</a> section. </p>
33+
* <p>The Request Syntax section shows the <code>BudgetLimit</code> syntax. For
34+
* <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudget.html#API_DescribeBudget_Examples">Examples</a> section.</p>
3435
* </important>
3536
* @example
3637
* Use a bare-bones client and the command you need to make an API call.
@@ -41,6 +42,7 @@ export interface DescribeBudgetCommandOutput extends DescribeBudgetResponse, __M
4142
* const input = { // DescribeBudgetRequest
4243
* AccountId: "STRING_VALUE", // required
4344
* BudgetName: "STRING_VALUE", // required
45+
* ShowFilterExpression: true || false,
4446
* };
4547
* const command = new DescribeBudgetCommand(input);
4648
* const response = await client.send(command);
@@ -100,6 +102,76 @@ export interface DescribeBudgetCommandOutput extends DescribeBudgetResponse, __M
100102
* // },
101103
* // LastAutoAdjustTime: new Date("TIMESTAMP"),
102104
* // },
105+
* // FilterExpression: { // Expression
106+
* // Or: [ // Expressions
107+
* // {
108+
* // Or: [
109+
* // "<Expression>",
110+
* // ],
111+
* // And: [
112+
* // "<Expression>",
113+
* // ],
114+
* // Not: "<Expression>",
115+
* // Dimensions: { // ExpressionDimensionValues
116+
* // Key: "AZ" || "INSTANCE_TYPE" || "LINKED_ACCOUNT" || "LINKED_ACCOUNT_NAME" || "OPERATION" || "PURCHASE_TYPE" || "REGION" || "SERVICE" || "SERVICE_CODE" || "USAGE_TYPE" || "USAGE_TYPE_GROUP" || "RECORD_TYPE" || "OPERATING_SYSTEM" || "TENANCY" || "SCOPE" || "PLATFORM" || "SUBSCRIPTION_ID" || "LEGAL_ENTITY_NAME" || "INVOICING_ENTITY" || "DEPLOYMENT_OPTION" || "DATABASE_ENGINE" || "CACHE_ENGINE" || "INSTANCE_TYPE_FAMILY" || "BILLING_ENTITY" || "RESERVATION_ID" || "RESOURCE_ID" || "RIGHTSIZING_TYPE" || "SAVINGS_PLANS_TYPE" || "SAVINGS_PLAN_ARN" || "PAYMENT_OPTION" || "RESERVATION_MODIFIED" || "TAG_KEY" || "COST_CATEGORY_NAME", // required
117+
* // Values: [ // Values // required
118+
* // "STRING_VALUE",
119+
* // ],
120+
* // MatchOptions: [ // MatchOptions
121+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
122+
* // ],
123+
* // },
124+
* // Tags: { // TagValues
125+
* // Key: "STRING_VALUE",
126+
* // Values: [
127+
* // "STRING_VALUE",
128+
* // ],
129+
* // MatchOptions: [
130+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
131+
* // ],
132+
* // },
133+
* // CostCategories: { // CostCategoryValues
134+
* // Key: "STRING_VALUE",
135+
* // Values: [
136+
* // "STRING_VALUE",
137+
* // ],
138+
* // MatchOptions: [
139+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
140+
* // ],
141+
* // },
142+
* // },
143+
* // ],
144+
* // And: [
145+
* // "<Expression>",
146+
* // ],
147+
* // Not: "<Expression>",
148+
* // Dimensions: {
149+
* // Key: "AZ" || "INSTANCE_TYPE" || "LINKED_ACCOUNT" || "LINKED_ACCOUNT_NAME" || "OPERATION" || "PURCHASE_TYPE" || "REGION" || "SERVICE" || "SERVICE_CODE" || "USAGE_TYPE" || "USAGE_TYPE_GROUP" || "RECORD_TYPE" || "OPERATING_SYSTEM" || "TENANCY" || "SCOPE" || "PLATFORM" || "SUBSCRIPTION_ID" || "LEGAL_ENTITY_NAME" || "INVOICING_ENTITY" || "DEPLOYMENT_OPTION" || "DATABASE_ENGINE" || "CACHE_ENGINE" || "INSTANCE_TYPE_FAMILY" || "BILLING_ENTITY" || "RESERVATION_ID" || "RESOURCE_ID" || "RIGHTSIZING_TYPE" || "SAVINGS_PLANS_TYPE" || "SAVINGS_PLAN_ARN" || "PAYMENT_OPTION" || "RESERVATION_MODIFIED" || "TAG_KEY" || "COST_CATEGORY_NAME", // required
150+
* // Values: [ // required
151+
* // "STRING_VALUE",
152+
* // ],
153+
* // MatchOptions: [
154+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
155+
* // ],
156+
* // },
157+
* // Tags: {
158+
* // Key: "STRING_VALUE",
159+
* // Values: [
160+
* // "STRING_VALUE",
161+
* // ],
162+
* // MatchOptions: [
163+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
164+
* // ],
165+
* // },
166+
* // CostCategories: {
167+
* // Key: "STRING_VALUE",
168+
* // Values: "<Values>",
169+
* // MatchOptions: "<MatchOptions>",
170+
* // },
171+
* // },
172+
* // Metrics: [ // Metrics
173+
* // "BlendedCost" || "UnblendedCost" || "AmortizedCost" || "NetUnblendedCost" || "NetAmortizedCost" || "UsageQuantity" || "NormalizedUsageAmount" || "Hours",
174+
* // ],
103175
* // },
104176
* // };
105177
*

clients/client-budgets/src/commands/DescribeBudgetsCommand.ts

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export interface DescribeBudgetsCommandOutput extends DescribeBudgetsResponse, _
3030
/**
3131
* <p>Lists the budgets that are associated with an account.</p>
3232
* <important>
33-
* <p>The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudgets.html#API_DescribeBudgets_Examples">Examples</a> section. </p>
33+
* <p>The Request Syntax section shows the <code>BudgetLimit</code> syntax. For
34+
* <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudgets.html#API_DescribeBudgets_Examples">Examples</a> section.</p>
3435
* </important>
3536
* @example
3637
* Use a bare-bones client and the command you need to make an API call.
@@ -42,6 +43,7 @@ export interface DescribeBudgetsCommandOutput extends DescribeBudgetsResponse, _
4243
* AccountId: "STRING_VALUE", // required
4344
* MaxResults: Number("int"),
4445
* NextToken: "STRING_VALUE",
46+
* ShowFilterExpression: true || false,
4547
* };
4648
* const command = new DescribeBudgetsCommand(input);
4749
* const response = await client.send(command);
@@ -102,6 +104,76 @@ export interface DescribeBudgetsCommandOutput extends DescribeBudgetsResponse, _
102104
* // },
103105
* // LastAutoAdjustTime: new Date("TIMESTAMP"),
104106
* // },
107+
* // FilterExpression: { // Expression
108+
* // Or: [ // Expressions
109+
* // {
110+
* // Or: [
111+
* // "<Expression>",
112+
* // ],
113+
* // And: [
114+
* // "<Expression>",
115+
* // ],
116+
* // Not: "<Expression>",
117+
* // Dimensions: { // ExpressionDimensionValues
118+
* // Key: "AZ" || "INSTANCE_TYPE" || "LINKED_ACCOUNT" || "LINKED_ACCOUNT_NAME" || "OPERATION" || "PURCHASE_TYPE" || "REGION" || "SERVICE" || "SERVICE_CODE" || "USAGE_TYPE" || "USAGE_TYPE_GROUP" || "RECORD_TYPE" || "OPERATING_SYSTEM" || "TENANCY" || "SCOPE" || "PLATFORM" || "SUBSCRIPTION_ID" || "LEGAL_ENTITY_NAME" || "INVOICING_ENTITY" || "DEPLOYMENT_OPTION" || "DATABASE_ENGINE" || "CACHE_ENGINE" || "INSTANCE_TYPE_FAMILY" || "BILLING_ENTITY" || "RESERVATION_ID" || "RESOURCE_ID" || "RIGHTSIZING_TYPE" || "SAVINGS_PLANS_TYPE" || "SAVINGS_PLAN_ARN" || "PAYMENT_OPTION" || "RESERVATION_MODIFIED" || "TAG_KEY" || "COST_CATEGORY_NAME", // required
119+
* // Values: [ // Values // required
120+
* // "STRING_VALUE",
121+
* // ],
122+
* // MatchOptions: [ // MatchOptions
123+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
124+
* // ],
125+
* // },
126+
* // Tags: { // TagValues
127+
* // Key: "STRING_VALUE",
128+
* // Values: [
129+
* // "STRING_VALUE",
130+
* // ],
131+
* // MatchOptions: [
132+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
133+
* // ],
134+
* // },
135+
* // CostCategories: { // CostCategoryValues
136+
* // Key: "STRING_VALUE",
137+
* // Values: [
138+
* // "STRING_VALUE",
139+
* // ],
140+
* // MatchOptions: [
141+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
142+
* // ],
143+
* // },
144+
* // },
145+
* // ],
146+
* // And: [
147+
* // "<Expression>",
148+
* // ],
149+
* // Not: "<Expression>",
150+
* // Dimensions: {
151+
* // Key: "AZ" || "INSTANCE_TYPE" || "LINKED_ACCOUNT" || "LINKED_ACCOUNT_NAME" || "OPERATION" || "PURCHASE_TYPE" || "REGION" || "SERVICE" || "SERVICE_CODE" || "USAGE_TYPE" || "USAGE_TYPE_GROUP" || "RECORD_TYPE" || "OPERATING_SYSTEM" || "TENANCY" || "SCOPE" || "PLATFORM" || "SUBSCRIPTION_ID" || "LEGAL_ENTITY_NAME" || "INVOICING_ENTITY" || "DEPLOYMENT_OPTION" || "DATABASE_ENGINE" || "CACHE_ENGINE" || "INSTANCE_TYPE_FAMILY" || "BILLING_ENTITY" || "RESERVATION_ID" || "RESOURCE_ID" || "RIGHTSIZING_TYPE" || "SAVINGS_PLANS_TYPE" || "SAVINGS_PLAN_ARN" || "PAYMENT_OPTION" || "RESERVATION_MODIFIED" || "TAG_KEY" || "COST_CATEGORY_NAME", // required
152+
* // Values: [ // required
153+
* // "STRING_VALUE",
154+
* // ],
155+
* // MatchOptions: [
156+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
157+
* // ],
158+
* // },
159+
* // Tags: {
160+
* // Key: "STRING_VALUE",
161+
* // Values: [
162+
* // "STRING_VALUE",
163+
* // ],
164+
* // MatchOptions: [
165+
* // "EQUALS" || "ABSENT" || "STARTS_WITH" || "ENDS_WITH" || "CONTAINS" || "GREATER_THAN_OR_EQUAL" || "CASE_SENSITIVE" || "CASE_INSENSITIVE",
166+
* // ],
167+
* // },
168+
* // CostCategories: {
169+
* // Key: "STRING_VALUE",
170+
* // Values: "<Values>",
171+
* // MatchOptions: "<MatchOptions>",
172+
* // },
173+
* // },
174+
* // Metrics: [ // Metrics
175+
* // "BlendedCost" || "UnblendedCost" || "AmortizedCost" || "NetUnblendedCost" || "NetAmortizedCost" || "UsageQuantity" || "NormalizedUsageAmount" || "Hours",
176+
* // ],
105177
* // },
106178
* // ],
107179
* // NextToken: "STRING_VALUE",

0 commit comments

Comments
 (0)