Get-AzSqlInstanceOperation
Hämtar åtgärder för en SQL-hanterad instans.
Syntax
Get-AzSqlInstanceOperation
[-Name <String>]
-ManagedInstanceName <String>
-ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceOperation
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceOperation
-ManagedInstanceName <String>
-ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Cmdleten Get-AzSqlInstanceOperation hämtar information om åtgärderna på en SQL-hanterad instans. Du kan visa alla åtgärder på en hanterad instans eller visa en specifik åtgärd genom att ange åtgärdsnamnet.
Exempel
Exempel 1: Hämta alla instansåtgärder
Get-AzSqlInstanceOperation -ResourceGroupName ps3753 -ManagedInstanceName ps3698
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/5870c6d8-6703-4b27-8ae4-687b4ca7caea
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : 5870c6d8-6703-4b27-8ae4-687b4ca7caea
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 100
StartTime : 3/16/2020 8:11:13 AM
State : Succeeded
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : False
OperationParameters : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationParametersPair
OperationSteps : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationSteps
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/79f2c91b-0080-4c14-b9b4-d9991c6e82dd
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : 79f2c91b-0080-4c14-b9b4-d9991c6e82dd
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 100
StartTime : 3/16/2020 8:19:53 AM
State : Cancelled
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : False
OperationParameters : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationParametersPair
OperationSteps : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationSteps
Det här kommandot hämtar alla åtgärder som en SQL-hanterad instans.
Exempel 2: Hämta en specifik åtgärd
Get-AzSqlInstanceOperation -ResourceGroupName ps3753 -ManagedInstanceName ps3698 -Name 5870c6d8-6703-4b27-8ae4-687b4ca7caea
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/5870c6d8-6703-4b27-8ae4-687b4ca7caea
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : 5870c6d8-6703-4b27-8ae4-687b4ca7caea
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 100
StartTime : 3/16/2020 8:11:13 AM
State : Succeeded
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : False
OperationParameters : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationParametersPair
OperationSteps : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationSteps
Det här kommandot hämtar åtgärden med namnet "5870c6d8-6703-4b27-8ae4-687b4ca7caea" på en SQL-hanterad instans.
Exempel 3: Använda åtgärdsresurs-ID
$managedInstanceOperation = Get-AzSqlInstanceOperation -ResourceGroupName ps3753 -ManagedInstanceName ps3698 -Name 5870c6d8-6703-4b27-8ae4-687b4ca7caea
Get-AzSqlInstanceOperation -ResourceId $managedInstanceOperation.Id
Id : /subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/5870c6d8-6703-4b27-8ae4-687b4ca7caea
ResourceGroupName : ps3753
ManagedInstanceName : ps3698
Name : 5870c6d8-6703-4b27-8ae4-687b4ca7caea
Operation : UpsertManagedServer
OperationFriendlyName : UPDATE MANAGED SERVER
PercentComplete : 100
StartTime : 3/16/2020 8:11:13 AM
State : Succeeded
ErrorCode :
ErrorDescription :
ErrorSeverity :
IsUserError :
EstimatedCompletionTime :
Description :
IsCancellable : False
OperationParameters : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationParametersPair
OperationSteps : Microsoft.Azure.Management.Sql.Models.ManagedInstanceOperationSteps
Det här kommandot hämtar åtgärden med ID :/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/ps3753/providers/Microsoft.Sql/managedInstances/ps3698/operations/5870c6d8-6703-4b27-8ae4-687b4ca7caea".
Parametrar
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ManagedInstanceName
Namnet på instansen.
Typ: | String |
Alias: | InstanceName |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | True |
-Name
Namnet på åtgärden.
Typ: | String |
Alias: | OperationName |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | True |
-ResourceGroupName
Namnet på resursgruppen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceId
Resursidentifieraren för den hanterade instansåtgärden.
Typ: | String |
Position: | 0 |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
Indata
Utdata
Azure PowerShell