共用方式為


Set-AzSynapseLinkedService

將數據存放區或雲端服務連結至工作區。

語法

Set-AzSynapseLinkedService
   -WorkspaceName <String>
   -Name <String>
   -DefinitionFile <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzSynapseLinkedService
   -WorkspaceObject <PSSynapseWorkspace>
   -Name <String>
   -DefinitionFile <String>
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Set-AzSynapseLinkedService Cmdlet 會將數據存放區或雲端服務連結至工作區。

範例

範例 1

Set-AzSynapseLinkedService -WorkspaceName ContosoWorkspace -Name ContosoLinkedService -DefinitionFile "C:\\samples\\LinkedService.json"

此命令會在名為 ContosoWorkspace 的工作區中建立名為 ContosoLinkedService 的鏈接服務。

範例 2

$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | Set-AzSynapseLinkedService -Name ContosoLinkedService -DefinitionFile "C:\\samples\\LinkedService.json"

此命令會在名為 ContosoWorkspace 的工作區中,透過管線建立名為 ContosoLinkedService 的鏈接服務。

參數

-AsJob

在背景執行 Cmdlet

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

-Confirm

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

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

-DefaultProfile

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

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

-DefinitionFile

JSON 檔案路徑。

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

-Name

連結的服務名稱。

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

-WhatIf

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

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

-WorkspaceName

Synapse 工作區的名稱。

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

-WorkspaceObject

工作區輸入物件,通常是透過管線傳遞。

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

輸入

PSSynapseWorkspace

輸出

PSLinkedServiceResource