Skip to content

Commit e04ca4d

Browse files
author
awstools
committed
feat(client-outposts): This release adds a new API called ListAssets to the Outposts SDK, which lists the hardware assets in an Outpost.
1 parent 329a23a commit e04ca4d

15 files changed

+715
-15
lines changed

clients/client-outposts/src/Outposts.ts

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
GetSiteAddressCommandOutput,
3333
} from "./commands/GetSiteAddressCommand";
3434
import { GetSiteCommand, GetSiteCommandInput, GetSiteCommandOutput } from "./commands/GetSiteCommand";
35+
import { ListAssetsCommand, ListAssetsCommandInput, ListAssetsCommandOutput } from "./commands/ListAssetsCommand";
3536
import {
3637
ListCatalogItemsCommand,
3738
ListCatalogItemsCommandInput,
@@ -339,7 +340,7 @@ export class Outposts extends OutpostsClient {
339340
}
340341

341342
/**
342-
* <p>Lists the instance types for the specified Outpost.</p>
343+
* <p>Gets the instance types for the specified Outpost.</p>
343344
*/
344345
public getOutpostInstanceTypes(
345346
args: GetOutpostInstanceTypesCommandInput,
@@ -433,7 +434,37 @@ export class Outposts extends OutpostsClient {
433434
}
434435

435436
/**
436-
* <p>Use to create a list of every item in the catalog. Add filters to your request to return a
437+
* <p>
438+
* Lists the hardware assets in an Outpost. If you are using Dedicated Hosts on
439+
* Amazon Web Services Outposts, you can filter your request by host ID to return a list of hardware
440+
* assets that allocate resources for Dedicated Hosts.
441+
* </p>
442+
*/
443+
public listAssets(args: ListAssetsCommandInput, options?: __HttpHandlerOptions): Promise<ListAssetsCommandOutput>;
444+
public listAssets(args: ListAssetsCommandInput, cb: (err: any, data?: ListAssetsCommandOutput) => void): void;
445+
public listAssets(
446+
args: ListAssetsCommandInput,
447+
options: __HttpHandlerOptions,
448+
cb: (err: any, data?: ListAssetsCommandOutput) => void
449+
): void;
450+
public listAssets(
451+
args: ListAssetsCommandInput,
452+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAssetsCommandOutput) => void),
453+
cb?: (err: any, data?: ListAssetsCommandOutput) => void
454+
): Promise<ListAssetsCommandOutput> | void {
455+
const command = new ListAssetsCommand(args);
456+
if (typeof optionsOrCb === "function") {
457+
this.send(command, optionsOrCb);
458+
} else if (typeof cb === "function") {
459+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
460+
this.send(command, optionsOrCb || {}, cb);
461+
} else {
462+
return this.send(command, optionsOrCb);
463+
}
464+
}
465+
466+
/**
467+
* <p>Lists the items in the catalog. Add filters to your request to return a
437468
* more specific list of results. Use filters to match an item class, storage
438469
* option, or EC2 family. </p>
439470
* <p>If you specify multiple filters, the filters are joined with an <code>AND</code>, and
@@ -469,7 +500,7 @@ export class Outposts extends OutpostsClient {
469500
}
470501

471502
/**
472-
* <p>Create a list of the Outpost orders for your Amazon Web Services account. You can filter your request by Outpost to
503+
* <p>Lists the Outpost orders for your Amazon Web Services account. You can filter your request by Outpost to
473504
* return a more specific list of results. </p>
474505
*/
475506
public listOrders(args: ListOrdersCommandInput, options?: __HttpHandlerOptions): Promise<ListOrdersCommandOutput>;
@@ -496,7 +527,7 @@ export class Outposts extends OutpostsClient {
496527
}
497528

