Skip to content

Commit

Permalink
feat(client-billing): Added new API's for defining and fetching Billi…
Browse files Browse the repository at this point in the history
…ng Views.
  • Loading branch information
awstools committed Dec 20, 2024
1 parent d0c7aba commit 3398a2a
Show file tree
Hide file tree
Showing 20 changed files with 4,160 additions and 180 deletions.
72 changes: 72 additions & 0 deletions clients/client-billing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,38 @@ see LICENSE for more information.

## Client Commands (Operations List)

<details>
<summary>
CreateBillingView
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/CreateBillingViewCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/CreateBillingViewCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/CreateBillingViewCommandOutput/)

</details>
<details>
<summary>
DeleteBillingView
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/DeleteBillingViewCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/DeleteBillingViewCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/DeleteBillingViewCommandOutput/)

</details>
<details>
<summary>
GetBillingView
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/GetBillingViewCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/GetBillingViewCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/GetBillingViewCommandOutput/)

</details>
<details>
<summary>
GetResourcePolicy
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/GetResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/GetResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/GetResourcePolicyCommandOutput/)

</details>
<details>
<summary>
ListBillingViews
Expand All @@ -217,3 +249,43 @@ ListBillingViews
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/ListBillingViewsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/ListBillingViewsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/ListBillingViewsCommandOutput/)

</details>
<details>
<summary>
ListSourceViewsForBillingView
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/ListSourceViewsForBillingViewCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/ListSourceViewsForBillingViewCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/ListSourceViewsForBillingViewCommandOutput/)

</details>
<details>
<summary>
ListTagsForResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/ListTagsForResourceCommandOutput/)

</details>
<details>
<summary>
TagResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/TagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/TagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/TagResourceCommandOutput/)

</details>
<details>
<summary>
UntagResource
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/UntagResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/UntagResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/UntagResourceCommandOutput/)

</details>
<details>
<summary>
UpdateBillingView
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/billing/command/UpdateBillingViewCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/UpdateBillingViewCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-billing/Interface/UpdateBillingViewCommandOutput/)

</details>
4 changes: 3 additions & 1 deletion clients/client-billing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"@smithy/util-middleware": "^3.0.11",
"@smithy/util-retry": "^3.0.11",
"@smithy/util-utf8": "^3.0.0",
"tslib": "^2.6.2"
"@types/uuid": "^9.0.1",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
},
"devDependencies": {
"@tsconfig/node16": "16.1.3",
Expand Down
189 changes: 189 additions & 0 deletions clients/client-billing/src/Billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,136 @@ import { createAggregatedClient } from "@smithy/smithy-client";
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";

import { BillingClient, BillingClientConfig } from "./BillingClient";
import {
CreateBillingViewCommand,
CreateBillingViewCommandInput,
CreateBillingViewCommandOutput,
} from "./commands/CreateBillingViewCommand";
import {
DeleteBillingViewCommand,
DeleteBillingViewCommandInput,
DeleteBillingViewCommandOutput,
} from "./commands/DeleteBillingViewCommand";
import {
GetBillingViewCommand,
GetBillingViewCommandInput,
GetBillingViewCommandOutput,
} from "./commands/GetBillingViewCommand";
import {
GetResourcePolicyCommand,
GetResourcePolicyCommandInput,
GetResourcePolicyCommandOutput,
} from "./commands/GetResourcePolicyCommand";
import {
ListBillingViewsCommand,
ListBillingViewsCommandInput,
ListBillingViewsCommandOutput,
} from "./commands/ListBillingViewsCommand";
import {
ListSourceViewsForBillingViewCommand,
ListSourceViewsForBillingViewCommandInput,
ListSourceViewsForBillingViewCommandOutput,
} from "./commands/ListSourceViewsForBillingViewCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import {
UntagResourceCommand,
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateBillingViewCommand,
UpdateBillingViewCommandInput,
UpdateBillingViewCommandOutput,
} from "./commands/UpdateBillingViewCommand";

const commands = {
CreateBillingViewCommand,
DeleteBillingViewCommand,
GetBillingViewCommand,
GetResourcePolicyCommand,
ListBillingViewsCommand,
ListSourceViewsForBillingViewCommand,
ListTagsForResourceCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateBillingViewCommand,
};

export interface Billing {
/**
* @see {@link CreateBillingViewCommand}
*/
createBillingView(
args: CreateBillingViewCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateBillingViewCommandOutput>;
createBillingView(
args: CreateBillingViewCommandInput,
cb: (err: any, data?: CreateBillingViewCommandOutput) => void
): void;
createBillingView(
args: CreateBillingViewCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateBillingViewCommandOutput) => void
): void;

/**
* @see {@link DeleteBillingViewCommand}
*/
deleteBillingView(
args: DeleteBillingViewCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteBillingViewCommandOutput>;
deleteBillingView(
args: DeleteBillingViewCommandInput,
cb: (err: any, data?: DeleteBillingViewCommandOutput) => void
): void;
deleteBillingView(
args: DeleteBillingViewCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteBillingViewCommandOutput) => void
): void;

/**
* @see {@link GetBillingViewCommand}
*/
getBillingView(
args: GetBillingViewCommandInput,
options?: __HttpHandlerOptions
): Promise<GetBillingViewCommandOutput>;
getBillingView(args: GetBillingViewCommandInput, cb: (err: any, data?: GetBillingViewCommandOutput) => void): void;
getBillingView(
args: GetBillingViewCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetBillingViewCommandOutput) => void
): void;

