Skip to content

Commit

Permalink
feat(client-cost-explorer): Support for retrieving cost, usage, and f…
Browse files Browse the repository at this point in the history
…orecast for billing view.
  • Loading branch information
awstools committed Dec 20, 2024
1 parent 3398a2a commit e4e1078
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export interface GetCostAndUsageCommandOutput extends GetCostAndUsageResponse, _
* Key: "STRING_VALUE",
* },
* ],
* BillingViewArn: "STRING_VALUE",
* NextPageToken: "STRING_VALUE",
* };
* const command = new GetCostAndUsageCommand(input);
Expand Down Expand Up @@ -197,6 +198,9 @@ export interface GetCostAndUsageCommandOutput extends GetCostAndUsageResponse, _
* <p>Your request parameters changed between pages. Try again with the old parameters or
* without a pagination token.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link CostExplorerServiceException}
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export interface GetCostAndUsageWithResourcesCommandOutput
* Key: "STRING_VALUE",
* },
* ],
* BillingViewArn: "STRING_VALUE",
* NextPageToken: "STRING_VALUE",
* };
* const command = new GetCostAndUsageWithResourcesCommand(input);
Expand Down Expand Up @@ -209,6 +210,9 @@ export interface GetCostAndUsageWithResourcesCommandOutput
* <p>Your request parameters changed between pages. Try again with the old parameters or
* without a pagination token.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link CostExplorerServiceException}
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export interface GetCostCategoriesCommandOutput extends GetCostCategoriesRespons
* SortOrder: "ASCENDING" || "DESCENDING",
* },
* ],
* BillingViewArn: "STRING_VALUE",
* MaxResults: Number("int"),
* NextPageToken: "STRING_VALUE",
* };
Expand Down Expand Up @@ -160,6 +161,9 @@ export interface GetCostCategoriesCommandOutput extends GetCostCategoriesRespons
* <p>Your request parameters changed between pages. Try again with the old parameters or
* without a pagination token.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link CostExplorerServiceException}
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export interface GetCostForecastCommandOutput extends GetCostForecastResponse, _
* MatchOptions: "<MatchOptions>",
* },
* },
* BillingViewArn: "STRING_VALUE",
* PredictionIntervalLevel: Number("int"),
* };
* const command = new GetCostForecastCommand(input);
Expand Down Expand Up @@ -146,6 +147,9 @@ export interface GetCostForecastCommandOutput extends GetCostForecastResponse, _
* @throws {@link LimitExceededException} (client fault)
* <p>You made too many calls in a short period of time. Try again later.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link CostExplorerServiceException}
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export interface GetDimensionValuesCommandOutput extends GetDimensionValuesRespo
* SortOrder: "ASCENDING" || "DESCENDING",
* },
* ],
* BillingViewArn: "STRING_VALUE",
* MaxResults: Number("int"),
* NextPageToken: "STRING_VALUE",
* };
Expand Down Expand Up @@ -160,6 +161,9 @@ export interface GetDimensionValuesCommandOutput extends GetDimensionValuesRespo
* <p>Your request parameters changed between pages. Try again with the old parameters or
* without a pagination token.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link CostExplorerServiceException}
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
*
Expand Down
4 changes: 4 additions & 0 deletions clients/client-cost-explorer/src/commands/GetTagsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export interface GetTagsCommandOutput extends GetTagsResponse, __MetadataBearer
* SortOrder: "ASCENDING" || "DESCENDING",
* },
* ],
* BillingViewArn: "STRING_VALUE",
* MaxResults: Number("int"),
* NextPageToken: "STRING_VALUE",
* };
Expand Down Expand Up @@ -154,6 +155,9 @@ export interface GetTagsCommandOutput extends GetTagsResponse, __MetadataBearer
* <p>Your request parameters changed between pages. Try again with the old parameters or
* without a pagination token.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link CostExplorerServiceException}
* <p>Base exception class for all service exceptions from CostExplorer service.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export interface GetUsageForecastCommandOutput extends GetUsageForecastResponse,
* MatchOptions: "<MatchOptions>",
* },
* },
* BillingViewArn: "STRING_VALUE",
* PredictionIntervalLevel: Number("int"),
* };
* const command = new GetUsageForecastCommand(input);
Expand Down Expand Up @@ -146,6 +147,9 @@ export interface GetUsageForecastCommandOutput extends GetUsageForecastResponse,
* @throws {@link LimitExceededException} (client fault)
* <p>You made too many calls in a short period of time. Try again later.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p> The specified ARN in the request doesn't exist. </p>
*
* @throws {@link UnresolvableUsageUnitException} (client fault)
* <p>Cost Explorer was unable to identify the usage unit. Provide
* <code>UsageType/UsageTypeGroup</code> filter selections that contain matching units,
Expand Down
70 changes: 70 additions & 0 deletions clients/client-cost-explorer/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6506,6 +6506,16 @@ export interface GetCostAndUsageRequest {
*/
GroupBy?: GroupDefinition[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>The token to retrieve the next set of results. Amazon Web Services provides the token
* when the response from a previous call has more results than the maximum page size.</p>
Expand Down Expand Up @@ -6586,6 +6596,16 @@ export interface GetCostAndUsageWithResourcesRequest {
*/
GroupBy?: GroupDefinition[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>The token to retrieve the next set of results. Amazon Web Services provides the token
* when the response from a previous call has more results than the maximum page size.</p>
Expand Down Expand Up @@ -6795,6 +6815,16 @@ export interface GetCostCategoriesRequest {
*/
SortBy?: SortDefinition[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>This field is only used when the <code>SortBy</code> value is provided in the
* request.</p>
Expand Down Expand Up @@ -6984,6 +7014,16 @@ export interface GetCostForecastRequest {
*/
Filter?: Expression | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>Cost Explorer always returns the mean forecast as a single point. You can request a
* prediction interval around the mean by specifying a confidence level. The higher the
Expand Down Expand Up @@ -7380,6 +7420,16 @@ export interface GetDimensionValuesRequest {
*/
SortBy?: SortDefinition[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>This field is only used when SortBy is provided in the request. The maximum number of
* objects that are returned for this request. If MaxResults isn't specified with SortBy, the
Expand Down Expand Up @@ -8772,6 +8822,16 @@ export interface GetTagsRequest {
*/
SortBy?: SortDefinition[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>This field is only used when SortBy is provided in the request. The maximum number of
* objects that are returned for this request. If MaxResults isn't specified with SortBy, the
Expand Down Expand Up @@ -8953,6 +9013,16 @@ export interface GetUsageForecastRequest {
*/
Filter?: Expression | undefined;

/**
* <p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN
* is used to specify which particular billing view you want to interact with or retrieve
* information from when making API calls related to Amazon Web Services Billing and Cost
* Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
* API.</p>
* @public
*/
BillingViewArn?: string | undefined;

/**
* <p>Amazon Web Services Cost Explorer always returns the mean forecast as a single point.
* You can request a prediction interval around the mean by specifying a confidence level. The
Expand Down
7 changes: 7 additions & 0 deletions clients/client-cost-explorer/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,7 @@ const se_GetAnomaliesRequest = (input: GetAnomaliesRequest, context: __SerdeCont
*/
const se_GetCostAndUsageRequest = (input: GetCostAndUsageRequest, context: __SerdeContext): any => {
return take(input, {
BillingViewArn: [],
Filter: (_) => se_Expression(_, context),
Granularity: [],
GroupBy: _json,
Expand All @@ -2219,6 +2220,7 @@ const se_GetCostAndUsageWithResourcesRequest = (
context: __SerdeContext
): any => {
return take(input, {
BillingViewArn: [],
Filter: (_) => se_Expression(_, context),
Granularity: [],
GroupBy: _json,
Expand All @@ -2233,6 +2235,7 @@ const se_GetCostAndUsageWithResourcesRequest = (
*/
const se_GetCostCategoriesRequest = (input: GetCostCategoriesRequest, context: __SerdeContext): any => {
return take(input, {
BillingViewArn: [],
CostCategoryName: [],
Filter: (_) => se_Expression(_, context),
MaxResults: [],
Expand All @@ -2248,6 +2251,7 @@ const se_GetCostCategoriesRequest = (input: GetCostCategoriesRequest, context: _
*/
const se_GetCostForecastRequest = (input: GetCostForecastRequest, context: __SerdeContext): any => {
return take(input, {
BillingViewArn: [],
Filter: (_) => se_Expression(_, context),
Granularity: [],
Metric: [],
Expand All @@ -2261,6 +2265,7 @@ const se_GetCostForecastRequest = (input: GetCostForecastRequest, context: __Ser
*/
const se_GetDimensionValuesRequest = (input: GetDimensionValuesRequest, context: __SerdeContext): any => {
return take(input, {
BillingViewArn: [],
Context: [],
Dimension: [],
Filter: (_) => se_Expression(_, context),
Expand Down Expand Up @@ -2414,6 +2419,7 @@ const se_GetSavingsPlansUtilizationRequest = (
*/
const se_GetTagsRequest = (input: GetTagsRequest, context: __SerdeContext): any => {
return take(input, {
BillingViewArn: [],
Filter: (_) => se_Expression(_, context),
MaxResults: [],
NextPageToken: [],
Expand All @@ -2429,6 +2435,7 @@ const se_GetTagsRequest = (input: GetTagsRequest, context: __SerdeContext): any
*/
const se_GetUsageForecastRequest = (input: GetUsageForecastRequest, context: __SerdeContext): any => {
return take(input, {
BillingViewArn: [],
Filter: (_) => se_Expression(_, context),
Granularity: [],
Metric: [],
Expand Down
Loading

0 comments on commit e4e1078

Please sign in to comment.