共用方式為


New-AzInsightsPrivateLinkScopedResource

建立私人連結範圍資源

語法

New-AzInsightsPrivateLinkScopedResource
   -LinkedResourceId <String>
   -ResourceGroupName <String>
   -ScopeName <String>
   -Name <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzInsightsPrivateLinkScopedResource
   -LinkedResourceId <String>
   -Name <String>
   -InputObject <PSMonitorPrivateLinkScope>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

建立私人鏈接範圍資源,範圍資源可以是Log Analytics工作區或Application Insights元件

範例

範例 1

$ai = Get-AzApplicationInsights -ResourceGroupName "rg_name" -Name "ai_name"

New-AzInsightsPrivateLinkScopedResource -LinkedResourceId $ai.Id -ResourceGroupName "rg_name" -ScopeName "scope_name" -Name "scoped_resource_name"

建立連結至 application insights 元件 「ai_name」的範圍資源「scoped_resource_name」

參數

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

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

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

-InputObject

PSMonitorPrivateLinkScope

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

-LinkedResourceId

連結的 LA/AI 資源識別碼

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

-Name

範圍資源名稱

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

-ResourceGroupName

資源組名

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

-ScopeName

Private Link 範圍名稱

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

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出