Skip to content

Commit dba90b0

Browse files
author
awstools
committed
feat(client-ec2): Elastic IP transfer is a new Amazon VPC feature that allows you to transfer your Elastic IP addresses from one AWS Account to another.
1 parent 72ea473 commit dba90b0

34 files changed

+3231
-1559
lines changed

Diff for: clients/client-ec2/README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ using your favorite package manager:
5252

5353
The AWS SDK is modulized by clients and commands.
5454
To send a request, you only need to import the `EC2Client` and
55-
the commands you need, for example `AcceptReservedInstancesExchangeQuoteCommand`:
55+
the commands you need, for example `AcceptAddressTransferCommand`:
5656

5757
```js
5858
// ES5 example
59-
const { EC2Client, AcceptReservedInstancesExchangeQuoteCommand } = require("@aws-sdk/client-ec2");
59+
const { EC2Client, AcceptAddressTransferCommand } = require("@aws-sdk/client-ec2");
6060
```
6161

6262
```ts
6363
// ES6+ example
64-
import { EC2Client, AcceptReservedInstancesExchangeQuoteCommand } from "@aws-sdk/client-ec2";
64+
import { EC2Client, AcceptAddressTransferCommand } from "@aws-sdk/client-ec2";
6565
```
6666

6767
### Usage
@@ -80,7 +80,7 @@ const client = new EC2Client({ region: "REGION" });
8080
const params = {
8181
/** input parameters */
8282
};
83-
const command = new AcceptReservedInstancesExchangeQuoteCommand(params);
83+
const command = new AcceptAddressTransferCommand(params);
8484
```
8585

8686
#### Async/await
@@ -159,15 +159,15 @@ const client = new AWS.EC2({ region: "REGION" });
159159

160160
// async/await.
161161
try {
162-
const data = await client.acceptReservedInstancesExchangeQuote(params);
162+
const data = await client.acceptAddressTransfer(params);
163163
// process data.
164164
} catch (error) {
165165
// error handling.
166166
}
167167

168168
// Promises.
169169
client
170-
.acceptReservedInstancesExchangeQuote(params)
170+
.acceptAddressTransfer(params)
171171
.then((data) => {
172172
// process data.
173173
})
@@ -176,7 +176,7 @@ client
176176
});
177177

178178
// callbacks.
179-
client.acceptReservedInstancesExchangeQuote(params, (err, data) => {
179+
client.acceptAddressTransfer(params, (err, data) => {
180180
// process err and data.
181181
});
182182
```

Diff for: clients/client-ec2/src/EC2.ts

+148
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// smithy-typescript generated code
22
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
33

