AWS SDK for .NET Documentation
DetachInternetGateway Method (request)
Amazon ► Amazon.EC2 ► AmazonEC2Client ► DetachInternetGateway(DetachInternetGatewayRequest)
Did this page help you? Yes No Tell us about it...
Detaches an Internet gateway from a VPC, disabling connectivity between the Internet and the VPC.
Declaration Syntax

C#

    public DetachInternetGatewayResponse DetachInternetGateway(
    	DetachInternetGatewayRequest request
    )

Parameters

request (DetachInternetGatewayRequest)
  Detach Internet Gateway request

Return Value
Detach Internet Gateway Response from the service
Remarks
The VPC must not contain any running instances with elastic IP addresses. For more information about your VPC and Internet gateway, go to Amazon Virtual Private Cloud User Guide.
Exceptions

Exception | Condition
--- | ---
WebException |
AmazonEC2Exception |

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)