Get-AzExpressRoutePortAuthorization
取得 ExpressRoutePort 授權的相關信息。
語法
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 |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ExpressRoutePortObject
ExpressRoutePort 物件
類型: | PSExpressRoutePort |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
指定此 Cmdlet 取得的 ExpressRoutePort 授權名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
輸出
PSExpressRoutePortAuthorization