Stop-AzSqlInstanceOperation
Stops a SQL managed instance's operations.
Syntax
StopByNameAndManagedInstanceAndResourceGroupParameterSet (Default)
Stop-AzSqlInstanceOperation
[-Name] <String>
[-ManagedInstanceName] <String>
[-ResourceGroupName] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
StopByResourceIdParameterSet
Stop-AzSqlInstanceOperation
[-ResourceId] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Stop-AzSqlInstanceOperation
[-InputObject] <AzureSqlManagedInstanceOperationModel>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Stop-AzSqlInstanceOperation cmdlet stops operation with provided operation name on a SQL managed instance.
Examples
Example 1: Get a specific operation
Stop-AzSqlInstanceOperation -ResourceGroupName ps3753 -ManagedInstanceName ps3698 -Name d0f5bef5-e2b1-4ef8-bb42-2e54073874f9
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/d0f5bef5-e2b1-4ef8-bb42-2e54073874f9
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : d0f5bef5-e2b1-4ef8-bb42-2e54073874f9
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 0
StartTime : 3/16/2020 12:49:53 PM
State : InProgress
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : True
This command stops operation with name 'd0f5bef5-e2b1-4ef8-bb42-2e54073874f9' on a SQL managed instance.
Example 2: Using operation resource id
$managedInstanceOperation = Get-AzSqlInstanceOperation -ResourceGroupName ps3753 -ManagedInstanceName ps3698 -Name 4253bf58-34f1-4499-80c6-198d94c659f7
Get-AzSqlInstanceOperation -ResourceId $managedInstanceOperation.Id
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/4253bf58-34f1-4499-80c6-198d94c659f7
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : 4253bf58-34f1-4499-80c6-198d94c659f7
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 0
StartTime : 3/16/2020 12:47:32 PM
State : InProgress
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : True
This command stops operation with resource id $managedInstanceOperation.Id.
Example 3: Using operation object
$managedInstanceOperation = Get-AzSqlInstanceOperation -ResourceGroupName ps3753 -ManagedInstanceName ps3698 -Name b15a2b78-c42c-4e00-bf87-7ef4737552dc
Stop-AzSqlInstanceOperation -InputObject $managedInstanceOperation
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/b15a2b78-c42c-4e00-bf87-7ef4737552dc
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : b15a2b78-c42c-4e00-bf87-7ef4737552dc
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 0
StartTime : 3/16/2020 12:44:57 PM
State : InProgress
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : True
This command stops operation with object $managedInstanceOperation.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Skip confirmation message for performing the action
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The operation to cancel
StopByInputObjectParameterSet
Position: 0
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ManagedInstanceName
The name of the instance.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
StopByNameAndManagedInstanceAndResourceGroupParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The name of the operation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: OperationName
Parameter sets
StopByNameAndManagedInstanceAndResourceGroupParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
StopByNameAndManagedInstanceAndResourceGroupParameterSet
Position: 1
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The resource id of operation object to stop
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
StopByResourceIdParameterSet
Position: 0
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs