Skip to content

Commit 9346a11

Browse files
author
awstools
committed
feat(client-ec2): Two new features for local gateway route tables: support for static routes targeting Elastic Network Interfaces and direct VPC routing.
1 parent a7d2b0e commit 9346a11

16 files changed

+622
-147
lines changed

clients/client-ec2/src/EC2.ts

+51-1
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,11 @@ import {
21322132
ModifyLaunchTemplateCommandInput,
21332133
ModifyLaunchTemplateCommandOutput,
21342134
} from "./commands/ModifyLaunchTemplateCommand";
2135+
import {
2136+
ModifyLocalGatewayRouteCommand,
2137+
ModifyLocalGatewayRouteCommandInput,
2138+
ModifyLocalGatewayRouteCommandOutput,
2139+
} from "./commands/ModifyLocalGatewayRouteCommand";
21352140
import {
21362141
ModifyManagedPrefixListCommand,
21372142
ModifyManagedPrefixListCommandInput,
@@ -5382,7 +5387,20 @@ export class EC2 extends EC2Client {
53825387
}
53835388

53845389
/**
5385-
* <p>Creates a static route for the specified local gateway route table.</p>
5390+
* <p>Creates a static route for the specified local gateway route table. You must specify one of the
5391+
* following targets: </p>
5392+
* <ul>
5393+
* <li>
5394+
* <p>
5395+
* <code>LocalGatewayVirtualInterfaceGroupId</code>
5396+
* </p>
5397+
* </li>
5398+
* <li>
5399+
* <p>
5400+
* <code>NetworkInterfaceId</code>
5401+
* </p>
5402+
* </li>
5403+
* </ul>
53865404
*/
53875405
public createLocalGatewayRoute(
53885406
args: CreateLocalGatewayRouteCommandInput,
@@ -18537,6 +18555,38 @@ export class EC2 extends EC2Client {
1853718555
}
1853818556
}
1853918557

18558+
/**
18559+
* <p>Modifies the specified local gateway route.</p>
18560+
*/
18561+
public modifyLocalGatewayRoute(
18562+
args: ModifyLocalGatewayRouteCommandInput,
18563+
options?: __HttpHandlerOptions
18564+
): Promise<ModifyLocalGatewayRouteCommandOutput>;
18565+
public modifyLocalGatewayRoute(
18566+
args: ModifyLocalGatewayRouteCommandInput,
18567+
cb: (err: any, data?: ModifyLocalGatewayRouteCommandOutput) => void
18568+
): void;
18569+
public modifyLocalGatewayRoute(
18570+
args: ModifyLocalGatewayRouteCommandInput,
18571+
options: __HttpHandlerOptions,
18572+
cb: (err: any, data?: ModifyLocalGatewayRouteCommandOutput) => void
18573+
): void;
18574+
public modifyLocalGatewayRoute(
18575+
args: ModifyLocalGatewayRouteCommandInput,
18576+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ModifyLocalGatewayRouteCommandOutput) => void),
18577+
cb?: (err: any, data?: ModifyLocalGatewayRouteCommandOutput) => void
18578+
): Promise<ModifyLocalGatewayRouteCommandOutput> | void {
18579+
const command = new ModifyLocalGatewayRouteCommand(args);
18580+
if (typeof optionsOrCb === "function") {
18581+
this.send(command, optionsOrCb);
18582+
} else if (typeof cb === "function") {
18583+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
18584+
this.send(command, optionsOrCb || {}, cb);
18585+
} else {
18586+
return this.send(command, optionsOrCb);
18587+
}
18588+
}
18589+
1854018590
/**
1854118591
* <p>Modifies the specified managed prefix list.</p>
1854218592
* <p>Adding or removing entries in a prefix list creates a new version of the prefix list.

clients/client-ec2/src/EC2Client.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,10 @@ import {
15181518
ModifyLaunchTemplateCommandInput,
15191519
ModifyLaunchTemplateCommandOutput,
15201520
} from "./commands/ModifyLaunchTemplateCommand";
1521+
import {
1522+
ModifyLocalGatewayRouteCommandInput,
1523+
ModifyLocalGatewayRouteCommandOutput,
1524+
} from "./commands/ModifyLocalGatewayRouteCommand";
15211525
import {
15221526
ModifyManagedPrefixListCommandInput,
15231527
ModifyManagedPrefixListCommandOutput,
@@ -2276,6 +2280,7 @@ export type ServiceInputTypes =
22762280
| ModifyIpamResourceCidrCommandInput
22772281
| ModifyIpamScopeCommandInput
22782282
| ModifyLaunchTemplateCommandInput
2283+
| ModifyLocalGatewayRouteCommandInput
22792284
| ModifyManagedPrefixListCommandInput
22802285
| ModifyNetworkInterfaceAttributeCommandInput
22812286
| ModifyPrivateDnsNameOptionsCommandInput
@@ -2811,6 +2816,7 @@ export type ServiceOutputTypes =
28112816
| ModifyIpamResourceCidrCommandOutput
28122817
| ModifyIpamScopeCommandOutput
28132818
| ModifyLaunchTemplateCommandOutput
2819+
| ModifyLocalGatewayRouteCommandOutput
28142820
| ModifyManagedPrefixListCommandOutput
28152821
| ModifyNetworkInterfaceAttributeCommandOutput
28162822
| ModifyPrivateDnsNameOptionsCommandOutput

clients/client-ec2/src/commands/CreateLocalGatewayRouteCommand.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,20 @@ export interface CreateLocalGatewayRouteCommandInput extends CreateLocalGatewayR
2828
export interface CreateLocalGatewayRouteCommandOutput extends CreateLocalGatewayRouteResult, __MetadataBearer {}
2929

3030
/**
31-
* <p>Creates a static route for the specified local gateway route table.</p>
31+
* <p>Creates a static route for the specified local gateway route table. You must specify one of the
32+
* following targets: </p>
33+
* <ul>
34+
* <li>
35+
* <p>
36+
* <code>LocalGatewayVirtualInterfaceGroupId</code>
37+
* </p>
38+
* </li>
39+
* <li>
40+
* <p>
41+
* <code>NetworkInterfaceId</code>
42+
* </p>
43+
* </li>
44+
* </ul>
3245
* @example
3346
* Use a bare-bones client and the command you need to make an API call.
3447
* ```javascript

clients/client-ec2/src/commands/DescribeNetworkInsightsAccessScopesCommand.ts

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "
1616
import {
1717
DescribeNetworkInsightsAccessScopesRequest,
1818
DescribeNetworkInsightsAccessScopesRequestFilterSensitiveLog,
19-
} from "../models/models_3";
20-
import {
2119
DescribeNetworkInsightsAccessScopesResult,
2220
DescribeNetworkInsightsAccessScopesResultFilterSensitiveLog,
2321
} from "../models/models_4";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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 { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
16+
import {
17+
ModifyLocalGatewayRouteRequest,
18+
ModifyLocalGatewayRouteRequestFilterSensitiveLog,
19+
ModifyLocalGatewayRouteResult,
20+
ModifyLocalGatewayRouteResultFilterSensitiveLog,
21+
} from "../models/models_5";
22+
import {
23+
deserializeAws_ec2ModifyLocalGatewayRouteCommand,
24+
serializeAws_ec2ModifyLocalGatewayRouteCommand,
25+
} from "../protocols/Aws_ec2";
26+
27+
export interface ModifyLocalGatewayRouteCommandInput extends ModifyLocalGatewayRouteRequest {}
28+
export interface ModifyLocalGatewayRouteCommandOutput extends ModifyLocalGatewayRouteResult, __MetadataBearer {}
29+
30+
/**
31+
* <p>Modifies the specified local gateway route.</p>
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { EC2Client, ModifyLocalGatewayRouteCommand } from "@aws-sdk/client-ec2"; // ES Modules import
36+
* // const { EC2Client, ModifyLocalGatewayRouteCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
37+
* const client = new EC2Client(config);
38+
* const command = new ModifyLocalGatewayRouteCommand(input);
39+
* const response = await client.send(command);
40+
* ```
41+
*
42+
* @see {@link ModifyLocalGatewayRouteCommandInput} for command's `input` shape.
43+
* @see {@link ModifyLocalGatewayRouteCommandOutput} for command's `response` shape.
44+
* @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
45+
*
46+
*/
47+
export class ModifyLocalGatewayRouteCommand extends $Command<
48+
ModifyLocalGatewayRouteCommandInput,
49+
ModifyLocalGatewayRouteCommandOutput,
50+
EC2ClientResolvedConfig
51+
> {
52+
// Start section: command_properties
53+
// End section: command_properties
54+
55+
constructor(readonly input: ModifyLocalGatewayRouteCommandInput) {
56+
// Start section: command_constructor
57+
super();
58+
// End section: command_constructor
59+
}
60+
61+
/**
62+
* @internal
63+
*/
64+
resolveMiddleware(
65+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
66+
configuration: EC2ClientResolvedConfig,
67+
options?: __HttpHandlerOptions
68+
): Handler<ModifyLocalGatewayRouteCommandInput, ModifyLocalGatewayRouteCommandOutput> {
69+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
70+
71+
const stack = clientStack.concat(this.middlewareStack);
72+
73+
const { logger } = configuration;
74+
const clientName = "EC2Client";
75+
const commandName = "ModifyLocalGatewayRouteCommand";
76+
const handlerExecutionContext: HandlerExecutionContext = {
77+
logger,
78+
clientName,
79+
commandName,
80+
inputFilterSensitiveLog: ModifyLocalGatewayRouteRequestFilterSensitiveLog,
81+
outputFilterSensitiveLog: ModifyLocalGatewayRouteResultFilterSensitiveLog,
82+
};
83+
const { requestHandler } = configuration;
84+
return stack.resolve(
85+
(request: FinalizeHandlerArguments<any>) =>
86+
requestHandler.handle(request.request as __HttpRequest, options || {}),
87+
handlerExecutionContext
88+
);
89+
}
90+
91+
private serialize(input: ModifyLocalGatewayRouteCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
92+
return serializeAws_ec2ModifyLocalGatewayRouteCommand(input, context);
93+
}
94+
95+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ModifyLocalGatewayRouteCommandOutput> {
96+
return deserializeAws_ec2ModifyLocalGatewayRouteCommand(output, context);
97+
}
98+
99+
// Start section: command_body_extra
100+
// End section: command_body_extra
101+
}

