All Products
Search
Document Center

ENS:CreateEpnInstance

Last Updated:Nov 18, 2024

Creates an edge private network (EPN) instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ens:CreateEpnInstancecreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
EPNInstanceTypestringYes

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

EdgeToEdge
EPNInstanceNamestringNo

The name of the EPN instance.

test EPNInstanceName
InternetChargeTypestringYes

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
NetworkingModelstringYes

The networking mode. Valid values:

  • SpeedUp: intelligent acceleration network (Internet)
  • Connection: internal network
  • SpeedUpAndConnection: intelligent acceleration network and internal network
SpeedUp
InternetMaxBandwidthOutintegerYes

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

1

Response parameters

ParameterTypeDescriptionExample
object
EPNInstanceIdstring

The ID of the EPN instance.

epn-xxxxx
RequestIdstring

The request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400StockNotEnoughThe specified instance type has insufficient resource.-
400UserNotExistThe specified user is not authroized to perform this operation.-
400MissingParameterThe input parameter that is mandatory for processing this request is not supplied.-
400InstanceIdNotFoundThe input parameter instancdId that is not found.The specified instance ID does not exist.
400NoPermissionPermission denied.-
400InvalidParameterThe input parameter is Invalid.-
400StockNotEnoughThe specified configuration is unavailable. Reconfigure and try again.-
400InvalidParameter.%sThe specified field %s invalid. Please check it again.-
400InvalidParameterThe errorMessage is %s. Please check it again.-
400StockNotEnoughThe specified EnsRegionId is unavailable. Reconfigure and try again.-
400StockNotEnoughThe specified InstanceSpec is unavailable. Reconfigure and try again.-
400InvalidDiskSize.ValueNotSupportedThe specified disk capacity is invalid. Specify another capacity and try again.-
400InvalidParameter.BandwidthThe specified parameter InternetChargeType is not valid.-
400StockNotEnoughThe specified node has insufficient resource.-
400InvalidParameter.ImageThe specified image does not support.-
400StockNotEnoughYou have reached the purchase default limit.-
400InvalidParameter.InstanceTypeThe specified parameter InstanceType is not valid.-
400InvalidAccountStatus.NotEnoughBalanceYour account does not have enough balance.-
400unsupported_Ipv6FeatureThis ensregion does not support creating instance of the IPv6 type. Select another type.-
400Forbidden.CreateInstanceThe user is not in the Goods whitelist of creating instance interface.-
400ENS_OperationUnsupported_KeyPairNameThe KeyPairNameis not available or image not support ssh key.-
400ENS_DependencyViolation_WindowsInstanceThe instance creating is window, only user password to login.-
400ENS_PASSWORDORKEYPAIRNAME_MODULE_NOT_CHOOSENThe required module pwd or keyPairName is not inputed-
400MissingParameterThe input parameter %s that is mandatory for processing this request is not supplied.-
400InvalidPrivateIpAddressSpecified private IP address is not in the CIDR block of virtual switch.-
400InvalidVSwitchId.NotFoundSpecified virtual switch does not exist.The specified virtual switch ID does not exist.
400InvalidPrivateIpAddress.DuplicatedSpecified private IP address is duplicated.-
400CallInterfaceCall Interface Happen Error.An error occurred when you call the operation.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-26API Description Update. The Error code has changedView Change Details