unassign_private_nat_gateway_address
¶
unassign_private_nat_gateway_address(
*,
config_overrides: Optional[EC2ClientConfig] = None,
nat_gateway_id: Optional[NatGatewayId] = None,
private_ip_addresses: Optional[IpList] = None,
max_drain_duration_seconds: Optional[DrainSeconds] = None,
dry_run: Optional[Boolean] = None,
) -> UnassignPrivateNatGatewayAddressResult
Unassigns secondary private IPv4 addresses from a private NAT gateway. You cannot unassign your primary private IP. For more information, see Edit secondary IP address associations in the Amazon VPC User Guide.
While unassigning is in progress, you cannot assign/unassign additional IP addresses while the connections are being drained. You are, however, allowed to delete the NAT gateway.
A private IP address will only be released at the end of MaxDrainDurationSeconds. The private IP addresses stay associated and support the existing connections, but do not support any new connections (new connections are distributed across the remaining assigned private IP address). After the existing connections drain out, the private IP addresses are released.
Parameters:
-
nat_gateway_id(Optional[NatGatewayId], default:None) –The ID of the NAT gateway.
-
private_ip_addresses(Optional[IpList], default:None) –The private IPv4 addresses you want to unassign.
-
max_drain_duration_seconds(Optional[DrainSeconds], default:None) –The maximum amount of time to wait (in seconds) before forcibly releasing the IP addresses if connections are still in progress. Default value is 350 seconds.
-
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.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
59968 59969 59970 59971 59972 59973 59974 59975 59976 59977 59978 59979 59980 59981 59982 59983 59984 59985 59986 59987 59988 59989 59990 59991 59992 59993 59994 59995 59996 59997 59998 59999 60000 60001 60002 60003 60004 60005 60006 60007 60008 60009 60010 60011 60012 60013 60014 60015 60016 60017 60018 60019 60020 60021 60022 60023 60024 | |