Stop-AzSqlInstanceOperation
语法
StopByNameAndManagedInstanceAndResourceGroupParameterSet (默认值)
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>]
说明
Stop-AzSqlInstanceOperation cmdlet 停止对 SQL 托管实例提供的作名称的作。
示例
示例 1:获取特定作
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
此命令在 SQL 托管实例上停止名为“d0f5bef5-e2b1-4ef8-bb42-2e54073874f9”的作。
示例 2:使用作资源 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
此命令停止使用资源 ID $managedInstanceOperation.Id 的作。
示例 3:使用作对象
$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
此命令停止使用对象$managedInstanceOperation的作。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Force
跳过执行操作的确认消息
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
要取消的作
StopByInputObjectParameterSet
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ManagedInstanceName
实例的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
StopByNameAndManagedInstanceAndResourceGroupParameterSet
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Name
操作的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | 操作名称 |
参数集
StopByNameAndManagedInstanceAndResourceGroupParameterSet
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ResourceGroupName
资源组的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
StopByNameAndManagedInstanceAndResourceGroupParameterSet
| Position: | 1 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-ResourceId
要停止的作对象的资源 ID
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
StopByResourceIdParameterSet
| Position: | 0 |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。
输出