Skip to content

Commit c02da55

Browse files
author
awstools
committed
feat(client-outposts): This release updates StartCapacityTask to allow an active Outpost to be modified. It also adds a new API to list all running EC2 instances on the Outpost.
1 parent 5eded70 commit c02da55

17 files changed

+1448
-31
lines changed

clients/client-outposts/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ GetSiteAddress
334334

335335
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/GetSiteAddressCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetSiteAddressCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/GetSiteAddressCommandOutput/)
336336

337+
</details>
338+
<details>
339+
<summary>
340+
ListAssetInstances
341+
</summary>
342+
343+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/ListAssetInstancesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/ListAssetInstancesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/ListAssetInstancesCommandOutput/)
344+
337345
</details>
338346
<details>
339347
<summary>
@@ -342,6 +350,14 @@ ListAssets
342350

343351
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/ListAssetsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/ListAssetsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/ListAssetsCommandOutput/)
344352

353+
</details>
354+
<details>
355+
<summary>
356+
ListBlockingInstancesForCapacityTask
357+
</summary>
358+
359+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/outposts/command/ListBlockingInstancesForCapacityTaskCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/ListBlockingInstancesForCapacityTaskCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-outposts/Interface/ListBlockingInstancesForCapacityTaskCommandOutput/)
360+
345361
</details>
346362
<details>
347363
<summary>

clients/client-outposts/src/Outposts.ts

