Disassociates an Elastic IP address from the instance or network interface it's associated with.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.
ec2_disassociate_address(AssociationId, PublicIp, DryRun)
An empty list.
[EC2-VPC] The association ID. Required for EC2-VPC.
[EC2-Classic] The Elastic IP address. Required for EC2-Classic.
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 is UnauthorizedOperation
.
svc$disassociate_address(
AssociationId = "string",
PublicIp = "string",
DryRun = TRUE|FALSE
)
if (FALSE) {
# This example disassociates an Elastic IP address from an instance in a
# VPC.
svc$disassociate_address(
AssociationId = "eipassoc-2bebb745"
)
# This example disassociates an Elastic IP address from an instance in
# EC2-Classic.
svc$disassociate_address(
PublicIp = "198.51.100.0"
)
}
Run the code above in your browser using DataLab