allocate_ip: Allocate/Release IP Addresses

Description Usage Arguments Details Value References See Also Examples

View source: R/ip.R

Description

Allocate or release VPC or standard IP Address

Usage

1
2
3
allocate_ip(domain = c("vpc", "standard"), ...)

release_ip(ip, ...)

Arguments

domain

Optionally, a character string specifying “vpc” or “standard”.

...

Additional arguments passed to [ec2HTTP()].

ip

An object of class “ec2_ip” or an allocationId (for a VPC IP) or publicIp (for a standard IP).

Details

This function is used to allocate IP addresses either to EC2 classic (if it is available on your account; see account_attrs()) or on a Virtual Private Cloud (VPC). The default for new AWS EC2 accounts is only to be able to create VPC configurations. Due to limitations in the IPv4 universe, users are typically restricted to 5 IP addresses, which can dynamically be allocated to instances via a VPC. Use associate_ip()/disassociate_ip() to link an IP address to a specific instance.

Value

For allocate_ip, a list containing the IP address. For release_ip, a logical.

References

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AllocateAddress.html http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReleaseAddress.html

See Also

associate_ip(), describe_ips(), release_ip(), make_ip_vpc()/make_ip_classic()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# create a classic/"standard" IP address
a1 <- allocate_ip("standard")
release_ip(a1$publicIp)

# create a VPC IP address
a2 <- allocate_ip("vpc")
release_ip(a2$allocationId)

## End(Not run)

HanjoStudy/awsR documentation built on May 6, 2019, 9:06 a.m.