Detaches an internet gateway from a VPC, disabling connectivity between the internet
and the VPC. The VPC must not contain any running instances with Elastic IP addresses or
public IPv4 addresses.
example
Use a bare-bones client and the command you need to make an API call.
Detaches an internet gateway from a VPC, disabling connectivity between the internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DetachInternetGatewayCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DetachInternetGatewayCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DetachInternetGatewayCommand(input); const response = await client.send(command);
DetachInternetGatewayCommandInput for command's
input
shape.DetachInternetGatewayCommandOutput for command's
response
shape.config for EC2Client's
config
shape.