Editar

Compartilhar via


Stop-AzSynapseSparkSession

Stops a Synapse Analytics Spark session.

Syntax

Stop-AzSynapseSparkSession
    -WorkspaceName <String>
    -SparkPoolName <String>
    -LivyId <Int32>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Stop-AzSynapseSparkSession
    -LivyId <Int32>
    -SparkPoolObject <PSSynapseSparkPool>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Stop-AzSynapseSparkSession
    -InputObject <PSSynapseSparkSession>
    [-PassThru]
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Stop-AzSynapseSparkSession cmdlet stops a Synapse Analytics Spark session.

Examples

Example 1

Stop-AzSynapseSparkSession -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -LivyId 324

This command stops a Synapse Analytics Spark session.

Example 2

$pool = Get-AzSynapseSparkPool -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool
$pool | Stop-AzSynapseSparkSession -LivyId 324

This command stops a Synapse Analytics Spark session through pipeline.

Example 3

$session = Get-AzSynapseSparkSession -WorkspaceName ContosoWorkspace -SparkPoolName ContosoSparkPool -LivyId 324
$session | Stop-AzSynapseSparkSession

This command stops a Synapse Analytics Spark session 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

-InputObject

Spark session input object, usually passed through the pipeline.

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

-LivyId

Identifier of Spark session.

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

-PassThru

This Cmdlet does not return an object by default. If this switch is specified, it returns true if successful.

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

-SparkPoolName

Name of Synapse Spark pool.

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

-SparkPoolObject

Spark pool input object, usually passed through the pipeline.

Type:PSSynapseSparkPool
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

Inputs

PSSynapseSparkPool

PSSynapseSparkSession

Outputs

Boolean