DeprovisionByoipCidrCommand

Releases the specified address range that you provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.

Before you can release an address range, you must stop advertising it using WithdrawByoipCidr and you must not have any IP addresses allocated from its address range.

Example Syntax

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

import { EC2Client, DeprovisionByoipCidrCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, DeprovisionByoipCidrCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // DeprovisionByoipCidrRequest
  Cidr: "STRING_VALUE", // required
  DryRun: true || false,
};
const command = new DeprovisionByoipCidrCommand(input);
const response = await client.send(command);
// { // DeprovisionByoipCidrResult
//   ByoipCidr: { // ByoipCidr
//     Cidr: "STRING_VALUE",
//     Description: "STRING_VALUE",
//     AsnAssociations: [ // AsnAssociationSet
//       { // AsnAssociation
//         Asn: "STRING_VALUE",
//         Cidr: "STRING_VALUE",
//         StatusMessage: "STRING_VALUE",
//         State: "disassociated" || "failed-disassociation" || "failed-association" || "pending-disassociation" || "pending-association" || "associated",
//       },
//     ],
//     StatusMessage: "STRING_VALUE",
//     State: "advertised" || "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned" || "provisioned-not-publicly-advertisable",
//     NetworkBorderGroup: "STRING_VALUE",
//   },
// };

DeprovisionByoipCidrCommand Input

Parameter
Type
Description
Cidr
Required
string | undefined

The address range, in CIDR notation. The prefix must be the same prefix that you specified when you provisioned the address range.

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.

DeprovisionByoipCidrCommand Output

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

Information about the address range.

Throws

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