clients/client-ec2/src/commands/PurchaseReservedInstancesOfferingCommand.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "
1616
import {
1717
PurchaseReservedInstancesOfferingRequest,
1818
PurchaseReservedInstancesOfferingRequestFilterSensitiveLog,
19+
} from "../models/models_5";
20+
import {
1921
PurchaseReservedInstancesOfferingResult,
2022
PurchaseReservedInstancesOfferingResultFilterSensitiveLog,
21-
} from "../models/models_5";
23+
} from "../models/models_6";
2224
import {
2325
deserializeAws_ec2PurchaseReservedInstancesOfferingCommand,
2426
serializeAws_ec2PurchaseReservedInstancesOfferingCommand,

clients/client-ec2/src/commands/PurchaseScheduledInstancesCommand.ts

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "
1616
import {
1717
PurchaseScheduledInstancesRequest,
1818
PurchaseScheduledInstancesRequestFilterSensitiveLog,
19-
} from "../models/models_5";
20-
import {
2119
PurchaseScheduledInstancesResult,
2220
PurchaseScheduledInstancesResultFilterSensitiveLog,
2321
} from "../models/models_6";

clients/client-ec2/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ export * from "./ModifyIpamPoolCommand";
438438
export * from "./ModifyIpamResourceCidrCommand";
439439
export * from "./ModifyIpamScopeCommand";
440440
export * from "./ModifyLaunchTemplateCommand";
441+
export * from "./ModifyLocalGatewayRouteCommand";
441442
export * from "./ModifyManagedPrefixListCommand";
442443
export * from "./ModifyNetworkInterfaceAttributeCommand";
443444
export * from "./ModifyPrivateDnsNameOptionsCommand";

clients/client-ec2/src/models/models_0.ts

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export enum AcceleratorManufacturer {
4646

4747
export enum AcceleratorName {
4848
A100 = "a100",
49+
INFERENTIA = "inferentia",
50+
K520 = "k520",
4951
K80 = "k80",
5052
M60 = "m60",
5153
RADEON_PRO_V520 = "radeon-pro-v520",

clients/client-ec2/src/models/models_1.ts

+21-1
Original file line numberDiff line numberDiff line change
@@ -5011,14 +5011,19 @@ export interface CreateLocalGatewayRouteRequest {
50115011
/**
50125012
* <p>The ID of the virtual interface group.</p>
50135013
*/
5014-
LocalGatewayVirtualInterfaceGroupId: string | undefined;
5014+
LocalGatewayVirtualInterfaceGroupId?: string;
50155015

50165016
/**
50175017
* <p>Checks whether you have the required permissions for the action, without actually making the request,
50185018
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
50195019
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
50205020
*/
50215021
DryRun?: boolean;
5022+
5023+
/**
5024+
* <p>The ID of the network interface.</p>
5025+
*/
5026+
NetworkInterfaceId?: string;
50225027
}
50235028

50245029
export type LocalGatewayRouteState = "active" | "blackhole" | "deleted" | "deleting" | "pending";
@@ -5063,6 +5068,21 @@ export interface LocalGatewayRoute {
50635068
* <p>The ID of the Amazon Web Services account that owns the local gateway route.</p>
50645069
*/
50655070
OwnerId?: string;
5071+
5072+
/**
5073+
* <p>The ID of the subnet.</p>
5074+
*/
5075+
SubnetId?: string;
5076+
5077+
/**
5078+
* <p>The ID of the customer-owned address pool.</p>
5079+
*/
5080+
CoipPoolId?: string;
5081+
5082+
/**
5083+
* <p>The ID of the network interface.</p>
5084+
*/
5085+
NetworkInterfaceId?: string;
50665086
}
50675087

50685088
export interface CreateLocalGatewayRouteResult {

clients/client-ec2/src/models/models_3.ts

+10-39
Original file line numberDiff line numberDiff line change
@@ -8481,6 +8481,11 @@ export interface DescribeLocalGatewayRouteTablesRequest {
84818481
DryRun?: boolean;
84828482
}
84838483

8484+
export enum LocalGatewayRouteTableMode {
8485+
coip = "coip",
8486+
direct_vpc_routing = "direct-vpc-routing",
8487+
}
8488+
84848489
/**
84858490
* <p>Describes a local gateway route table.</p>
84868491
*/
@@ -8519,6 +8524,11 @@ export interface LocalGatewayRouteTable {
85198524
* <p>The tags assigned to the local gateway route table.</p>
85208525
*/
85218526
Tags?: Tag[];
8527+
8528+
/**
8529+
* <p>The mode of the local gateway route table.</p>
8530+
*/
8531+
Mode?: LocalGatewayRouteTableMode | string;
85228532
}
85238533

85248534
export interface DescribeLocalGatewayRouteTablesResult {
@@ -9480,36 +9490,6 @@ export interface DescribeNetworkInsightsAccessScopeAnalysesResult {
94809490
NextToken?: string;
94819491
}
94829492

9483-
export interface DescribeNetworkInsightsAccessScopesRequest {
9484-
/**
9485-
* <p>The IDs of the Network Access Scopes.</p>
9486-
*/
9487-
NetworkInsightsAccessScopeIds?: string[];
9488-
9489-
/**
9490-
* <p>There are no supported filters.</p>
9491-
*/
9492-
Filters?: Filter[];
9493-
9494-
/**
9495-
* <p>The maximum number of results to return with a single call.
9496-
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
9497-
*/
9498-
MaxResults?: number;
9499-
9500-
/**
9501-
* <p>Checks whether you have the required permissions for the action, without actually making the request,
9502-
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
9503-
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
9504-
*/
9505-
DryRun?: boolean;
9506-
9507-
/**
9508-
* <p>The token for the next page of results.</p>
9509-
*/
9510-
NextToken?: string;
9511-
}
9512-
95139493
/**
95149494
* @internal
95159495
*/
@@ -11280,12 +11260,3 @@ export const DescribeNetworkInsightsAccessScopeAnalysesResultFilterSensitiveLog
1128011260
): any => ({
1128111261
...obj,
1128211262
});
11283-
11284-
/**
11285-
* @internal
11286-
*/
11287-
export const DescribeNetworkInsightsAccessScopesRequestFilterSensitiveLog = (
11288-
obj: DescribeNetworkInsightsAccessScopesRequest
11289-
): any => ({
11290-
...obj,
11291-
});

0 commit comments

Comments
 (0)