-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-s3outposts): S3 on Outposts introduces a new API ListOutp…
…ostsWithS3, with this API you can list all your Outposts with S3 capacity.
- Loading branch information
awstools
committed
Mar 1, 2023
1 parent
e0db41d
commit 9b55483
Showing
15 changed files
with
1,118 additions
and
1,294 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
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
122 changes: 122 additions & 0 deletions
122
clients/client-s3outposts/src/commands/ListOutpostsWithS3Command.ts
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,122 @@ | ||
// smithy-typescript generated code | ||
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; | ||
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 { | ||
ListOutpostsWithS3Request, | ||
ListOutpostsWithS3RequestFilterSensitiveLog, | ||
ListOutpostsWithS3Result, | ||
ListOutpostsWithS3ResultFilterSensitiveLog, | ||
} from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1ListOutpostsWithS3Command, | ||
serializeAws_restJson1ListOutpostsWithS3Command, | ||
} from "../protocols/Aws_restJson1"; | ||
import { S3OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3OutpostsClient"; | ||
|
||
/** | ||
* The input for {@link ListOutpostsWithS3Command}. | ||
*/ | ||
export interface ListOutpostsWithS3CommandInput extends ListOutpostsWithS3Request {} | ||
/** | ||
* The output of {@link ListOutpostsWithS3Command}. | ||
*/ | ||
export interface ListOutpostsWithS3CommandOutput extends ListOutpostsWithS3Result, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Lists the Outposts with S3 on Outposts capacity for your Amazon Web Services account. | ||
* Includes S3 on Outposts that you have access to as the Outposts owner, or as a shared user | ||
* from Resource Access Manager (RAM). </p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { S3OutpostsClient, ListOutpostsWithS3Command } from "@aws-sdk/client-s3outposts"; // ES Modules import | ||
* // const { S3OutpostsClient, ListOutpostsWithS3Command } = require("@aws-sdk/client-s3outposts"); // CommonJS import | ||
* const client = new S3OutpostsClient(config); | ||
* const command = new ListOutpostsWithS3Command(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link ListOutpostsWithS3CommandInput} for command's `input` shape. | ||
* @see {@link ListOutpostsWithS3CommandOutput} for command's `response` shape. | ||
* @see {@link S3OutpostsClientResolvedConfig | config} for S3OutpostsClient's `config` shape. | ||
* | ||
*/ | ||
export class ListOutpostsWithS3Command extends $Command< | ||
ListOutpostsWithS3CommandInput, | ||
ListOutpostsWithS3CommandOutput, | ||
S3OutpostsClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
public static getEndpointParameterInstructions(): EndpointParameterInstructions { | ||
return { | ||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, | ||
Endpoint: { type: "builtInParams", name: "endpoint" }, | ||
Region: { type: "builtInParams", name: "region" }, | ||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, | ||
}; | ||
} | ||
|
||
constructor(readonly input: ListOutpostsWithS3CommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: S3OutpostsClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<ListOutpostsWithS3CommandInput, ListOutpostsWithS3CommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
this.middlewareStack.use( | ||
getEndpointPlugin(configuration, ListOutpostsWithS3Command.getEndpointParameterInstructions()) | ||
); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "S3OutpostsClient"; | ||
const commandName = "ListOutpostsWithS3Command"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: ListOutpostsWithS3RequestFilterSensitiveLog, | ||
outputFilterSensitiveLog: ListOutpostsWithS3ResultFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: ListOutpostsWithS3CommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1ListOutpostsWithS3Command(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListOutpostsWithS3CommandOutput> { | ||
return deserializeAws_restJson1ListOutpostsWithS3Command(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
Oops, something went wrong.