Skip to content

Commit 3398a2a

Browse files
author
awstools
committed
feat(client-billing): Added new API's for defining and fetching Billing Views.
1 parent d0c7aba commit 3398a2a

20 files changed

+4160
-180
lines changed

clients/client-billing/README.md

+72
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,38 @@ see LICENSE for more information.
209209

210210
## Client Commands (Operations List)
211211

212+
<details>
213+
<summary>
214+
CreateBillingView
215+
</summary>
216+
217+
[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/)
218+
219+
</details>
220+
<details>
221+
<summary>
222+
DeleteBillingView
223+
</summary>
224+
225+
[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/)
226+
227+
</details>
228+
<details>
229+
<summary>
230+
GetBillingView
231+
</summary>
232+
233+
[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/)
234+
235+
</details>
236+
<details>
237+
<summary>
238+
GetResourcePolicy
239+
</summary>
240+
241+
[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/)
242+
243+
</details>
212244
<details>
213245
<summary>
214246
ListBillingViews
@@ -217,3 +249,43 @@ ListBillingViews
217249
[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/)
218250

219251
</details>
252+
<details>
253+
<summary>
254+
ListSourceViewsForBillingView
255+
</summary>
256+
257+
[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/)
258+
259+
</details>
260+
<details>
261+
<summary>
262+
ListTagsForResource
263+
</summary>
264+
265+
[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/)
266+
267+
</details>
268+
<details>
269+
<summary>
270+
TagResource
271+
</summary>
272+
273+
[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/)
274+
275+
</details>
276+
<details>
277+
<summary>
278+
UntagResource
279+
</summary>
280+
281+
[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/)
282+
283+
</details>
284+
<details>
285+
<summary>
286+
UpdateBillingView
287+
</summary>
288+
289+
[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/)
290+
291+
</details>

