detach_internet_gateway
¶
detach_internet_gateway(
*,
config_overrides: Optional[EC2ClientConfig] = 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/ec2.py
38285 38286 38287 38288 38289 38290 38291 38292 38293 38294 38295 38296 38297 38298 38299 38300 38301 38302 38303 38304 38305 38306 38307 38308 38309 38310 38311 38312 38313 38314 38315 38316 38317 38318 38319 38320 38321 38322 38323 38324 38325 38326 38327 38328 38329 38330 38331 38332 38333 38334 38335 38336 38337 38338 38339 38340 38341 | |