Skip to content

Commit a04c290

Browse files
author
awstools
committed
feat(client-outposts): This release adds API operations AWS uses to install Outpost servers.
1 parent 5b4e721 commit a04c290

File tree

8 files changed

+956
-0
lines changed

8 files changed

+956
-0
lines changed

clients/client-outposts/src/Outposts.ts

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ import {
2020
GetCatalogItemCommandInput,
2121
GetCatalogItemCommandOutput,
2222
} from "./commands/GetCatalogItemCommand";
23+
import {
24+
GetConnectionCommand,
25+
GetConnectionCommandInput,
26+
GetConnectionCommandOutput,
27+
} from "./commands/GetConnectionCommand";
2328
import { GetOrderCommand, GetOrderCommandInput, GetOrderCommandOutput } from "./commands/GetOrderCommand";
2429
import { GetOutpostCommand, GetOutpostCommandInput, GetOutpostCommandOutput } from "./commands/GetOutpostCommand";
2530
import {
@@ -51,6 +56,11 @@ import {
5156
ListTagsForResourceCommandInput,
5257
ListTagsForResourceCommandOutput,
5358
} from "./commands/ListTagsForResourceCommand";
59+
import {
60+
StartConnectionCommand,
61+
StartConnectionCommandInput,
62+
StartConnectionCommandOutput,
63+
} from "./commands/StartConnectionCommand";
5464
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
5565
import {
5666
UntagResourceCommand,
@@ -288,6 +298,50 @@ export class Outposts extends OutpostsClient {
288298
}
289299
}
290300

301+
/**
302+
* <note>
303+
* <p>
304+
* Amazon Web Services uses this action to install Outpost servers.</p>
305+
* </note>
306+
* <p>
307+
* Gets information about a specified connection.
308+
* </p>
309+
* <p>
310+
* Use CloudTrail to monitor this action or Amazon Web Services managed policy for Amazon Web Services Outposts to secure it. For
311+
* more information, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/security-iam-awsmanpol.html">
312+
* Amazon Web Services managed policies for Amazon Web Services Outposts</a> and <a href="https://docs.aws.amazon.com/outposts/latest/userguide/logging-using-cloudtrail.html">
313+
* Logging Amazon Web Services Outposts API calls with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Outposts User Guide</i>.
314+
* </p>
315+
*/
316+
public getConnection(
317+
args: GetConnectionCommandInput,
318+
options?: __HttpHandlerOptions
319+
): Promise<GetConnectionCommandOutput>;
320+
public getConnection(
321+
args: GetConnectionCommandInput,
322+
cb: (err: any, data?: GetConnectionCommandOutput) => void
323+
): void;
324+
public getConnection(
325+
args: GetConnectionCommandInput,
326+
options: __HttpHandlerOptions,
327+
cb: (err: any, data?: GetConnectionCommandOutput) => void
328+
): void;
329+
public getConnection(
330+
args: GetConnectionCommandInput,
331+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetConnectionCommandOutput) => void),
332+
cb?: (err: any, data?: GetConnectionCommandOutput) => void
333+
): Promise<GetConnectionCommandOutput> | void {
334+
const command = new GetConnectionCommand(args);
335+
if (typeof optionsOrCb === "function") {
336+
this.send(command, optionsOrCb);
337+
} else if (typeof cb === "function") {
338+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
339+
this.send(command, optionsOrCb || {}, cb);
340+
} else {
341+
return this.send(command, optionsOrCb);
342+
}
343+
}
344+
291345
/**
292346
* <p>Gets an order.</p>
293347
*/
@@ -624,6 +678,50 @@ export class Outposts extends OutpostsClient {
624678
}
625679
}
626680

