Upravit

Sdílet prostřednictvím


New-AzSynapseLinkedServiceEncryptedCredential

Encrypt credential in linked service with specified integration runtime.

Syntax

New-AzSynapseLinkedServiceEncryptedCredential
   [-ResourceGroupName <String>]
   -WorkspaceName <String>
   -IntegrationRuntimeName <String>
   -DefinitionFile <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSynapseLinkedServiceEncryptedCredential
   -WorkspaceObject <PSSynapseWorkspace>
   -IntegrationRuntimeName <String>
   -DefinitionFile <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzSynapseLinkedServiceEncryptedCredential cmdlet encrypt credential in linked service with specified integration runtime.

Please ensure the following prerequisites are met:

  • Remote access option is enabled on the self-hosted integration runtime.
  • Powershell 7.0 or higher is used to execute the cmdlet.

Examples

Example 1

New-AzSynapseLinkedServiceEncryptedCredential -WorkspaceName ContosoWorkspace -ResourceGroupName ContosoRG -IntegrationRuntimeName "IR-LSEncryptedCredential" -DefinitionFile "D:\sqlLinkService.json" > "D:\SynapseEncryptedSQLServerLinkedService.json"

This command encrypts credential in file D:\SynapseEncryptedSQLServerLinkedService.json with the integration runtime named IR-LSEncryptedCredential.

Example 2

$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | New-AzSynapseLinkedServiceEncryptedCredential -IntegrationRuntimeName "IR-LSEncryptedCredential" -DefinitionFile "D:\sqlLinkService.json" > "D:\SynapseEncryptedSQLServerLinkedService.json"

This command encrypts credential in file D:\SynapseEncryptedSQLServerLinkedService.json with the integration runtime named IR-LSEncryptedCredential through pipeline.

Parameters

-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
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Force

Do not ask for confirmation.

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

-IntegrationRuntimeName

The integration runtime name.

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

-ResourceGroupName

Resource group name.

Type:String
Position:Named
Default value:None
Required:False
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

String