Managed Instance Operations - List By Managed Instance

Gets a list of operations performed on the managed instance.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations?api-version=2021-02-01-preview

URI Parameters

Name In Required Type Description
managedInstanceName
path True
  • string

The name of the managed instance.

resourceGroupName
path True
  • string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

subscriptionId
path True
  • string

The subscription ID that identifies an Azure subscription.

api-version
query True
  • string

The API version to use for the request.

Responses

Name Type Description
200 OK

The request for getting managed instance operations has been executed successfully.

Other Status Codes

*** Error Responses: ***

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.

Examples

List the managed instance management operations

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations?api-version=2021-02-01-preview

Sample Response

{
  "value": [
    {
      "properties": {
        "managedInstanceName": "sqlcrudtest-4645",
        "operation": "UpsertManagedServer",
        "operationFriendlyName": "UPDATE MANAGED SERVER",
        "percentComplete": 100,
        "startTime": "2019-12-06T11:08:44.49Z",
        "state": "Cancelled",
        "isCancellable": false
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111",
      "name": "11111111-1111-1111-1111-111111111111",
      "type": "Microsoft.Sql/managedInstances/operations"
    },
    {
      "properties": {
        "managedInstanceName": "sqlcrudtest-4645",
        "operation": "UpsertManagedServer",
        "operationFriendlyName": "UPDATE MANAGED SERVER",
        "percentComplete": 50,
        "startTime": "2019-12-06T11:08:44.49Z",
        "state": "InProgress",
        "isCancellable": true,
        "operationParameters": {
          "currentParameters": {
            "family": "Gen4",
            "tier": "GeneralPurpose",
            "vCores": 8,
            "storageSizeInGB": 32
          },
          "requestedParameters": {
            "family": "Gen4",
            "tier": "BusinessCritical",
            "vCores": 8,
            "storageSizeInGB": 128
          }
        },
        "operationSteps": {
          "totalSteps": "3",
          "currentStep": 3,
          "stepsList": [
            {
              "order": 1,
              "name": "Request validation",
              "status": "Completed"
            },
            {
              "order": 2,
              "name": "Virtual Cluster resize/creation",
              "status": "Completed"
            },
            {
              "order": 3,
              "name": "New SQL Instance Startup",
              "status": "InProgress"
            }
          ]
        }
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222",
      "name": "22222222-2222-2222-2222-222222222222",
      "type": "Microsoft.Sql/managedInstances/operations"
    },
    {
      "properties": {
        "managedInstanceName": "sqlcrudtest-4645",
        "operation": "UpsertManagedServer",
        "operationFriendlyName": "UPDATE MANAGED SERVER",
        "percentComplete": 100,
        "startTime": "2019-12-06T14:48:34.583Z",
        "state": "Failed",
        "errorCode": 45157,
        "errorDescription": "Server 'sqlcrudtest-4645' is busy with another operation. Please try your operation later.",
        "errorSeverity": 16,
        "isUserError": true,
        "isCancellable": false
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/33333333-3333-3333-3333-333333333333",
      "name": "33333333-3333-3333-3333-333333333333",
      "type": "Microsoft.Sql/managedInstances/operations"
    },
    {
      "properties": {
        "managedInstanceName": "sqlcrudtest-4645",
        "operation": "MakeAllManagedDatabasesAccessible",
        "operationFriendlyName": "MAKE ALL MANAGED DBS ACCESSIBLE",
        "percentComplete": 100,
        "startTime": "2017-06-01T09:00:08.1Z",
        "state": "Succeeded",
        "operationSteps": {
          "totalSteps": "1",
          "currentStep": 1,
          "stepsList": [
            {
              "order": 1,
              "name": "Request validation",
              "status": "Failed"
            }
          ]
        }
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/managedInstances/sqlcrudtest-4645/operations/44444444-4444-4444-4444-444444444444",
      "name": "44444444-4444-4444-4444-444444444444",
      "type": "Microsoft.Sql/managedInstances/operations"
    }
  ]
}

Definitions

ManagedInstanceOperation

A managed instance operation.

ManagedInstanceOperationListResult

The response to a list managed instance operations request

ManagedInstanceOperationParametersPair

The parameters of a managed instance operation.

ManagedInstanceOperationSteps

The steps of a managed instance operation.

ManagementOperationState

The operation state.

UpsertManagedServerOperationParameters
UpsertManagedServerOperationStep

ManagedInstanceOperation

A managed instance operation.

Name Type Description
id
  • string

Resource ID.

name
  • string

Resource name.

properties.description
  • string

The operation description.

properties.errorCode
  • integer

The operation error code.

properties.errorDescription
  • string

The operation error description.

properties.errorSeverity
  • integer

The operation error severity.

properties.estimatedCompletionTime
  • string

The estimated completion time of the operation.

properties.isCancellable
  • boolean

Whether the operation can be cancelled.

properties.isUserError
  • boolean

Whether or not the error is a user error.

properties.managedInstanceName
  • string

The name of the managed instance the operation is being performed on.

properties.operation
  • string

The name of operation.

properties.operationFriendlyName
  • string

The friendly name of operation.

properties.operationParameters

The operation parameters.

properties.operationSteps

The operation steps.

properties.percentComplete
  • integer

The percentage of the operation completed.

properties.startTime
  • string

The operation start time.

properties.state

The operation state.

type
  • string

Resource type.

ManagedInstanceOperationListResult

The response to a list managed instance operations request

Name Type Description
nextLink
  • string

Link to retrieve next page of results.

value

Array of results.

ManagedInstanceOperationParametersPair

The parameters of a managed instance operation.

Name Type Description
currentParameters

The current parameters.

requestedParameters

The requested parameters.

ManagedInstanceOperationSteps

The steps of a managed instance operation.

Name Type Description
currentStep
  • integer

The number of current operation steps.

stepsList

The operation steps list.

totalSteps
  • string

The total number of operation steps.

ManagementOperationState

The operation state.

Name Type Description
CancelInProgress
  • string
Cancelled
  • string
Failed
  • string
InProgress
  • string
Pending
  • string
Succeeded
  • string

UpsertManagedServerOperationParameters

Name Type Description
family
  • string
storageSizeInGB
  • integer
tier
  • string
vCores
  • integer

UpsertManagedServerOperationStep

Name Type Description
name
  • string
order
  • integer
status enum:
  • Canceled
  • Completed
  • Failed
  • InProgress
  • NotStarted
  • SlowedDown