API - 连接到 Microsoft Azure ExpressRoute
建立与 Microsoft Azure 的直接第 2 层连接以访问 Azure 云基础设施和其他 Azure 云服务。

本文档介绍从API中的端口,服务令牌或云路由器创建连接。有关从虚拟设备(包括在API中)创建连接的信息,请参阅Network Edge to Azure ExpressRoute
先决条件
-
身份验证 - 提交您的 OAuth2 用户凭据、客户端 ID 和客户端密钥 验证。有关如何致电OAuth API以验证和验证您的凭据的说明,请参阅API验证。
-
确定A侧信息。以下任一项:
- 向端点发送请求
/fabric/v4/ports,以确定您的Equinix Fabric端口信息GET。端口UUID和链路协议类型(Dot1q或QinQ),
或
- 通过向端点发送请求
/fabric/v4/serviceTokens来检索A端服务令牌GET。您需要令牌的UUID。A端令牌提供配置连接A端的相关信息。
或
- 确定您的Fabric Cloud Router信息。向端点发送请求
/fabric/v4/routers/search,以检查可用的云路由器POST。您需要路由器的UUID。
- 向端点发送请求
-
识别Azure ExpressRoute服务配置文件信息。您应该选择哪种服务配置文件的详细信息,请参见Azure ExpressRoute概述页面。
- Azure ExpressRoute -
a1390b22-bbe0-4e93-ad37-85beef9d254d - Azure政府ExpressRoute -
0de4e413-edd7-4325-912f-7c8a4428e156
- Azure ExpressRoute -
-
识别并验证您的ExpressRoute服务密钥。向端点发送
POST请求/fabric/v4/connections/validate,以验证您的ExpressRoute服务密钥是否可用于在给定都会区创建与选定服务配置文件的连接。
从 DOT1Q端口连接
要创建从您的Dot1q端口到Azure ExpressRouter的连接,请向端点发送POST请求/fabric/v4/connections。连接type为EVPL_VC。
在对象中提供您的端口信息aSide,包括:
accessPoint.typeASCOLO- 将您的端口UUID提供给
port.uuid - LinkProtocol.type AS
DOT1Q - 将VLAN ID提供给
linkProtocol.vlanTag
在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:
- 设置
accessPoint.type为SP。 - 设置
profile.type为L2_PROFILE。 - 在中指定您要连接的Azure ExpressRoute服务配置文件
profile.uuid。 - 在中指定您要连接的Equinix都会区位置
location.metroCode。 - 设置
authenticationKey为您的ExpressRoute服务密钥。 - 设置
peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。 - (可选)设置
linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。
redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。
cURL 请求示例:
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "<your_connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "COLO",
"port": {
"uuid": "<your_port_uuid>"
},
"linkProtocol": {
"type": "DOT1Q",
"vlanTag": <vlan_id>
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "DC"
},
"linkProtocol": {
"type": "QINQ",
"vlanCTag": <vlan_id>
},
"peeringType": "<peering_type>",
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}
从 QINQ端口连接
要创建从您的Dot1q端口到Azure ExpressRouter的连接,请向端点发送POST请求/fabric/v4/connections。连接type为EVPL_VC。
在对象中提供您的端口信息aSide,包括:
accessPoint.typeASCOLO- 将您的端口UUID提供给
port.uuid - LinkProtocol.type AS
QINQ - 向提供内部标记ID
linkProtocol.vlanCTag - 向提供外部标记ID
linkProtocol.vlanSTag
在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:
- 设置
accessPoint.type为SP。 - 设置
profile.type为L2_PROFILE。 - 在中指定您要连接的Azure ExpressRoute服务配置文件
profile.uuid。 - 在中指定您要连接的Equinix都会区位置
location.metroCode。 - 设置
authenticationKey为您的ExpressRoute服务密钥。 - 设置
peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。 - (可选)设置
linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。
redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。
cURL 请求示例:
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "<connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "COLO",
"port": {
"uuid": "<port_uuid>"
},
"linkProtocol": {
"type": "QINQ",
"vlanSTag": <vlan_id>,
"vlanCTag": <vlan_id>
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<metro_code>"
},
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'
使用服务令牌进行连接
要创建从您的Dot1q端口到Azure ExpressRouter的连接,请向端点发送POST请求/fabric/v4/connections。连接type为EVPL_VC。
在对象中提供服务令牌UUIDaSide。服务令牌提供建立连接所需的所有其他必要信息。
在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:
- 设置
accessPoint.type为SP。 - 设置
profile.type为L2_PROFILE。 - 在中指定您要连接的Azure ExpressRoute服务配置文件
profile.uuid。 - 在中指定您要连接的Equinix都会区位置
location.metroCode。 - 设置
authenticationKey为您的ExpressRoute服务密钥。 - 设置
peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。 - (可选)设置
linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。
redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。
cURL 请求示例:
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "EVPL_VC",
"name": "<connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"serviceToken": {
"uuid": "<your_aside_service_token>"
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<metro_code>"
},
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'
从Fabric Cloud Router连接
要建立从Network Edge设备到AWS的连接,请向端点发送POST请求/fabric/v4/connections。连接type为IP_VC。
在对象中定义Fabric Cloud RouteraSide,包括:
- 设置
accessPoint.type为CLOUD_ROUTER。 - 设置
router.uuid为路由器的UUID。
在对象中提供您的Azure ExpressRoute详细信息和位置详细信息zSide,包括:
- 设置
accessPoint.type为SP。 - 设置
profile.type为L2_PROFILE。 - 在中指定您要连接的Azure ExpressRoute服务配置文件
profile.uuid。 - 在中指定您要连接的Equinix都会区位置
location.metroCode。 - 设置
authenticationKey为您的ExpressRoute服务密钥。 - 设置
peeringType为MICROSOFT或PRIVATE,具体取决于您使用该连接的服务。有关更多信息,请参阅配置对等互连。 - (可选)设置
linkProtocol.type为QINQ并指定linkProtocol.vlanCTag。此操作将设置用于对等互连的ExpressRoute VLAN ID。您也可以在创建连接后在Azure门户中设置此值。
redundancy在请求正文中指定任何其他连接配置详情,包括bandwidth和。参数及其说明的完整列表,请参见API参考手册。
curl -X
POST 'https://api.equinix.com/fabric/v4/connections'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "IP_VC",
"name": "<connection_name>",
"bandwidth": <connection_speed>,
"redundancy": {
"priority": "<redundancy_code>"
},
"aSide": {
"accessPoint": {
"type": "CLOUD_ROUTER",
"router": {
"uuid": "<router_uuid>"
}
}
},
"zSide": {
"accessPoint": {
"type": "SP",
"profile": {
"type": "L2_PROFILE",
"uuid": "<service_profile_uuid>"
},
"location": {
"metroCode": "<metro_code>"
},
"authenticationKey": "<expressroute_service_key>"
}
},
"order": {
"purchaseOrderNumber": "<purchase_order_number>"
},
"notifications": [
{
"type": "ALL",
"emails": [
"<contact_email>"
]
}
]
}'
监控连接状态
向端点发送GET监控连接状态的请求fabric/v4/connections/{connectionId}。
| Equinix 连接状态 | Azure 状态 | |||
|---|---|---|---|---|
**equinixStatus**属性值 | **providerStatus**属性值 | 提供商状态 | Peerings状态 | 描述 |
PROVISIONING | PROVISIONING | 未配置 | 未配置 | 连接请求尚未发送给微软。 |
PENDING_BGP_PEERING | PENDING_BGP | 已配置 | 未配置 | 连接已获批,等待客户在Microsoft Azure门户网站上配置Microsoft对等互连。如果您从端口连接到Azure ExpressRoute,该状态将保持不变PENDING_BGP_PEERING,直至在Microsoft Azure门户中完成对等互连,且状态仅在Equinix Fabric与Microsoft同步后才会更改为PROVISIONED。要立即同步BGP对等互连,请使用连接操作API Endpoint。如果要从Fabric Cloud Router连接到Azure ExpressRoute,还需要在Equinix Customer Portal中配置连接的路由详细信息。 |
PROVISIONING | PROVISIONED | 微软端配置已完成,Equinix 端正在配置连接。 | ||
PROVISIONED | PROVISIONED | 连接已建立。 |