681+
/**
682+
* <note>
683+
* <p>
684+
* Amazon Web Services uses this action to install Outpost servers.</p>
685+
* </note>
686+
* <p>
687+
* Starts the connection required for Outpost server installation.
688+
* </p>
689+
* <p>
690+
* Use CloudTrail to monitor this action or Amazon Web Services managed policy for Amazon Web Services Outposts to secure it. For
691+
* more information, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/security-iam-awsmanpol.html">
692+
* Amazon Web Services managed policies for Amazon Web Services Outposts</a> and <a href="https://docs.aws.amazon.com/outposts/latest/userguide/logging-using-cloudtrail.html">
693+
* Logging Amazon Web Services Outposts API calls with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Outposts User Guide</i>.
694+
* </p>
695+
*/
696+
public startConnection(
697+
args: StartConnectionCommandInput,
698+
options?: __HttpHandlerOptions
699+
): Promise<StartConnectionCommandOutput>;
700+
public startConnection(
701+
args: StartConnectionCommandInput,
702+
cb: (err: any, data?: StartConnectionCommandOutput) => void
703+
): void;
704+
public startConnection(
705+
args: StartConnectionCommandInput,
706+
options: __HttpHandlerOptions,
707+
cb: (err: any, data?: StartConnectionCommandOutput) => void
708+
): void;
709+
public startConnection(
710+
args: StartConnectionCommandInput,
711+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartConnectionCommandOutput) => void),
712+
cb?: (err: any, data?: StartConnectionCommandOutput) => void
713+
): Promise<StartConnectionCommandOutput> | void {
714+
const command = new StartConnectionCommand(args);
715+
if (typeof optionsOrCb === "function") {
716+
this.send(command, optionsOrCb);
717+
} else if (typeof cb === "function") {
718+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
719+
this.send(command, optionsOrCb || {}, cb);
720+
} else {
721+
return this.send(command, optionsOrCb);
722+
}
723+
}
724+
627725
/**
628726
* <p>Adds tags to the specified resource.</p>
629727
*/

