Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must
specify its association ID. You can get the association ID by using
DescribeVpcs. You must detach or delete all gateways and resources that
are associated with the CIDR block before you can disassociate it.
You cannot disassociate the CIDR block with which you originally created the VPC (the
primary CIDR block).
example
Use a bare-bones client and the command you need to make an API call.
Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify its association ID. You can get the association ID by using DescribeVpcs. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.
You cannot disassociate the CIDR block with which you originally created the VPC (the primary CIDR block).
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DisassociateVpcCidrBlockCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DisassociateVpcCidrBlockCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DisassociateVpcCidrBlockCommand(input); const response = await client.send(command);
DisassociateVpcCidrBlockCommandInput for command's
input
shape.DisassociateVpcCidrBlockCommandOutput for command's
response
shape.config for EC2Client's
config
shape.