編輯

共用方式為


New-AzSynapseWorkspaceKey

Creates a workspace key.

Syntax

New-AzSynapseWorkspaceKey
   [-ResourceGroupName <String>]
   -WorkspaceName <String>
   -Name <String>
   -EncryptionKeyIdentifier <String>
   [-Activate]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzSynapseWorkspaceKey
   -WorkspaceObject <PSSynapseWorkspace>
   -Name <String>
   -EncryptionKeyIdentifier <String>
   [-Activate]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This New-AzSynapseWorkspaceKey cmdlet creates a workspace key.

Examples

Example 1

New-AzSynapseWorkspaceKey -ResourceGroupName ContosoResourceGroup -WorkspaceName ContosoWorkspace -Name ContosoWorkspaceKey -EncryptionKeyIdentifier https://<key-vault-url>/keys/<key-name>

This command creates a workspace key named ContosoWorkspaceKey under workspace ContosoWorkspace.

Example 2

$ws = Get-AzSynapseWorkspace -Name ContosoWorkspace
$ws | New-AzSynapseWorkspaceKey -Name ContosoWorkspaceKey -EncryptionKeyIdentifier https://<key-vault-url>/keys/<key-name>

This command creates a workspace key named ContosoWorkspaceKey under workspace ContosoWorkspace through pipeline.

Parameters

-Activate

Indicates whether to activate the workspace after a customer managed key is provided.

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

-EncryptionKeyIdentifier

Key identifier should be in the format of: https://{keyvaultname}.vault.azure.net/keys/{keyname}.

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

-Name

The name of the workspace key.

Type:String
Aliases:KeyName
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

PSWorkspaceKey