498529
/**
499-
* <p>Create a list of the Outposts for your Amazon Web Services account. Add filters to your request to return
530+
* <p>Lists the Outposts for your Amazon Web Services account. Add filters to your request to return
500531
* a more specific list of results. Use filters to match an Outpost lifecycle status,
501532
* Availability Zone (<code>us-east-1a</code>), and AZ ID (<code>use1-az1</code>). </p>
502533
*
@@ -530,7 +561,7 @@ export class Outposts extends OutpostsClient {
530561
}
531562

532563
/**
533-
* <p>Create a list of the Outpost sites for your Amazon Web Services account. Add operating address filters to your request to
564+
* <p>Lists the Outpost sites for your Amazon Web Services account. Add operating address filters to your request to
534565
* return a more specific list of results. Use filters to match site city, country code, or state/region of the
535566
* operating address. </p>
536567
*

clients/client-outposts/src/OutpostsClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import {
6666
} from "./commands/GetOutpostInstanceTypesCommand";
6767
import { GetSiteAddressCommandInput, GetSiteAddressCommandOutput } from "./commands/GetSiteAddressCommand";
6868
import { GetSiteCommandInput, GetSiteCommandOutput } from "./commands/GetSiteCommand";
69+
import { ListAssetsCommandInput, ListAssetsCommandOutput } from "./commands/ListAssetsCommand";
6970
import { ListCatalogItemsCommandInput, ListCatalogItemsCommandOutput } from "./commands/ListCatalogItemsCommand";
7071
import { ListOrdersCommandInput, ListOrdersCommandOutput } from "./commands/ListOrdersCommand";
7172
import { ListOutpostsCommandInput, ListOutpostsCommandOutput } from "./commands/ListOutpostsCommand";
@@ -98,6 +99,7 @@ export type ServiceInputTypes =
9899
| GetOutpostInstanceTypesCommandInput
99100
| GetSiteAddressCommandInput
100101
| GetSiteCommandInput
102+
| ListAssetsCommandInput
101103
| ListCatalogItemsCommandInput
102104
| ListOrdersCommandInput
103105
| ListOutpostsCommandInput
@@ -123,6 +125,7 @@ export type ServiceOutputTypes =
123125
| GetOutpostInstanceTypesCommandOutput
124126
| GetSiteAddressCommandOutput
125127
| GetSiteCommandOutput
128+
| ListAssetsCommandOutput
126129
| ListCatalogItemsCommandOutput
127130
| ListOrdersCommandOutput
128131
| ListOutpostsCommandOutput

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface GetOutpostInstanceTypesCommandInput extends GetOutpostInstanceT
2222
export interface GetOutpostInstanceTypesCommandOutput extends GetOutpostInstanceTypesOutput, __MetadataBearer {}
2323

2424
/**
25-
* <p>Lists the instance types for the specified Outpost.</p>
25+
* <p>Gets the instance types for the specified Outpost.</p>
2626
* @example
2727
* Use a bare-bones client and the command you need to make an API call.
2828
* ```javascript
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3+
import { Command as $Command } from "@aws-sdk/smithy-client";
4+
import {
5+
FinalizeHandlerArguments,
6+
Handler,
7+
HandlerExecutionContext,
8+
HttpHandlerOptions as __HttpHandlerOptions,
9+
MetadataBearer as __MetadataBearer,
10+
MiddlewareStack,
11+
SerdeContext as __SerdeContext,
12+
} from "@aws-sdk/types";
13+
14+
import { ListAssetsInput, ListAssetsOutput } from "../models/models_0";
15+
import { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient";
16+
import {
17+
deserializeAws_restJson1ListAssetsCommand,
18+
serializeAws_restJson1ListAssetsCommand,
19+
} from "../protocols/Aws_restJson1";
20+
21+
export interface ListAssetsCommandInput extends ListAssetsInput {}
22+
export interface ListAssetsCommandOutput extends ListAssetsOutput, __MetadataBearer {}
23+
24+
/**
25+
* <p>
26+
* Lists the hardware assets in an Outpost. If you are using Dedicated Hosts on
27+
* Amazon Web Services Outposts, you can filter your request by host ID to return a list of hardware
28+
* assets that allocate resources for Dedicated Hosts.
29+
* </p>
30+
* @example
31+
* Use a bare-bones client and the command you need to make an API call.
32+
* ```javascript
33+
* import { OutpostsClient, ListAssetsCommand } from "@aws-sdk/client-outposts"; // ES Modules import
34+
* // const { OutpostsClient, ListAssetsCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
35+
* const client = new OutpostsClient(config);
36+
* const command = new ListAssetsCommand(input);
37+
* const response = await client.send(command);
38+
* ```
39+
*
40+
* @see {@link ListAssetsCommandInput} for command's `input` shape.
41+
* @see {@link ListAssetsCommandOutput} for command's `response` shape.
42+
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
43+
*
44+
*/
45+
export class ListAssetsCommand extends $Command<
46+
ListAssetsCommandInput,
47+
ListAssetsCommandOutput,
48+
OutpostsClientResolvedConfig
49+
> {
50+
// Start section: command_properties
51+
// End section: command_properties
52+
53+
constructor(readonly input: ListAssetsCommandInput) {
54+
// Start section: command_constructor
55+
super();
56+
// End section: command_constructor
57+
}
58+
59+
/**
60+
* @internal
61+
*/
62+
resolveMiddleware(
63+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
64+
configuration: OutpostsClientResolvedConfig,
65+
options?: __HttpHandlerOptions
66+
): Handler<ListAssetsCommandInput, ListAssetsCommandOutput> {
67+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
68+
69+
const stack = clientStack.concat(this.middlewareStack);
70+
71+
const { logger } = configuration;
72+
const clientName = "OutpostsClient";
73+
const commandName = "ListAssetsCommand";
74+
const handlerExecutionContext: HandlerExecutionContext = {
75+
logger,
76+
clientName,
77+
commandName,
78+
inputFilterSensitiveLog: ListAssetsInput.filterSensitiveLog,
79+
outputFilterSensitiveLog: ListAssetsOutput.filterSensitiveLog,
80+
};
81+
const { requestHandler } = configuration;
82+
return stack.resolve(
83+
(request: FinalizeHandlerArguments<any>) =>
84+
requestHandler.handle(request.request as __HttpRequest, options || {}),
85+
handlerExecutionContext
86+
);
87+
}
88+
89+
private serialize(input: ListAssetsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
90+
return serializeAws_restJson1ListAssetsCommand(input, context);
91+
}
92+
93+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListAssetsCommandOutput> {
94+
return deserializeAws_restJson1ListAssetsCommand(output, context);
95+
}
96+
97+
// Start section: command_body_extra
98+
// End section: command_body_extra
99+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ListCatalogItemsCommandInput extends ListCatalogItemsInput {}
2222
export interface ListCatalogItemsCommandOutput extends ListCatalogItemsOutput, __MetadataBearer {}
2323

2424
/**
25-
* <p>Use to create a list of every item in the catalog. Add filters to your request to return a
25+
* <p>Lists the items in the catalog. Add filters to your request to return a
2626
* more specific list of results. Use filters to match an item class, storage
2727
* option, or EC2 family. </p>
2828
* <p>If you specify multiple filters, the filters are joined with an <code>AND</code>, and

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ListOrdersCommandInput extends ListOrdersInput {}
2222
export interface ListOrdersCommandOutput extends ListOrdersOutput, __MetadataBearer {}
2323

2424
/**
25-
* <p>Create a list of the Outpost orders for your Amazon Web Services account. You can filter your request by Outpost to
25+
* <p>Lists the Outpost orders for your Amazon Web Services account. You can filter your request by Outpost to
2626
* return a more specific list of results. </p>
2727
* @example
2828
* Use a bare-bones client and the command you need to make an API call.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ListOutpostsCommandInput extends ListOutpostsInput {}
2222
export interface ListOutpostsCommandOutput extends ListOutpostsOutput, __MetadataBearer {}
2323

2424
/**
25-
* <p>Create a list of the Outposts for your Amazon Web Services account. Add filters to your request to return
25+
* <p>Lists the Outposts for your Amazon Web Services account. Add filters to your request to return
2626
* a more specific list of results. Use filters to match an Outpost lifecycle status,
2727
* Availability Zone (<code>us-east-1a</code>), and AZ ID (<code>use1-az1</code>). </p>
2828
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface ListSitesCommandInput extends ListSitesInput {}
2222
export interface ListSitesCommandOutput extends ListSitesOutput, __MetadataBearer {}
2323

2424
/**
25-
* <p>Create a list of the Outpost sites for your Amazon Web Services account. Add operating address filters to your request to
25+
* <p>Lists the Outpost sites for your Amazon Web Services account. Add operating address filters to your request to
2626
* return a more specific list of results. Use filters to match site city, country code, or state/region of the
2727
* operating address. </p>
2828
*

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 "./GetOutpostCommand";
1010
export * from "./GetOutpostInstanceTypesCommand";
1111
export * from "./GetSiteAddressCommand";
1212
export * from "./GetSiteCommand";
13+
export * from "./ListAssetsCommand";
1314
export * from "./ListCatalogItemsCommand";
1415
export * from "./ListOrdersCommand";
1516
export * from "./ListOutpostsCommand";

0 commit comments

Comments
 (0)