Skip to content

Commit e4e1078

Browse files
author
awstools
committed
feat(client-cost-explorer): Support for retrieving cost, usage, and forecast for billing view.
1 parent 3398a2a commit e4e1078

10 files changed

+178
-0
lines changed

clients/client-cost-explorer/src/commands/GetCostAndUsageCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export interface GetCostAndUsageCommandOutput extends GetCostAndUsageResponse, _
123123
* Key: "STRING_VALUE",
124124
* },
125125
* ],
126+
* BillingViewArn: "STRING_VALUE",
126127
* NextPageToken: "STRING_VALUE",
127128
* };
128129
* const command = new GetCostAndUsageCommand(input);
@@ -197,6 +198,9 @@ export interface GetCostAndUsageCommandOutput extends GetCostAndUsageResponse, _
197198
* <p>Your request parameters changed between pages. Try again with the old parameters or
198199
* without a pagination token.</p>
199200
*
201+
* @throws {@link ResourceNotFoundException} (client fault)
202+
* <p> The specified ARN in the request doesn't exist. </p>
203+
*
200204
* @throws {@link CostExplorerServiceException}
201205
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
202206
*

clients/client-cost-explorer/src/commands/GetCostAndUsageWithResourcesCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export interface GetCostAndUsageWithResourcesCommandOutput
135135
* Key: "STRING_VALUE",
136136
* },
137137
* ],
138+
* BillingViewArn: "STRING_VALUE",
138139
* NextPageToken: "STRING_VALUE",
139140
* };
140141
* const command = new GetCostAndUsageWithResourcesCommand(input);
@@ -209,6 +210,9 @@ export interface GetCostAndUsageWithResourcesCommandOutput
209210
* <p>Your request parameters changed between pages. Try again with the old parameters or
210211
* without a pagination token.</p>
211212
*
213+
* @throws {@link ResourceNotFoundException} (client fault)
214+
* <p> The specified ARN in the request doesn't exist. </p>
215+
*
212216
* @throws {@link CostExplorerServiceException}
213217
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
214218
*

clients/client-cost-explorer/src/commands/GetCostCategoriesCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export interface GetCostCategoriesCommandOutput extends GetCostCategoriesRespons
119119
* SortOrder: "ASCENDING" || "DESCENDING",
120120
* },
121121
* ],
122+
* BillingViewArn: "STRING_VALUE",
122123
* MaxResults: Number("int"),
123124
* NextPageToken: "STRING_VALUE",
124125
* };
@@ -160,6 +161,9 @@ export interface GetCostCategoriesCommandOutput extends GetCostCategoriesRespons
160161
* <p>Your request parameters changed between pages. Try again with the old parameters or
161162
* without a pagination token.</p>
162163
*
164+
* @throws {@link ResourceNotFoundException} (client fault)
165+
* <p> The specified ARN in the request doesn't exist. </p>
166+
*
163167
* @throws {@link CostExplorerServiceException}
164168
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
165169
*

clients/client-cost-explorer/src/commands/GetCostForecastCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export interface GetCostForecastCommandOutput extends GetCostForecastResponse, _
110110
* MatchOptions: "<MatchOptions>",
111111
* },
112112
* },
113+
* BillingViewArn: "STRING_VALUE",
113114
* PredictionIntervalLevel: Number("int"),
114115
* };
115116
* const command = new GetCostForecastCommand(input);
@@ -146,6 +147,9 @@ export interface GetCostForecastCommandOutput extends GetCostForecastResponse, _
146147
* @throws {@link LimitExceededException} (client fault)
147148
* <p>You made too many calls in a short period of time. Try again later.</p>
148149
*
150+
* @throws {@link ResourceNotFoundException} (client fault)
151+
* <p> The specified ARN in the request doesn't exist. </p>
152+
*
149153
* @throws {@link CostExplorerServiceException}
150154
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
151155
*

clients/client-cost-explorer/src/commands/GetDimensionValuesCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export interface GetDimensionValuesCommandOutput extends GetDimensionValuesRespo
117117
* SortOrder: "ASCENDING" || "DESCENDING",
118118
* },
119119
* ],
120+
* BillingViewArn: "STRING_VALUE",
120121
* MaxResults: Number("int"),
121122
* NextPageToken: "STRING_VALUE",
122123
* };
@@ -160,6 +161,9 @@ export interface GetDimensionValuesCommandOutput extends GetDimensionValuesRespo
160161
* <p>Your request parameters changed between pages. Try again with the old parameters or
161162
* without a pagination token.</p>
162163
*
164+
* @throws {@link ResourceNotFoundException} (client fault)
165+
* <p> The specified ARN in the request doesn't exist. </p>
166+
*
163167
* @throws {@link CostExplorerServiceException}
164168
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
165169
*

