Skip to content

Commit ba6c2a7

Browse files
author
awstools
committed
feat(client-outposts): Add AWS Outposts APIs to view renewal pricing options and submit renewal requests for Outpost contracts
1 parent 459df0b commit ba6c2a7

13 files changed

Lines changed: 875 additions & 11 deletions

File tree

clients/client-outposts/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,13 @@ CreateOutpost
213213
</details>
214214
<details>
215215
<summary>
216+
CreateRenewal
217+
</summary>
218+
219+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/CreateRenewalCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/CreateRenewalCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/CreateRenewalCommandOutput/)
220+
</details>
221+
<details>
222+
<summary>
216223
CreateSite
217224
</summary>
218225

@@ -290,6 +297,13 @@ GetOutpostSupportedInstanceTypes
290297
</details>
291298
<details>
292299
<summary>
300+
GetRenewalPricing
301+
</summary>
302+
303+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/GetRenewalPricingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetRenewalPricingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetRenewalPricingCommandOutput/)
304+
</details>
305+
<details>
306+
<summary>
293307
GetSite
294308
</summary>
295309

clients/client-outposts/src/Outposts.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ import {
2222
type CreateOutpostCommandOutput,
2323
CreateOutpostCommand,
2424
} from "./commands/CreateOutpostCommand";
25+
import {
26+
type CreateRenewalCommandInput,
27+
type CreateRenewalCommandOutput,
28+
CreateRenewalCommand,
29+
} from "./commands/CreateRenewalCommand";
2530
import {
2631
type CreateSiteCommandInput,
2732
type CreateSiteCommandOutput,
@@ -73,6 +78,11 @@ import {
7378
type GetOutpostSupportedInstanceTypesCommandOutput,
7479
GetOutpostSupportedInstanceTypesCommand,
7580
} from "./commands/GetOutpostSupportedInstanceTypesCommand";
81+
import {
82+
type GetRenewalPricingCommandInput,
83+
type GetRenewalPricingCommandOutput,
84+
GetRenewalPricingCommand,
85+
} from "./commands/GetRenewalPricingCommand";
7686
import {
7787
type GetSiteAddressCommandInput,
7888
type GetSiteAddressCommandOutput,
@@ -185,6 +195,7 @@ const commands = {
185195
CancelOrderCommand,
186196
CreateOrderCommand,
187197
CreateOutpostCommand,
198+
CreateRenewalCommand,
188199
CreateSiteCommand,
189200
DeleteOutpostCommand,
190201
DeleteSiteCommand,
@@ -196,6 +207,7 @@ const commands = {
196207
GetOutpostBillingInformationCommand,
197208
GetOutpostInstanceTypesCommand,
198209
GetOutpostSupportedInstanceTypesCommand,
210+
GetRenewalPricingCommand,
199211
GetSiteCommand,
200212
GetSiteAddressCommand,
201213
ListAssetInstancesCommand,
@@ -300,6 +312,23 @@ export interface Outposts {
300312
cb: (err: any, data?: CreateOutpostCommandOutput) => void
301313
): void;
302314

315+
/**
316+
* @see {@link CreateRenewalCommand}
317+
*/
318+
createRenewal(
319+
args: CreateRenewalCommandInput,
320+
options?: __HttpHandlerOptions
321+
): Promise<CreateRenewalCommandOutput>;
322+
createRenewal(
323+
args: CreateRenewalCommandInput,
324+
cb: (err: any, data?: CreateRenewalCommandOutput) => void
325+
): void;
326+
createRenewal(
327+
args: CreateRenewalCommandInput,
328+
options: __HttpHandlerOptions,
329+
cb: (err: any, data?: CreateRenewalCommandOutput) => void
330+
): void;
331+
303332
/**
304333
* @see {@link CreateSiteCommand}
305334
*/
@@ -487,6 +516,23 @@ export interface Outposts {
487516
cb: (err: any, data?: GetOutpostSupportedInstanceTypesCommandOutput) => void
488517
): void;
489518

519+
/**
520+
* @see {@link GetRenewalPricingCommand}
521+
*/
522+
getRenewalPricing(
523+
args: GetRenewalPricingCommandInput,
524+
options?: __HttpHandlerOptions
525+
): Promise<GetRenewalPricingCommandOutput>;
526+
getRenewalPricing(
527+
args: GetRenewalPricingCommandInput,
528+
cb: (err: any, data?: GetRenewalPricingCommandOutput) => void
529+
): void;
530+
getRenewalPricing(
531+
args: GetRenewalPricingCommandInput,
532+
options: __HttpHandlerOptions,
533+
cb: (err: any, data?: GetRenewalPricingCommandOutput) => void
534+
): void;
535+
490536
/**
491537
* @see {@link GetSiteCommand}
492538
*/

clients/client-outposts/src/OutpostsClient.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import type {
6868
import type { CancelOrderCommandInput, CancelOrderCommandOutput } from "./commands/CancelOrderCommand";
6969
import type { CreateOrderCommandInput, CreateOrderCommandOutput } from "./commands/CreateOrderCommand";
7070
import type { CreateOutpostCommandInput, CreateOutpostCommandOutput } from "./commands/CreateOutpostCommand";
71+
import type { CreateRenewalCommandInput, CreateRenewalCommandOutput } from "./commands/CreateRenewalCommand";
7172
import type { CreateSiteCommandInput, CreateSiteCommandOutput } from "./commands/CreateSiteCommand";
7273
import type { DeleteOutpostCommandInput, DeleteOutpostCommandOutput } from "./commands/DeleteOutpostCommand";
7374
import type { DeleteSiteCommandInput, DeleteSiteCommandOutput } from "./commands/DeleteSiteCommand";
@@ -88,6 +89,10 @@ import type {
8889
GetOutpostSupportedInstanceTypesCommandInput,
8990
GetOutpostSupportedInstanceTypesCommandOutput,
9091
} from "./commands/GetOutpostSupportedInstanceTypesCommand";
92+
import type {
93+
GetRenewalPricingCommandInput,
94+
GetRenewalPricingCommandOutput,
95+
} from "./commands/GetRenewalPricingCommand";
9196
import type { GetSiteAddressCommandInput, GetSiteAddressCommandOutput } from "./commands/GetSiteAddressCommand";
9297
import type { GetSiteCommandInput, GetSiteCommandOutput } from "./commands/GetSiteCommand";
9398
import type {
@@ -151,6 +156,7 @@ export type ServiceInputTypes =
151156
| CancelOrderCommandInput
152157
| CreateOrderCommandInput
153158
| CreateOutpostCommandInput
159+
| CreateRenewalCommandInput
154160
| CreateSiteCommandInput
155161
| DeleteOutpostCommandInput
156162
| DeleteSiteCommandInput
@@ -162,6 +168,7 @@ export type ServiceInputTypes =
162168
| GetOutpostCommandInput
163169
| GetOutpostInstanceTypesCommandInput
164170
| GetOutpostSupportedInstanceTypesCommandInput
171+
| GetRenewalPricingCommandInput
165172
| GetSiteAddressCommandInput
166173
| GetSiteCommandInput
167174
| ListAssetInstancesCommandInput
@@ -191,6 +198,7 @@ export type ServiceOutputTypes =
191198
| CancelOrderCommandOutput
192199
| CreateOrderCommandOutput
193200
| CreateOutpostCommandOutput
201+
| CreateRenewalCommandOutput
194202
| CreateSiteCommandOutput
195203
| DeleteOutpostCommandOutput
196204
| DeleteSiteCommandOutput
@@ -202,6 +210,7 @@ export type ServiceOutputTypes =
202210
| GetOutpostCommandOutput
203211
| GetOutpostInstanceTypesCommandOutput
204212
| GetOutpostSupportedInstanceTypesCommandOutput
213+
| GetRenewalPricingCommandOutput
205214
| GetSiteAddressCommandOutput
206215
| GetSiteCommandOutput
207216
| ListAssetInstancesCommandOutput
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import { commonParams } from "../endpoint/EndpointParameters";
7+
import type { CreateRenewalInput, CreateRenewalOutput } from "../models/models_0";
8+
import type { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient";
9+
import { CreateRenewal$ } from "../schemas/schemas_0";
10+
11+
/**
12+
* @public
13+
*/
14+
export type { __MetadataBearer };
15+
export { $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link CreateRenewalCommand}.
20+
*/
21+
export interface CreateRenewalCommandInput extends CreateRenewalInput {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link CreateRenewalCommand}.
26+
*/
27+
export interface CreateRenewalCommandOutput extends CreateRenewalOutput, __MetadataBearer {}
28+
29+
/**
30+
* <p>Creates a renewal contract for the specified Outpost.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { OutpostsClient, CreateRenewalCommand } from "@aws-sdk/client-outposts"; // ES Modules import
35+
* // const { OutpostsClient, CreateRenewalCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
36+
* // import type { OutpostsClientConfig } from "@aws-sdk/client-outposts";
37+
* const config = {}; // type is OutpostsClientConfig
38+
* const client = new OutpostsClient(config);
39+
* const input = { // CreateRenewalInput
40+
* PaymentOption: "ALL_UPFRONT" || "NO_UPFRONT" || "PARTIAL_UPFRONT", // required
41+
* PaymentTerm: "THREE_YEARS" || "ONE_YEAR" || "FIVE_YEARS", // required
42+
* OutpostIdentifier: "STRING_VALUE", // required
43+
* ClientToken: "STRING_VALUE",
44+
* };
45+
* const command = new CreateRenewalCommand(input);
46+
* const response = await client.send(command);
47+
* // { // CreateRenewalOutput
48+
* // PaymentOption: "ALL_UPFRONT" || "NO_UPFRONT" || "PARTIAL_UPFRONT",
49+
* // PaymentTerm: "THREE_YEARS" || "ONE_YEAR" || "FIVE_YEARS",
50+
* // OutpostId: "STRING_VALUE",
51+
* // UpfrontPrice: Number("float"),
52+
* // MonthlyRecurringPrice: Number("float"),
53+
* // };
54+
*
55+
* ```
56+
*
57+
* @param CreateRenewalCommandInput - {@link CreateRenewalCommandInput}
58+
* @returns {@link CreateRenewalCommandOutput}
59+
* @see {@link CreateRenewalCommandInput} for command's `input` shape.
60+
* @see {@link CreateRenewalCommandOutput} for command's `response` shape.
61+
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
62+
*
63+
* @throws {@link AccessDeniedException} (client fault)
64+
* <p>You do not have permission to perform this operation.</p>
65+
*
66+
* @throws {@link InternalServerException} (server fault)
67+
* <p>An internal error has occurred.</p>
68+
*
69+
* @throws {@link NotFoundException} (client fault)
70+
* <p>The specified request is not valid.</p>
71+
*
72+
* @throws {@link ValidationException} (client fault)
73+
* <p>A parameter is not valid.</p>
74+
*
75+
* @throws {@link OutpostsServiceException}
76+
* <p>Base exception class for all service exceptions from Outposts service.</p>
77+
*
78+
*
79+
* @public
80+
*/
81+
export class CreateRenewalCommand extends $Command
82+
.classBuilder<
83+
CreateRenewalCommandInput,
84+
CreateRenewalCommandOutput,
85+
OutpostsClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: OutpostsClientResolvedConfig, o: any) {
91+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
92+
})
93+
.s("OutpostsOlafService", "CreateRenewal", {})
94+
.n("OutpostsClient", "CreateRenewalCommand")
95+
.sc(CreateRenewal$)
96+
.build() {
97+
/** @internal type navigation helper, not in runtime. */
98+
protected declare static __types: {
99+
api: {
100+
input: CreateRenewalInput;
101+
output: CreateRenewalOutput;
102+
};
103+
sdk: {
104+
input: CreateRenewalCommandInput;
105+
output: CreateRenewalCommandOutput;
106+
};
107+
};
108+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface GetOutpostBillingInformationCommandOutput extends GetOutpostBil
4949
* // { // Subscription
5050
* // SubscriptionId: "STRING_VALUE",
5151
* // SubscriptionType: "ORIGINAL" || "RENEWAL" || "CAPACITY_INCREASE",
52-
* // SubscriptionStatus: "ACTIVE" || "INACTIVE" || "CANCELLED",
52+
* // SubscriptionStatus: "ACTIVE" || "PENDING" || "INACTIVE" || "CANCELLED",
5353
* // OrderIds: [ // OrderIdList
5454
* // "STRING_VALUE",
5555
* // ],
@@ -60,6 +60,8 @@ export interface GetOutpostBillingInformationCommandOutput extends GetOutpostBil
6060
* // },
6161
* // ],
6262
* // ContractEndDate: "STRING_VALUE",
63+
* // PaymentTerm: "THREE_YEARS" || "ONE_YEAR" || "FIVE_YEARS",
64+
* // PaymentOption: "ALL_UPFRONT" || "NO_UPFRONT" || "PARTIAL_UPFRONT",
6365
* // };
6466
*
6567
* ```

0 commit comments

Comments
 (0)