detach_internet_gateway
async
¶
detach_internet_gateway(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
internet_gateway_id: Optional[InternetGatewayId] = None,
vpc_id: Optional[VpcId] = None,
) -> None
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.
Parameters:
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation. -
internet_gateway_id(Optional[InternetGatewayId], default:None) –The ID of the internet gateway.
-
vpc_id(Optional[VpcId], default:None) –The ID of the VPC.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To detach an Internet gateway from a VPC This example detaches the specified Internet gateway from the specified VPC.
Source code in docs_src/capo_ec2/_services/async_ec2.py
38788 38789 38790 38791 38792 38793 38794 38795 38796 38797 38798 38799 38800 38801 38802 38803 38804 38805 38806 38807 38808 38809 38810 38811 38812 38813 38814 38815 38816 38817 38818 38819 38820 38821 38822 38823 38824 38825 38826 38827 38828 38829 38830 38831 38832 38833 38834 38835 38836 38837 38838 38839 38840 38841 38842 38843 38844 38845 | |