Editar

Partilhar via


New-AzSynapseGitRepositoryConfig

Creates Git repository configuration.

Syntax

New-AzSynapseGitRepositoryConfig
   -RepositoryType <String>
   [-HostName <String>]
   -AccountName <String>
   [-ProjectName <String>]
   -RepositoryName <String>
   -CollaborationBranch <String>
   [-RootFolder <String>]
   [-TenantId <Guid>]
   [-LastCommitId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

This New-AzSynapseGitRepositoryConfig cmdlets creates a Git repository configuration which can be used in creating or updating a workspace.

Examples

Example 1

$config = New-AzSynapseGitRepositoryConfig -RepositoryType GitHub -AccountName ContosoAccount -RepositoryName ContosoRepo -CollaborationBranch main
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ("ContosoUser", $password)
New-AzSynapseWorkspace -ResourceGroupName ContosoResourceGroup -Name ContosoWorkspace -Location northeurope -DefaultDataLakeStorageAccountName ContosoAdlGen2Storage -DefaultDataLakeStorageFilesystem ContosoFileSystem -SqlAdministratorLoginCredential $creds -AsJob -GitRepository $config

The first command creates a Git repository configuration. Then the rest methods uses the configuration to creates a new Synapse workspace.

Parameters

-AccountName

GitHub or DevOps account name used for the repository.

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

-CollaborationBranch

Select the branch name where you will collaborate with others and from which you will publish.

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

-HostName

GitHub Enterprise host name. For example: https://github.mydomain.com

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

-LastCommitId

The last published commit Id.

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

-ProjectName

The project name you are connecting, only specify it when you choose DevOps.

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

-RepositoryName

The name of the repository you are connecting.

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

-RepositoryType

Select the repository type that you want to use to store your artifacts for this Synapse Analytics workspace, the type include DevOps and GitHub.

Type:String
Accepted values:GitHub, AzureDevOpsGit
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RootFolder

Displays the name of the folder to the location of your Azure Data Factory JSON resources are imported. The default value is /

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

-TenantId

Select the tenant Id to use when signing in into the Azure DevOps Git repository.

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

Inputs

None

Outputs

PSWorkspaceRepositoryConfiguration