EnableAddressTransferCommand

Enables Elastic IP address transfer. For more information, see Transfer Elastic IP addresses  in the Amazon VPC User Guide.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, EnableAddressTransferCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, EnableAddressTransferCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // EnableAddressTransferRequest
  AllocationId: "STRING_VALUE", // required
  TransferAccountId: "STRING_VALUE", // required
  DryRun: true || false,
};
const command = new EnableAddressTransferCommand(input);
const response = await client.send(command);
// { // EnableAddressTransferResult
//   AddressTransfer: { // AddressTransfer
//     PublicIp: "STRING_VALUE",
//     AllocationId: "STRING_VALUE",
//     TransferAccountId: "STRING_VALUE",
//     TransferOfferExpirationTimestamp: new Date("TIMESTAMP"),
//     TransferOfferAcceptedTimestamp: new Date("TIMESTAMP"),
//     AddressTransferStatus: "pending" || "disabled" || "accepted",
//   },
// };

EnableAddressTransferCommand Input

Parameter
Type
Description
AllocationId
Required
string | undefined

The allocation ID of an Elastic IP address.

TransferAccountId
Required
string | undefined

The ID of the account that you want to transfer the Elastic IP address to.

DryRun
boolean | undefined

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

EnableAddressTransferCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
AddressTransfer
AddressTransfer | undefined

An Elastic IP address transfer.

Throws

Name
Fault
Details
EC2ServiceException
Base exception class for all service exceptions from EC2 service.