Skip to content

Commit bc4cc25

Browse files
author
awstools
committed
feat(client-outposts): Add AWS Outposts API to surface customer billing information
1 parent 1cf5c01 commit bc4cc25

File tree

13 files changed

+693
-28
lines changed

13 files changed

+693
-28
lines changed

clients/client-outposts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ GetOutpost
302302

303303
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/GetOutpostCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetOutpostCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetOutpostCommandOutput/)
304304

305+
</details>
306+
<details>
307+
<summary>
308+
GetOutpostBillingInformation
309+
</summary>
310+
311+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/GetOutpostBillingInformationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetOutpostBillingInformationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetOutpostBillingInformationCommandOutput/)
312+
305313
</details>
306314
<details>
307315
<summary>

clients/client-outposts/src/Outposts.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ import {
3737
GetConnectionCommandOutput,
3838
} from "./commands/GetConnectionCommand";
3939
import { GetOrderCommand, GetOrderCommandInput, GetOrderCommandOutput } from "./commands/GetOrderCommand";
40+
import {
41+
GetOutpostBillingInformationCommand,
42+
GetOutpostBillingInformationCommandInput,
43+
GetOutpostBillingInformationCommandOutput,
44+
} from "./commands/GetOutpostBillingInformationCommand";
4045
import { GetOutpostCommand, GetOutpostCommandInput, GetOutpostCommandOutput } from "./commands/GetOutpostCommand";
4146
import {
4247
GetOutpostInstanceTypesCommand,
@@ -134,6 +139,7 @@ const commands = {
134139
GetConnectionCommand,
135140
GetOrderCommand,
136141
GetOutpostCommand,
142+
GetOutpostBillingInformationCommand,
137143
GetOutpostInstanceTypesCommand,
138144
GetOutpostSupportedInstanceTypesCommand,
139145
GetSiteCommand,
@@ -302,6 +308,23 @@ export interface Outposts {
302308
cb: (err: any, data?: GetOutpostCommandOutput) => void
303309
): void;
304310

311+
/**
312+
* @see {@link GetOutpostBillingInformationCommand}
313+
*/
314+
getOutpostBillingInformation(
315+
args: GetOutpostBillingInformationCommandInput,
316+
options?: __HttpHandlerOptions
317+
): Promise<GetOutpostBillingInformationCommandOutput>;
318+
getOutpostBillingInformation(
319+
args: GetOutpostBillingInformationCommandInput,
320+
cb: (err: any, data?: GetOutpostBillingInformationCommandOutput) => void
321+
): void;
322+
getOutpostBillingInformation(
323+
args: GetOutpostBillingInformationCommandInput,
324+
options: __HttpHandlerOptions,
325+
cb: (err: any, data?: GetOutpostBillingInformationCommandOutput) => void
326+
): void;
327+
305328
/**
306329
* @see {@link GetOutpostInstanceTypesCommand}
307330
*/

clients/client-outposts/src/OutpostsClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ import { GetCapacityTaskCommandInput, GetCapacityTaskCommandOutput } from "./com
6464
import { GetCatalogItemCommandInput, GetCatalogItemCommandOutput } from "./commands/GetCatalogItemCommand";
6565
import { GetConnectionCommandInput, GetConnectionCommandOutput } from "./commands/GetConnectionCommand";
6666
import { GetOrderCommandInput, GetOrderCommandOutput } from "./commands/GetOrderCommand";
67+
import {
68+
GetOutpostBillingInformationCommandInput,
69+
GetOutpostBillingInformationCommandOutput,
70+
} from "./commands/GetOutpostBillingInformationCommand";
6771
import { GetOutpostCommandInput, GetOutpostCommandOutput } from "./commands/GetOutpostCommand";
6872
import {
6973
GetOutpostInstanceTypesCommandInput,
@@ -127,6 +131,7 @@ export type ServiceInputTypes =
127131
| GetCatalogItemCommandInput
128132
| GetConnectionCommandInput
129133
| GetOrderCommandInput
134+
| GetOutpostBillingInformationCommandInput
130135
| GetOutpostCommandInput
131136
| GetOutpostInstanceTypesCommandInput
132137
| GetOutpostSupportedInstanceTypesCommandInput
@@ -165,6 +170,7 @@ export type ServiceOutputTypes =
165170
| GetCatalogItemCommandOutput
166171
| GetConnectionCommandOutput
167172
| GetOrderCommandOutput
173+
| GetOutpostBillingInformationCommandOutput
168174
| GetOutpostCommandOutput
169175
| GetOutpostInstanceTypesCommandOutput
170176
| GetOutpostSupportedInstanceTypesCommandOutput

clients/client-outposts/src/commands/GetCatalogItemCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ export interface GetCatalogItemCommandOutput extends GetCatalogItemOutput, __Met
7070
* @see {@link GetCatalogItemCommandOutput} for command's `response` shape.
7171
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
7272
*
73+
* @throws {@link AccessDeniedException} (client fault)
74+
* <p>You do not have permission to perform this operation.</p>
75+
*
7376
* @throws {@link InternalServerException} (server fault)
7477
* <p>An internal error has occurred.</p>
7578
*
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { GetOutpostBillingInformationInput, GetOutpostBillingInformationOutput } from "../models/models_0";
9+
import { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient";
10+
import {
11+
de_GetOutpostBillingInformationCommand,
12+
se_GetOutpostBillingInformationCommand,
13+
} from "../protocols/Aws_restJson1";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link GetOutpostBillingInformationCommand}.
24+
*/
25+
export interface GetOutpostBillingInformationCommandInput extends GetOutpostBillingInformationInput {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link GetOutpostBillingInformationCommand}.
30+
*/
31+
export interface GetOutpostBillingInformationCommandOutput
32+
extends GetOutpostBillingInformationOutput,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Gets current and historical billing information about the specified Outpost.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { OutpostsClient, GetOutpostBillingInformationCommand } from "@aws-sdk/client-outposts"; // ES Modules import
41+
* // const { OutpostsClient, GetOutpostBillingInformationCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
42+
* const client = new OutpostsClient(config);
43+
* const input = { // GetOutpostBillingInformationInput
44+
* NextToken: "STRING_VALUE",
45+
* MaxResults: Number("int"),
46+
* OutpostIdentifier: "STRING_VALUE", // required
47+
* };
48+
* const command = new GetOutpostBillingInformationCommand(input);
49+
* const response = await client.send(command);
50+
* // { // GetOutpostBillingInformationOutput
51+
* // NextToken: "STRING_VALUE",
52+
* // Subscriptions: [ // SubscriptionList
53+
* // { // Subscription
54+
* // SubscriptionId: "STRING_VALUE",
55+
* // SubscriptionType: "ORIGINAL" || "RENEWAL" || "CAPACITY_INCREASE",
56+
* // SubscriptionStatus: "ACTIVE" || "INACTIVE" || "CANCELLED",
57+
* // OrderIds: [ // OrderIdList
58+
* // "STRING_VALUE",
59+
* // ],
60+
* // BeginDate: new Date("TIMESTAMP"),
61+
* // EndDate: new Date("TIMESTAMP"),
62+
* // MonthlyRecurringPrice: Number("double"),
63+
* // UpfrontPrice: Number("double"),
64+
* // },
65+
* // ],
66+
* // ContractEndDate: "STRING_VALUE",
67+
* // };
68+
*
69+
* ```
70+
*
71+
* @param GetOutpostBillingInformationCommandInput - {@link GetOutpostBillingInformationCommandInput}
72+
* @returns {@link GetOutpostBillingInformationCommandOutput}
73+
* @see {@link GetOutpostBillingInformationCommandInput} for command's `input` shape.
74+
* @see {@link GetOutpostBillingInformationCommandOutput} for command's `response` shape.
75+
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
76+
*
77+
* @throws {@link AccessDeniedException} (client fault)
78+
* <p>You do not have permission to perform this operation.</p>
79+
*
80+
* @throws {@link InternalServerException} (server fault)
81+
* <p>An internal error has occurred.</p>
82+
*
83+
* @throws {@link NotFoundException} (client fault)
84+
* <p>The specified request is not valid.</p>
85+
*
86+
* @throws {@link OutpostsServiceException}
87+
* <p>Base exception class for all service exceptions from Outposts service.</p>
88+
*
89+
*
90+
* @public
91+
*/
92+
export class GetOutpostBillingInformationCommand extends $Command
93+
.classBuilder<
94+
GetOutpostBillingInformationCommandInput,
95+
GetOutpostBillingInformationCommandOutput,
96+
OutpostsClientResolvedConfig,
97+
ServiceInputTypes,
98+
ServiceOutputTypes
99+
>()
100+
.ep(commonParams)
101+
.m(function (this: any, Command: any, cs: any, config: OutpostsClientResolvedConfig, o: any) {
102+
return [
103+
getSerdePlugin(config, this.serialize, this.deserialize),
104+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
105+
];
106+
})
107+
.s("OutpostsOlafService", "GetOutpostBillingInformation", {})
108+
.n("OutpostsClient", "GetOutpostBillingInformationCommand")
109+
.f(void 0, void 0)
110+
.ser(se_GetOutpostBillingInformationCommand)
111+
.de(de_GetOutpostBillingInformationCommand)
112+
.build() {
113+
/** @internal type navigation helper, not in runtime. */
114+
protected declare static __types: {
115+
api: {
116+
input: GetOutpostBillingInformationInput;
117+
output: GetOutpostBillingInformationOutput;
118+
};
119+
sdk: {
120+
input: GetOutpostBillingInformationCommandInput;
121+
output: GetOutpostBillingInformationCommandOutput;
122+
};
123+
};
124+
}

clients/client-outposts/src/commands/ListCatalogItemsCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ export interface ListCatalogItemsCommandOutput extends ListCatalogItemsOutput, _
8686
* @see {@link ListCatalogItemsCommandOutput} for command's `response` shape.
8787
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
8888
*
89+
* @throws {@link AccessDeniedException} (client fault)
90+
* <p>You do not have permission to perform this operation.</p>
91+
*
8992
* @throws {@link InternalServerException} (server fault)
9093
* <p>An internal error has occurred.</p>
9194
*

clients/client-outposts/src/commands/StartCapacityTaskCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export interface StartCapacityTaskCommandInput extends StartCapacityTaskInput {}
2828
export interface StartCapacityTaskCommandOutput extends StartCapacityTaskOutput, __MetadataBearer {}
2929

3030
/**
31-
* <p>Starts the specified capacity task. You can have one active capacity task for each order and each Outpost.</p>
31+
* <p>Starts the specified capacity task. You can have one active capacity task for each order
32+
* and each Outpost.</p>
3233
* @example
3334
* Use a bare-bones client and the command you need to make an API call.
3435
* ```javascript

clients/client-outposts/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export * from "./GetCapacityTaskCommand";
1010
export * from "./GetCatalogItemCommand";
1111
export * from "./GetConnectionCommand";
1212
export * from "./GetOrderCommand";
13+
export * from "./GetOutpostBillingInformationCommand";
1314
export * from "./GetOutpostCommand";
1415
export * from "./GetOutpostInstanceTypesCommand";
1516
export * from "./GetOutpostSupportedInstanceTypesCommand";

0 commit comments

Comments
 (0)