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>]
Description
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:使用作業資源識別碼
$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。
輸出