/**
* @see {@link GetResourcePolicyCommand}
*/
getResourcePolicy(
args: GetResourcePolicyCommandInput,
options?: __HttpHandlerOptions
): Promise<GetResourcePolicyCommandOutput>;
getResourcePolicy(
args: GetResourcePolicyCommandInput,
cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
): void;
getResourcePolicy(
args: GetResourcePolicyCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
): void;

/**
* @see {@link ListBillingViewsCommand}
*/
listBillingViews(): Promise<ListBillingViewsCommandOutput>;
listBillingViews(
args: ListBillingViewsCommandInput,
options?: __HttpHandlerOptions
Expand All @@ -30,6 +146,79 @@ export interface Billing {
options: __HttpHandlerOptions,
cb: (err: any, data?: ListBillingViewsCommandOutput) => void
): void;

/**
* @see {@link ListSourceViewsForBillingViewCommand}
*/
listSourceViewsForBillingView(
args: ListSourceViewsForBillingViewCommandInput,
options?: __HttpHandlerOptions
): Promise<ListSourceViewsForBillingViewCommandOutput>;
listSourceViewsForBillingView(
args: ListSourceViewsForBillingViewCommandInput,
cb: (err: any, data?: ListSourceViewsForBillingViewCommandOutput) => void
): void;
listSourceViewsForBillingView(
args: ListSourceViewsForBillingViewCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListSourceViewsForBillingViewCommandOutput) => void
): void;

/**
* @see {@link ListTagsForResourceCommand}
*/
listTagsForResource(
args: ListTagsForResourceCommandInput,
options?: __HttpHandlerOptions
): Promise<ListTagsForResourceCommandOutput>;
listTagsForResource(
args: ListTagsForResourceCommandInput,
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
): void;
listTagsForResource(
args: ListTagsForResourceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
): void;

/**
* @see {@link TagResourceCommand}
*/
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
tagResource(
args: TagResourceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: TagResourceCommandOutput) => void
): void;

/**
* @see {@link UntagResourceCommand}
*/
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
untagResource(
args: UntagResourceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UntagResourceCommandOutput) => void
): void;

/**
* @see {@link UpdateBillingViewCommand}
*/
updateBillingView(
args: UpdateBillingViewCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateBillingViewCommandOutput>;
updateBillingView(
args: UpdateBillingViewCommandInput,
cb: (err: any, data?: UpdateBillingViewCommandOutput) => void
): void;
updateBillingView(
args: UpdateBillingViewCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateBillingViewCommandOutput) => void
): void;
}

/**
Expand Down
39 changes: 37 additions & 2 deletions clients/client-billing/src/BillingClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,22 @@ import {
HttpAuthSchemeResolvedConfig,
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import { CreateBillingViewCommandInput, CreateBillingViewCommandOutput } from "./commands/CreateBillingViewCommand";
import { DeleteBillingViewCommandInput, DeleteBillingViewCommandOutput } from "./commands/DeleteBillingViewCommand";
import { GetBillingViewCommandInput, GetBillingViewCommandOutput } from "./commands/GetBillingViewCommand";
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
import { ListBillingViewsCommandInput, ListBillingViewsCommandOutput } from "./commands/ListBillingViewsCommand";
import {
ListSourceViewsForBillingViewCommandInput,
ListSourceViewsForBillingViewCommandOutput,
} from "./commands/ListSourceViewsForBillingViewCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
} from "./commands/ListTagsForResourceCommand";
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import { UpdateBillingViewCommandInput, UpdateBillingViewCommandOutput } from "./commands/UpdateBillingViewCommand";
import {
ClientInputEndpointParameters,
ClientResolvedEndpointParameters,
Expand All @@ -68,12 +83,32 @@ export { __Client };
/**
* @public
*/
export type ServiceInputTypes = ListBillingViewsCommandInput;
export type ServiceInputTypes =
| CreateBillingViewCommandInput
| DeleteBillingViewCommandInput
| GetBillingViewCommandInput
| GetResourcePolicyCommandInput
| ListBillingViewsCommandInput
| ListSourceViewsForBillingViewCommandInput
| ListTagsForResourceCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateBillingViewCommandInput;

/**
* @public
*/
export type ServiceOutputTypes = ListBillingViewsCommandOutput;
export type ServiceOutputTypes =
| CreateBillingViewCommandOutput
| DeleteBillingViewCommandOutput
| GetBillingViewCommandOutput
| GetResourcePolicyCommandOutput
| ListBillingViewsCommandOutput
| ListSourceViewsForBillingViewCommandOutput
| ListTagsForResourceCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateBillingViewCommandOutput;

/**
* @public
Expand Down
Loading

0 comments on commit 3398a2a

Please sign in to comment.