Love Liu Yan How to create a NAT gateway

Source: Internet
Author: User
Tags error code range

  To create a NAT gateway

Describe

Creates a NAT gateway in the specified VPC.

Some notes:

Nat Gateways and "Self-built Snat gateways" (using an ECS as Snat Gateway) are not currently supported in VPC, and if so, undefined product behavior is generated (this usage will be supported in future product iterations)

When the Nat gateway is created, a "0.0.0.0->natgateway_id" system route appears in the routing table to ensure that messages that need to be forwarded by the Nat gateway to the public network can be forwarded by the router to the NAT network.

Natgateway creation failed when a custom route "0.0.0.0/0-> an ECS" already exists in the routing table;

Request parameters

name type whether you must Description
Action String Is System specified parameters, values: Creaenatgateway
RegionID String Is The region where the Natgateway was created
Vpcid String Is In which VPC to create the Natgateway
Bandwidthpackage.n.ipcount Integer Specify at least one Number of public network IP in nth bandwidth packet (n is currently only 1)
Value range: 1-50
Bandwidthpackage.n.bandwidth Integer Specify at least one Bandwidth value of nth bandwidth packet (n is currently only 1)
Value range: 5-5000
Bandwidthpackage.n.zone String Whether The available area of the nth bandwidth packet (n is currently only 1)
When this parameter is not specified, the system randomly selects the available extents for allocation. n the IP on the shared bandwidth packet is not in the same usable area as the back-end ECS, it does not affect its connectivity, but it can achieve a more extreme latancy performance when it is located in a total usable area.
Name String Whether The display name of the instance, [2, 128] English or Chinese characters, must begin with a size letter or a Mandarin, can contain numbers, ".", "_" or "-".
The instance name is displayed in the console. N If this argument is not specified, the INSTANCEIDN with the default value instance cannot begin with http://and https://.
Description String Whether Custom description [[2, 256] characters, the instance description is displayed in the console. Blank if not filled, default is empty. Can't start with http://and https://.
Clienttoken String Whether Used to guarantee the power of the request. This parameter value is generated by the client to ensure that it is unique between requests and that the maximum is not worth 64 ASCII characters.
See Appendix for details

return parameters

name type Description
Natgatewayid String Natgateway instance ID, generated by the system, globally unique. Is the unique identification of the access instance
Forwardtableids Array List of IDs for Port forwarding publications
Bandwidthpackageids Array ID List of bandwidth packages created together

Error code

Error code Description Http Status Code Semantics
Invalidregionid.notfound Specified value of "RegionID" is not supported. 404 The specified Region does not exist
Invalidzoneid.notfound Specified value of ZoneID is not supported. 404 The specified ZoneID does not exist
Invalidvpcid.notfound Specified value of ZoneID isn't found in our record. 404 The specified VPC does not exist
Missingparameter.bandwidthpackage At least 1 Bandwidthpackage must is created with Natgateway. 400 At least one shared bandwidth package needs to be created with NATGW
Missingparameter.bandwidthpackage.n.ipcount Missing parameter Ipcount in bandwidth N. 400 Nth Bandwidth packet parameter incomplete, unspecified Ipcount
Missingparameter.bandwidthpackage.n.bandwidth (n need to give a specific value) Missing parameter Bandwidth in bandwidthpackage N. (n need to give a specific value) 400 Nth Bandwidth packet parameter incomplete, unspecified Ipcount
quotaexceeded.natgatewaycountinonevpc Natgateway count limit in one VPC exceeded. 400 There is only one natgateway in a VPC.
routerentryconflict.duplicated A Route entry already exists, which CIDR is ' 0.0.0.0/0 ' 400 Cannot add natgateway when a custom route with ' 0.0.0.0/0 ' exists in the routing table

Example

Request sample

https://ecs.aliyuncs.com/? Signatureversion=1.0&vpcid=vpc-11af8lp67&name=mynatgw&format=json&timestamp=2016-05-23t03%3a26 %3a21z&bandwidthpackage.1.ipcount=5&regionid=cn-shanghai&accesskeyid=jzgi0oyrq6ihgkp9& signaturemethod=hmac-sha1&version=2014-05-26&signature=i4kkhwgjjdimtqk4rcifab3lblw%3d&action= createnatgateway&signaturenonce=1ebae49c-2096-11e6-b781-2cf0ee28adf2&bandwidthpackage.1.bandwidth=150 &bandwidthpackage.1.zone=cn-shanghai-a&description=my+first+nat+gateway

Return sample

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.