NAT Gateway Binds EIP
Updated at:2025-10-16
Description
Associate an EIP with the NAT gateway.
- This API supports only enhanced NAT gateways.
- The associated EIP can be utilized for both SNAT and DNAT rules.
Request structure
Plain Text
1PUT /v{version}/nat/{natId}?{action}&clientToken={clientToken} HTTP/1.1
2Host: bcc.bj.baidubce.com
3Authorization: authorization string
4{ "bindEips":[bindEips] }
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| natId | String | Yes | URL parameter | NAT gateway ID to which the EIP is bound |
| action | String | Yes | Query | Action executed on the NAT gateway. In this API, the value of this parameter is bind |
| clientToken | String | No | Query | Idempotence Token, which is an ASCII string with a length not exceeding 64 bits, see details in [ClientToken Idempotence](VPC/API Reference/General Description.md#Idempotence). |
| bindEips | List |
Yes | RequestBody | List of EIPs associated with the NAT gateway; supports associating multiple EIPs, which must all belong to the same EIPGROUP or not be part of any EIPGROUP. |
Response headers
No additional headers beyond standard ones.
Response parameters
No special response parameters are available.
Request example
Plain Text
1 PUT /v1/nat/nat-b7ze574srr4g?bind&clientToken={ac31ef8c-5e41-4k38-9ds0-9de700ds5b20} HTTP/1.1
2 host: bcc.bj.baidubce.com
3 content-type: application/json
4 authorization: bce-auth-v1/2830b179831d11e8be57233b1de1e808/2018-07-09T02:11:00Z/3600/host;x-bce-account;x-bce-client-ip;x -bce-date;x-bce-request-id;x-bce-security-token/241df034
5 75c8a723f7acd63851b343c8a37e654d001e79695e87c83595ca58fd
6 connection: Keep-Alive
7 {
8 "bindEips" : [ "180.76.186.174" ]
9 }
Response example
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: cb337890-fda4-4de7-ae5c-6af8ade82281
3Date: Mon, 09 Jul 2018 02:11:01 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS
