swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: The AzureData management API provides a RESTful set of web APIs to manage Azure Data Resources. For example, register, delete and retrieve a SQL Server, SQL Server registration.
  title: AzureDataManagementClient
  version: 2017-03-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/azuredata/resource-manager/Microsoft.AzureData/preview/2017-03-01-preview/azuredata.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: azuredata
  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: API version to use for the request.
    in: query
    name: api-version
    required: true
    type: string
    x-ms-parameter-location: client
  ResourceGroupParameter:
    description: 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
  SqlServerNameParameter:
    description: Name of the Sql Server.
    in: path
    name: SqlServerName
    required: true
    type: string
    x-ms-parameter-location: method
  SqlServerRegistrationNameParameter:
    description: Name of the Sql Server registration.
    in: path
    name: SqlServerRegistrationNameParameter
    required: true
    type: string
    x-ms-parameter-location: method
  SubscriptionIdParameter:
    description: Subscription ID that identifies an Azure subscription.
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: client
paths:
  /providers/Microsoft.AzureData/operations:
    get:
      description: Lists all of the available SQL Server Registration API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved operations.
          schema:
            $ref: "#/definitions/OperationListResult"
        default:
          description: |-
            *** Error Responses: ***

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

             * 403 AccessDenied - Access denied.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - Operations
      x-ms-examples:
        Lists all of the available SQL Server Registration API operations.:
          parameters:
            api-version: 2017-03-01-preview
          responses:
            "200":
              body:
                value:
                  - display:
                      description: Retrives details of SQL Server Registration
                      operation: Get SQL Server Registration details
                      resource: SQL Server Registration
                    name: Microsoft.AzureData/sqlServerRegistrations/read
                  - display:
                      description: Create a new or change properties of existing SQL Server Registration
                      operation: Create a new or update existing SQL Server Registration
                      resource: SQL Server Registration
                    name: Microsoft.AzureData/sqlServerRegistrations/write
                  - display:
                      description: Delete existing SQL Server Registration
                      operation: Delete existing SQL Server Registration
                      resource: SQL Server Registration
                    name: Microsoft.AzureData/sqlServerRegistrations/delete
                  - display:
                      resource: Available REST operations
                    name: Microsoft.AzureData/operations/read
                  - display:
                      description: Retrieves details of SQL Server
                      operation: Get SQL Server Instance details
                    name: Microsoft.AzureData/sqlServers/read
                  - display:
                      description: Create a new or change properties of existing SQL Server
                      operation: Create new or update existing SQL Server
                    name: Microsoft.AzureData/sqlServers/write
                  - display:
                      description: Delete exisiting SQL Server
                      operation: Delete exisiting SQL Server
                    name: Microsoft.AzureData/sqlServers/delete
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/providers/Microsoft.AzureData/sqlServerRegistrations":
    get:
      description: Gets all SQL Server registrations in a subscription.
      operationId: SqlServerRegistrations_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved all SQL Server registrations in the subscription.
          schema:
            $ref: "#/definitions/SqlServerRegistrationListResult"
        default:
          description: |-
            *** Error Responses: ***

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 404 ResourceNotFound - The requested resource was not found.
      tags:
        - SqlServerRegistrations
      x-ms-examples:
        Gets all SQL Server registrations in a subscription.:
          parameters:
            api-version: 2017-03-01-preview
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration1
                    location: northeurope
                    name: testsqlregistration1
                    properties: {}
                    tags:
                      mytag: myval
                    type: Microsoft.AzureData/SqlServerRegistrations
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration2
                    location: northeurope
                    name: testsqlregistration2
                    properties: {}
                    tags:
                      mytag: myval
                    type: Microsoft.AzureData/SqlServerRegistrations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations":
    get:
      description: Gets all SQL Server registrations in a resource group.
      operationId: SqlServerRegistrations_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved all SQL Server registrations in the resource group.
          schema:
            $ref: "#/definitions/SqlServerRegistrationListResult"
        default:
          description: "*** Error Responses: ***"
      tags:
        - SqlServerRegistrations
      x-ms-examples:
        Gets all SQL Server registrations in a resource group.:
          parameters:
            api-version: 2017-03-01-preview
            resourceGroupName: testrg
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration1
                    location: northeurope
                    name: testsqlregistration1
                    properties: {}
                    tags:
                      mytag: myval
                    type: Microsoft.AzureData/SqlServerRegistrations
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration2
                    location: northeurope
                    name: testsqlregistration2
                    properties: {}
                    tags:
                      mytag: myval
                    type: Microsoft.AzureData/SqlServerRegistrations
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}":
    delete:
      description: Deletes a SQL Server registration.
      operationId: SqlServerRegistrations_Delete
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully deleted the SQL Server registration.
        "204":
          description: The specified SQL Server registration does not exist.
        default:
          description: |-
            *** Error Responses: ***

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 TinaGroupUpdateFailVmAttached - SQL Server registration cannot be updated as it has attached a SQL Server.

             * 400 InvalidSqlImageOffer - Provided SQL image offer is invalid.

             * 400 InvalidSqlSku - Provided SQL sku is invalid.

             * 400 OuPathAndDomainMismatch - OU path is not within the domain provided.

             * 400 InvalidAccountNameFormat - Account name format is invalid.

             * 400 CloudWitnessUnsupported - For Windows Server 2012R2 setup cloud witness is not allowed.

             * 400 FileShareWitnessDisAllowed - For Windows Server 2016 and beyond setup, file share witness is not allowed.

             * 400 InvalidStorageAccountUrl - Invalid storage account url.

             * 400 TinaGroupNameTooLong - SQL Server registration name cannot exceed 15 characters.

             * 400 InvalidTinaGroupName - Invalid SQL Server registration name.

             * 400 TinaGroupNotEmpty - SQL Server registration is not empty.

             * 400 TinaGroupUpdateNotAllowed - Update to SQL Server registration is not allowed.

             * 403 AccessDenied - Access denied.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServerRegistrations
      x-ms-examples:
        Deletes a SQL Server registration.:
          parameters:
            api-version: 2017-03-01-preview
            resourceGroupName: testrg
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets a SQL Server registration.
      operationId: SqlServerRegistrations_Get
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the SQL Server registration.
          schema:
            $ref: "#/definitions/SqlServerRegistration"
        default:
          description: |-
            *** Error Responses: ***

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

             * 403 AccessDenied - Access denied.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServerRegistrations
      x-ms-examples:
        Gets a SQL Server registration.:
          parameters:
            api-version: 2017-03-01-preview
            resourceGroupName: testrg
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                location: northeurope
                name: testsqlregistration
                properties: {}
                tags:
                  mytag: myval
                type: Microsoft.AzureData/SqlServerRegistrations
    patch:
      description: Updates SQL Server Registration tags.
      operationId: SqlServerRegistrations_Update
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - description: The SQL Server Registration.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/SqlServerRegistrationUpdate"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the SQL Server Registration.
          schema:
            $ref: "#/definitions/SqlServerRegistration"
        default:
          description: |-
            *** Error Responses: ***

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 403 AccessDenied - Access denied.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 404 ResourceNotFound - The requested resource was not found.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServerRegistrations
      x-ms-examples:
        Updates a SQL Server Registration tags.:
          parameters:
            api-version: 2017-03-01-preview
            parameters:
              tags:
                mytag: myval
            resourceGroupName: testrg
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                location: northeurope
                name: testsqlregistration
                properties: {}
                tags:
                  mytag: myval
                type: Microsoft.AzureData/SqlServerRegistrations
    put:
      description: Creates or updates a SQL Server registration.
      operationId: SqlServerRegistrations_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - description: The SQL Server registration to be created or updated.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/SqlServerRegistration"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the SQL Server registration.
          schema:
            $ref: "#/definitions/SqlServerRegistration"
        "201":
          description: Successfully created the SQL Server registration.
          schema:
            $ref: "#/definitions/SqlServerRegistration"
        default:
          description: |-
            *** Error Responses: ***

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 TinaGroupUpdateFailVmAttached - SQL Server registration cannot be updated as it has attached a SQL Server.

             * 400 InvalidSqlImageOffer - Provided SQL image offer is invalid.

             * 400 InvalidSqlSku - Provided SQL sku is invalid.

             * 400 OuPathAndDomainMismatch - OU path is not within the domain provided.

             * 400 InvalidAccountNameFormat - Account name format is invalid.

             * 400 CloudWitnessUnsupported - For Windows Server 2012R2 setup cloud witness is not allowed.

             * 400 FileShareWitnessDisAllowed - For Windows Server 2016 and beyond setup, file share witness is not allowed.

             * 400 InvalidStorageAccountUrl - Invalid storage account url.

             * 400 TinaGroupNameTooLong - SQL Server registration name cannot exceed 15 characters.

             * 400 InvalidTinaGroupName - Invalid SQL Server registration name.

             * 400 TinaGroupNotEmpty - SQL Server registration is not empty.

             * 400 TinaGroupUpdateNotAllowed - Update to SQL Server registration is not allowed.

             * 403 AccessDenied - Access denied.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServerRegistrations
      x-ms-examples:
        Creates or updates a SQL Server registration.:
          parameters:
            api-version: 2017-03-01-preview
            parameters:
              location: northeurope
              properties: {}
              tags:
                mytag: myval
            resourceGroupName: testrg
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                location: northeurope
                name: testsqlregistration
                properties: {}
                tags:
                  mytag: myval
                type: Microsoft.AzureData/SqlServerRegistrations
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                location: northeurope
                name: testsqlregistration
                properties: {}
                tags:
                  mytag: myval
                type: Microsoft.AzureData/SqlServerRegistrations
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers":
    get:
      description: Gets all SQL Servers in a SQL Server Registration.
      operationId: SqlServers_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - description: The child resources to include in the response.
          in: query
          name: $expand
          required: false
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved all SQL Servers in the SQL Server Registration.
          schema:
            $ref: "#/definitions/SqlServerListResult"
        default:
          description: "*** Error Responses: ***"
      tags:
        - SqlServers
      x-ms-examples:
        Gets all SQL Servers in a SQL Server Registration.:
          parameters:
            api-version: 2017-03-01-preview
            resourceGroupName: testrg
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver1
                    name: testsqlserver1
                    properties:
                      cores: 8
                      edition: Latin
                      propertyBag: ""
                      registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                      version: "2008"
                    type: Microsoft.AzureData/SqlServerRegistrations/SqlServers
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver2
                    name: testsqlserver2
                    properties:
                      cores: 16
                      edition: Latin
                      propertyBag: ""
                      registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                      version: "2008"
                    type: Microsoft.AzureData/SqlServerRegistrations/SqlServers
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/sqlServerRegistrations/{sqlServerRegistrationName}/sqlServers/{sqlServerName}":
    delete:
      description: Deletes a SQL Server.
      operationId: SqlServers_Delete
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - description: Name of the SQL Server.
          in: path
          name: sqlServerName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully deleted the SQL Server.
        "204":
          description: The specified SQL Server does not exist.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidVmResourceIdChange - Server resource id property cannot be updated.

             * 400 TinaAlreadyIncludedInGroup - SQL Server cannot be moved from one group to another in same operation.

             * 400 TinaCannotRemoveFromGroup - SQL Server cannot be removed from group.

             * 400 VmLocationMismatch - VM location does not match that of SQL Server.

             * 400 SqlSkuMismatchWithGroup - SQL sku set on the SQL Server registration does not match that of the SQL Server.

             * 400 VmInsufficientPermission - Insufficient permission to Vm.

             * 400 SingleNicOnVmAllowed - Only Single NIC Servers are allowed.

             * 400 InvalidTinaGroupResourceIdParameterValue - SQL Server registration resource id is not in correct format.

             * 400 MismatchVmGroupSubscription - Subscription id for SQL Server and SQL Server registration are different.

             * 400 IncompleteDomainCredentialsProperty - Incomplete input provided for domain credentials property.

             * 400 BYOLChangeToPAYGNotSupported - The conversion from AHUB to PAYG is not supported for BYOL images

             * 400 InvalidVmResourceIdParameterValue - Provided Server resource id is not valid.

             * 400 MismatchInTinaAndVmResourceIdSubscription - Mismatch in subscription id for SQL Server and Server resource id property.

             * 400 MismatchTinaAndVmName - SQL Server name is not same as the Server name provided on ServerResourceId property.

             * 400 MismatchTinaAndVmRgName - SQL Server resource group name is not same as the Server resource group name provided on ServerResourceId property.

             * 400 NotSupportedTinaOSVersion - Server OS type is not Windows. Only Windows OS versions are supported

             * 400 VmNotRunning - The VM is not in running state.

             * 400 VmAgentNotRunning - The VM agent is not installed or in running state.

             * 400 SqlExtNotInstalled - Sql Iaas Extension is not installed on Server.

             * 400 PAYGNotSupportedForNonGalleryVM - License type PAYG is invalid for this Server as this was not created from Azure marketplace image.

             * 400 SqlVersionMismatchWithGroup - SQL version mismatch with SQL Server registration.

             * 400 VmOSVersionMismatchWithGroup - OS version mismatch with group.

             * 400 AutoBackupEncryptionPasswordNotSpecified - Password not provided when enabling encryption as auto backup setting.

             * 400 BackupScheduleTypeNotSet - Backup schedule type needs to be set.

             * 400 BackupStorageCredentialsNotSpecified - Backup storage credentials are not specified.

             * 400 KeyVaultCredentialsNotSpecified - Key vault credentials not specified.

             * 400 SqlCredentialsNotSpecified - SQL Server credentials are not specified.

             * 400 IncompleteAutoPatchingSettings - Incomplete auto patching settings specified.

             * 400 IncompleteAutoBackupSettings - Incomplete auto backup settings specified.

             * 400 IncompleteSqlStorageSettings - Incomplete SQL storage settings specified.

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

             * 403 AccessDenied - Access denied.

             * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.

             * 404 SubscriptionDoesNotHaveTINAInResourceGroup - Subscription does not have SQL Server Instance in resource group.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServers
      x-ms-examples:
        Deletes a SQL Server.:
          parameters:
            api-version: 2017-03-01-preview
            resourceGroupName: testrg
            sqlServerName: testsqlserver
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets a SQL Server.
      operationId: SqlServers_Get
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - description: Name of the SQL Server.
          in: path
          name: sqlServerName
          required: true
          type: string
        - description: The child resources to include in the response.
          in: query
          name: $expand
          required: false
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the SQL Server.
          schema:
            $ref: "#/definitions/SqlServer"
        default:
          description: |-
            *** Error Responses: ***

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

             * 403 AccessDenied - Access denied.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServers
      x-ms-examples:
        Gets a SQL Server.:
          parameters:
            api-version: 2017-03-01-preview
            parameters: {}
            resourceGroupName: testrg
            sqlServerName: testsqlserver
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver
                name: testsqlserver
                properties:
                  cores: 8
                  edition: Latin
                  propertyBag: ""
                  registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                  version: "2008"
                type: Microsoft.AzureData/SqlServerRegistrations/SqlServers
    put:
      description: Creates or updates a SQL Server.
      operationId: SqlServers_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - description: Name of the SQL Server registration.
          in: path
          name: sqlServerRegistrationName
          required: true
          type: string
        - description: Name of the SQL Server.
          in: path
          name: sqlServerName
          required: true
          type: string
        - description: The SQL Server to be created or updated.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/SqlServer"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the SQL Server.
          schema:
            $ref: "#/definitions/SqlServer"
        "201":
          description: Successfully created the SQL Server.
          schema:
            $ref: "#/definitions/SqlServer"
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidVmResourceIdChange - Server resource id property cannot be updated.

             * 400 TinaAlreadyIncludedInGroup - SQL Server cannot be moved from one group to another in same operation.

             * 400 TinaCannotRemoveFromGroup - SQL Server cannot be removed from group.

             * 400 VmLocationMismatch - VM location does not match that of SQL Server.

             * 400 SqlSkuMismatchWithGroup - SQL sku set on the SQL Server registration does not match that of the SQL Server.

             * 400 VmInsufficientPermission - Insufficient permission to Vm.

             * 400 SingleNicOnVmAllowed - Only Single NIC Servers are allowed.

             * 400 InvalidTinaGroupResourceIdParameterValue - SQL Server registration resource id is not in correct format.

             * 400 MismatchVmGroupSubscription - Subscription id for SQL Server and SQL Server registration are different.

             * 400 IncompleteDomainCredentialsProperty - Incomplete input provided for domain credentials property.

             * 400 BYOLChangeToPAYGNotSupported - The conversion from AHUB to PAYG is not supported for BYOL images

             * 400 InvalidVmResourceIdParameterValue - Provided Server resource id is not valid.

             * 400 MismatchInTinaAndVmResourceIdSubscription - Mismatch in subscription id for SQL Server and Server resource id property.

             * 400 MismatchTinaAndVmName - SQL Server name is not same as the Server name provided on ServerResourceId property.

             * 400 MismatchTinaAndVmRgName - SQL Server resource group name is not same as the Server resource group name provided on ServerResourceId property.

             * 400 NotSupportedTinaOSVersion - Server OS type is not Windows. Only Windows OS versions are supported

             * 400 VmNotRunning - The VM is not in running state.

             * 400 VmAgentNotRunning - The VM agent is not installed or in running state.

             * 400 SqlExtNotInstalled - Sql Iaas Extension is not installed on Server.

             * 400 PAYGNotSupportedForNonGalleryVM - License type PAYG is invalid for this Server as this was not created from Azure marketplace image.

             * 400 SqlVersionMismatchWithGroup - SQL version mismatch with SQL Server registration.

             * 400 VmOSVersionMismatchWithGroup - OS version mismatch with group.

             * 400 AutoBackupEncryptionPasswordNotSpecified - Password not provided when enabling encryption as auto backup setting.

             * 400 BackupScheduleTypeNotSet - Backup schedule type needs to be set.

             * 400 BackupStorageCredentialsNotSpecified - Backup storage credentials are not specified.

             * 400 KeyVaultCredentialsNotSpecified - Key vault credentials not specified.

             * 400 SqlCredentialsNotSpecified - SQL Server credentials are not specified.

             * 400 IncompleteAutoPatchingSettings - Incomplete auto patching settings specified.

             * 400 IncompleteAutoBackupSettings - Incomplete auto backup settings specified.

             * 400 IncompleteSqlStorageSettings - Incomplete SQL storage settings specified.

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

             * 400 InvalidCrossSubscriptionVmMove - Invalid cross subscription move of resource.

             * 400 RPGenericUser - User Failure when calling other Resource Provider.

             * 400 InvalidArgument - Invalid argument '{0}'.

             * 400 ArgumentNotInRange - Argument '{0}' not in range.

             * 400 ResourceNotProvisioned - As the resource: {0} is not in a provisioned state, the request cannot be proceeded forward

             * 400 InvalidRgResourceId - Invalid Resourcegroup resource id specified.

             * 403 AccessDenied - Access denied.

             * 404 SubscriptionDoesNotHaveTINAGroupInResourceGroup - Subscription does not have SQL Server registration in resource group.

             * 404 SubscriptionDoesNotHaveTINAInResourceGroup - Subscription does not have SQL Server Instance in resource group.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotExist - Subscription id does not exist.

             * 404 ResourceDoesNotExist - Resource does not exist.

             * 404 OperationIdNotFound - Operation id could not be found.

             * 404 OperationTypeNotFound - Operation Type not found.

             * 409 ResourceAlreadyExists - Resource already exists.

             * 409 SqlExtensionNotInstalled - SQL extension not installed.

             * 409 MissingMoveResources - Cannot move resources(s) because some resources are missing in the request.

             * 409 OperationInProgress - Operation in progress on resource already.

             * 409 OperationCanceled - Operation Cancelled.

             * 500 RPGenericSystem - System Failure when calling other Resource Provider.

             * 500 UnExpectedErrorOccurred - Unexpected error occurred.

             * 500 OperationTimeout - Operation timed out.
      tags:
        - SqlServers
      x-ms-examples:
        Creates or updates a SQL Server in a Registration group.:
          parameters:
            api-version: 2017-03-01-preview
            parameters:
              properties:
                cores: 8
                edition: Latin
                propertyBag: ""
                registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                version: "2008"
            resourceGroupName: testrg
            sqlServerName: testsqlserver
            sqlServerRegistrationName: testsqlregistration
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver
                name: testsqlserver
                properties:
                  cores: 8
                  edition: Latin
                  propertyBag: ""
                  registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                  version: "2008"
                type: Microsoft.AzureData/SqlServerRegistrations/SqlServers
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration/sqlServers/testsqlserver
                name: testsqlserver
                properties:
                  cores: 8
                  edition: Latin
                  propertyBag: ""
                  registrationID: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.AzureData/SqlServerRegistrations/testsqlregistration
                  version: "2008"
                type: Microsoft.AzureData/SqlServerRegistrations/SqlServers
