CreateEgressProxyIpPool

Updated at:
Copy as MD

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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:

  • true: performs only a dry run and does not create the egress proxy IP pool. The system checks whether the required parameters are specified, the request format is valid, and the service limits are met. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false (default): performs a dry run and sends the actual request. If the request passes the dry run, an HTTP 2xx status code is returned and the operation is performed.

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:

  • Intranet: private network address. Only private network IPv4 addresses (PrivateIpv4Address) in a vSwitch can be added.

  • Internet: public IP address. Only elastic IP addresses (EipAllocationId) can be added.

Valid values:

  • Intranet :

    Private network address.

  • Internet :

    Public IP address.

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:

  • Random (default): random scheduling.

  • ConsistentHash: consistent hashing. If this value is used, you must specify the HashFactor parameter.

Valid values:

  • ConsistentHash :

    Consistent hashing.

  • Random :

    Random scheduling.

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:

  • SourceIP: source IP address.

  • FiveTuple: 5-tuple.

  • HttpHeader: HTTP request header. If this value is used, you must also specify the corresponding HTTP request header name.

Valid values:

  • SourceIP :

    Source IP address.

  • HttpHeader :

    HTTP request header.

  • FiveTuple :

    5-tuple.

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.

  • If the AddressType parameter is set to Internet (public IP address), specify EipAllocationId.

  • If the AddressType parameter is set to Intranet (private network address), specify PrivateIpv4Address.

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 aliyun or acs:, and cannot contain http:// or https://.

epg

Value

string

No

The tag value. The value can be up to 256 characters in length, and cannot contain http:// or https://.

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.