swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.
  title: SqlManagementClient
  version: 2019-06-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/preview/2019-06-01-preview/serverOperations.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: sql-serverOperations
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
parameters:
  ApiVersionParameter:
    description: The API version to use for the request.
    in: query
    name: api-version
    required: true
    type: string
    x-ms-parameter-location: client
  BlobAuditingPolicyNameParameter:
    description: The name of the blob auditing policy.
    enum:
      - default
    in: path
    name: blobAuditingPolicyName
    required: true
    type: string
    x-ms-parameter-location: method
  DatabaseNameParameter:
    description: The name of the database.
    in: path
    name: databaseName
    required: true
    type: string
    x-ms-parameter-location: method
  ManagedInstanceNameParameter:
    description: The name of the managed instance.
    in: path
    name: managedInstanceName
    required: true
    type: string
    x-ms-parameter-location: method
  ResourceGroupParameter:
    description: The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
  ServerNameParameter:
    description: The name of the server.
    in: path
    name: serverName
    required: true
    type: string
    x-ms-parameter-location: method
  SqlVirtualMachineContainerNameParameter:
    description: The name of the SqlVirtualMachineContainer.
    in: path
    name: sqlVirtualMachineContainerName
    required: true
    type: string
    x-ms-parameter-location: method
  SqlVirtualMachineInstanceNameParameter:
    description: The name of the SqlVirtualMachineInstance.
    in: path
    name: sqlVirtualMachineInstanceName
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: The subscription ID that identifies an Azure subscription.
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: client
  VirtualClusterNameParameter:
    description: The name of the virtual cluster.
    in: path
    name: virtualClusterName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/operations":
    get:
      description: Gets a list of operations performed on the server.
      operationId: ServerOperations_ListByServer
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: The request for getting server operations has been executed successfully.
          schema:
            $ref: "#/definitions/ServerOperationListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 400 NameAlreadyExists - The provided name already exists.

             * 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

             * 400 InvalidLoginName - The provided login name is invalid.

             * 400 InvalidUsername - Supplied user name contains invalid characters.

             * 400 PasswordTooShort - The provided password is too short

             * 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

             * 400 PasswordTooLong - The provided password is too long.

             * 400 PasswordNotComplex - The provided password is not complex enough.

             * 400 SubscriptionNotFound - The requested subscription was not found.

             * 400 InvalidParameterValue - An invalid value was given to a parameter.

             * 400 InvalidLocation - An invalid location was specified.

             * 400 InvalidServerName - Invalid server name specified.

             * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.

             * 400 TokenTooLong - The provided token is too long.

             * 400 ServerNotFound - The requested server was not found.

             * 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.

             * 400 SubscriptionNotFound - The requested subscription was not found.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

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

             * 404 OperationIdNotFound - The operation with Id does not exist.

             * 404 OperationIdNotFound - The operation with Id does not exist.

             * 409 OperationCancelled - The operation has been cancelled by user.

             * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

             * 409 ServerDisabled - Server is disabled.

             * 409 ConflictingServerOperation - An operation is currently in progress for the server.

             * 409 SubscriptionDisabled - Subscription is disabled.

             * 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

             * 409 ServerAlreadyExists - Duplicate server name.

             * 409 ServerDisabled - Server is disabled.

             * 409 ConflictingServerOperation - An operation is currently in progress for the server.

             * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

             * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.

             * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

             * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

             * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.
      tags:
        - ServerOperations
      x-ms-examples:
        List the server management operations:
          parameters:
            api-version: 2019-06-01-preview
            resourceGroupName: sqlcrudtest-7398
            serverName: sqlcrudtest-4645
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/11111111-1111-1111-1111-111111111111
                    name: 11111111-1111-1111-1111-111111111111
                    properties:
                      operation: MakeAllLogicalDatabasesAccessible
                      operationFriendlyName: MAKE ALL DBS ACCESSIBLE
                      percentComplete: 0
                      serverName: sqlcrudtest-4645
                      startTime: 2017-06-01T09:10:08.10Z
                      state: InProgress
                    type: Microsoft.Sql/servers/operations
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/operations/22222222-2222-2222-2222-222222222222
                    name: 22222222-2222-2222-2222-222222222222
                    properties:
                      operation: MakeAllLogicalDatabasesAccessible
                      operationFriendlyName: MAKE ALL DBS ACCESSIBLE
                      percentComplete: 100
                      serverName: sqlcrudtest-4645
                      startTime: 2017-06-01T09:00:08.10Z
                      state: Succeeded
                    type: Microsoft.Sql/servers/operations
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  ProxyResource:
    allOf:
      - $ref: "#/definitions/Resource"
    description: ARM proxy resource.
    properties: {}
    type: object
  Resource:
    description: ARM resource.
    properties:
      id:
        description: Resource ID.
        readOnly: true
        type: string
      name:
        description: Resource name.
        readOnly: true
        type: string
      type:
        description: Resource type.
        readOnly: true
        type: string
    type: object
    x-ms-azure-resource: true
  ServerOperation:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: A server operation.
    properties:
      properties:
        $ref: "#/definitions/ServerOperationProperties"
        description: Resource properties.
        x-ms-client-flatten: true
    type: object
  ServerOperationListResult:
    description: The response to a list server operations request
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/ServerOperation"
        readOnly: true
        type: array
    type: object
  ServerOperationProperties:
    description: The properties of a server operation.
    properties:
      description:
        description: The operation description.
        readOnly: true
        type: string
      errorCode:
        description: The operation error code.
        format: int32
        readOnly: true
        type: integer
      errorDescription:
        description: The operation error description.
        readOnly: true
        type: string
      errorSeverity:
        description: The operation error severity.
        format: int32
        readOnly: true
        type: integer
      estimatedCompletionTime:
        description: The estimated completion time of the operation.
        format: date-time
        readOnly: true
        type: string
      isCancellable:
        description: Whether the operation can be cancelled.
        readOnly: true
        type: boolean
      isUserError:
        description: Whether or not the error is a user error.
        readOnly: true
        type: boolean
      operation:
        description: The name of operation.
        readOnly: true
        type: string
      operationFriendlyName:
        description: The friendly name of operation.
        readOnly: true
        type: string
      percentComplete:
        description: The percentage of the operation completed.
        format: int32
        readOnly: true
        type: integer
      serverName:
        description: The name of the server.
        readOnly: true
        type: string
      startTime:
        description: The operation start time.
        format: date-time
        readOnly: true
        type: string
      state:
        description: The operation state.
        enum:
          - Pending
          - InProgress
          - Succeeded
          - Failed
          - CancelInProgress
          - Cancelled
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: ManagementOperationState
    type: object