clients/client-cost-explorer/src/commands/GetTagsCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export interface GetTagsCommandOutput extends GetTagsResponse, __MetadataBearer
116116
* SortOrder: "ASCENDING" || "DESCENDING",
117117
* },
118118
* ],
119+
* BillingViewArn: "STRING_VALUE",
119120
* MaxResults: Number("int"),
120121
* NextPageToken: "STRING_VALUE",
121122
* };
@@ -154,6 +155,9 @@ export interface GetTagsCommandOutput extends GetTagsResponse, __MetadataBearer
154155
* <p>Your request parameters changed between pages. Try again with the old parameters or
155156
* without a pagination token.</p>
156157
*
158+
* @throws {@link ResourceNotFoundException} (client fault)
159+
* <p> The specified ARN in the request doesn't exist. </p>
160+
*
157161
* @throws {@link CostExplorerServiceException}
158162
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
159163
*

clients/client-cost-explorer/src/commands/GetUsageForecastCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export interface GetUsageForecastCommandOutput extends GetUsageForecastResponse,
110110
* MatchOptions: "<MatchOptions>",
111111
* },
112112
* },
113+
* BillingViewArn: "STRING_VALUE",
113114
* PredictionIntervalLevel: Number("int"),
114115
* };
115116
* const command = new GetUsageForecastCommand(input);
@@ -146,6 +147,9 @@ export interface GetUsageForecastCommandOutput extends GetUsageForecastResponse,
146147
* @throws {@link LimitExceededException} (client fault)
147148
* <p>You made too many calls in a short period of time. Try again later.</p>
148149
*
150+
* @throws {@link ResourceNotFoundException} (client fault)
151+
* <p> The specified ARN in the request doesn't exist. </p>
152+
*
149153
* @throws {@link UnresolvableUsageUnitException} (client fault)
150154
* <p>Cost Explorer was unable to identify the usage unit. Provide
151155
* <code>UsageType/UsageTypeGroup</code> filter selections that contain matching units,

clients/client-cost-explorer/src/models/models_0.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6506,6 +6506,16 @@ export interface GetCostAndUsageRequest {
65066506
*/
65076507
GroupBy?: GroupDefinition[] | undefined;
65086508

6509+
/**
6510+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
6511+
* is used to specify which particular billing view you want to interact with or retrieve
6512+
* information from when making API calls related to Amazon Web Services Billing and Cost
6513+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
6514+
* API.</p>
6515+
* @public
6516+
*/
6517+
BillingViewArn?: string | undefined;
6518+
65096519
/**
65106520
* <p>The token to retrieve the next set of results. Amazon Web Services provides the token
65116521
* when the response from a previous call has more results than the maximum page size.</p>
@@ -6586,6 +6596,16 @@ export interface GetCostAndUsageWithResourcesRequest {
65866596
*/
65876597
GroupBy?: GroupDefinition[] | undefined;
65886598

6599+
/**
6600+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
6601+
* is used to specify which particular billing view you want to interact with or retrieve
6602+
* information from when making API calls related to Amazon Web Services Billing and Cost
6603+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
6604+
* API.</p>
6605+
* @public
6606+
*/
6607+
BillingViewArn?: string | undefined;
6608+
65896609
/**
65906610
* <p>The token to retrieve the next set of results. Amazon Web Services provides the token
65916611
* when the response from a previous call has more results than the maximum page size.</p>
@@ -6795,6 +6815,16 @@ export interface GetCostCategoriesRequest {
67956815
*/
67966816
SortBy?: SortDefinition[] | undefined;
67976817

6818+
/**
6819+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
6820+
* is used to specify which particular billing view you want to interact with or retrieve
6821+
* information from when making API calls related to Amazon Web Services Billing and Cost
6822+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
6823+
* API.</p>
6824+
* @public
6825+
*/
6826+
BillingViewArn?: string | undefined;
6827+
67986828
/**
67996829
* <p>This field is only used when the <code>SortBy</code> value is provided in the
68006830
* request.</p>
@@ -6984,6 +7014,16 @@ export interface GetCostForecastRequest {
69847014
*/
69857015
Filter?: Expression | undefined;
69867016

7017+
/**
7018+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
7019+
* is used to specify which particular billing view you want to interact with or retrieve
7020+
* information from when making API calls related to Amazon Web Services Billing and Cost
7021+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
7022+
* API.</p>
7023+
* @public
7024+
*/
7025+
BillingViewArn?: string | undefined;
7026+
69877027
/**
69887028
* <p>Cost Explorer always returns the mean forecast as a single point. You can request a
69897029
* prediction interval around the mean by specifying a confidence level. The higher the
@@ -7380,6 +7420,16 @@ export interface GetDimensionValuesRequest {
73807420
*/
73817421
SortBy?: SortDefinition[] | undefined;
73827422

7423+
/**
7424+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
7425+
* is used to specify which particular billing view you want to interact with or retrieve
7426+
* information from when making API calls related to Amazon Web Services Billing and Cost
7427+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
7428+
* API.</p>
7429+
* @public
7430+
*/
7431+
BillingViewArn?: string | undefined;
7432+
73837433
/**
73847434
* <p>This field is only used when SortBy is provided in the request. The maximum number of
73857435
* objects that are returned for this request. If MaxResults isn't specified with SortBy, the
@@ -8772,6 +8822,16 @@ export interface GetTagsRequest {
87728822
*/
87738823
SortBy?: SortDefinition[] | undefined;
87748824

8825+
/**
8826+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
8827+
* is used to specify which particular billing view you want to interact with or retrieve
8828+
* information from when making API calls related to Amazon Web Services Billing and Cost
8829+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
8830+
* API.</p>
8831+
* @public
8832+
*/
8833+
BillingViewArn?: string | undefined;
8834+
87758835
/**
87768836
* <p>This field is only used when SortBy is provided in the request. The maximum number of
87778837
* objects that are returned for this request. If MaxResults isn't specified with SortBy, the
@@ -8953,6 +9013,16 @@ export interface GetUsageForecastRequest {
89539013
*/
89549014
Filter?: Expression | undefined;
89559015

9016+
/**
9017+
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
9018+
* is used to specify which particular billing view you want to interact with or retrieve
9019+
* information from when making API calls related to Amazon Web Services Billing and Cost
9020+
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
9021+
* API.</p>
9022+
* @public
9023+
*/
9024+
BillingViewArn?: string | undefined;
9025+
89569026
/**
89579027
* <p>Amazon Web Services Cost Explorer always returns the mean forecast as a single point.
89589028
* You can request a prediction interval around the mean by specifying a confidence level. The

clients/client-cost-explorer/src/protocols/Aws_json1_1.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,6 +2202,7 @@ const se_GetAnomaliesRequest = (input: GetAnomaliesRequest, context: __SerdeCont
22022202
*/
22032203
const se_GetCostAndUsageRequest = (input: GetCostAndUsageRequest, context: __SerdeContext): any => {
22042204
return take(input, {
2205+
BillingViewArn: [],
22052206
Filter: (_) => se_Expression(_, context),
22062207
Granularity: [],
22072208
GroupBy: _json,
@@ -2219,6 +2220,7 @@ const se_GetCostAndUsageWithResourcesRequest = (
22192220
context: __SerdeContext
22202221
): any => {
22212222
return take(input, {
2223+
BillingViewArn: [],
22222224
Filter: (_) => se_Expression(_, context),
22232225
Granularity: [],
22242226
GroupBy: _json,
@@ -2233,6 +2235,7 @@ const se_GetCostAndUsageWithResourcesRequest = (
22332235
*/
22342236
const se_GetCostCategoriesRequest = (input: GetCostCategoriesRequest, context: __SerdeContext): any => {
22352237
return take(input, {
2238+
BillingViewArn: [],
22362239
CostCategoryName: [],
22372240
Filter: (_) => se_Expression(_, context),
22382241
MaxResults: [],
@@ -2248,6 +2251,7 @@ const se_GetCostCategoriesRequest = (input: GetCostCategoriesRequest, context: _
22482251
*/
22492252
const se_GetCostForecastRequest = (input: GetCostForecastRequest, context: __SerdeContext): any => {
22502253
return take(input, {
2254+
BillingViewArn: [],
22512255
Filter: (_) => se_Expression(_, context),
22522256
Granularity: [],
22532257
Metric: [],
@@ -2261,6 +2265,7 @@ const se_GetCostForecastRequest = (input: GetCostForecastRequest, context: __Ser
22612265
*/
22622266
const se_GetDimensionValuesRequest = (input: GetDimensionValuesRequest, context: __SerdeContext): any => {
22632267
return take(input, {
2268+
BillingViewArn: [],
22642269
Context: [],
22652270
Dimension: [],
22662271
Filter: (_) => se_Expression(_, context),
@@ -2414,6 +2419,7 @@ const se_GetSavingsPlansUtilizationRequest = (
24142419
*/
24152420
const se_GetTagsRequest = (input: GetTagsRequest, context: __SerdeContext): any => {
24162421
return take(input, {
2422+
BillingViewArn: [],
24172423
Filter: (_) => se_Expression(_, context),
24182424
MaxResults: [],
24192425
NextPageToken: [],
@@ -2429,6 +2435,7 @@ const se_GetTagsRequest = (input: GetTagsRequest, context: __SerdeContext): any
24292435
*/
24302436
const se_GetUsageForecastRequest = (input: GetUsageForecastRequest, context: __SerdeContext): any => {
24312437
return take(input, {
2438+
BillingViewArn: [],
24322439
Filter: (_) => se_Expression(_, context),
24332440
Granularity: [],
24342441
Metric: [],

0 commit comments

Comments
 (0)