CreateEgressProxyIpPool
Creates an egress proxy IP pool under a specified egress proxy gateway.
Operation description
When you call this operation to create an egress proxy IP pool under a specified egress proxy gateway, take note of the following items:
-
The address type (AddressType) of the egress proxy IPAM pool cannot be modified after creation. If the value is set to Intranet (private network address), only private network IPv4 addresses in a vSwitch can be added. If the value is set to Internet, only elastic IP addresses (EIPs) can be added.
-
If the scheduling algorithm (Scheduler) is set to ConsistentHash, you must specify a hash factor (HashFactor). If the hash factor is set to HttpHeader, you must also specify the corresponding HTTP request header name.
-
The CreateEgressProxyIpPool operation is asynchronous. The system returns an egress proxy IP pool ID, but the IP pool is not yet created and the creation task is still running in the background. You can call the GetEgressProxyIpPoolAttribute operation to query the creation status of the egress proxy IP pool:
If the egress proxy IP pool is in the Provisioning state, the IP pool is being created.
If the egress proxy IP pool is in the Available state, the IP pool is created.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
epg:CreateEgressProxyIpPool |
create |
*All Resource
|
None | None |
Request syntax
POST / HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The client token can contain only ASCII characters. Note
Note If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is different. |
5A2CFF0E-5718-45B5-9D4D-70B****** |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run on the request. Valid values:
|
false |
| EgressProxyGatewayId |
string |
Yes |
The ID of the egress proxy gateway to which the egress proxy IP pool belongs. |
epg-gw80bb6a94f835db**** |
| EgressProxyIpPoolName |
string |
Yes |
The name of the egress proxy IP address pool. The name must be 2 to 128 characters in length and start with a letter or a Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-). |
testIpPool |
| Description |
string |
No |
The description of the egress proxy IP pool. The description must be 2 to 256 characters in length, and can contain letters and digits. It can also contain commas (,), periods (.), semicolons (;), forward slashes (/), at signs (@), underscores (_), and hyphens (-). |
testIpPool |
| AddressType |
string |
Yes |
The address type of the egress proxy IPAM pool. The address type cannot be modified after creation. Valid values:
Valid values:
|
Intranet |
| Scheduler |
string |
No |
The scheduling algorithm for egress IP addresses, which specifies how an egress IP address is selected from the IP pool. Valid values:
Valid values:
|
Random |
| HashFactor |
string |
No |
The hash factor used for consistent hashing scheduling. This parameter is required when the Scheduler parameter is set to ConsistentHash. Valid values:
Valid values:
|
SourceIP |
| HashHeaderName |
string |
No |
The name of the custom hash request header. This parameter is required when the HashFactor parameter is set to HttpHeader. The name must be 1 to 128 characters in length. |
X-Forwarded-For |
| ZoneMappings |
array<object> |
Yes |
The mappings between zones and vSwitches, which are used to specify the zones, vSwitches, and IP addresses for the deployment of the egress proxy IP pool. |
|
|
array<object> |
No |
The mapping between a zone and a vSwitch. |
||
| ZoneId |
string |
Yes |
The zone ID. You can call the DescribeZones operation to query the zone information corresponding to the zone ID. |
cn-shanghai-b |
| IpCount |
integer |
No |
The number of private IPv4 addresses to be automatically assigned. This parameter takes effect only when the AddressType parameter is set to Intranet. The system automatically assigns the specified number of private IPv4 addresses in the vSwitch corresponding to the zone. Note
Note If you specify both PrivateIpv4Address in IpAddresses and IpCount, the number of specified PrivateIpv4Address values cannot exceed the value of IpCount. |
12 |
| VSwitchId |
string |
Yes |
The ID of the vSwitch corresponding to the zone. Private IPv4 addresses are assigned from the CIDR block of the vSwitch. |
vsw-0jl8x3ridfqbikax5o**** |
| IpAddresses |
array<object> |
No |
The list of IP addresses. You can specify up to 100 IP addresses for each zone.
|
|
|
object |
No |
The IP address information. |
||
| PrivateIpv4Address |
string |
No |
The private network IPv4 address. The address must be an active address in the corresponding vSwitch CIDR block. Specify this parameter only when the AddressType parameter is set to Intranet. |
192.168.10.1 |
| EipAllocationId |
string |
No |
The ID of the elastic IP address (EIP) instance. Specify this parameter only when the AddressType parameter is set to Internet. |
eip-2zep1zbmxnvoyt1vs**** |
| Tag |
array<object> |
No |
The list of tags. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key. The key can be up to 128 characters in length. It cannot start with |
epg |
| Value |
string |
No |
The tag value. The value can be up to 256 characters in length, and cannot contain |
test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| EgressProxyIpPoolId |
string |
The ID of the created egress proxy IP pool. |
eppool-gw80d96a96ca0b00**** |
| RequestId |
string |
The request ID. |
01A05AB7-6C14-5A12-94E7-F20F9F69AE3D |
Examples
Success response
JSON format
{
"EgressProxyIpPoolId": "eppool-gw80d96a96ca0b00****",
"RequestId": "01A05AB7-6C14-5A12-94E7-F20F9F69AE3D"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | QuotaExceeded.IpPoolNumPerGateway | The quota of %s is exceeded, usage %s/%s. | The number of IP address pools under a single gateway has exceeded the quota limit. |
| 400 | QuotaExceeded.IpNumPerIpPool | The quota of %s is exceeded, usage %s/%s. | The number of IP addresses in a single IP address pool has exceeded the quota limit. |
| 400 | DuplicatedParam.ZoneId | The param of %s is duplicated. | The zone ID parameter contains duplicate values. |
| 400 | IllegalParam.ZoneId | The param of %s is illegal. | The value of the zone ID parameter is invalid. |
| 400 | DuplicatedParam.IpAddress | The param of %s is duplicated. | The IP address parameter contains duplicate values. |
| 400 | ResourceNotSupport.EipAllocationId | The specified resource of %s is not supported because of %s. | The specified Elastic IP address resource does not support the current operation. |
| 400 | IncorrectStatus.EipAllocationId | The status of %s [%s] is incorrect. | The status of the Elastic IP address does not support the current operation. |
| 400 | IncorrectBusinessStatus.EipAllocationId | The business status of %s [%s] is incorrect. | The business status of the elastic IP address does not support this operation. |
| 400 | MissingParam.EipAllocationId | The param of %s is missing. | The required parameter Elastic IP address instance ID is missing. |
| 400 | MissingParam.IpAddressesOrIpCount | The param of %s is missing. | Neither the IP address list nor the number of automatically allocated IP addresses is specified. |
| 400 | IllegalParam.IpCount | The param of %s is illegal. | The value of the IP address count parameter is invalid. |
| 400 | IllegalParam.EipAllocationId | The param of %s is illegal. | The value of the EIP instance ID parameter is invalid. |
| 400 | IllegalParam.IpAddress | The param of %s is illegal. | The value of the IP address parameter is invalid. |
| 400 | IllegalParamSize.IpAddresses | The param size of %s is illegal. | The number of IP addresses in the IP address list parameter is invalid. |
| 400 | DuplicatedParam.EipAllocationId | The param of %s is duplicated. | The EIP instance ID parameter contains duplicate values. |
| 400 | ResourceMismatch.VSwitchId | The specified resource of %s is mismatch with %s. | The specified vSwitch resource does not match. |
| 400 | ResourceNotEnough.VSwitchIp | The specified resource of %s is not enough. | The specified vSwitch does not have sufficient IP address resources. |
| 404 | ResourceNotFound.EipAllocationId | The specified resource of %s is not found. | The specified Elastic IP address resource does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.