Skip to content

Commit 23b94f7

Browse files
Merge pull request #3 from duongau/patch-10
add CLI instructions
2 parents 8dda98d + dc088a6 commit 23b94f7

File tree

1 file changed

+63
-5
lines changed

1 file changed

+63
-5
lines changed

articles/expressroute/how-to-expressroute-direct-portal.md

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -720,14 +720,14 @@ Create a circuit on the ExpressRoute Direct resource.
720720
CircuitProvisioningState : Enabled
721721
ServiceProviderProvisioningState : Provisioned
722722
ServiceProviderNotes :
723-
ServiceProviderProperties : null
723+
ServiceProviderProperties : null
724724
ExpressRoutePort : {
725725
"Id": "/subscriptions/<subscriptionID>n/resourceGroups/Contoso-Direct-rg/providers/Micros
726726
oft.Network/expressRoutePorts/Contoso-Direct"
727727
}
728728
BandwidthInGbps : 10
729729
Stag : 2
730-
ServiceKey : <number>
730+
ServiceKey : aaaaaaaa-0b0b-1c1c-2d2d-333333333333
731731
Peerings : []
732732
Authorizations : []
733733
AllowClassicOperations : False
@@ -836,7 +836,7 @@ You can create an authorization for your ExpressRoute Direct resource, and redee
836836
Sample output:
837837
```powershell
838838
Name : ERDirectAuthorization_1
839-
Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/erdirect- rg/providers/Microsoft.Network/expressRoutePorts/erdirect/authorizations/ERDirectAuthorization_1
839+
Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/erdirect-rg/providers/Microsoft.Network/expressRoutePorts/erdirect/authorizations/ERDirectAuthorization_1
840840
Etag : W/"24cac874-dfb4-4931-9447-28e67edd5155"
841841
AuthorizationKey : 6e1fc16a-0777-4cdc-a206-108f2f0f67e8
842842
AuthorizationUseStatus : Available
@@ -854,9 +854,9 @@ You can create an authorization for your ExpressRoute Direct resource, and redee
854854
Sample output:
855855
```powershell
856856
Name : ERDirectAuthorization_1
857-
Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/erdirect- rg/providers/Microsoft.Network/expressRoutePorts/erdirect/authorizations/ERDirectAuthorization_1
857+
Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/erdirect-rg/providers/Microsoft.Network/expressRoutePorts/erdirect/authorizations/ERDirectAuthorization_1
858858
Etag : W/"24cac874-dfb4-4931-9447-28e67edd5155"
859-
AuthorizationKey : 6e1fc16a-0777-4cdc-a206-108f2f0f67e8
859+
AuthorizationKey : aaaaaaaa-0b0b-1c1c-2d2d-333333333333
860860
AuthorizationUseStatus : Available
861861
ProvisioningState : Succeeded
862862
CircuitResourceUri :on
@@ -870,6 +870,64 @@ You can create an authorization for your ExpressRoute Direct resource, and redee
870870
New-AzExpressRouteCircuit -Name $Name -ResourceGroupName $RGName -Location $Location -SkuTier $SkuTier -SkuFamily $SkuFamily -BandwidthInGbps $BandwidthInGbps -ExpressRoutePort $ERPort -AuthorizationKey $ERDirectAuthorization.AuthorizationKey
871871
```
872872
873+
# [**Azure CLI**](#tab/cli)
874+
875+
You can create an authorization for your ExpressRoute Direct resource, and redeem the authorization to create an ExpressRoute circuit in a different subscription or Microsoft Entra tenant.
876+
877+
1. Sign in to Azure and select the subscription:
878+
879+
```azurecli
880+
az login
881+
882+
az account set --subscription "<SubscriptionID or SubscriptionName>"
883+
884+
1. Get ExpressRoute Direct details:
885+
886+
```azurecli-interactive
887+
az network express-route port list
888+
az network express-route port show --name <Name> --resource-group <ResourceGroupName>
889+
```
890+
891+
1. Create an authorization for the ExpressRoute Direct resource:
892+
893+
```azurecli-interactive
894+
az network express-route port authorization create --express-route-port <Name> --resource-group <ResourceGroupName> --name <AuthName>
895+
```
896+
897+
Sample output:
898+
899+
```
900+
"name": "ERDirectAuthorization_1",
901+
"id": "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/erdirect-rg/providers/Microsoft.Network/expressRoutePorts/erdirect/authorizations/ERDirectAuthorization_1",
902+
"authorizationKey": "aaaaaaaa-0b0b-1c1c-2d2d-333333333333",
903+
"authorizationUseStatus": "Available",
904+
"provisioningState": "Succeeded"
905+
// ... other fields
906+
```
907+
908+
1. Verify the authorization was created successfully:
909+
910+
```azurecli-interactive
911+
az network express-route port authorization show --express-route-port <Name> --resource-group <ResourceGroupName> --name <AuthName>
912+
```
913+
914+
1. Redeem the authorization to create the ExpressRoute Direct circuit in a different subscription or Microsoft Entra tenant:
915+
916+
```azurecli-interactive
917+
az account set --subscription "<TargetSubscriptionID or SubscriptionName>"
918+
919+
az network express-route create \
920+
--name <CircuitName> \
921+
--resource-group <RGName> \
922+
--location <Location> \
923+
--bandwidth <BandwidthInGbps> \
924+
--sku-tier <SkuTier> \
925+
--sku-family <SkuFamily> \
926+
--peering-location <PeeringLocation> \
927+
--express-route-port <ExpressRoutePortResourceId> \
928+
--authorization-key <AuthorizationKey>
929+
```
930+
873931
---
874932
875933
## Next steps

0 commit comments

Comments
 (0)