1VM::EC2::REST::vpc(3) User Contributed Perl DocumentationVM::EC2::REST::vpc(3)
2
3
4

NAME VM::EC2::REST::vpc

SYNOPSIS

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

METHODS

10       EC2 virtual private clouds (VPCs) provide facilities for creating
11       tiered applications combining public and private subnetworks, and for
12       extending your home/corporate network into the cloud.
13
14       Implemented:
15        AcceptVpcPeeringConnection
16        CreateVpc
17        CreateVpcPeeringConnection
18        DeleteVpc
19        DeleteVpcPeeringConnection
20        DescribeVpcPeeringConnections
21        DescribeVpcs
22        DescribeVpcAttribute
23        ModifyVpcAttribute
24        RejectVpcPeeringConnection
25
26       Unimplemented:
27        (none)
28
29   $vpx = $ec2->accept_vpc_peering_connection(-vpc_peering_connection_id =>
30       $id)
31   $vpx = $ec2->accept_vpc_peering_connection($id)
32       Accepts a VPC peering connection request. To accept a request, the VPC
33       peering connection must be in the pending-acceptance state, and the
34       request must come from the owner of the peer VPC.  Use
35       describe_vpc_peering_connections(-filter => { 'status-code' =>
36       'pending-acceptance' }) to view outstanding VPC peering connection
37       requests.
38
39       Required arguments:
40
41        -vpc_peering_connection_id    -- The ID of the VPC peering connection
42
43       Returns a VM::EC2::VPC::PeeringConnection object.
44
45   $vpc = $ec2->create_vpc(-cidr_block=>$cidr,-instance_tenancy=>$tenancy)
46       Create a new VPC. This can be called with a single argument, in which
47       case it is interpreted as the desired CIDR block, or
48
49        $vpc = $ec2->$ec2->create_vpc('10.0.0.0/16') or die $ec2->error_str;
50
51       Or it can be called with named arguments.
52
53       Required arguments:
54
55        -cidr_block         The Classless Internet Domain Routing address, in the
56                            form xx.xx.xx.xx/xx. One or more subnets will be allocated
57                            from within this block.
58
59       Optional arguments:
60
61        -instance_tenancy   "default" or "dedicated". The latter requests AWS to
62                            launch all your instances in the VPC on single-tenant
63                            hardware (at additional cost).
64
65       See
66       http://docs.amazonwebservices.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html
67       for a description of the valid CIDRs that can be used with EC2.
68
69       On success, this method will return a new VM::EC2::VPC object. You can
70       then use this object to create new subnets within the VPC:
71
72        $vpc     = $ec2->create_vpc('10.0.0.0/16')    or die $ec2->error_str;
73        $subnet1 = $vpc->create_subnet('10.0.0.0/24') or die $vpc->error_str;
74        $subnet2 = $vpc->create_subnet('10.0.1.0/24') or die $vpc->error_str;
75        $subnet3 = $vpc->create_subnet('10.0.2.0/24') or die $vpc->error_str;
76
77   $pcx = $ec2->create_vpc_peering_connection(-vpc_id        => $vpc_id,
78       -peer_vpc_id   => $peer_id, -peer_owner_id => $owner_id)
79       Requests a VPC peering connection between two VPCs: a requester VPC and
80       a peer VPC with which to create the connection. The peer VPC can belong
81       to another AWS account. The requester VPC and peer VPC must not have
82       overlapping CIDR blocks.
83
84       The owner of the peer VPC must accept the peering request to activate
85       the peering connection. The VPC peering connection request expires
86       after seven days, after which it cannot be accepted or rejected.
87
88       Required arguments:
89
90        -vpc_id           The ID of the requester VPC
91
92        -peer_vpc_id      The ID of the VPC with which the peering connection is to be
93                          made
94
95       Conditional arguments:
96
97        -peer_owner_id    The AWS account ID of the owner of the peer VPC
98                          Required if the peer VPC is not in the same account as the
99                          requester VPC
100
101       Returns a VM::EC2::VPC::PeeringConnection object.
102
103   @vpc = $ec2->describe_vpcs(@vpc_ids)
104   @vpc = $ec2->describe_vpcs(\%filter)
105   @vpc = $ec2->describe_vpcs(-vpc_id=>\@list,-filter=>\%filter)
106       Describe VPCs that you own and return a list of VM::EC2::VPC objects.
107       Call with no arguments to return all VPCs, or provide a list of VPC IDs
108       to return information on those only. You may also provide a filter
109       list, or named argument forms.
110
111       Optional arguments:
112
113        -vpc_id      A scalar or array ref containing the VPC IDs you want
114                     information on.
115
116        -filter      A hashref of filters to apply to the query.
117
118       The filters you can use are described at
119       http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVpcs.html
120
121   @vpx = $ec2->describe_vpc_peering_connections(@vpx_ids)
122   @vpx = $ec2->describe_vpc_peering_connections(\%filter)
123   @vpx =
124       $ec2->describe_vpc_peering_connections(vpc_peering_connection_id=>\@list,-filter=>\%filter)
125       Describes one or more of your VPC peering connections.
126
127       Optional arguments:
128
129        -vpc_peering_connection_id    A scalar or array ref containing the VPC IDs you want
130                                      information on.
131
132        -filter                       A hashref of filters to apply to the query.
133
134       The filters you can use are described at
135       http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVpcPeeringConnections.html
136
137       Returns a scalar or array of VM::EC2::VPC::PeeringConnection objects.
138
139   $success = $ec2->delete_vpc($vpc_id)
140   $success = $ec2->delete_vpc(-vpc_id=>$vpc_id)
141       Delete the indicated VPC, returning true if successful.
142
143   $success = $ec2->delete_vpc_peering_connection(-vpc_peering_connection_id
144       => $id)
145   $success = $ec2->delete_vpc_peering_connection($id)
146       Deletes a VPC peering connection. Either the owner of the requester VPC
147       or the owner of the peer VPC can delete the VPC peering connection if
148       it's in the 'active' state. The owner of the requester VPC can delete a
149       VPC peering connection in the 'pending-acceptance' state.
150
151       Required arguments:
152
153        -vpc_peering_connection_id    The ID of the VPC peering connection to delete
154
155       Returns true if the deletion was successful.
156
157   $attr = $ec2->describe_vpc_attribute(-vpc_id => $id, -attribute => $attr)
158       Describes an attribute of the specified VPC.
159
160       Required arguments:
161
162        -vpc_id                  The ID of the VPC.
163
164        -attribute               The VPC attribute.
165                                 Valid values:
166                                 enableDnsSupport | enableDnsHostnames
167
168       Returns true if attribute is set.
169
170   $success = $ec2->modify_vpc_attribute(-vpc_id               => $id,
171       -enable_dns_support   => $boolen, -enable_dns_hostnames => $boolean)
172       Modify attributes of a VPC.
173
174       Required Arguments:
175
176        -vpc_id                  The ID of the VPC.
177
178       One or more of the following arguments is required:
179
180        -enable_dns_support      Specifies whether the DNS server provided
181                                 by Amazon is enabled for the VPC.
182
183        -enable_dns_hostnames    Specifies whether DNS hostnames are provided
184                                 for the instances launched in this VPC. You
185                                 can only set this attribute to true if
186                                 -enable_dns_support is also true.
187
188       Returns true on success.
189
190   $success = $ec2->reject_vpc_peering_connection(-vpc_peering_connection_id
191       => $id)
192       Rejects a VPC peering connection request. The VPC peering connection
193       must be in the 'pending-acceptance' state.  Use
194       describe_vpc_peering_connections(-filter => { 'status-code' =>
195       'pending-acceptance' }) to view outstanding VPC peering connection
196       requests.
197
198       Required arguments:
199
200        -vpc_peering_connection_id    The ID of the VPC peering connection to delete
201
202       Returns true if the deletion was successful.
203

SEE ALSO

205       VM::EC2
206

AUTHOR

208       Lincoln Stein <lincoln.stein@gmail.com>.
209
210       Copyright (c) 2011 Ontario Institute for Cancer Research
211
212       Lance Kinley <lkinley@loyaltymethods.com>
213
214       Copyright (c) 2014 Loyalty Methods, Inc.
215
216       This package and its accompanying libraries is free software; you can
217       redistribute it and/or modify it under the terms of the GPL (either
218       version 1, or at your option, any later version) or the Artistic
219       License 2.0.  Refer to LICENSE for the full license text. In addition,
220       please see DISCLAIMER.txt for disclaimers of warranty.
221
222
223
224perl v5.30.1                      2020-02-07             VM::EC2::REST::vpc(3)
Impressum