create_customer_gateway ( $type, $ip_address, $bgp_asn, $opt )

Provides information to AWS about your customer gateway device. The customer gateway is the appliance at your end of the VPN connection (compared to the VPN gateway, which is the device at the AWS side of the VPN connection). You can have a single active customer gateway per AWS account (active means that you’ve created a VPN connection to use with the customer gateway). AWS might delete any customer gateway that you create with this operation if you leave it inactive for an extended period of time.

You must provide the Internet-routable IP address of the customer gateway’s external interface. The IP address must be static.

You must also provide the device’s Border Gateway Protocol (BGP) Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don’t have an ASN already, you can use a private ASN (in the 64512 - 65534 range). For more information about ASNs, go to http://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29.

Access

public

Parameters

Parameter

Type

Required

Description

$type

string

Required

The type of VPN connection this customer gateway supports.

$ip_address

string

Required

The Internet-routable IP address for the customer gateway’s outside interface. The address must be static

$bgp_asn

integer

Required

The customer gateway’s Border Gateway Protocol (BGP) Autonomous System Number (ASN).

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Create a new VPC customer gateway.

$ec2 = new AmazonEC2();

// IP: 1.1.1.1; Port: 65534
$response = $ec2->create_customer_gateway('ipsec.1', '1.1.1.1', '65534');

var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/ec2.class.php | Toggle source view (9 lines) | View on GitHub

public function create_customer_gateway($type, $ip_address, $bgp_asn, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['Type'] = $type;
    $opt['IpAddress'] = $ip_address;
    $opt['BgpAsn'] = $bgp_asn;
    
    return $this->authenticate('CreateCustomerGateway', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback