Set-AzDataFactoryV2LinkedService

Links a data store or a cloud service to Data Factory.

Syntax

Set-AzDataFactoryV2LinkedService
   [-Name] <String>
   [-DefinitionFile] <String>
   [-Force]
   [-ResourceGroupName] <String>
   [-DataFactoryName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzDataFactoryV2LinkedService
   [-DefinitionFile] <String>
   [-Force]
   [-ResourceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzDataFactoryV2LinkedService cmdlet links a data store or a cloud service to Azure Data Factory. If you specify a name for a linked service that already exists, this cmdlet prompts you for confirmation before it replaces the linked service. If you specify the Force parameter, the cmdlet replaces the existing linked service without confirmation. Perform these operations in the following order: -- Create a data factory. -- Create linked services. -- Create datasets. -- Create a pipeline.

Examples

Example 1: Create a linked service

Set-AzDataFactoryV2LinkedService -ResourceGroupName "ADF" -DataFactoryName "WikiADF" -Name "LinkedServiceCuratedWikiData" -File "C:\\samples\\WikiSample\\LinkedServiceCuratedWikiData.json" | Format-List

LinkedServiceName : LinkedServiceCuratedWikiData
    ResourceGroupName : ADF
    DataFactoryName   : WikiADF
    Properties        : Microsoft.Azure.Management.DataFactory.Models.AzureStorageLinkedService

This command creates a linked service named LinkedServiceCuratedWikiData in the data factory named WikiADF. This linked service links an Azure blob store specified in the file to the data factory named WikiADF. The command passes the result to the Format-List cmdlet by using the pipeline operator. That Windows PowerShell cmdlet formats the results. For more information, type Get-Help Format-List.

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

-DataFactoryName

Specifies the name of a data factory. This cmdlet creates a linked service for the data factory that this parameter specifies.

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

-Force

Runs the cmdlet without prompting for confirmation.

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

-Name

Specifies the name of the linked service to create.

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

-ResourceGroupName

Specifies the name of an Azure resource group. This cmdlet creates a linked service for the group that this parameter specifies.

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

-ResourceId

The Azure resource ID.

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

-WhatIf

Shows what happens if the cmdlet runs, but doesn't run the cmdlet.

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

Inputs

String

Outputs

PSLinkedService

Notes

Keywords: azure, azurerm, arm, resource, management, manager, data, factories