4+
import {
5+
AcceptAddressTransferCommand,
6+
AcceptAddressTransferCommandInput,
7+
AcceptAddressTransferCommandOutput,
8+
} from "./commands/AcceptAddressTransferCommand";
49
import {
510
AcceptReservedInstancesExchangeQuoteCommand,
611
AcceptReservedInstancesExchangeQuoteCommandInput,
@@ -967,6 +972,11 @@ import {
967972
DescribeAddressesCommandInput,
968973
DescribeAddressesCommandOutput,
969974
} from "./commands/DescribeAddressesCommand";
975+
import {
976+
DescribeAddressTransfersCommand,
977+
DescribeAddressTransfersCommandInput,
978+
DescribeAddressTransfersCommandOutput,
979+
} from "./commands/DescribeAddressTransfersCommand";
970980
import {
971981
DescribeAggregateIdFormatCommand,
972982
DescribeAggregateIdFormatCommandInput,
@@ -1652,6 +1662,11 @@ import {
16521662
DetachVpnGatewayCommandInput,
16531663
DetachVpnGatewayCommandOutput,
16541664
} from "./commands/DetachVpnGatewayCommand";
1665+
import {
1666+
DisableAddressTransferCommand,
1667+
DisableAddressTransferCommandInput,
1668+
DisableAddressTransferCommandOutput,
1669+
} from "./commands/DisableAddressTransferCommand";
16551670
import {
16561671
DisableEbsEncryptionByDefaultCommand,
16571672
DisableEbsEncryptionByDefaultCommandInput,
@@ -1762,6 +1777,11 @@ import {
17621777
DisassociateVpcCidrBlockCommandInput,
17631778
DisassociateVpcCidrBlockCommandOutput,
17641779
} from "./commands/DisassociateVpcCidrBlockCommand";
1780+
import {
1781+
EnableAddressTransferCommand,
1782+
EnableAddressTransferCommandInput,
1783+
EnableAddressTransferCommandOutput,
1784+
} from "./commands/EnableAddressTransferCommand";
17651785
import {
17661786
EnableEbsEncryptionByDefaultCommand,
17671787
EnableEbsEncryptionByDefaultCommandInput,
@@ -2678,6 +2698,38 @@ import { EC2Client } from "./EC2Client";
26782698
* </ul>
26792699
*/
26802700
export class EC2 extends EC2Client {
2701+
/**
2702+
* <p>Accepts an Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#using-instance-addressing-eips-transfer-accept">Accept a transferred Elastic IP address</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
2703+
*/
2704+
public acceptAddressTransfer(
2705+
args: AcceptAddressTransferCommandInput,
2706+
options?: __HttpHandlerOptions
2707+
): Promise<AcceptAddressTransferCommandOutput>;
2708+
public acceptAddressTransfer(
2709+
args: AcceptAddressTransferCommandInput,
2710+
cb: (err: any, data?: AcceptAddressTransferCommandOutput) => void
2711+
): void;
2712+
public acceptAddressTransfer(
2713+
args: AcceptAddressTransferCommandInput,
2714+
options: __HttpHandlerOptions,
2715+
cb: (err: any, data?: AcceptAddressTransferCommandOutput) => void
2716+
): void;
2717+
public acceptAddressTransfer(
2718+
args: AcceptAddressTransferCommandInput,
2719+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: AcceptAddressTransferCommandOutput) => void),
2720+
cb?: (err: any, data?: AcceptAddressTransferCommandOutput) => void
2721+
): Promise<AcceptAddressTransferCommandOutput> | void {
2722+
const command = new AcceptAddressTransferCommand(args);
2723+
if (typeof optionsOrCb === "function") {
2724+
this.send(command, optionsOrCb);
2725+
} else if (typeof cb === "function") {
2726+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2727+
this.send(command, optionsOrCb || {}, cb);
2728+
} else {
2729+
return this.send(command, optionsOrCb);
2730+
}
2731+
}
2732+
26812733
/**
26822734
* <p>Accepts the Convertible Reserved Instance exchange quote described in the <a>GetReservedInstancesExchangeQuote</a> call.</p>
26832735
*/
@@ -10118,6 +10170,38 @@ export class EC2 extends EC2Client {
1011810170
}
1011910171
}
1012010172

10173+
/**
10174+
* <p>Describes an Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro">Transfer Elastic IP addresses</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
10175+
*/
10176+
public describeAddressTransfers(
10177+
args: DescribeAddressTransfersCommandInput,
10178+
options?: __HttpHandlerOptions
10179+
): Promise<DescribeAddressTransfersCommandOutput>;
10180+
public describeAddressTransfers(
10181+
args: DescribeAddressTransfersCommandInput,
10182+
cb: (err: any, data?: DescribeAddressTransfersCommandOutput) => void
10183+
): void;
10184+
public describeAddressTransfers(
10185+
args: DescribeAddressTransfersCommandInput,
10186+
options: __HttpHandlerOptions,
10187+
cb: (err: any, data?: DescribeAddressTransfersCommandOutput) => void
10188+
): void;
10189+
public describeAddressTransfers(
10190+
args: DescribeAddressTransfersCommandInput,
10191+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeAddressTransfersCommandOutput) => void),
10192+
cb?: (err: any, data?: DescribeAddressTransfersCommandOutput) => void
10193+
): Promise<DescribeAddressTransfersCommandOutput> | void {
10194+
const command = new DescribeAddressTransfersCommand(args);
10195+
if (typeof optionsOrCb === "function") {
10196+
this.send(command, optionsOrCb);
10197+
} else if (typeof cb === "function") {
10198+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
10199+
this.send(command, optionsOrCb || {}, cb);
10200+
} else {
10201+
return this.send(command, optionsOrCb);
10202+
}
10203+
}
10204+
1012110205
/**
1012210206
* <p>Describes the longer ID format settings for all resource types in a specific
1012310207
* Region. This request is useful for performing a quick audit to determine whether a
@@ -14965,6 +15049,38 @@ export class EC2 extends EC2Client {
1496515049
}
1496615050
}
1496715051

15052+
/**
15053+
* <p>Disables Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro">Transfer Elastic IP addresses</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
15054+
*/
15055+
public disableAddressTransfer(
15056+
args: DisableAddressTransferCommandInput,
15057+
options?: __HttpHandlerOptions
15058+
): Promise<DisableAddressTransferCommandOutput>;
15059+
public disableAddressTransfer(
15060+
args: DisableAddressTransferCommandInput,
15061+
cb: (err: any, data?: DisableAddressTransferCommandOutput) => void
15062+
): void;
15063+
public disableAddressTransfer(
15064+
args: DisableAddressTransferCommandInput,
15065+
options: __HttpHandlerOptions,
15066+
cb: (err: any, data?: DisableAddressTransferCommandOutput) => void
15067+
): void;
15068+
public disableAddressTransfer(
15069+
args: DisableAddressTransferCommandInput,
15070+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisableAddressTransferCommandOutput) => void),
15071+
cb?: (err: any, data?: DisableAddressTransferCommandOutput) => void
15072+
): Promise<DisableAddressTransferCommandOutput> | void {
15073+
const command = new DisableAddressTransferCommand(args);
15074+
if (typeof optionsOrCb === "function") {
15075+
this.send(command, optionsOrCb);
15076+
} else if (typeof cb === "function") {
15077+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
15078+
this.send(command, optionsOrCb || {}, cb);
15079+
} else {
15080+
return this.send(command, optionsOrCb);
15081+
}
15082+
}
15083+
1496815084
/**
1496915085
* <p>Disables EBS encryption by default for your account in the current Region.</p>
1497015086
* <p>After you disable encryption by default, you can still create encrypted volumes by
@@ -15752,6 +15868,38 @@ export class EC2 extends EC2Client {
1575215868
}
1575315869
}
1575415870

15871+
/**
15872+
* <p>Enables Elastic IP address transfer. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro">Transfer Elastic IP addresses</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
15873+
*/
15874+
public enableAddressTransfer(
15875+
args: EnableAddressTransferCommandInput,
15876+
options?: __HttpHandlerOptions
15877+
): Promise<EnableAddressTransferCommandOutput>;
15878+
public enableAddressTransfer(
15879+
args: EnableAddressTransferCommandInput,
15880+
cb: (err: any, data?: EnableAddressTransferCommandOutput) => void
15881+
): void;
15882+
public enableAddressTransfer(
15883+
args: EnableAddressTransferCommandInput,
15884+
options: __HttpHandlerOptions,
15885+
cb: (err: any, data?: EnableAddressTransferCommandOutput) => void
15886+
): void;
15887+
public enableAddressTransfer(
15888+
args: EnableAddressTransferCommandInput,
15889+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: EnableAddressTransferCommandOutput) => void),
15890+
cb?: (err: any, data?: EnableAddressTransferCommandOutput) => void
15891+
): Promise<EnableAddressTransferCommandOutput> | void {
15892+
const command = new EnableAddressTransferCommand(args);
15893+
if (typeof optionsOrCb === "function") {
15894+
this.send(command, optionsOrCb);
15895+
} else if (typeof cb === "function") {
15896+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
15897+
this.send(command, optionsOrCb || {}, cb);
15898+
} else {
15899+
return this.send(command, optionsOrCb);
15900+
}
15901+
}
15902+
1575515903
/**
1575615904
* <p>Enables EBS encryption by default for your account in the current Region.</p>
1575715905
* <p>After you enable encryption by default, the EBS volumes that you create are

Diff for: clients/client-ec2/src/EC2Client.ts

+24
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ import {
4747
UserAgent as __UserAgent,
4848
} from "@aws-sdk/types";
4949

50+
import {
51+
AcceptAddressTransferCommandInput,
52+
AcceptAddressTransferCommandOutput,
53+
} from "./commands/AcceptAddressTransferCommand";
5054
import {
5155
AcceptReservedInstancesExchangeQuoteCommandInput,
5256
AcceptReservedInstancesExchangeQuoteCommandOutput,
@@ -675,6 +679,10 @@ import {
675679
DescribeAddressesAttributeCommandOutput,
676680
} from "./commands/DescribeAddressesAttributeCommand";
677681
import { DescribeAddressesCommandInput, DescribeAddressesCommandOutput } from "./commands/DescribeAddressesCommand";
682+
import {
683+
DescribeAddressTransfersCommandInput,
684+
DescribeAddressTransfersCommandOutput,
685+
} from "./commands/DescribeAddressTransfersCommand";
678686
import {
679687
DescribeAggregateIdFormatCommandInput,
680688
DescribeAggregateIdFormatCommandOutput,
@@ -1157,6 +1165,10 @@ import {
11571165
} from "./commands/DetachNetworkInterfaceCommand";
11581166
import { DetachVolumeCommandInput, DetachVolumeCommandOutput } from "./commands/DetachVolumeCommand";
11591167
import { DetachVpnGatewayCommandInput, DetachVpnGatewayCommandOutput } from "./commands/DetachVpnGatewayCommand";
1168+
import {
1169+
DisableAddressTransferCommandInput,
1170+
DisableAddressTransferCommandOutput,
1171+
} from "./commands/DisableAddressTransferCommand";
11601172
import {
11611173
DisableEbsEncryptionByDefaultCommandInput,
11621174
DisableEbsEncryptionByDefaultCommandOutput,
@@ -1242,6 +1254,10 @@ import {
12421254
DisassociateVpcCidrBlockCommandInput,
12431255
DisassociateVpcCidrBlockCommandOutput,
12441256
} from "./commands/DisassociateVpcCidrBlockCommand";
1257+
import {
1258+
EnableAddressTransferCommandInput,
1259+
EnableAddressTransferCommandOutput,
1260+
} from "./commands/EnableAddressTransferCommand";
12451261
import {
12461262
EnableEbsEncryptionByDefaultCommandInput,
12471263
EnableEbsEncryptionByDefaultCommandOutput,
@@ -1861,6 +1877,7 @@ import {
18611877
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
18621878

18631879
export type ServiceInputTypes =
1880+
| AcceptAddressTransferCommandInput
18641881
| AcceptReservedInstancesExchangeQuoteCommandInput
18651882
| AcceptTransitGatewayMulticastDomainAssociationsCommandInput
18661883
| AcceptTransitGatewayPeeringAttachmentCommandInput
@@ -2061,6 +2078,7 @@ export type ServiceInputTypes =
20612078
| DeregisterTransitGatewayMulticastGroupMembersCommandInput
20622079
| DeregisterTransitGatewayMulticastGroupSourcesCommandInput
20632080
| DescribeAccountAttributesCommandInput
2081+
| DescribeAddressTransfersCommandInput
20642082
| DescribeAddressesAttributeCommandInput
20652083
| DescribeAddressesCommandInput
20662084
| DescribeAggregateIdFormatCommandInput
@@ -2200,6 +2218,7 @@ export type ServiceInputTypes =
22002218
| DetachNetworkInterfaceCommandInput
22012219
| DetachVolumeCommandInput
22022220
| DetachVpnGatewayCommandInput
2221+
| DisableAddressTransferCommandInput
22032222
| DisableEbsEncryptionByDefaultCommandInput
22042223
| DisableFastLaunchCommandInput
22052224
| DisableFastSnapshotRestoresCommandInput
@@ -2222,6 +2241,7 @@ export type ServiceInputTypes =
22222241
| DisassociateTransitGatewayRouteTableCommandInput
22232242
| DisassociateTrunkInterfaceCommandInput
22242243
| DisassociateVpcCidrBlockCommandInput
2244+
| EnableAddressTransferCommandInput
22252245
| EnableEbsEncryptionByDefaultCommandInput
22262246
| EnableFastLaunchCommandInput
22272247
| EnableFastSnapshotRestoresCommandInput
@@ -2405,6 +2425,7 @@ export type ServiceInputTypes =
24052425
| WithdrawByoipCidrCommandInput;
24062426

24072427
export type ServiceOutputTypes =
2428+
| AcceptAddressTransferCommandOutput
24082429
| AcceptReservedInstancesExchangeQuoteCommandOutput
24092430
| AcceptTransitGatewayMulticastDomainAssociationsCommandOutput
24102431
| AcceptTransitGatewayPeeringAttachmentCommandOutput
@@ -2605,6 +2626,7 @@ export type ServiceOutputTypes =
26052626
| DeregisterTransitGatewayMulticastGroupMembersCommandOutput
26062627
| DeregisterTransitGatewayMulticastGroupSourcesCommandOutput
26072628
| DescribeAccountAttributesCommandOutput
2629+
| DescribeAddressTransfersCommandOutput
26082630
| DescribeAddressesAttributeCommandOutput
26092631
| DescribeAddressesCommandOutput
26102632
| DescribeAggregateIdFormatCommandOutput
@@ -2744,6 +2766,7 @@ export type ServiceOutputTypes =
27442766
| DetachNetworkInterfaceCommandOutput
27452767
| DetachVolumeCommandOutput
27462768
| DetachVpnGatewayCommandOutput
2769+
| DisableAddressTransferCommandOutput
27472770
| DisableEbsEncryptionByDefaultCommandOutput
27482771
| DisableFastLaunchCommandOutput
27492772
| DisableFastSnapshotRestoresCommandOutput
@@ -2766,6 +2789,7 @@ export type ServiceOutputTypes =
27662789
| DisassociateTransitGatewayRouteTableCommandOutput
27672790
| DisassociateTrunkInterfaceCommandOutput
27682791
| DisassociateVpcCidrBlockCommandOutput
2792+
| EnableAddressTransferCommandOutput
27692793
| EnableEbsEncryptionByDefaultCommandOutput
27702794
| EnableFastLaunchCommandOutput
27712795
| EnableFastSnapshotRestoresCommandOutput

0 commit comments

Comments
 (0)