Get-AzExpressRoutePortAuthorization
取得 ExpressRoutePort 授權的相關資訊。
語法
Default (預設值)
Get-AzExpressRoutePortAuthorization
[-Name <String>]
-ExpressRoutePortObject <PSExpressRoutePort>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzExpressRoutePortAuthorization Cmdlet 會取得指派給 ExpressRoutePort 之授權的相關資訊。 ExpressRoutePort 的擁有者可以建立這些授權,以產生授權金鑰,ExpressRoute 線路擁有者可以使用該金鑰在 ExpressRoutePort 上建立線路 (具有不同的擁有者)。 只能使用一個 ExpressRoutePort 授權建立一個線路。 授權金鑰,以及授權的其他相關資訊,可以隨時執行 Get-AzExpressRoutePortAuthorization 來檢視。
範例
範例 1
$ERPort = Get-AzExpressRoutePort -Name "ContosoPort" -ResourceGroupName "ContosoResourceGroup"
Name : ContosoPort
ResourceGroupName : ContosoResourceGroup
Location : westcentralus
Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResourceGroup/pr
oviders/Microsoft.Network/expressRoutePorts/ContosoPort
Etag : W/"cf987288-013e-40bf-a2aa-b29d017e7b7f"
ResourceGuid : 4c0e5cdb-79e1-4cb8-a430-0ce9b24472ca
ProvisioningState : Succeeded
PeeringLocation : Area51-ERDirect
BandwidthInGbps : 100
ProvisionedBandwidthInGbps : 0
Encapsulation : QinQ
Mtu : 1500
EtherType : 0x8100
AllocationDate : Thursday, March 31, 2022
Identity : null
Links : [
{
"Name": "link1",
"Etag": "W/\"cf987288-013e-40bf-a2aa-b29d017e7b7f\"",
"Id": "/subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResou
rceGroup/providers/Microsoft.Network/expressRoutePorts/ContosoPort/links/link1",
"RouterName": "a51-test-06gmr-cis-3",
"InterfaceName": "HundredGigE15/15/19",
"PatchPanelId": "PP:0123:1110201 - Port 42",
"RackId": "A51 02050-0123-L",
"ConnectorType": "LC",
"AdminState": "Disabled",
"ProvisioningState": "Succeeded",
"MacSecConfig": {
"SciState": "Disabled",
"Cipher": "GcmAes128"
}
},
{
"Name": "link2",
"Etag": "W/\"cf987288-013e-40bf-a2aa-b29d017e7b7f\"",
"Id": "/subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResou
rceGroup/providers/Microsoft.Network/expressRoutePorts/ContosoPort/links/link2",
"RouterName": "a51-test-06gmr-cis-4",
"InterfaceName": "HundredGigE15/15/19",
"PatchPanelId": "2050:0124:1110854 - Port 42",
"RackId": "A51 02050-0124-L",
"ConnectorType": "LC",
"AdminState": "Disabled",
"ProvisioningState": "Succeeded",
"MacSecConfig": {
"SciState": "Disabled",
"Cipher": "GcmAes128"
}
}
]
Circuits : []
Get-AzExpressRoutePortAuthorization -ExpressRoutePortObject $ERPort
Name : ContosoPortAuthorization
Id : /subscriptions/62364504-2406-418e-971c-05822ff72fad/resourceGroups/ContosoResourceGroup/provid
ers/Microsoft.Network/expressRoutePorts/ContosoPort/authorizations/ContosoPortAuthorization
Etag : W/"36ccc199-c371-4d19-88cc-90d51bfe7ea9"
AuthorizationKey : 10d01cd7-0b67-4c44-88ca-51e7effa452d
AuthorizationUseStatus : Available
ProvisioningState : Succeeded
CircuitResourceUri :
這些命令會傳回與 ExpressRoutePort 相關聯之所有 ExpressRoute 授權的相關資訊。 第一個命令會使用 Get-AzExpressRoutePort Cmdlet 來建立物件參考名為 ContosoPort 的 ExpressRoutePort;該物件參照會儲存在變數$ERPort中。 然後,第二個命令會使用該物件參考和 Get-AzExpressRoutePortAuthorization Cmdlet 來傳回與 ContosoPort 相關聯之授權的相關資訊。 您也可以使用此命令將授權名稱指定為與 ContosoPort 相關聯的特定授權。
參數
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
參數屬性
| 類型: | IAzureContextContainer |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
| 別名: | AzContext, AzureRmContext, AzureCredential |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-ExpressRoutePortObject
ExpressRoutePort 物件
參數屬性
| 類型: | PSExpressRoutePort |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | True |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
-Name
指定此 Cmdlet 取得的 ExpressRoutePort 授權名稱。
參數屬性
| 類型: | String |
| 預設值: | None |
| 支援萬用字元: | False |
| 不要顯示: | False |
參數集
(All)
| Position: | Named |
| 必要: | False |
| 來自管線的值: | False |
| 來自管線按屬性名稱的值: | False |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援常見參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。