| 1 | package VM::EC2::VPC::CustomerGateway; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::VPC::CustomerGateway - Object describing an Amazon EC2 | ||
| 6 | Virtual Private Cloud customer gateway | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | use VM::EC2; | ||
| 11 | |||
| 12 | my $ec2 = VM::EC2->new(...); | ||
| 13 | my $gtwy = $ec2->describe_customer_gateways(-customer_gatway_id=>'cgw-12345678'); | ||
| 14 | print $gtwy->ipAddress,"\n", | ||
| 15 | $gtwy->state,"\n"; | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | This object represents an Amazon EC2 VPC route, and is returned by | ||
| 20 | VM::EC2->describe_customer_gateways() and ->create_customer_gateway() | ||
| 21 | |||
| 22 | =head1 METHODS | ||
| 23 | |||
| 24 | These object methods are supported: | ||
| 25 | |||
| 26 | customerGatewayId -- The ID of the customer gateway. | ||
| 27 | state -- The current state of the customer gateway. | ||
| 28 | Valid values: pending | available | deleting | deleted | ||
| 29 | type -- The type of VPN connection the customer gateway | ||
| 30 | supports (ipsec.1). | ||
| 31 | ipAddress -- The Internet-routable IP address of the customer | ||
| 32 | gateway's outside interface. | ||
| 33 | bgpAsn -- The customer gateway's Border Gateway Protocol (BGP) | ||
| 34 | Autonomous System Number (ASN). | ||
| 35 | tagSet -- Tags assigned to the resource. | ||
| 36 | |||
| 37 | The object also supports the tags() method described in | ||
| 38 | L<VM::EC2::Generic>: | ||
| 39 | |||
| 40 | =head1 STRING OVERLOADING | ||
| 41 | |||
| 42 | When used in a string context, this object will interpolate the | ||
| 43 | customerGatewayId. | ||
| 44 | |||
| 45 | =head1 SEE ALSO | ||
| 46 | |||
| 47 | L<VM::EC2> | ||
| 48 | L<VM::EC2::Generic> | ||
| 49 | L<VM::EC2::Tag> | ||
| 50 | L<VM::EC2::VPC> | ||
| 51 | |||
| 52 | =head1 AUTHOR | ||
| 53 | |||
| 54 | Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>. | ||
| 55 | |||
| 56 | Copyright (c) 2012 Loyalty Methods, Inc. | ||
| 57 | |||
| 58 | This package and its accompanying libraries is free software; you can | ||
| 59 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 60 | version 1, or at your option, any later version) or the Artistic | ||
| 61 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 62 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 63 | |||
| 64 | =cut | ||
| 65 | |||
| 66 | use strict; | ||
| 67 | use base 'VM::EC2::Generic'; | ||
| 68 | use Carp 'croak'; | ||
| 69 | |||
| 70 | sub primary_id { shift->customerGatewayId} | ||
| 71 | |||
| 72 | sub valid_fields { | ||
| 73 | my $self = shift; | ||
| 74 | return qw(customerGatewayId state type ipAddress bgpAsn tagSet); | ||
| 75 | } | ||
| 76 | |||
| 77 | 1; |