-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-outposts): This release adds a new API called ListAssets …
…to the Outposts SDK, which lists the hardware assets in an Outpost.
- Loading branch information
awstools
committed
May 2, 2022
1 parent
329a23a
commit e04ca4d
Showing
15 changed files
with
715 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { ListAssetsInput, ListAssetsOutput } from "../models/models_0"; | ||
import { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient"; | ||
import { | ||
deserializeAws_restJson1ListAssetsCommand, | ||
serializeAws_restJson1ListAssetsCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface ListAssetsCommandInput extends ListAssetsInput {} | ||
export interface ListAssetsCommandOutput extends ListAssetsOutput, __MetadataBearer {} | ||
|
||
/** | ||
* <p> | ||
* Lists the hardware assets in an Outpost. If you are using Dedicated Hosts on | ||
* Amazon Web Services Outposts, you can filter your request by host ID to return a list of hardware | ||
* assets that allocate resources for Dedicated Hosts. | ||
* </p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { OutpostsClient, ListAssetsCommand } from "@aws-sdk/client-outposts"; // ES Modules import | ||
* // const { OutpostsClient, ListAssetsCommand } = require("@aws-sdk/client-outposts"); // CommonJS import | ||
* const client = new OutpostsClient(config); | ||
* const command = new ListAssetsCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link ListAssetsCommandInput} for command's `input` shape. | ||
* @see {@link ListAssetsCommandOutput} for command's `response` shape. | ||
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape. | ||
* | ||
*/ | ||
export class ListAssetsCommand extends $Command< | ||
ListAssetsCommandInput, | ||
ListAssetsCommandOutput, | ||
OutpostsClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: ListAssetsCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: OutpostsClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<ListAssetsCommandInput, ListAssetsCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "OutpostsClient"; | ||
const commandName = "ListAssetsCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: ListAssetsInput.filterSensitiveLog, | ||
outputFilterSensitiveLog: ListAssetsOutput.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: ListAssetsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1ListAssetsCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListAssetsCommandOutput> { | ||
return deserializeAws_restJson1ListAssetsCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.