共用方式為


Get-AzAllowedConnection

用來顯示訂用帳戶資源之間的允許流量

語法

Get-AzAllowedConnection
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAllowedConnection
   -ResourceGroupName <String>
   -Name <String>
   -Location <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzAllowedConnection
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

根據連線類型,取得訂用帳戶與位置資源之間所有可能流量的清單。

範例

範例 1

Get-AzAllowedConnection

Id:	/subscriptions/3eeab341-f466-499c-a8be-85427e154baf7612f869/resourceGroups/myService1/providers/Microsoft.Security/locations/centralus/allowedConnections/virtualMachines
Name:	Internal
Type:	Microsoft.Security/locations/allowedConnections
CalculatedDateTime:	03-Jun-20 3:03:48 PM
ConnectableResources:	/subscriptions/3eeab341-f466-499c-a8be-85427e154baf7612f869/resourceGroups/myService1/providers/Microsoft.Compute/virtualMachines/myvm

範例 2

Get-AzAllowedConnection -ResourceGroupName "myService1" -Location "centralus" -Name "Internal"

Id:	/subscriptions/3eeab341-f466-499c-a8be-85427e154baf7612f869/resourceGroups/myService1/providers/Microsoft.Security/locations/centralus/allowedConnections/Internal
Name:	virtualMachines
Type:	Microsoft.Security/locations/allowedConnections
CalculatedDateTime:	03-Jun-20 3:03:48 PM
ConnectableResources:	/subscriptions/3eeab341-f466-499c-a8be-85427e154baf7612f869/resourceGroups/myService1/providers/Microsoft.Compute/virtualMachines/myvm

根據連線類型,取得訂用帳戶與位置資源之間所有可能流量的清單。

參數

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Location

位置。​​

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-Name

資源名稱。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

資源組名。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceId

您要叫用命令之安全性資源的識別碼。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

輸入

String

輸出

PSSecurityAllowedConnection