clients/client-outposts/src/OutpostsClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import { CreateSiteCommandInput, CreateSiteCommandOutput } from "./commands/Crea
6060
import { DeleteOutpostCommandInput, DeleteOutpostCommandOutput } from "./commands/DeleteOutpostCommand";
6161
import { DeleteSiteCommandInput, DeleteSiteCommandOutput } from "./commands/DeleteSiteCommand";
6262
import { GetCatalogItemCommandInput, GetCatalogItemCommandOutput } from "./commands/GetCatalogItemCommand";
63+
import { GetConnectionCommandInput, GetConnectionCommandOutput } from "./commands/GetConnectionCommand";
6364
import { GetOrderCommandInput, GetOrderCommandOutput } from "./commands/GetOrderCommand";
6465
import { GetOutpostCommandInput, GetOutpostCommandOutput } from "./commands/GetOutpostCommand";
6566
import {
@@ -77,6 +78,7 @@ import {
7778
ListTagsForResourceCommandInput,
7879
ListTagsForResourceCommandOutput,
7980
} from "./commands/ListTagsForResourceCommand";
81+
import { StartConnectionCommandInput, StartConnectionCommandOutput } from "./commands/StartConnectionCommand";
8082
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8183
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
8284
import { UpdateOutpostCommandInput, UpdateOutpostCommandOutput } from "./commands/UpdateOutpostCommand";
@@ -96,6 +98,7 @@ export type ServiceInputTypes =
9698
| DeleteOutpostCommandInput
9799
| DeleteSiteCommandInput
98100
| GetCatalogItemCommandInput
101+
| GetConnectionCommandInput
99102
| GetOrderCommandInput
100103
| GetOutpostCommandInput
101104
| GetOutpostInstanceTypesCommandInput
@@ -107,6 +110,7 @@ export type ServiceInputTypes =
107110
| ListOutpostsCommandInput
108111
| ListSitesCommandInput
109112
| ListTagsForResourceCommandInput
113+
| StartConnectionCommandInput
110114
| TagResourceCommandInput
111115
| UntagResourceCommandInput
112116
| UpdateOutpostCommandInput
@@ -122,6 +126,7 @@ export type ServiceOutputTypes =
122126
| DeleteOutpostCommandOutput
123127
| DeleteSiteCommandOutput
124128
| GetCatalogItemCommandOutput
129+
| GetConnectionCommandOutput
125130
| GetOrderCommandOutput
126131
| GetOutpostCommandOutput
127132
| GetOutpostInstanceTypesCommandOutput
@@ -133,6 +138,7 @@ export type ServiceOutputTypes =
133138
| ListOutpostsCommandOutput
134139
| ListSitesCommandOutput
135140
| ListTagsForResourceCommandOutput
141+
| StartConnectionCommandOutput
136142
| TagResourceCommandOutput
137143
| UntagResourceCommandOutput
138144
| UpdateOutpostCommandOutput
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 { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { GetConnectionRequest, GetConnectionResponse } from "../models/models_0";
16+
import { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient";
17+
import {
18+
deserializeAws_restJson1GetConnectionCommand,
19+
serializeAws_restJson1GetConnectionCommand,
20+
} from "../protocols/Aws_restJson1";
21+
22+
export interface GetConnectionCommandInput extends GetConnectionRequest {}
23+
export interface GetConnectionCommandOutput extends GetConnectionResponse, __MetadataBearer {}
24+
25+
/**
26+
* <note>
27+
* <p>
28+
* Amazon Web Services uses this action to install Outpost servers.</p>
29+
* </note>
30+
* <p>
31+
* Gets information about a specified connection.
32+
* </p>
33+
* <p>
34+
* Use CloudTrail to monitor this action or Amazon Web Services managed policy for Amazon Web Services Outposts to secure it. For
35+
* more information, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/security-iam-awsmanpol.html">
36+
* Amazon Web Services managed policies for Amazon Web Services Outposts</a> and <a href="https://docs.aws.amazon.com/outposts/latest/userguide/logging-using-cloudtrail.html">
37+
* Logging Amazon Web Services Outposts API calls with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Outposts User Guide</i>.
38+
* </p>
39+
* @example
40+
* Use a bare-bones client and the command you need to make an API call.
41+
* ```javascript
42+
* import { OutpostsClient, GetConnectionCommand } from "@aws-sdk/client-outposts"; // ES Modules import
43+
* // const { OutpostsClient, GetConnectionCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
44+
* const client = new OutpostsClient(config);
45+
* const command = new GetConnectionCommand(input);
46+
* const response = await client.send(command);
47+
* ```
48+
*
49+
* @see {@link GetConnectionCommandInput} for command's `input` shape.
50+
* @see {@link GetConnectionCommandOutput} for command's `response` shape.
51+
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
52+
*
53+
*/
54+
export class GetConnectionCommand extends $Command<
55+
GetConnectionCommandInput,
56+
GetConnectionCommandOutput,
57+
OutpostsClientResolvedConfig
58+
> {
59+
// Start section: command_properties
60+
// End section: command_properties
61+
62+
constructor(readonly input: GetConnectionCommandInput) {
63+
// Start section: command_constructor
64+
super();
65+
// End section: command_constructor
66+
}
67+
68+
/**
69+
* @internal
70+
*/
71+
resolveMiddleware(
72+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
73+
configuration: OutpostsClientResolvedConfig,
74+
options?: __HttpHandlerOptions
75+
): Handler<GetConnectionCommandInput, GetConnectionCommandOutput> {
76+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
77+
78+
const stack = clientStack.concat(this.middlewareStack);
79+
80+
const { logger } = configuration;
81+
const clientName = "OutpostsClient";
82+
const commandName = "GetConnectionCommand";
83+
const handlerExecutionContext: HandlerExecutionContext = {
84+
logger,
85+
clientName,
86+
commandName,
87+
inputFilterSensitiveLog: GetConnectionRequest.filterSensitiveLog,
88+
outputFilterSensitiveLog: GetConnectionResponse.filterSensitiveLog,
89+
};
90+
const { requestHandler } = configuration;
91+
return stack.resolve(
92+
(request: FinalizeHandlerArguments<any>) =>
93+
requestHandler.handle(request.request as __HttpRequest, options || {}),
94+
handlerExecutionContext
95+
);
96+
}
97+
98+
private serialize(input: GetConnectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
99+
return serializeAws_restJson1GetConnectionCommand(input, context);
100+
}
101+
102+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetConnectionCommandOutput> {
103+
return deserializeAws_restJson1GetConnectionCommand(output, context);
104+
}
105+
106+
// Start section: command_body_extra
107+
// End section: command_body_extra
108+
}
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 { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { StartConnectionRequest, StartConnectionResponse } from "../models/models_0";
16+
import { OutpostsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../OutpostsClient";
17+
import {
18+
deserializeAws_restJson1StartConnectionCommand,
19+
serializeAws_restJson1StartConnectionCommand,
20+
} from "../protocols/Aws_restJson1";
21+
22+
export interface StartConnectionCommandInput extends StartConnectionRequest {}
23+
export interface StartConnectionCommandOutput extends StartConnectionResponse, __MetadataBearer {}
24+
25+
/**
26+
* <note>
27+
* <p>
28+
* Amazon Web Services uses this action to install Outpost servers.</p>
29+
* </note>
30+
* <p>
31+
* Starts the connection required for Outpost server installation.
32+
* </p>
33+
* <p>
34+
* Use CloudTrail to monitor this action or Amazon Web Services managed policy for Amazon Web Services Outposts to secure it. For
35+
* more information, see <a href="https://docs.aws.amazon.com/outposts/latest/userguide/security-iam-awsmanpol.html">
36+
* Amazon Web Services managed policies for Amazon Web Services Outposts</a> and <a href="https://docs.aws.amazon.com/outposts/latest/userguide/logging-using-cloudtrail.html">
37+
* Logging Amazon Web Services Outposts API calls with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Outposts User Guide</i>.
38+
* </p>
39+
* @example
40+
* Use a bare-bones client and the command you need to make an API call.
41+
* ```javascript
42+
* import { OutpostsClient, StartConnectionCommand } from "@aws-sdk/client-outposts"; // ES Modules import
43+
* // const { OutpostsClient, StartConnectionCommand } = require("@aws-sdk/client-outposts"); // CommonJS import
44+
* const client = new OutpostsClient(config);
45+
* const command = new StartConnectionCommand(input);
46+
* const response = await client.send(command);
47+
* ```
48+
*
49+
* @see {@link StartConnectionCommandInput} for command's `input` shape.
50+
* @see {@link StartConnectionCommandOutput} for command's `response` shape.
51+
* @see {@link OutpostsClientResolvedConfig | config} for OutpostsClient's `config` shape.
52+
*
53+
*/
54+
export class StartConnectionCommand extends $Command<
55+
StartConnectionCommandInput,
56+
StartConnectionCommandOutput,
57+
OutpostsClientResolvedConfig
58+
> {
59+
// Start section: command_properties
60+
// End section: command_properties
61+
62+
constructor(readonly input: StartConnectionCommandInput) {
63+
// Start section: command_constructor
64+
super();
65+
// End section: command_constructor
66+
}
67+
68+
/**
69+
* @internal
70+
*/
71+
resolveMiddleware(
72+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
73+
configuration: OutpostsClientResolvedConfig,
74+
options?: __HttpHandlerOptions
75+
): Handler<StartConnectionCommandInput, StartConnectionCommandOutput> {
76+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
77+
78+
const stack = clientStack.concat(this.middlewareStack);
79+
80+
const { logger } = configuration;
81+
const clientName = "OutpostsClient";
82+
const commandName = "StartConnectionCommand";
83+
const handlerExecutionContext: HandlerExecutionContext = {
84+
logger,
85+
clientName,
86+
commandName,
87+
inputFilterSensitiveLog: StartConnectionRequest.filterSensitiveLog,
88+
outputFilterSensitiveLog: StartConnectionResponse.filterSensitiveLog,
89+
};
90+
const { requestHandler } = configuration;
91+
return stack.resolve(
92+
(request: FinalizeHandlerArguments<any>) =>
93+
requestHandler.handle(request.request as __HttpRequest, options || {}),
94+
handlerExecutionContext
95+
);
96+
}
97+
98+
private serialize(input: StartConnectionCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
99+
return serializeAws_restJson1StartConnectionCommand(input, context);
100+
}
101+
102+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<StartConnectionCommandOutput> {
103+
return deserializeAws_restJson1StartConnectionCommand(output, context);
104+
}
105+
106+
// Start section: command_body_extra
107+
// End section: command_body_extra
108+
}

0 commit comments

Comments
 (0)