Skip to content

Commit 6147f35

Browse files
author
awstools
committed
feat(client-evs): CreateEnvironment API now supports parameters (isHcxPublic & hcxNetworkAclId) for HCX migration via public internet, adding flexibility for migration scenarios. New APIs have been added for associating (AssociateEipToVlan) & disassociating (DisassociateEipFromVlan) Elastic IP (EIP) addresses.
1 parent 36b2bf0 commit 6147f35

File tree

12 files changed

+1055
-216
lines changed

12 files changed

+1055
-216
lines changed

clients/client-evs/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,14 @@ see LICENSE for more information.
203203

204204
## Client Commands (Operations List)
205205

206+
<details>
207+
<summary>
208+
AssociateEipToVlan
209+
</summary>
210+
211+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/evs/command/AssociateEipToVlanCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-evs/Interface/AssociateEipToVlanCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-evs/Interface/AssociateEipToVlanCommandOutput/)
212+
213+
</details>
206214
<details>
207215
<summary>
208216
CreateEnvironment
@@ -234,6 +242,14 @@ DeleteEnvironmentHost
234242

235243
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/evs/command/DeleteEnvironmentHostCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-evs/Interface/DeleteEnvironmentHostCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-evs/Interface/DeleteEnvironmentHostCommandOutput/)
236244

245+
</details>
246+
<details>
247+
<summary>
248+
DisassociateEipFromVlan
249+
</summary>
250+
251+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/evs/command/DisassociateEipFromVlanCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-evs/Interface/DisassociateEipFromVlanCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-evs/Interface/DisassociateEipFromVlanCommandOutput/)
252+
237253
</details>
238254
<details>
239255
<summary>

clients/client-evs/src/Evs.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { createAggregatedClient } from "@smithy/smithy-client";
33
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5+
import {
6+
AssociateEipToVlanCommand,
7+
AssociateEipToVlanCommandInput,
8+
AssociateEipToVlanCommandOutput,
9+
} from "./commands/AssociateEipToVlanCommand";
510
import {
611
CreateEnvironmentCommand,
712
CreateEnvironmentCommandInput,
@@ -22,6 +27,11 @@ import {
2227
DeleteEnvironmentHostCommandInput,
2328
DeleteEnvironmentHostCommandOutput,
2429
} from "./commands/DeleteEnvironmentHostCommand";
30+
import {
31+
DisassociateEipFromVlanCommand,
32+
DisassociateEipFromVlanCommandInput,
33+
DisassociateEipFromVlanCommandOutput,
34+
} from "./commands/DisassociateEipFromVlanCommand";
2535
import {
2636
GetEnvironmentCommand,
2737
GetEnvironmentCommandInput,
@@ -56,10 +66,12 @@ import {
5666
import { EvsClient, EvsClientConfig } from "./EvsClient";
5767

5868
const commands = {
69+
AssociateEipToVlanCommand,
5970
CreateEnvironmentCommand,
6071
CreateEnvironmentHostCommand,
6172
DeleteEnvironmentCommand,
6273
DeleteEnvironmentHostCommand,
74+
DisassociateEipFromVlanCommand,
6375
GetEnvironmentCommand,
6476
ListEnvironmentHostsCommand,
6577
ListEnvironmentsCommand,
@@ -70,6 +82,23 @@ const commands = {
7082
};
7183

7284
export interface Evs {
85+
/**
86+
* @see {@link AssociateEipToVlanCommand}
87+
*/
88+
associateEipToVlan(
89+
args: AssociateEipToVlanCommandInput,
90+
options?: __HttpHandlerOptions
91+
): Promise<AssociateEipToVlanCommandOutput>;
92+
associateEipToVlan(
93+
args: AssociateEipToVlanCommandInput,
94+
cb: (err: any, data?: AssociateEipToVlanCommandOutput) => void
95+
): void;
96+
associateEipToVlan(
97+
args: AssociateEipToVlanCommandInput,
98+
options: __HttpHandlerOptions,
99+
cb: (err: any, data?: AssociateEipToVlanCommandOutput) => void
100+
): void;
101+
73102
/**
74103
* @see {@link CreateEnvironmentCommand}
75104
*/
@@ -138,6 +167,23 @@ export interface Evs {
138167
cb: (err: any, data?: DeleteEnvironmentHostCommandOutput) => void
139168
): void;
140169

170+
/**
171+
* @see {@link DisassociateEipFromVlanCommand}
172+
*/
173+
disassociateEipFromVlan(
174+
args: DisassociateEipFromVlanCommandInput,
175+
options?: __HttpHandlerOptions
176+
): Promise<DisassociateEipFromVlanCommandOutput>;
177+
disassociateEipFromVlan(
178+
args: DisassociateEipFromVlanCommandInput,
179+
cb: (err: any, data?: DisassociateEipFromVlanCommandOutput) => void
180+
): void;
181+
disassociateEipFromVlan(
182+
args: DisassociateEipFromVlanCommandInput,
183+
options: __HttpHandlerOptions,
184+
cb: (err: any, data?: DisassociateEipFromVlanCommandOutput) => void
185+
): void;
186+
141187
/**
142188
* @see {@link GetEnvironmentCommand}
143189
*/

clients/client-evs/src/EvsClient.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import {
5353
HttpAuthSchemeResolvedConfig,
5454
resolveHttpAuthSchemeConfig,
5555
} from "./auth/httpAuthSchemeProvider";
56+
import { AssociateEipToVlanCommandInput, AssociateEipToVlanCommandOutput } from "./commands/AssociateEipToVlanCommand";
5657
import { CreateEnvironmentCommandInput, CreateEnvironmentCommandOutput } from "./commands/CreateEnvironmentCommand";
5758
import {
5859
CreateEnvironmentHostCommandInput,
@@ -63,6 +64,10 @@ import {
6364
DeleteEnvironmentHostCommandInput,
6465
DeleteEnvironmentHostCommandOutput,
6566
} from "./commands/DeleteEnvironmentHostCommand";
67+
import {
68+
DisassociateEipFromVlanCommandInput,
69+
DisassociateEipFromVlanCommandOutput,
70+
} from "./commands/DisassociateEipFromVlanCommand";
6671
import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "./commands/GetEnvironmentCommand";
6772
import {
6873
ListEnvironmentHostsCommandInput,
@@ -94,10 +99,12 @@ export { __Client };
9499
* @public
95100
*/
96101
export type ServiceInputTypes =
102+
| AssociateEipToVlanCommandInput
97103
| CreateEnvironmentCommandInput
98104
| CreateEnvironmentHostCommandInput
99105
| DeleteEnvironmentCommandInput
100106
| DeleteEnvironmentHostCommandInput
107+
| DisassociateEipFromVlanCommandInput
101108
| GetEnvironmentCommandInput
102109
| ListEnvironmentHostsCommandInput
103110
| ListEnvironmentVlansCommandInput
@@ -110,10 +117,12 @@ export type ServiceInputTypes =
110117
* @public
111118
*/
112119
export type ServiceOutputTypes =
120+
| AssociateEipToVlanCommandOutput
113121
| CreateEnvironmentCommandOutput
114122
| CreateEnvironmentHostCommandOutput
115123
| DeleteEnvironmentCommandOutput
116124
| DeleteEnvironmentHostCommandOutput
125+
| DisassociateEipFromVlanCommandOutput
117126
| GetEnvironmentCommandOutput
118127
| ListEnvironmentHostsCommandOutput
119128
| ListEnvironmentVlansCommandOutput
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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 { EvsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EvsClient";
9+
import { AssociateEipToVlanRequest, AssociateEipToVlanResponse } from "../models/models_0";
10+
import { de_AssociateEipToVlanCommand, se_AssociateEipToVlanCommand } from "../protocols/Aws_json1_0";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link AssociateEipToVlanCommand}.
21+
*/
22+
export interface AssociateEipToVlanCommandInput extends AssociateEipToVlanRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link AssociateEipToVlanCommand}.
27+
*/
28+
export interface AssociateEipToVlanCommandOutput extends AssociateEipToVlanResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Associates an Elastic IP address with a public HCX VLAN. This operation is only allowed for public HCX VLANs at this time.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { EvsClient, AssociateEipToVlanCommand } from "@aws-sdk/client-evs"; // ES Modules import
36+
* // const { EvsClient, AssociateEipToVlanCommand } = require("@aws-sdk/client-evs"); // CommonJS import
37+
* const client = new EvsClient(config);
38+
* const input = { // AssociateEipToVlanRequest
39+
* clientToken: "STRING_VALUE",
40+
* environmentId: "STRING_VALUE", // required
41+
* vlanName: "STRING_VALUE", // required
42+
* allocationId: "STRING_VALUE", // required
43+
* };
44+
* const command = new AssociateEipToVlanCommand(input);
45+
* const response = await client.send(command);
46+
* // { // AssociateEipToVlanResponse
47+
* // vlan: { // Vlan
48+
* // vlanId: Number("int"),
49+
* // cidr: "STRING_VALUE",
50+
* // availabilityZone: "STRING_VALUE",
51+
* // functionName: "STRING_VALUE",
52+
* // subnetId: "STRING_VALUE",
53+
* // createdAt: new Date("TIMESTAMP"),
54+
* // modifiedAt: new Date("TIMESTAMP"),
55+
* // vlanState: "CREATING" || "CREATED" || "DELETING" || "DELETED" || "CREATE_FAILED",
56+
* // stateDetails: "STRING_VALUE",
57+
* // eipAssociations: [ // EipAssociationList
58+
* // { // EipAssociation
59+
* // associationId: "STRING_VALUE",
60+
* // allocationId: "STRING_VALUE",
61+
* // ipAddress: "STRING_VALUE",
62+
* // },
63+
* // ],
64+
* // isPublic: true || false,
65+
* // networkAclId: "STRING_VALUE",
66+
* // },
67+
* // };
68+
*
69+
* ```
70+
*
71+
* @param AssociateEipToVlanCommandInput - {@link AssociateEipToVlanCommandInput}
72+
* @returns {@link AssociateEipToVlanCommandOutput}
73+
* @see {@link AssociateEipToVlanCommandInput} for command's `input` shape.
74+
* @see {@link AssociateEipToVlanCommandOutput} for command's `response` shape.
75+
* @see {@link EvsClientResolvedConfig | config} for EvsClient's `config` shape.
76+
*
77+
* @throws {@link ResourceNotFoundException} (client fault)
78+
* <p>A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a <code>state</code> of <code>DELETED</code>.</p>
79+
*
80+
* @throws {@link ThrottlingException} (client fault)
81+
* <p>The operation couldn't be performed because the service is throttling requests. This exception is thrown when there are too many requests accepted concurrently from the service endpoint.</p>
82+
*
83+
* @throws {@link ValidationException} (client fault)
84+
* <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</p>
85+
*
86+
* @throws {@link EvsServiceException}
87+
* <p>Base exception class for all service exceptions from Evs service.</p>
88+
*
89+
*
90+
* @public
91+
*/
92+
export class AssociateEipToVlanCommand extends $Command
93+
.classBuilder<
94+
AssociateEipToVlanCommandInput,
95+
AssociateEipToVlanCommandOutput,
96+
EvsClientResolvedConfig,
97+
ServiceInputTypes,
98+
ServiceOutputTypes
99+
>()
100+
.ep(commonParams)
101+
.m(function (this: any, Command: any, cs: any, config: EvsClientResolvedConfig, o: any) {
102+
return [
103+
getSerdePlugin(config, this.serialize, this.deserialize),
104+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
105+
];
106+
})
107+
.s("AmazonElasticVMwareService", "AssociateEipToVlan", {})
108+
.n("EvsClient", "AssociateEipToVlanCommand")
109+
.f(void 0, void 0)
110+
.ser(se_AssociateEipToVlanCommand)
111+
.de(de_AssociateEipToVlanCommand)
112+
.build() {
113+
/** @internal type navigation helper, not in runtime. */
114+
protected declare static __types: {
115+
api: {
116+
input: AssociateEipToVlanRequest;
117+
output: AssociateEipToVlanResponse;
118+
};
119+
sdk: {
120+
input: AssociateEipToVlanCommandInput;
121+
output: AssociateEipToVlanCommandOutput;
122+
};
123+
};
124+
}

clients/client-evs/src/commands/CreateEnvironmentCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ export interface CreateEnvironmentCommandOutput extends CreateEnvironmentRespons
7878
* hcx: "<InitialVlanInfo>", // required
7979
* expansionVlan1: "<InitialVlanInfo>", // required
8080
* expansionVlan2: "<InitialVlanInfo>", // required
81+
* isHcxPublic: true || false,
82+
* hcxNetworkAclId: "STRING_VALUE",
8183
* },
8284
* hosts: [ // HostInfoForCreateList // required
8385
* { // HostInfoForCreate

clients/client-evs/src/commands/CreateEnvironmentHostCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export interface CreateEnvironmentHostCommandOutput extends CreateEnvironmentHos
8888
* @see {@link EvsClientResolvedConfig | config} for EvsClient's `config` shape.
8989
*
9090
* @throws {@link ThrottlingException} (client fault)
91-
* <p>The <code>CreateEnvironmentHost</code> operation couldn't be performed because the service is throttling requests. This exception is thrown when the <code>CreateEnvironmentHost</code> request exceeds concurrency of 1 transaction per second (TPS).</p>
91+
* <p>The operation couldn't be performed because the service is throttling requests. This exception is thrown when there are too many requests accepted concurrently from the service endpoint.</p>
9292
*
9393
* @throws {@link ValidationException} (client fault)
9494
* <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</p>

0 commit comments

Comments
 (0)