1VM::EC2::VPC(3) User Contributed Perl Documentation VM::EC2::VPC(3)
2
3
4
6 VM::EC2::VPC
7
9 use VM::EC2;
10 $ec2 - VM::EC2->new(...);
11 $vpc = $ec2->create_vpc('10.0.0.0/16') or die $ec2->error_str;
12 $subnet1 = $vpc->create_subnet('10.0.0.0/24') or die $vpc->error_str;
13 $gateway = $vpc->create_internet_gateway or die $vpc->error_str;
14 $routeTbl = $subnet1->create_route_table or die $vpc->error_str;
15 $routeTbl->create_route('0.0.0.0/0' => $gateway) or die $vpc->error_str;
16
18 Please see VM::EC2::Generic for methods shared by all VM::EC2 objects.
19
21 These object methods are supported:
22
23 vpcId -- ID of the VPC
24 state -- Current state of the VPC (pending, available)
25 cidrBlock -- The CIDR block the VPC covers.
26 dhcpOptionsId -- The ID of the set of DHCP options you've associated
27 with the VPC, or "default".
28 instanceTenancy -- Either "dedicated" or "default"
29 isDefault -- Indicates if the VPC is a default VPC
30
31 In addition, this object supports the following convenience methods:
32
33 dhcp_options() -- Return a VM::EC2::VPC::DhcpOptions object.
34
35 current_state() -- Refresh the object and then return its state
36
37 current_status() -- Same as above (for module consistency)
38
39 set_dhcp_options($options) -- Associate the Dhcp option set with
40 this VPC (DhcpOptionsId string or VM::EC2::VPC::DhcpOptions object).
41 Use "default" or pass no arguments to assign no Dhcp options.
42
43 internet_gateways() -- Return the list of internet gateways attached to
44 this VPC as a list of VM::EC2::VPC::InternetGateway.
45
46 create_subnet($cidr_block [,$availability_zone] )
47 -- Create a subnet with the indicated CIDR block and
48 return the VM::EC2::VPC::Subnet object. The
49 optional $availability_zone argument selects the
50 zone for the subnet. Otherwise Amazon selects one
51 for you.
52
53 create_internet_gateway()
54 -- Create an internet gateway and immediately attach
55 it to this VPC. If successful returns a
56 VM::EC2::VPC::InternetGateway object.
57
58 subnets() -- Return the list of subnets attached to this VPC
59 as a list of VM::EC2::VPC::Subnet.
60
61 route_tables() -- Return the list of route tables attached to this VPC
62 as a list of VM::EC2::VPC::RouteTable.
63
65 When used in a string context, this object will be interpolated as the
66 VPC ID.
67
69 VM::EC2 VM::EC2::Generic
70
72 Lincoln Stein <lincoln.stein@gmail.com>.
73
74 Copyright (c) 2012 Ontario Institute for Cancer Research
75
76 This package and its accompanying libraries is free software; you can
77 redistribute it and/or modify it under the terms of the GPL (either
78 version 1, or at your option, any later version) or the Artistic
79 License 2.0. Refer to LICENSE for the full license text. In addition,
80 please see DISCLAIMER.txt for disclaimers of warranty.
81
82
83
84perl v5.28.0 2018-07-15 VM::EC2::VPC(3)