disassociate_nat_gateway_address
async
¶
disassociate_nat_gateway_address(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
nat_gateway_id: Optional[NatGatewayId] = None,
association_ids: Optional[EipAssociationIdList] = None,
max_drain_duration_seconds: Optional[DrainSeconds] = None,
dry_run: Optional[Boolean] = None,
) -> DisassociateNatGatewayAddressResult
Disassociates secondary Elastic IP addresses (EIPs) from a public NAT gateway. You cannot disassociate your primary EIP. For more information, see Edit secondary IP address associations in the Amazon VPC User Guide.
While disassociating is in progress, you cannot associate/disassociate additional EIPs while the connections are being drained. You are, however, allowed to delete the NAT gateway.
An EIP is released only at the end of MaxDrainDurationSeconds. It stays associated and supports the existing connections but does not support any new connections (new connections are distributed across the remaining associated EIPs). As the existing connections drain out, the EIPs (and the corresponding private IP addresses mapped to them) are released.
Parameters:
-
nat_gateway_id(Optional[NatGatewayId], default:None) –The ID of the NAT gateway.
-
association_ids(Optional[EipAssociationIdList], default:None) –The association IDs of EIPs that have been associated with the NAT gateway.
-
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/async_ec2.py
40758 40759 40760 40761 40762 40763 40764 40765 40766 40767 40768 40769 40770 40771 40772 40773 40774 40775 40776 40777 40778 40779 40780 40781 40782 40783 40784 40785 40786 40787 40788 40789 40790 40791 40792 40793 40794 40795 40796 40797 40798 40799 40800 40801 40802 40803 40804 40805 40806 40807 40808 40809 40810 40811 40812 40813 40814 40815 40816 40817 | |