release_address
async
¶
release_address(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
allocation_id: Optional[AllocationId] = None,
public_ip: Optional[String] = None,
network_border_group: Optional[String] = None,
dry_run: Optional[Boolean] = None,
) -> None
Releases the specified Elastic IP address.
[Default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. Alternatively, you can disassociate an Elastic IP address without releasing it.
[Nondefault VPC] You must disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse).
After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another Amazon Web Services account.
After you release an Elastic IP address, you might be able to recover it. For more information, see Release an Elastic IP address.
Parameters:
-
allocation_id(Optional[AllocationId], default:None) –The allocation ID. This parameter is required.
-
public_ip(Optional[String], default:None) –Deprecated.
-
network_border_group(Optional[String], default:None) –The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.
If you provide an incorrect network border group, you receive an
InvalidAddress.NotFounderror. -
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.
Examples:
To release an Elastic IP address This example releases the specified Elastic IP address.
Source code in docs_src/capo_ec2/_services/async_ec2.py
57458 57459 57460 57461 57462 57463 57464 57465 57466 57467 57468 57469 57470 57471 57472 57473 57474 57475 57476 57477 57478 57479 57480 57481 57482 57483 57484 57485 57486 57487 57488 57489 57490 57491 57492 57493 57494 57495 57496 57497 57498 57499 57500 57501 57502 57503 57504 57505 57506 57507 57508 57509 57510 57511 57512 57513 57514 57515 57516 57517 | |