The following code examples show how to use DeleteInternetGateway
.
- AWS CLI
-
To delete an internet gateway
The following
delete-internet-gateway
example deletes the specified internet gateway.aws ec2 delete-internet-gateway \ --internet-gateway-id
igw-0d0fb496b3EXAMPLE
This command produces no output.
For more information, see Internet gateways in the Amazon VPC User Guide.
-
For API details, see DeleteInternetGateway
in AWS CLI Command Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Create Amazon EC2 resources using an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.