definitions:
  Operation:
    description: SQL REST API operation definition.
    properties:
      display:
        $ref: "#/definitions/OperationDisplay"
        description: The localized display information for this particular operation / action.
        readOnly: true
      name:
        description: The name of the operation being performed on this particular object.
        readOnly: true
        type: string
      origin:
        description: The intended executor of the operation.
        enum:
          - user
          - system
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: OperationOrigin
      properties:
        additionalProperties:
          type: object
        description: Additional descriptions for the operation.
        readOnly: true
        type: object
        x-ms-client-flatten: false
    type: object
  OperationDisplay:
    description: Display metadata associated with the operation.
    properties:
      description:
        description: The localized friendly description for the operation.
        readOnly: true
        type: string
      operation:
        description: The localized friendly name for the operation.
        readOnly: true
        type: string
      provider:
        description: The localized friendly form of the resource provider name.
        readOnly: true
        type: string
      resource:
        description: The localized friendly form of the resource type related to this action/operation.
        readOnly: true
        type: string
    type: object
  OperationListResult:
    description: Result of the request to list SQL operations.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/Operation"
        readOnly: true
        type: array
    type: object
  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
  SqlServer:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: A SQL server.
    properties:
      properties:
        $ref: "#/definitions/SqlServerProperties"
        description: Resource properties.
        x-ms-client-flatten: true
    type: object
  SqlServerListResult:
    description: A list of SQL servers.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/SqlServer"
        readOnly: true
        type: array
    type: object
  SqlServerProperties:
    description: The SQL server properties.
    properties:
      cores:
        description: Cores of the Sql Server.
        format: int32
        type: integer
        x-ms-mutability:
          - update
      edition:
        description: Sql Server Edition.
        type: string
      propertyBag:
        description: Sql Server Json Property Bag.
        type: string
      registrationID:
        description: ID for Parent Sql Server Registration.
        type: string
      version:
        description: Version of the Sql Server.
        type: string
    type: object
  SqlServerRegistration:
    allOf:
      - $ref: "#/definitions/TrackedResource"
    description: A SQL server registration.
    properties:
      properties:
        $ref: "#/definitions/SqlServerRegistrationProperties"
        description: Resource properties.
        x-ms-client-flatten: true
    required:
      - location
    type: object
  SqlServerRegistrationListResult:
    description: Server.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/SqlServerRegistration"
        readOnly: true
        type: array
    type: object
  SqlServerRegistrationProperties:
    description: The SQL server Registration properties.
    properties:
      propertyBag:
        description: Optional Properties as JSON string
        type: string
      resourceGroup:
        description: Resource Group Name
        type: string
      subscriptionId:
        description: Subscription Id
        format: uuid
        type: string
    type: object
  SqlServerRegistrationUpdate:
    description: An update to a SQL Server Registration.
    properties:
      tags:
        additionalProperties:
          type: string
        description: Resource tags.
        type: object
    type: object
  TrackedResource:
    allOf:
      - $ref: "#/definitions/Resource"
    description: ARM tracked top level resource.
    properties:
      location:
        description: Resource location.
        type: string
        x-ms-mutability:
          - read
          - create
      tags:
        additionalProperties:
          type: string
        description: Resource tags.
        type: object
    required:
      - location
    type: object
