创建设备

先决条件
身份验证 - 请提交您的用户凭据、客户端 ID 和客户端密钥以进行 OAuth2 身份验证。有关如何调用 OAuth API 来验证和确认您的凭据的说明,请参阅API 身份验证。
第 2 步:获取设备详细信息
-
调用 获取设备类型 函数,即可了解要在 NE 平台上启动的自配置设备(例如路由器或防火墙)。您将了解到虚拟设备可用的都市区、设备供应商、可用核心数以及软件包及其版本。请选择
deviceTypeCode、metroCode、core、packageCode和version。 -
调用 Get Allowed Interfaces 函数,即可了解所选核心允许的接口数量。您可以选择任何可用的设备接口作为
sshInterfaceId。否则,Equinix 将选择第一个可用的接口。 -
调用 Get Accounts {metro} 来检查您在需要虚拟设备的都市区中的帐户号(或
acountReferenceId)和状态。出于计费原因,您必须在需要虚拟设备的都市区中拥有一个帐户,该帐户的状态可以是“激活”或“待处理”。如果您还没有帐户,请创建一个帐户。
如果您是经销商,想要为客户创建设备,则必须确保客户和您(经销商)的账户状态均为“激活”或“待处理”。您的账户将被计费,但您必须将客户的账号发送给 API 才能为客户创建设备。
步骤 3:许可选项
我们为大多数设备提供 BYOL(自带许可)许可选项。请根据供应商提供的许可文件或代码/令牌/ID 上传许可文件。对于Cisco 8KV,您可以选择订阅许可选项。
-
Arista:我们不支持为 Arista 设备上传许可证。不过,您可以在设备创建后登录设备并上传许可证,以提高吞吐量。
-
Cisco 和 Palo Alto 提供许可证令牌。请在
licenseToken字段中输入许可证令牌。 -
Juniper 提供许可证文件。要为 Juniper 设备自带许可证 (BYOL),请使用 上传许可证文件 上传许可证文件。您将获得一个文件 ID,可用于创建虚拟设备。如果您有冗余的 Juniper 设备,则可以为主设备和备用设备使用相同的文件 ID。
-
Fortinet:创建 Fortinet 设备时,许可证并非强制性要求。如果您有令牌,请将其输入到
licenseToken字段中。要为 Fortinet 设备配置许可证文件,您必须执行以下操作:- 在 Fortinet 门户上生成许可证文件。
- 通过调用 Post License File 函数,在 Equinix 门户上传许可证文件。您将获得一个
fileId,可用于创建虚拟设备。
- 登录设备检查您的许可证状态。
步骤 4:创建自配置设备
| POST /ne/v1/devices | |
|---|---|
| Method | POST |
| URL or End Point | /ne/v1/devices |
| Headers | Authorization token, Content-Type |
| Query Parameters | draft, draftUuid |
要创建具有主设备和辅助设备的冗余设备:
- 设置次要对象的参数
- 如果您是经销商,想要为客户创建冗余设备,请确保主备数据中心位于同一国家/地区。主备数据中心的账号必须相同。虽然费用会记入经销商的账户,但此 API 也接受客户的账号来为客户创建设备。上述限制是必要的,因为每个客户都与经销商的计费账户关联。
- 对于 Cisco FTD 设备,主设备和辅助设备的管理类型必须相同。
要保存设备草稿,您必须提供 deviceTypeCode、accountNumber 或 accountReferenceId 和 metroCode。
示例请求
创建单个设备的示例 curl 请求。
curl -X
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer <token>"
-d '
{
"metroCode": "SV",
"deviceTypeCode": "VSRX",
"agreeOrderTerms": true,
"termLength": "1",
"licenseMode": "BYOL",
"packageCode": "STD",
"virtualDeviceName": "Test-device-001-SROY",
"notifications": [
"test@equinix.com"
],
"hostNamePrefix": "TC12",
"aclDetails": [
{
"uuid": "fb2e69bb-cbd7-40c4-bc01-8bcc5fa741c2",
"interfaceType": "WAN"
}
],
"accountNumber": "200541",
"version": "18.4R2-S1.4",
"interfaceCount": 10,
"deviceManagementType": "SELF-CONFIGURED",
"core": 5,
"userPublicKey": {
"username": "userName",
"keyName": "keyName"
},
"additionalBandwidth": "100"
}
'
创建冗余设备的 curl 请求示例。
curl -X
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer <token>"
-d '
{
"metroCode": "DC",
"deviceTypeCode": "C8000V",
"agreeOrderTerms": true,
"termLength": "1",
"licenseMode": "BYOL",
"packageCode": "network-advantage",
"virtualDeviceName": "Test-device-002-SROY",
"notifications": [
"test@equinix.com"
],
"hostNamePrefix": "TC01",
"aclDetails": [
{
"uuid": "fb2e69bb-cbd7-40c4-bc01-8bcc5fa741c2",
"interfaceType": "WAN"
}
],
"accountNumber": "201148",
"version": "17.06.01a",
"interfaceCount": 10,
"deviceManagementType": "SELF-CONFIGURED",
"core": 2,
"userPublicKey": {
"username": "sroy",
"keyName": "keyWIQzB"
},
"sshInterfaceId": "3",
"channelPartner": "SDCI",
"secondary": {
"metroCode": "DC",
"hostNamePrefix": "TC02",
"notifications": [
"test@equinix.com"
],
"virtualDeviceName": "Test-device-001-SROY - secondary",
"additionalBandwidth": "100",
"aclDetails": [
{
"uuid": "fb2e69bb-cbd7-40c4-bc01-8bcc5fa741c2",
"interfaceType": "WAN"
}
],
"accountNumber": "201148",
"sshInterfaceId": "4"
},
"additionalBandwidth": "100"
}
'
创建无互联网访问的 Cisco FTD 辅助设备的示例 curl 请求。
curl -X
POST "https://api.equinix.com/ne/v1/devices?draft=false"
-H "content-type: application/json"
-H "Authorization: Bearer <token>"
-d '
{
"deviceTypeCode": "Cisco_NGFW",
"licenseMode": "BYOL",
"packageCode": "FTDv5",
"virtualDeviceName": "NEAut-",
"metroCode": "#(supportedMetro)",
"notifications": [
"t@t.com"
],
"hostNamePrefix": "test",
"interfaceCount": 10,
"deviceManagementType": "SELF-CONFIGURED",
"core": 4,
"version": "7.0.4-55",
"vendorConfig": {
"managementType": "FDM"
},
"connectivity": "PRIVATE",
"secondary": {
"hostNamePrefix": "test-123",
"metroCode": "#(supportedMetroForSec)",
"notifications": [
"t@t.com"
],
"virtualDeviceName": "test-secondary",
"vendorConfig": {
"managementType": "FDM"
}
}
}
'
有关参数和选项的完整列表,请参阅API 参考。
示例回复
单个设备的示例响应。202:请求已接受。
{
"uuid": "74d8c6b6-3153-4271-9f0e-45bdc7094dec"
}
冗余设备的示例响应。202:请求已接受。
{
"uuid": "74d8c6b6-3153-4271-9f0e-45bdc7094dec",
"secondaryUuid": "de5cf79b-3d16-4ccd-841b-3b68ecda2142"
}
设备状态
您可以通过调用 Get Virtual Device {uuid} 来监控设备状态。您的设备必须已完成配置,并且您的许可证必须已注册,然后才能连接到云服务提供商。
| Virtual device "status" | Description |
|---|---|
INITIALIZING | Equinix is in the process of reserving resources and creating the device. |
PROVISIONING | The device is booting. |
PENDING_ORDER | The order has come to NE from Siebel. Customers need to log in to the NE portal and submit the order. |
PENDING_SIGNATURE | The customer has signed up for the offline acceptance of NE terms but has not yet accepted the terms. |
CANCEL_ORDER | The order from Siebel to NE is canceled. |
WAITING_FOR_PRIMARY | The secondary device is ready but the primary is not. This state might appear only if you have created a secondary device for redundancy. |
WAITING_FOR_SECONDARY | The primary device is ready but the secondary is not. This state might appear only if you have created a secondary device for redundancy. |
FAILED | The device creation failed. |
PROVISIONED | The device is ready. |

当最终用户使用 Delete Virtual Devices API 删除设备时,设备在 Equinix 系统中会经历以下状态转换。 基础设施。
| Virtual device "status" under /ne/v1/devices/{uuid} | Description |
|---|---|
| DEPROVISIONING | Equinix accepted the customer's request to delete a virtual device. |
| DEPROVISIONED | The device is de-provisioned/deleted. |