1VM::EC2::REST::elastic_Uispe(r3)Contributed Perl DocumenVtMa:t:iEoCn2::REST::elastic_ip(3)
2
3
4

NAME VM::EC2::REST::elastic_ip

SYNOPSIS

7        use VM::EC2 ':standard';
8

METHODS

10       The methods in this section allow you to allocate elastic IP addresses,
11       attach them to instances, and delete them. See VM::EC2::ElasticAddress.
12
13       Implemented:
14        AllocateAddress
15        AssociateAddress
16        DescribeAddresses
17        DissociateAddress
18        ReleaseAddress
19
20       Unimplemented:
21        (none)
22
23   @addr = $ec2->describe_addresses(@public_ips)
24   @addr =
25       $ec2->describe_addresses(-public_ip=>\@addr,-allocation_id=>\@id,-filter->\%filters)
26       Queries AWS for a list of elastic IP addresses already allocated to
27       you. All arguments are optional:
28
29        -public_ip     -- An IP address (in dotted format) or an arrayref of
30                          addresses to return information about.
31        -allocation_id -- An allocation ID or arrayref of such IDs. Only
32                          applicable to VPC addresses.
33        -filter        -- A hashref of tag=>value pairs to filter the response
34                          on.
35
36       The list of applicable filters can be found at
37       http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html.
38
39       This method returns a list of VM::EC2::ElasticAddress.
40
41   $address_info = $ec2->allocate_address([-vpc=>1])
42       Request an elastic IP address. Pass -vpc=>1 to allocate a VPC elastic
43       address. The return object is a VM::EC2::ElasticAddress.
44
45   $boolean = $ec2->release_address($addr)
46       Release an elastic IP address. For non-VPC addresses, you may provide
47       either an IP address string, or a VM::EC2::ElasticAddress. For VPC
48       addresses, you must obtain a VM::EC2::ElasticAddress first (e.g. with
49       describe_addresses) and then pass that to the method.
50
51   $result = $ec2->associate_address($elastic_addr => $instance_id)
52       Associate an elastic address with an instance id. Both arguments are
53       mandatory. If you are associating a VPC elastic IP address with the
54       instance, the result code will indicate the associationId. Otherwise it
55       will be a simple perl truth value ("1") if successful, undef if false.
56
57       If this is an ordinary EC2 Elastic IP address, the first argument may
58       either be an ordinary string (xx.xx.xx.xx format) or a
59       VM::EC2::ElasticAddress object. However, if it is a VPC elastic IP
60       address, then the argument must be a VM::EC2::ElasticAddress as
61       returned by describe_addresses(). The reason for this is that the
62       allocationId must be retrieved from the object in order to use in the
63       call.
64
65   $bool = $ec2->disassociate_address($elastic_addr)
66       Disassociate an elastic address from whatever instance it is currently
67       associated with, if any. The result will be true if disassociation was
68       successful.
69
70       If this is an ordinary EC2 Elastic IP address, the argument may either
71       be an ordinary string (xx.xx.xx.xx format) or a VM::EC2::ElasticAddress
72       object. However, if it is a VPC elastic IP address, then the argument
73       must be a VM::EC2::ElasticAddress as returned by describe_addresses().
74       The reason for this is that the allocationId must be retrieved from the
75       object in order to use in the call.
76

SEE ALSO

78       VM::EC2
79

AUTHOR

81       Lincoln Stein <lincoln.stein@gmail.com>.
82
83       Copyright (c) 2011 Ontario Institute for Cancer Research
84
85       This package and its accompanying libraries is free software; you can
86       redistribute it and/or modify it under the terms of the GPL (either
87       version 1, or at your option, any later version) or the Artistic
88       License 2.0.  Refer to LICENSE for the full license text. In addition,
89       please see DISCLAIMER.txt for disclaimers of warranty.
90
91
92
93perl v5.30.0                      2019-07-26      VM::EC2::REST::elastic_ip(3)
Impressum