+46
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,17 @@ import {
5454
GetSiteAddressCommandOutput,
5555
} from "./commands/GetSiteAddressCommand";
5656
import { GetSiteCommand, GetSiteCommandInput, GetSiteCommandOutput } from "./commands/GetSiteCommand";
57+
import {
58+
ListAssetInstancesCommand,
59+
ListAssetInstancesCommandInput,
60+
ListAssetInstancesCommandOutput,
61+
} from "./commands/ListAssetInstancesCommand";
5762
import { ListAssetsCommand, ListAssetsCommandInput, ListAssetsCommandOutput } from "./commands/ListAssetsCommand";
63+
import {
64+
ListBlockingInstancesForCapacityTaskCommand,
65+
ListBlockingInstancesForCapacityTaskCommandInput,
66+
ListBlockingInstancesForCapacityTaskCommandOutput,
67+
} from "./commands/ListBlockingInstancesForCapacityTaskCommand";
5868
import {
5969
ListCapacityTasksCommand,
6070
ListCapacityTasksCommandInput,
@@ -128,7 +138,9 @@ const commands = {
128138
GetOutpostSupportedInstanceTypesCommand,
129139
GetSiteCommand,
130140
GetSiteAddressCommand,
141+
ListAssetInstancesCommand,
131142
ListAssetsCommand,
143+
ListBlockingInstancesForCapacityTaskCommand,
132144
ListCapacityTasksCommand,
133145
ListCatalogItemsCommand,
134146
ListOrdersCommand,
@@ -349,6 +361,23 @@ export interface Outposts {
349361
cb: (err: any, data?: GetSiteAddressCommandOutput) => void
350362
): void;
351363

364+
/**
365+
* @see {@link ListAssetInstancesCommand}
366+
*/
367+
listAssetInstances(
368+
args: ListAssetInstancesCommandInput,
369+
options?: __HttpHandlerOptions
370+
): Promise<ListAssetInstancesCommandOutput>;
371+
listAssetInstances(
372+
args: ListAssetInstancesCommandInput,
373+
cb: (err: any, data?: ListAssetInstancesCommandOutput) => void
374+
): void;
375+
listAssetInstances(
376+
args: ListAssetInstancesCommandInput,
377+
options: __HttpHandlerOptions,
378+
cb: (err: any, data?: ListAssetInstancesCommandOutput) => void
379+
): void;
380+
352381
/**
353382
* @see {@link ListAssetsCommand}
354383
*/
@@ -360,6 +389,23 @@ export interface Outposts {
360389
cb: (err: any, data?: ListAssetsCommandOutput) => void
361390
): void;
362391

392+
/**
393+
* @see {@link ListBlockingInstancesForCapacityTaskCommand}
394+
*/
395+
listBlockingInstancesForCapacityTask(
396+
args: ListBlockingInstancesForCapacityTaskCommandInput,
397+
options?: __HttpHandlerOptions
398+
): Promise<ListBlockingInstancesForCapacityTaskCommandOutput>;
399+
listBlockingInstancesForCapacityTask(
400+
args: ListBlockingInstancesForCapacityTaskCommandInput,
401+
cb: (err: any, data?: ListBlockingInstancesForCapacityTaskCommandOutput) => void
402+
): void;
403+
listBlockingInstancesForCapacityTask(
404+
args: ListBlockingInstancesForCapacityTaskCommandInput,
405+
options: __HttpHandlerOptions,
406+
cb: (err: any, data?: ListBlockingInstancesForCapacityTaskCommandOutput) => void
407+
): void;
408+
363409
/**
364410
* @see {@link ListCapacityTasksCommand}
365411
*/

clients/client-outposts/src/OutpostsClient.ts

+9
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ import {
7575
} from "./commands/GetOutpostSupportedInstanceTypesCommand";
7676
import { GetSiteAddressCommandInput, GetSiteAddressCommandOutput } from "./commands/GetSiteAddressCommand";
7777
import { GetSiteCommandInput, GetSiteCommandOutput } from "./commands/GetSiteCommand";
78+
import { ListAssetInstancesCommandInput, ListAssetInstancesCommandOutput } from "./commands/ListAssetInstancesCommand";
7879
import { ListAssetsCommandInput, ListAssetsCommandOutput } from "./commands/ListAssetsCommand";
80+
import {
81+
ListBlockingInstancesForCapacityTaskCommandInput,
82+
ListBlockingInstancesForCapacityTaskCommandOutput,
83+
} from "./commands/ListBlockingInstancesForCapacityTaskCommand";
7984
import { ListCapacityTasksCommandInput, ListCapacityTasksCommandOutput } from "./commands/ListCapacityTasksCommand";
8085
import { ListCatalogItemsCommandInput, ListCatalogItemsCommandOutput } from "./commands/ListCatalogItemsCommand";
8186
import { ListOrdersCommandInput, ListOrdersCommandOutput } from "./commands/ListOrdersCommand";
@@ -127,7 +132,9 @@ export type ServiceInputTypes =
127132
| GetOutpostSupportedInstanceTypesCommandInput
128133
| GetSiteAddressCommandInput
129134
| GetSiteCommandInput
135+
| ListAssetInstancesCommandInput
130136
| ListAssetsCommandInput
137+
| ListBlockingInstancesForCapacityTaskCommandInput
131138
| ListCapacityTasksCommandInput
132139
| ListCatalogItemsCommandInput
133140
| ListOrdersCommandInput
@@ -163,7 +170,9 @@ export type ServiceOutputTypes =
163170
| GetOutpostSupportedInstanceTypesCommandOutput
164171
| GetSiteAddressCommandOutput
165172
| GetSiteCommandOutput
173+
| ListAssetInstancesCommandOutput
166174
| ListAssetsCommandOutput
175+
| ListBlockingInstancesForCapacityTaskCommandOutput
167176
| ListCapacityTasksCommandOutput
168177
| ListCatalogItemsCommandOutput
169178
| ListOrdersCommandOutput

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

+14-2
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,27 @@ export interface GetCapacityTaskCommandOutput extends GetCapacityTaskOutput, __M
5151
* // Count: Number("int"), // required
5252
* // },
5353
* // ],
54+
* // InstancesToExclude: { // InstancesToExclude
55+
* // Instances: [ // InstanceIdList
56+
* // "STRING_VALUE",
57+
* // ],
58+
* // AccountIds: [ // AccountIdList
59+
* // "STRING_VALUE",
60+
* // ],
61+
* // Services: [ // AWSServiceNameList
62+
* // "AWS" || "EC2" || "ELASTICACHE" || "ELB" || "RDS" || "ROUTE53",
63+
* // ],
64+
* // },
5465
* // DryRun: true || false,
55-
* // CapacityTaskStatus: "REQUESTED" || "IN_PROGRESS" || "FAILED" || "COMPLETED" || "CANCELLED",
66+
* // CapacityTaskStatus: "REQUESTED" || "IN_PROGRESS" || "FAILED" || "COMPLETED" || "WAITING_FOR_EVACUATION" || "CANCELLATION_IN_PROGRESS" || "CANCELLED",
5667
* // Failed: { // CapacityTaskFailure
5768
* // Reason: "STRING_VALUE", // required
58-
* // Type: "UNSUPPORTED_CAPACITY_CONFIGURATION",
69+
* // Type: "UNSUPPORTED_CAPACITY_CONFIGURATION" || "UNEXPECTED_ASSET_STATE" || "BLOCKING_INSTANCES_NOT_EVACUATED" || "INTERNAL_SERVER_ERROR" || "RESOURCE_NOT_FOUND",
5970
* // },
6071
* // CreationDate: new Date("TIMESTAMP"),
6172
* // CompletionDate: new Date("TIMESTAMP"),
6273
* // LastModifiedDate: new Date("TIMESTAMP"),
74+
* // TaskActionOnBlockingInstances: "WAIT_FOR_EVACUATION" || "FAIL_TASK",
6375
* // };
6476
*
6577
* ```

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ export interface GetOutpostSupportedInstanceTypesCommandOutput
3333
__MetadataBearer {}
3434

3535
/**
36-
* <p>Gets the instance types that an
37-
* Outpost can support in <code>InstanceTypeCapacity</code>. This will generally include instance types that
38-
* are not currently configured and therefore cannot be launched with the current Outpost
39-
* capacity configuration.</p>
36+
* <p>Gets the instance types that an Outpost can support in <code>InstanceTypeCapacity</code>.
37+
* This will generally include instance types that are not currently configured and therefore
38+
* cannot be launched with the current Outpost capacity configuration.</p>
4039
* @example
4140
* Use a bare-bones client and the command you need to make an API call.
4241
* ```javascript
@@ -45,7 +44,7 @@ export interface GetOutpostSupportedInstanceTypesCommandOutput
4544
* const client = new OutpostsClient(config);
4645
* const input = { // GetOutpostSupportedInstanceTypesInput
4746
* OutpostIdentifier: "STRING_VALUE", // required
48-
* OrderId: "STRING_VALUE", // required
47+
* OrderId: "STRING_VALUE",
4948
* MaxResults: Number("int"),
5049
* NextToken: "STRING_VALUE",
5150
* };
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
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 { ListAssetInstancesInput, ListAssetInstancesOutput } from "../models/models_0";
9+
import { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient";
10+
import { de_ListAssetInstancesCommand, se_ListAssetInstancesCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link ListAssetInstancesCommand}.
21+
*/
22+
export interface ListAssetInstancesCommandInput extends ListAssetInstancesInput {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link ListAssetInstancesCommand}.
27+
*/
28+
export interface ListAssetInstancesCommandOutput extends ListAssetInstancesOutput, __MetadataBearer {}
29+
30+
/**
31+
* <p>A list of Amazon EC2 instances, belonging to all accounts, running on the specified Outpost.
32+
* Does not include Amazon EBS or Amazon S3 instances.</p>
33+
* @example
34+
* Use a bare-bones client and the command you need to make an API call.
35+
* ```javascript
36+
* import { OutpostsClient, ListAssetInstancesCommand } from "@aws-sdk/client-outposts"; // ES Modules import
37+
* // const { OutpostsClient, ListAssetInstancesCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
38+
* const client = new OutpostsClient(config);
39+
* const input = { // ListAssetInstancesInput
40+
* OutpostIdentifier: "STRING_VALUE", // required
41+
* AssetIdFilter: [ // AssetIdList
42+
* "STRING_VALUE",
43+
* ],
44+
* InstanceTypeFilter: [ // OutpostInstanceTypeList
45+
* "STRING_VALUE",
46+
* ],
47+
* AccountIdFilter: [ // AccountIdList
48+
* "STRING_VALUE",
49+
* ],
50+
* AwsServiceFilter: [ // AWSServiceNameList
51+
* "AWS" || "EC2" || "ELASTICACHE" || "ELB" || "RDS" || "ROUTE53",
52+
* ],
53+
* MaxResults: Number("int"),
54+
* NextToken: "STRING_VALUE",
55+
* };
56+
* const command = new ListAssetInstancesCommand(input);
57+
* const response = await client.send(command);
58+
* // { // ListAssetInstancesOutput
59+
* // AssetInstances: [ // AssetInstanceList
60+
* // { // AssetInstance
61+
* // InstanceId: "STRING_VALUE",
62+
* // InstanceType: "STRING_VALUE",
63+
* // AssetId: "STRING_VALUE",
64+
* // AccountId: "STRING_VALUE",
65+
* // AwsServiceName: "AWS" || "EC2" || "ELASTICACHE" || "ELB" || "RDS" || "ROUTE53",
66+
* // },
67+
* // ],
68+
* // NextToken: "STRING_VALUE",
69+
* // };
70+
*
71+
* ```
72+
*
73+
* @param ListAssetInstancesCommandInput - {@link ListAssetInstancesCommandInput}
74+
* @returns {@link ListAssetInstancesCommandOutput}
75+
* @see {@link ListAssetInstancesCommandInput} for command's `input` shape.
76+
* @see {@link ListAssetInstancesCommandOutput} for command's `response` shape.
77+
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
78+
*
79+
* @throws {@link AccessDeniedException} (client fault)
80+
* <p>You do not have permission to perform this operation.</p>
81+
*
82+
* @throws {@link InternalServerException} (server fault)
83+
* <p>An internal error has occurred.</p>
84+
*
85+
* @throws {@link NotFoundException} (client fault)
86+
* <p>The specified request is not valid.</p>
87+
*
88+
* @throws {@link ValidationException} (client fault)
89+
* <p>A parameter is not valid.</p>
90+
*
91+
* @throws {@link OutpostsServiceException}
92+
* <p>Base exception class for all service exceptions from Outposts service.</p>
93+
*
94+
* @public
95+
*/
96+
export class ListAssetInstancesCommand extends $Command
97+
.classBuilder<
98+
ListAssetInstancesCommandInput,
99+
ListAssetInstancesCommandOutput,
100+
OutpostsClientResolvedConfig,
101+
ServiceInputTypes,
102+
ServiceOutputTypes
103+
>()
104+
.ep(commonParams)
105+
.m(function (this: any, Command: any, cs: any, config: OutpostsClientResolvedConfig, o: any) {
106+
return [
107+
getSerdePlugin(config, this.serialize, this.deserialize),
108+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
109+
];
110+
})
111+
.s("OutpostsOlafService", "ListAssetInstances", {})
112+
.n("OutpostsClient", "ListAssetInstancesCommand")
113+
.f(void 0, void 0)
114+
.ser(se_ListAssetInstancesCommand)
115+
.de(de_ListAssetInstancesCommand)
116+
.build() {
117+
/** @internal type navigation helper, not in runtime. */
118+
protected declare static __types: {
119+
api: {
120+
input: ListAssetInstancesInput;
121+
output: ListAssetInstancesOutput;
122+
};
123+
sdk: {
124+
input: ListAssetInstancesCommandInput;
125+
output: ListAssetInstancesCommandOutput;
126+
};
127+
};
128+
}

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

+7
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ export interface ListAssetsCommandOutput extends ListAssetsOutput, __MetadataBea
6363
* // InstanceFamilies: [ // InstanceFamilies
6464
* // "STRING_VALUE",
6565
* // ],
66+
* // InstanceTypeCapacities: [ // AssetInstanceCapacityList
67+
* // { // AssetInstanceTypeCapacity
68+
* // InstanceType: "STRING_VALUE", // required
69+
* // Count: Number("int"), // required
70+
* // },
71+
* // ],
72+
* // MaxVcpus: Number("int"),
6673
* // },
6774
* // AssetLocation: { // AssetLocation
6875
* // RackElevation: Number("float"),

0 commit comments

Comments
 (0)