Skip to content

Commit 02a5e1a

Browse files
author
awstools
committed
feat(client-ec2): This launch allows customers to associate up to 8 IP addresses to their NAT Gateways to increase the limit on concurrent connections to a single destination by eight times from 55K to 440K.
1 parent c6f86d2 commit 02a5e1a

33 files changed

+3429
-1533
lines changed

clients/client-ec2/src/EC2.ts

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ import {
7171
AssignPrivateIpAddressesCommandInput,
7272
AssignPrivateIpAddressesCommandOutput,
7373
} from "./commands/AssignPrivateIpAddressesCommand";
74+
import {
75+
AssignPrivateNatGatewayAddressCommand,
76+
AssignPrivateNatGatewayAddressCommandInput,
77+
AssignPrivateNatGatewayAddressCommandOutput,
78+
} from "./commands/AssignPrivateNatGatewayAddressCommand";
7479
import {
7580
AssociateAddressCommand,
7681
AssociateAddressCommandInput,
@@ -106,6 +111,11 @@ import {
106111
AssociateIpamResourceDiscoveryCommandInput,
107112
AssociateIpamResourceDiscoveryCommandOutput,
108113
} from "./commands/AssociateIpamResourceDiscoveryCommand";
114+
import {
115+
AssociateNatGatewayAddressCommand,
116+
AssociateNatGatewayAddressCommandInput,
117+
AssociateNatGatewayAddressCommandOutput,
118+
} from "./commands/AssociateNatGatewayAddressCommand";
109119
import {
110120
AssociateRouteTableCommand,
111121
AssociateRouteTableCommandInput,
@@ -1862,6 +1872,11 @@ import {
18621872
DisassociateIpamResourceDiscoveryCommandInput,
18631873
DisassociateIpamResourceDiscoveryCommandOutput,
18641874
} from "./commands/DisassociateIpamResourceDiscoveryCommand";
1875+
import {
1876+
DisassociateNatGatewayAddressCommand,
1877+
DisassociateNatGatewayAddressCommandInput,
1878+
DisassociateNatGatewayAddressCommandOutput,
1879+
} from "./commands/DisassociateNatGatewayAddressCommand";
18651880
import {
18661881
DisassociateRouteTableCommand,
18671882
DisassociateRouteTableCommandInput,
@@ -2842,6 +2857,11 @@ import {
28422857
UnassignPrivateIpAddressesCommandInput,
28432858
UnassignPrivateIpAddressesCommandOutput,
28442859
} from "./commands/UnassignPrivateIpAddressesCommand";
2860+
import {
2861+
UnassignPrivateNatGatewayAddressCommand,
2862+
UnassignPrivateNatGatewayAddressCommandInput,
2863+
UnassignPrivateNatGatewayAddressCommandOutput,
2864+
} from "./commands/UnassignPrivateNatGatewayAddressCommand";
28452865
import {
28462866
UnmonitorInstancesCommand,
28472867
UnmonitorInstancesCommandInput,
@@ -3410,6 +3430,38 @@ export class EC2 extends EC2Client {
34103430
}
34113431
}
34123432

3433+
/**
3434+
* <p>Assigns one or more private IPv4 addresses to a private NAT gateway. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-working-with">Work with NAT gateways</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
3435+
*/
3436+
public assignPrivateNatGatewayAddress(
3437+
args: AssignPrivateNatGatewayAddressCommandInput,
3438+
options?: __HttpHandlerOptions
3439+
): Promise<AssignPrivateNatGatewayAddressCommandOutput>;
3440+
public assignPrivateNatGatewayAddress(
3441+
args: AssignPrivateNatGatewayAddressCommandInput,
3442+
cb: (err: any, data?: AssignPrivateNatGatewayAddressCommandOutput) => void
3443+
): void;
3444+
public assignPrivateNatGatewayAddress(
3445+
args: AssignPrivateNatGatewayAddressCommandInput,
3446+
options: __HttpHandlerOptions,
3447+
cb: (err: any, data?: AssignPrivateNatGatewayAddressCommandOutput) => void
3448+
): void;
3449+
public assignPrivateNatGatewayAddress(
3450+
args: AssignPrivateNatGatewayAddressCommandInput,
3451+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssignPrivateNatGatewayAddressCommandOutput) => void),
3452+
cb?: (err: any, data?: AssignPrivateNatGatewayAddressCommandOutput) => void
3453+
): Promise<AssignPrivateNatGatewayAddressCommandOutput> | void {
3454+
const command = new AssignPrivateNatGatewayAddressCommand(args);
3455+
if (typeof optionsOrCb === "function") {
3456+
this.send(command, optionsOrCb);
3457+
} else if (typeof cb === "function") {
3458+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3459+
this.send(command, optionsOrCb || {}, cb);
3460+
} else {
3461+
return this.send(command, optionsOrCb);
3462+
}
3463+
}
3464+
34133465
/**
34143466
* <p>Associates an Elastic IP address, or carrier IP address (for instances that are in
34153467
* subnets in Wavelength Zones) with an instance or a network interface. Before you can use an
@@ -3681,6 +3733,39 @@ export class EC2 extends EC2Client {
36813733
}
36823734
}
36833735

3736+
/**
3737+
* <p>Associates Elastic IP addresses (EIPs) and private IPv4 addresses with a public NAT gateway. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-working-with">Work with NAT gateways</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
3738+
* <p>By default, you can associate up to 2 Elastic IP addresses per public NAT gateway. You can increase the limit by requesting a quota adjustment. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-eips">Elastic IP address quotas</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
3739+
*/
3740+
public associateNatGatewayAddress(
3741+
args: AssociateNatGatewayAddressCommandInput,
3742+
options?: __HttpHandlerOptions
3743+
): Promise<AssociateNatGatewayAddressCommandOutput>;
3744+
public associateNatGatewayAddress(
3745+
args: AssociateNatGatewayAddressCommandInput,
3746+
cb: (err: any, data?: AssociateNatGatewayAddressCommandOutput) => void
3747+
): void;
3748+
public associateNatGatewayAddress(
3749+
args: AssociateNatGatewayAddressCommandInput,
3750+
options: __HttpHandlerOptions,
3751+
cb: (err: any, data?: AssociateNatGatewayAddressCommandOutput) => void
3752+
): void;
3753+
public associateNatGatewayAddress(
3754+
args: AssociateNatGatewayAddressCommandInput,
3755+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AssociateNatGatewayAddressCommandOutput) => void),
3756+
cb?: (err: any, data?: AssociateNatGatewayAddressCommandOutput) => void
3757+
): Promise<AssociateNatGatewayAddressCommandOutput> | void {
3758+
const command = new AssociateNatGatewayAddressCommand(args);
3759+
if (typeof optionsOrCb === "function") {
3760+
this.send(command, optionsOrCb);
3761+
} else if (typeof cb === "function") {
3762+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3763+
this.send(command, optionsOrCb || {}, cb);
3764+
} else {
3765+
return this.send(command, optionsOrCb);
3766+
}
3767+
}
3768+
36843769
/**
36853770
* <p>Associates a subnet in your VPC or an internet gateway or virtual private gateway
36863771
* attached to your VPC with a route table in your VPC. This association causes traffic
@@ -16547,6 +16632,44 @@ export class EC2 extends EC2Client {
1654716632
}
1654816633
}
1654916634

16635+
/**
16636+
* <p>Disassociates secondary Elastic IP addresses (EIPs) from a public NAT gateway. You cannot disassociate your primary EIP. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-edit-secondary">Edit secondary IP address associations</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
16637+
* <p>While disassociating is in progress, you cannot associate/disassociate additional EIPs while the connections are being drained. You are, however, allowed to delete the NAT gateway.</p>
16638+
* <p>An EIP will only be released at the end of MaxDrainDurationSeconds. The EIPs stay
16639+
* associated and support the existing connections but do not support any new connections
16640+
* (new connections are distributed across the remaining associated EIPs). As the existing
16641+
* connections drain out, the EIPs (and the corresponding private IPs mapped to them) get
16642+
* released.</p>
16643+
*/
16644+
public disassociateNatGatewayAddress(
16645+
args: DisassociateNatGatewayAddressCommandInput,
16646+
options?: __HttpHandlerOptions
16647+
): Promise<DisassociateNatGatewayAddressCommandOutput>;
16648+
public disassociateNatGatewayAddress(
16649+
args: DisassociateNatGatewayAddressCommandInput,
16650+
cb: (err: any, data?: DisassociateNatGatewayAddressCommandOutput) => void
16651+
): void;
16652+
public disassociateNatGatewayAddress(
16653+
args: DisassociateNatGatewayAddressCommandInput,
16654+
options: __HttpHandlerOptions,
16655+
cb: (err: any, data?: DisassociateNatGatewayAddressCommandOutput) => void
16656+
): void;
16657+
public disassociateNatGatewayAddress(
16658+
args: DisassociateNatGatewayAddressCommandInput,
16659+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisassociateNatGatewayAddressCommandOutput) => void),
16660+
cb?: (err: any, data?: DisassociateNatGatewayAddressCommandOutput) => void
16661+
): Promise<DisassociateNatGatewayAddressCommandOutput> | void {
16662+
const command = new DisassociateNatGatewayAddressCommand(args);
16663+
if (typeof optionsOrCb === "function") {
16664+
this.send(command, optionsOrCb);
16665+
} else if (typeof cb === "function") {
16666+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
16667+
this.send(command, optionsOrCb || {}, cb);
16668+
} else {
16669+
return this.send(command, optionsOrCb);
16670+
}
16671+
}
16672+
1655016673
/**
1655116674
* <p>Disassociates a subnet or gateway from a route table.</p>
1655216675
* <p>After you perform this action, the subnet no longer uses the routes in the route table.
@@ -23985,6 +24108,46 @@ export class EC2 extends EC2Client {
2398524108
}
2398624109
}
2398724110

24111+
/**
24112+
* <p>Unassigns secondary private NAT gateway IPv4 addresses from a private NAT gateway. You cannot unassign your primary private IP. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-edit-secondary">Edit secondary IP address associations</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
24113+
* <p>While unassigning is in progress, you cannot assign/unassign additional IP addresses while the connections are being drained. You are, however, allowed to delete the NAT gateway.</p>
24114+
* <p>A private IP address will only be released at the end of MaxDrainDurationSeconds. The
24115+
* private IP addresses stay associated and support the existing connections but do not
24116+
* support any new connections (new connections are distributed across the remaining
24117+
* assigned private IP address). After the existing connections drain out, the private IP
24118+
* addresses get released. </p>
24119+
* <p></p>
24120+
* <p></p>
24121+
*/
24122+
public unassignPrivateNatGatewayAddress(
24123+
args: UnassignPrivateNatGatewayAddressCommandInput,
24124+
options?: __HttpHandlerOptions
24125+
): Promise<UnassignPrivateNatGatewayAddressCommandOutput>;
24126+
public unassignPrivateNatGatewayAddress(
24127+
args: UnassignPrivateNatGatewayAddressCommandInput,
24128+
cb: (err: any, data?: UnassignPrivateNatGatewayAddressCommandOutput) => void
24129+
): void;
24130+
public unassignPrivateNatGatewayAddress(
24131+
args: UnassignPrivateNatGatewayAddressCommandInput,
24132+
options: __HttpHandlerOptions,
24133+
cb: (err: any, data?: UnassignPrivateNatGatewayAddressCommandOutput) => void
24134+
): void;
24135+
public unassignPrivateNatGatewayAddress(
24136+
args: UnassignPrivateNatGatewayAddressCommandInput,
24137+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UnassignPrivateNatGatewayAddressCommandOutput) => void),
24138+
cb?: (err: any, data?: UnassignPrivateNatGatewayAddressCommandOutput) => void
24139+
): Promise<UnassignPrivateNatGatewayAddressCommandOutput> | void {
24140+
const command = new UnassignPrivateNatGatewayAddressCommand(args);
24141+
if (typeof optionsOrCb === "function") {
24142+
this.send(command, optionsOrCb);
24143+
} else if (typeof cb === "function") {
24144+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
24145+
this.send(command, optionsOrCb || {}, cb);
24146+
} else {
24147+
return this.send(command, optionsOrCb);
24148+
}
24149+
}
24150+
2398824151
/**
2398924152
* <p>Disables detailed monitoring for a running instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html">Monitoring
2399024153
* your instances and volumes</a> in the

clients/client-ec2/src/EC2Client.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ import {
9696
AssignPrivateIpAddressesCommandInput,
9797
AssignPrivateIpAddressesCommandOutput,
9898
} from "./commands/AssignPrivateIpAddressesCommand";
99+
import {
100+
AssignPrivateNatGatewayAddressCommandInput,
101+
AssignPrivateNatGatewayAddressCommandOutput,
102+
} from "./commands/AssignPrivateNatGatewayAddressCommand";
99103
import { AssociateAddressCommandInput, AssociateAddressCommandOutput } from "./commands/AssociateAddressCommand";
100104
import {
101105
AssociateClientVpnTargetNetworkCommandInput,
@@ -121,6 +125,10 @@ import {
121125
AssociateIpamResourceDiscoveryCommandInput,
122126
AssociateIpamResourceDiscoveryCommandOutput,
123127
} from "./commands/AssociateIpamResourceDiscoveryCommand";
128+
import {
129+
AssociateNatGatewayAddressCommandInput,
130+
AssociateNatGatewayAddressCommandOutput,
131+
} from "./commands/AssociateNatGatewayAddressCommand";
124132
import {
125133
AssociateRouteTableCommandInput,
126134
AssociateRouteTableCommandOutput,
@@ -1324,6 +1332,10 @@ import {
13241332
DisassociateIpamResourceDiscoveryCommandInput,
13251333
DisassociateIpamResourceDiscoveryCommandOutput,
13261334
} from "./commands/DisassociateIpamResourceDiscoveryCommand";
1335+
import {
1336+
DisassociateNatGatewayAddressCommandInput,
1337+
DisassociateNatGatewayAddressCommandOutput,
1338+
} from "./commands/DisassociateNatGatewayAddressCommand";
13271339
import {
13281340
DisassociateRouteTableCommandInput,
13291341
DisassociateRouteTableCommandOutput,
@@ -2016,6 +2028,10 @@ import {
20162028
UnassignPrivateIpAddressesCommandInput,
20172029
UnassignPrivateIpAddressesCommandOutput,
20182030
} from "./commands/UnassignPrivateIpAddressesCommand";
2031+
import {
2032+
UnassignPrivateNatGatewayAddressCommandInput,
2033+
UnassignPrivateNatGatewayAddressCommandOutput,
2034+
} from "./commands/UnassignPrivateNatGatewayAddressCommand";
20192035
import { UnmonitorInstancesCommandInput, UnmonitorInstancesCommandOutput } from "./commands/UnmonitorInstancesCommand";
20202036
import {
20212037
UpdateSecurityGroupRuleDescriptionsEgressCommandInput,
@@ -2049,13 +2065,15 @@ export type ServiceInputTypes =
20492065
| ApplySecurityGroupsToClientVpnTargetNetworkCommandInput
20502066
| AssignIpv6AddressesCommandInput
20512067
| AssignPrivateIpAddressesCommandInput
2068+
| AssignPrivateNatGatewayAddressCommandInput
20522069
| AssociateAddressCommandInput
20532070
| AssociateClientVpnTargetNetworkCommandInput
20542071
| AssociateDhcpOptionsCommandInput
20552072
| AssociateEnclaveCertificateIamRoleCommandInput
20562073
| AssociateIamInstanceProfileCommandInput
20572074
| AssociateInstanceEventWindowCommandInput
20582075
| AssociateIpamResourceDiscoveryCommandInput
2076+
| AssociateNatGatewayAddressCommandInput
20592077
| AssociateRouteTableCommandInput
20602078
| AssociateSubnetCidrBlockCommandInput
20612079
| AssociateTransitGatewayMulticastDomainCommandInput
@@ -2416,6 +2434,7 @@ export type ServiceInputTypes =
24162434
| DisassociateIamInstanceProfileCommandInput
24172435
| DisassociateInstanceEventWindowCommandInput
24182436
| DisassociateIpamResourceDiscoveryCommandInput
2437+
| DisassociateNatGatewayAddressCommandInput
24192438
| DisassociateRouteTableCommandInput
24202439
| DisassociateSubnetCidrBlockCommandInput
24212440
| DisassociateTransitGatewayMulticastDomainCommandInput
@@ -2616,6 +2635,7 @@ export type ServiceInputTypes =
26162635
| TerminateInstancesCommandInput
26172636
| UnassignIpv6AddressesCommandInput
26182637
| UnassignPrivateIpAddressesCommandInput
2638+
| UnassignPrivateNatGatewayAddressCommandInput
26192639
| UnmonitorInstancesCommandInput
26202640
| UpdateSecurityGroupRuleDescriptionsEgressCommandInput
26212641
| UpdateSecurityGroupRuleDescriptionsIngressCommandInput
@@ -2636,13 +2656,15 @@ export type ServiceOutputTypes =
26362656
| ApplySecurityGroupsToClientVpnTargetNetworkCommandOutput
26372657
| AssignIpv6AddressesCommandOutput
26382658
| AssignPrivateIpAddressesCommandOutput
2659+
| AssignPrivateNatGatewayAddressCommandOutput
26392660
| AssociateAddressCommandOutput
26402661
| AssociateClientVpnTargetNetworkCommandOutput
26412662
| AssociateDhcpOptionsCommandOutput
26422663
| AssociateEnclaveCertificateIamRoleCommandOutput
26432664
| AssociateIamInstanceProfileCommandOutput
26442665
| AssociateInstanceEventWindowCommandOutput
26452666
| AssociateIpamResourceDiscoveryCommandOutput
2667+
| AssociateNatGatewayAddressCommandOutput
26462668
| AssociateRouteTableCommandOutput
26472669
| AssociateSubnetCidrBlockCommandOutput
26482670
| AssociateTransitGatewayMulticastDomainCommandOutput
@@ -3003,6 +3025,7 @@ export type ServiceOutputTypes =
30033025
| DisassociateIamInstanceProfileCommandOutput
30043026
| DisassociateInstanceEventWindowCommandOutput
30053027
| DisassociateIpamResourceDiscoveryCommandOutput
3028+
| DisassociateNatGatewayAddressCommandOutput
30063029
| DisassociateRouteTableCommandOutput
30073030
| DisassociateSubnetCidrBlockCommandOutput
30083031
| DisassociateTransitGatewayMulticastDomainCommandOutput
@@ -3203,6 +3226,7 @@ export type ServiceOutputTypes =
32033226
| TerminateInstancesCommandOutput
32043227
| UnassignIpv6AddressesCommandOutput
32053228
| UnassignPrivateIpAddressesCommandOutput
3229+
| UnassignPrivateNatGatewayAddressCommandOutput
32063230
| UnmonitorInstancesCommandOutput
32073231
| UpdateSecurityGroupRuleDescriptionsEgressCommandOutput
32083232
| UpdateSecurityGroupRuleDescriptionsIngressCommandOutput

0 commit comments

Comments
 (0)