clients/client-billing/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@
5858
"@smithy/util-middleware": "^3.0.11",
5959
"@smithy/util-retry": "^3.0.11",
6060
"@smithy/util-utf8": "^3.0.0",
61-
"tslib": "^2.6.2"
61+
"@types/uuid": "^9.0.1",
62+
"tslib": "^2.6.2",
63+
"uuid": "^9.0.1"
6264
},
6365
"devDependencies": {
6466
"@tsconfig/node16": "16.1.3",

clients/client-billing/src/Billing.ts

+189
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,136 @@ import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

55
import { BillingClient, BillingClientConfig } from "./BillingClient";
6+
import {
7+
CreateBillingViewCommand,
8+
CreateBillingViewCommandInput,
9+
CreateBillingViewCommandOutput,
10+
} from "./commands/CreateBillingViewCommand";
11+
import {
12+
DeleteBillingViewCommand,
13+
DeleteBillingViewCommandInput,
14+
DeleteBillingViewCommandOutput,
15+
} from "./commands/DeleteBillingViewCommand";
16+
import {
17+
GetBillingViewCommand,
18+
GetBillingViewCommandInput,
19+
GetBillingViewCommandOutput,
20+
} from "./commands/GetBillingViewCommand";
21+
import {
22+
GetResourcePolicyCommand,
23+
GetResourcePolicyCommandInput,
24+
GetResourcePolicyCommandOutput,
25+
} from "./commands/GetResourcePolicyCommand";
626
import {
727
ListBillingViewsCommand,
828
ListBillingViewsCommandInput,
929
ListBillingViewsCommandOutput,
1030
} from "./commands/ListBillingViewsCommand";
31+
import {
32+
ListSourceViewsForBillingViewCommand,
33+
ListSourceViewsForBillingViewCommandInput,
34+
ListSourceViewsForBillingViewCommandOutput,
35+
} from "./commands/ListSourceViewsForBillingViewCommand";
36+
import {
37+
ListTagsForResourceCommand,
38+
ListTagsForResourceCommandInput,
39+
ListTagsForResourceCommandOutput,
40+
} from "./commands/ListTagsForResourceCommand";
41+
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
42+
import {
43+
UntagResourceCommand,
44+
UntagResourceCommandInput,
45+
UntagResourceCommandOutput,
46+
} from "./commands/UntagResourceCommand";
47+
import {
48+
UpdateBillingViewCommand,
49+
UpdateBillingViewCommandInput,
50+
UpdateBillingViewCommandOutput,
51+
} from "./commands/UpdateBillingViewCommand";
1152

1253
const commands = {
54+
CreateBillingViewCommand,
55+
DeleteBillingViewCommand,
56+
GetBillingViewCommand,
57+
GetResourcePolicyCommand,
1358
ListBillingViewsCommand,
59+
ListSourceViewsForBillingViewCommand,
60+
ListTagsForResourceCommand,
61+
TagResourceCommand,
62+
UntagResourceCommand,
63+
UpdateBillingViewCommand,
1464
};
1565

1666
export interface Billing {
67+
/**
68+
* @see {@link CreateBillingViewCommand}
69+
*/
70+
createBillingView(
71+
args: CreateBillingViewCommandInput,
72+
options?: __HttpHandlerOptions
73+
): Promise<CreateBillingViewCommandOutput>;
74+
createBillingView(
75+
args: CreateBillingViewCommandInput,
76+
cb: (err: any, data?: CreateBillingViewCommandOutput) => void
77+
): void;
78+
createBillingView(
79+
args: CreateBillingViewCommandInput,
80+
options: __HttpHandlerOptions,
81+
cb: (err: any, data?: CreateBillingViewCommandOutput) => void
82+
): void;
83+
84+
/**
85+
* @see {@link DeleteBillingViewCommand}
86+
*/
87+
deleteBillingView(
88+
args: DeleteBillingViewCommandInput,
89+
options?: __HttpHandlerOptions
90+
): Promise<DeleteBillingViewCommandOutput>;
91+
deleteBillingView(
92+
args: DeleteBillingViewCommandInput,
93+
cb: (err: any, data?: DeleteBillingViewCommandOutput) => void
94+
): void;
95+
deleteBillingView(
96+
args: DeleteBillingViewCommandInput,
97+
options: __HttpHandlerOptions,
98+
cb: (err: any, data?: DeleteBillingViewCommandOutput) => void
99+
): void;
100+
101+
/**
102+
* @see {@link GetBillingViewCommand}
103+
*/
104+
getBillingView(
105+
args: GetBillingViewCommandInput,
106+
options?: __HttpHandlerOptions
107+
): Promise<GetBillingViewCommandOutput>;
108+
getBillingView(args: GetBillingViewCommandInput, cb: (err: any, data?: GetBillingViewCommandOutput) => void): void;
109+
getBillingView(
110+
args: GetBillingViewCommandInput,
111+
options: __HttpHandlerOptions,
112+
cb: (err: any, data?: GetBillingViewCommandOutput) => void
113+
): void;
114+
115+
/**
116+
* @see {@link GetResourcePolicyCommand}
117+
*/
118+
getResourcePolicy(
119+
args: GetResourcePolicyCommandInput,
120+
options?: __HttpHandlerOptions
121+
): Promise<GetResourcePolicyCommandOutput>;
122+
getResourcePolicy(
123+
args: GetResourcePolicyCommandInput,
124+
cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
125+
): void;
126+
getResourcePolicy(
127+
args: GetResourcePolicyCommandInput,
128+
options: __HttpHandlerOptions,
129+
cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
130+
): void;
131+
17132
/**
18133
* @see {@link ListBillingViewsCommand}
19134
*/
135+
listBillingViews(): Promise<ListBillingViewsCommandOutput>;
20136
listBillingViews(
21137
args: ListBillingViewsCommandInput,
22138
options?: __HttpHandlerOptions
@@ -30,6 +146,79 @@ export interface Billing {
30146
options: __HttpHandlerOptions,
31147
cb: (err: any, data?: ListBillingViewsCommandOutput) => void
32148
): void;
149+
150+
/**
151+
* @see {@link ListSourceViewsForBillingViewCommand}
152+
*/
153+
listSourceViewsForBillingView(
154+
args: ListSourceViewsForBillingViewCommandInput,
155+
options?: __HttpHandlerOptions
156+
): Promise<ListSourceViewsForBillingViewCommandOutput>;
157+
listSourceViewsForBillingView(
158+
args: ListSourceViewsForBillingViewCommandInput,
159+
cb: (err: any, data?: ListSourceViewsForBillingViewCommandOutput) => void
160+
): void;
161+
listSourceViewsForBillingView(
162+
args: ListSourceViewsForBillingViewCommandInput,
163+
options: __HttpHandlerOptions,
164+
cb: (err: any, data?: ListSourceViewsForBillingViewCommandOutput) => void
165+
): void;
166+
167+
/**
168+
* @see {@link ListTagsForResourceCommand}
169+
*/
170+
listTagsForResource(
171+
args: ListTagsForResourceCommandInput,
172+
options?: __HttpHandlerOptions
173+
): Promise<ListTagsForResourceCommandOutput>;
174+
listTagsForResource(
175+
args: ListTagsForResourceCommandInput,
176+
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
177+
): void;
178+
listTagsForResource(
179+
args: ListTagsForResourceCommandInput,
180+
options: __HttpHandlerOptions,
181+
cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
182+
): void;
183+
184+
/**
185+
* @see {@link TagResourceCommand}
186+
*/
187+
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
188+
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
189+
tagResource(
190+
args: TagResourceCommandInput,
191+
options: __HttpHandlerOptions,
192+
cb: (err: any, data?: TagResourceCommandOutput) => void
193+
): void;
194+
195+
/**
196+
* @see {@link UntagResourceCommand}
197+
*/
198+
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
199+
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
200+
untagResource(
201+
args: UntagResourceCommandInput,
202+
options: __HttpHandlerOptions,
203+
cb: (err: any, data?: UntagResourceCommandOutput) => void
204+
): void;
205+
206+
/**
207+
* @see {@link UpdateBillingViewCommand}
208+
*/
209+
updateBillingView(
210+
args: UpdateBillingViewCommandInput,
211+
options?: __HttpHandlerOptions
212+
): Promise<UpdateBillingViewCommandOutput>;
213+
updateBillingView(
214+
args: UpdateBillingViewCommandInput,
215+
cb: (err: any, data?: UpdateBillingViewCommandOutput) => void
216+
): void;
217+
updateBillingView(
218+
args: UpdateBillingViewCommandInput,
219+
options: __HttpHandlerOptions,
220+
cb: (err: any, data?: UpdateBillingViewCommandOutput) => void
221+
): void;
33222
}
34223

35224
/**

clients/client-billing/src/BillingClient.ts

+37-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,22 @@ import {
5353
HttpAuthSchemeResolvedConfig,
5454
resolveHttpAuthSchemeConfig,
5555
} from "./auth/httpAuthSchemeProvider";
56+
import { CreateBillingViewCommandInput, CreateBillingViewCommandOutput } from "./commands/CreateBillingViewCommand";
57+
import { DeleteBillingViewCommandInput, DeleteBillingViewCommandOutput } from "./commands/DeleteBillingViewCommand";
58+
import { GetBillingViewCommandInput, GetBillingViewCommandOutput } from "./commands/GetBillingViewCommand";
59+
import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand";
5660
import { ListBillingViewsCommandInput, ListBillingViewsCommandOutput } from "./commands/ListBillingViewsCommand";
61+
import {
62+
ListSourceViewsForBillingViewCommandInput,
63+
ListSourceViewsForBillingViewCommandOutput,
64+
} from "./commands/ListSourceViewsForBillingViewCommand";
65+
import {
66+
ListTagsForResourceCommandInput,
67+
ListTagsForResourceCommandOutput,
68+
} from "./commands/ListTagsForResourceCommand";
69+
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
70+
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
71+
import { UpdateBillingViewCommandInput, UpdateBillingViewCommandOutput } from "./commands/UpdateBillingViewCommand";
5772
import {
5873
ClientInputEndpointParameters,
5974
ClientResolvedEndpointParameters,
@@ -68,12 +83,32 @@ export { __Client };
6883
/**
6984
* @public
7085
*/
71-
export type ServiceInputTypes = ListBillingViewsCommandInput;
86+
export type ServiceInputTypes =
87+
| CreateBillingViewCommandInput
88+
| DeleteBillingViewCommandInput
89+
| GetBillingViewCommandInput
90+
| GetResourcePolicyCommandInput
91+
| ListBillingViewsCommandInput
92+
| ListSourceViewsForBillingViewCommandInput
93+
| ListTagsForResourceCommandInput
94+
| TagResourceCommandInput
95+
| UntagResourceCommandInput
96+
| UpdateBillingViewCommandInput;
7297

7398
/**
7499
* @public
75100
*/
76-
export type ServiceOutputTypes = ListBillingViewsCommandOutput;
101+
export type ServiceOutputTypes =
102+
| CreateBillingViewCommandOutput
103+
| DeleteBillingViewCommandOutput
104+
| GetBillingViewCommandOutput
105+
| GetResourcePolicyCommandOutput
106+
| ListBillingViewsCommandOutput
107+
| ListSourceViewsForBillingViewCommandOutput
108+
| ListTagsForResourceCommandOutput
109+
| TagResourceCommandOutput
110+
| UntagResourceCommandOutput
111+
| UpdateBillingViewCommandOutput;
77112

78113
/**
79114
* @public

0 commit comments

Comments
 (0)