All Products
Search
Document Center

ENS:CreateEpnInstance

Last Updated:Mar 27, 2026

Creates an edge private network (EPN) instance.

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

ens:CreateEpnInstance

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

EPNInstanceType

string

Yes

The type of the EPN instance. Set the value to EdgeToEdge.

EdgeToEdge

EPNInstanceName

string

No

The name of the EPN instance.

test EPNInstanceName

InternetChargeType

string

Yes

The billing method for network usage. Valid values:

  • BandwidthByDay: Pay by daily peak bandwidth.

  • 95BandwidthByMonth: Pay by monthly 95th percentile bandwidth.

  • PayByBandwidth4thMonth: Pay by monthly fourth peak bandwidth.

  • PayByBandwidth: Pay by fixed bandwidth.

You can specify only one metering method for network usage and cannot overwrite the existing metering method.

BandwidthByDay

NetworkingModel

string

Yes

The networking mode. Valid values:

  • SpeedUp: intelligent acceleration network (Internet)

  • Connection: internal network

  • SpeedUpAndConnection: intelligent acceleration network and internal network

SpeedUp

InternetMaxBandwidthOut

integer

Yes

The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 1 to 100.

1

Response elements

Element

Type

Description

Example

object

EPNInstanceId

string

The ID of the EPN instance.

epn-xxxxx

RequestId

string

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

Examples

Success response

JSON format

{
  "EPNInstanceId": "epn-xxxxx",
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}

Error codes

HTTP status code

Error code

Error message

Description

400 StockNotEnough The specified instance type has insufficient resource.
400 UserNotExist The specified user is not authroized to perform this operation.
400 MissingParameter The input parameter that is mandatory for processing this request is not supplied.
400 InstanceIdNotFound The input parameter instancdId that is not found. The specified instance ID does not exist.
400 NoPermission Permission denied.
400 InvalidParameter The input parameter is Invalid.
400 InvalidParameter.%s The specified field %s invalid. Please check it again.
400 InvalidDiskSize.ValueNotSupported The specified disk capacity is invalid. Specify another capacity and try again.
400 InvalidParameter.Bandwidth The specified parameter InternetChargeType is not valid.
400 InvalidParameter.Image The specified image does not support.
400 InvalidParameter.InstanceType The specified parameter InstanceType is not valid.
400 InvalidAccountStatus.NotEnoughBalance Your account does not have enough balance.
400 unsupported_Ipv6Feature This ensregion does not support creating instance of the IPv6 type. Select another type.
400 Forbidden.CreateInstance The user is not in the Goods whitelist of creating instance interface.
400 ENS_OperationUnsupported_KeyPairName The KeyPairNameis not available or image not support ssh key.
400 ENS_DependencyViolation_WindowsInstance The instance creating is window, only user password to login.
400 ENS_PASSWORDORKEYPAIRNAME_MODULE_NOT_CHOOSEN The required module pwd or keyPairName is not inputed
400 InvalidPrivateIpAddress Specified private IP address is not in the CIDR block of virtual switch.
400 InvalidVSwitchId.NotFound Specified virtual switch does not exist. The specified virtual switch ID does not exist.
400 InvalidPrivateIpAddress.Duplicated Specified private IP address is duplicated.
400 CallInterface Call Interface Happen Error. An error occurred when you call the operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.