편집

다음을 통해 공유


Set-AzSynapseLinkConnection

Creates or updates a link connection in workspace.

Syntax

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

Description

The Set-AzSynapseLinkConnection cmdlet creates or updates a link connections in a workspace.

Examples

Example 1

<#
linkconnection.json
{
	"name":"sampleLinkConnection", // please change to your link connection name
	"properties":{
		"sourceDatabase":{
			"typeProperties":{ // please change to your source database resourceId and principalId
				"resourceId":"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/sampleResourceGroup/providers/Microsoft.Sql/servers/sampleServer",
				"principalId":"xxxxxxxxxx"
				},
			"linkedService":{
				"referenceName":"sampleLinkServiceReference", // please change to your source database link service name
				"type":"LinkedServiceReference"
			}
		},
		"targetDatabase":{
			"linkedService":{
				"referenceName":"sampleLinkServiceReference", // please change to your target database link service name
				"type":"LinkedServiceReference",
				"parameters":{
					"DBName":"v2"
				}
			}
		},
		"compute":{
			"coreCount":16,
			"computeType":"General"
		}
	}
}
#>
Set-AzSynapseLinkConnection -WorkspaceName ContosoWorkspace -DefinitionFile "C:\samples\linkconnection.json"

This command creates or updates a link connection from definition file linkconnection.json in the workspace named ContosoWorkspace.

Example 2

$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | Set-AzSynapseLinkConnection -DefinitionFile "C:\samples\linkconnection.json"

This command creates or updates a link connection from definition file linkconnection.json in the workspace named ContosoWorkspace through pipeline.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefinitionFile

The JSON file path.

Type:String
Aliases:File
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

The Synapse link connection name for Azure Sql Database.

Type:String
Aliases:LinkConnectionName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceName

Name of Synapse workspace.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WorkspaceObject

workspace input object, usually passed through the pipeline.

Type:PSSynapseWorkspace
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSSynapseWorkspace

Outputs

PSLinkConnectionResource