1VM::EC2::VPC::Subnet(3)User Contributed Perl DocumentatioVnM::EC2::VPC::Subnet(3)
2
3
4

NAME

6       VM::EC2::VPC::Subnet -- A VPC subnet
7

SYNOPSIS

9        use VM::EC2;
10        my $ec2     = VM::EC2->new(...);
11        my $vpc     = $ec2->create_vpc('10.0.0.0/16');
12        my $subnet  = $vpc->create_subnet('10.0.0.0/24')  or die $vpc->error_str;
13        @subnets    = $ec2->describe_subnets;
14
15        for my $sn (@subnets) {
16           print $sn->subnetId,"\n",
17                 $sn->state,"\n",
18                 $sn->vpcId,"\n",
19                 $sn->cidrBlock,"\n",
20                 $sn->availableIpAddressCount,"\n",
21                 $sn->availabilityZone,"\n";
22        }
23

DESCRIPTION

25       This object supports the EC2 Virtual Private Cloud subnet interface.
26       Please see VM::EC2::Generic for methods shared by all VM::EC2 objects.
27

METHODS

29       These object methods are supported:
30
31        subnetId   -- the ID of the subnet
32        state      -- The current state of the subnet, either "pending" or "available"
33        vpcId      -- The ID of the VPC the subnet is in.
34        cidrBlock  -- The CIDR block assigned to the subnet.
35        availableIpAddressCount -- The number of unused IP addresses in the subnet.
36        availableZone -- This subnet's availability zone.
37        defaultForAz  -- Indicates if this is the default subnet for the Availability Zone
38        mapPublicIpOnLaunch -- Indicates if instances launched in this subnet automatically receive a
39                               public IP address
40
41       This class supports the VM::EC2 tagging interface. See VM::EC2::Generic
42       for information.
43
44       In addition, this object supports the following convenience methods:
45
46        vpc()                -- Return the associated VM::EC2::VPC object.
47        zone()               -- Return the associated VM::EC2::AvailabilityZone object.
48        refresh()            -- Refreshes the object from its current state in EC2.
49        current_state()      -- Refreshes the object and returns its current state.
50        create_route_table() -- Create a new route table, associates it with this subnet, and
51                                returns the corresponding VM::EC2::VPC::RouteTable
52                                object.
53        associate_route_table($table)
54                             -- Associates a route table with this subnet, returning true if
55                                sucessful.
56        disassociate_route_table($table)
57                             -- Removes the association of a route table with this subnet. Produces
58                                a fatal error if $table is not associated with the subnet. Returns true
59                                on success.
60        associate_network_acl($network_acl_id)
61                             -- Associates a network ACL with this subnet, returning the new
62                                association ID on success.
63        disassociate_network_acl()
64                             -- Removes the association of a network ACL with this subnet. The subnet
65                                will then be associated with the default network ACL.  Returns the
66                                the association ID.
67

STRING OVERLOADING

69       When used in a string context, this object will be interpolated as the
70       subnet ID.
71

SEE ALSO

73       VM::EC2 VM::EC2::Generic
74

AUTHOR

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