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: 2015-05-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/2015-05-01-preview/syncMembers.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: sql-syncMembers
  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
  DatabaseNameParameter:
    description: The name of the database.
    in: path
    name: databaseName
    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
  SubscriptionIdParameter:
    description: The subscription ID that identifies an Azure subscription.
    in: path
    name: subscriptionId
    required: true
    type: string
    x-ms-parameter-location: client
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers":
    get:
      description: Lists sync members in the given sync group.
      operationId: SyncMembers_ListBySyncGroup
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group.
          in: path
          name: syncGroupName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the list of sync members.
          schema:
            $ref: "#/definitions/SyncMemberListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        List sync members under a sync group:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                    name: syncgroupcrud-4879
                    properties:
                      databaseName: syncgroupcrud-7421
                      databaseType: AzureSqlDatabase
                      serverName: syncgroupcrud-3379.database.windows.net
                      syncDirection: Bidirectional
                      syncState: UnProvisioned
                      userName: myUser
                    type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}":
    delete:
      description: Deletes a sync member.
      operationId: SyncMembers_Delete
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group on which the sync member is hosted.
          in: path
          name: syncGroupName
          required: true
          type: string
        - description: The name of the sync member.
          in: path
          name: syncMemberName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully deleted the sync member.
        "202":
          description: Deleting the sync member is in progress.
        "204":
          description: The specified sync member does not exist.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        Delete a sync member:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets a sync member.
      operationId: SyncMembers_Get
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group on which the sync member is hosted.
          in: path
          name: syncGroupName
          required: true
          type: string
        - description: The name of the sync member.
          in: path
          name: syncMemberName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the specified sync member.
          schema:
            $ref: "#/definitions/SyncMember"
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 ResourceNotFound - The requested resource was not found.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        Get a sync member:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                name: syncgroupcrud-4879
                properties:
                  databaseName: syncgroupcrud-7421
                  databaseType: AzureSqlDatabase
                  serverName: syncgroupcrud-3379.database.windows.net
                  syncDirection: Bidirectional
                  syncState: UnProvisioned
                  userName: myUser
                type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
    patch:
      description: Updates an existing sync member.
      operationId: SyncMembers_Update
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group on which the sync member is hosted.
          in: path
          name: syncGroupName
          required: true
          type: string
        - description: The name of the sync member.
          in: path
          name: syncMemberName
          required: true
          type: string
        - description: The requested sync member resource state.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/SyncMember"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the sync member.
          schema:
            $ref: "#/definitions/SyncMember"
        "202":
          description: Updating the sync member is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        Update an existing sync member:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            parameters:
              properties:
                databaseName: syncgroupcrud-7421
                databaseType: AzureSqlDatabase
                serverName: syncgroupcrud-3379.database.windows.net
                syncDirection: Bidirectional
                syncState: UnProvisioned
                userName: myUser
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                name: syncgroupcrud-4879
                properties:
                  databaseName: syncgroupcrud-7421
                  databaseType: AzureSqlDatabase
                  serverName: syncgroupcrud-3379.database.windows.net
                  syncDirection: Bidirectional
                  syncState: UnProvisioned
                  userName: myUser
                type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
            "202": {}
      x-ms-long-running-operation: true
    put:
      description: Creates or updates a sync member.
      operationId: SyncMembers_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group on which the sync member is hosted.
          in: path
          name: syncGroupName
          required: true
          type: string
        - description: The name of the sync member.
          in: path
          name: syncMemberName
          required: true
          type: string
        - description: The requested sync member resource state.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/SyncMember"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the sync member.
          schema:
            $ref: "#/definitions/SyncMember"
        "201":
          description: Successfully created the sync member.
          schema:
            $ref: "#/definitions/SyncMember"
        "202":
          description: Creating or updating the sync member is in progress.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        Create a new sync member:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            parameters:
              properties:
                databaseName: syncgroupcrud-7421
                databaseType: AzureSqlDatabase
                serverName: syncgroupcrud-3379.database.windows.net
                syncDirection: Bidirectional
                syncState: UnProvisioned
                userName: myUser
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                name: syncgroupcrud-4879
                properties:
                  databaseName: syncgroupcrud-7421
                  databaseType: AzureSqlDatabase
                  serverName: syncgroupcrud-3379.database.windows.net
                  syncDirection: Bidirectional
                  syncState: UnProvisioned
                  userName: myUser
                type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                name: syncgroupcrud-4879
                properties:
                  databaseName: syncgroupcrud-7421
                  databaseType: AzureSqlDatabase
                  serverName: syncgroupcrud-3379.database.windows.net
                  syncDirection: Bidirectional
                  syncState: UnProvisioned
                  userName: myUser
                type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
            "202": {}
        Update a sync member:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            parameters:
              properties:
                databaseName: syncgroupcrud-7421
                databaseType: AzureSqlDatabase
                serverName: syncgroupcrud-3379.database.windows.net
                syncDirection: Bidirectional
                syncState: UnProvisioned
                userName: myUser
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                name: syncgroupcrud-4879
                properties:
                  databaseName: syncgroupcrud-7421
                  databaseType: AzureSqlDatabase
                  serverName: syncgroupcrud-3379.database.windows.net
                  syncDirection: Bidirectional
                  syncState: UnProvisioned
                  userName: myUser
                type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
            "201":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/syncMembers/syncgroupcrud-4879
                name: syncgroupcrud-4879
                properties:
                  databaseName: syncgroupcrud-7421
                  databaseType: AzureSqlDatabase
                  serverName: syncgroupcrud-3379.database.windows.net
                  syncDirection: Bidirectional
                  syncState: UnProvisioned
                  userName: myUser
                type: Microsoft.Sql/servers/databases/syncGroups/syncMembers
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema":
    post:
      description: Refreshes a sync member database schema.
      operationId: SyncMembers_RefreshMemberSchema
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group on which the sync member is hosted.
          in: path
          name: syncGroupName
          required: true
          type: string
        - description: The name of the sync member.
          in: path
          name: syncMemberName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully refreshed a sync member schema.
        "202":
          description: The sync member schema refresh operation is on going.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        Refresh a sync member database schema:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200": {}
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas":
    get:
      description: Gets a sync member database schema.
      operationId: SyncMembers_ListMemberSchemas
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the database on which the sync group is hosted.
          in: path
          name: databaseName
          required: true
          type: string
        - description: The name of the sync group on which the sync member is hosted.
          in: path
          name: syncGroupName
          required: true
          type: string
        - description: The name of the sync member.
          in: path
          name: syncMemberName
          required: true
          type: string
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully get a sync member schema.
          schema:
            $ref: "#/definitions/SyncFullSchemaPropertiesListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

             * 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

             * 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

             * 400 InvalidDatabaseResourceId - Invalid database resource identifier.

             * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

             * 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

             * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

             * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

             * 400 InvalidSyncGroup - Sync group is invalid.

             * 400 InvalidSyncMember - Sync member is invalid.

             * 400 InvalidSyncAgent - Sync agent is invalid.

             * 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

             * 409 CannotCreateSyncMemberDueToQuotaExceeded - Cannot create sync member due to quota exceeded.
      tags:
        - SyncMembers
      x-ms-examples:
        Get a sync member schema:
          parameters:
            api-version: 2015-05-01-preview
            databaseName: syncgroupcrud-4328
            resourceGroupName: syncgroupcrud-65440
            serverName: syncgroupcrud-8475
            subscriptionId: 00000000-1111-2222-3333-444444444444
            syncGroupName: syncgroupcrud-3187
            syncMemberName: syncgroupcrud-4879
          responses:
            "200":
              body:
                value:
                  - lastUpdateTime: 2017-05-30T07:16:08.21Z
                    tables:
                      - columns:
                          - dataSize: "4"
                            dataType: int
                            hasError: false
                            isPrimaryKey: false
                            name: intField
                            quotedName: "[intField]"
                          - dataSize: "100"
                            dataType: nvarchar
                            hasError: false
                            isPrimaryKey: false
                            name: charField
                            quotedName: "[charField]"
                        errorId: Schema_TableHasNoPrimaryKey
                        hasError: true
                        name: dbo.myTable
                        quotedName: "[dbo].[myTable]"
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  SyncFullSchemaProperties:
    description: Properties of the database full schema.
    properties:
      lastUpdateTime:
        description: Last update time of the database schema.
        format: date-time
        readOnly: true
        type: string
      tables:
        description: List of tables in the database full schema.
        items:
          $ref: "#/definitions/SyncFullSchemaTable"
        readOnly: true
        type: array
    type: object
  SyncFullSchemaPropertiesListResult:
    description: A list of sync schema properties.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/SyncFullSchemaProperties"
        readOnly: true
        type: array
    type: object
  SyncFullSchemaTable:
    description: Properties of the table in the database full schema.
    properties:
      columns:
        description: List of columns in the table of database full schema.
        items:
          $ref: "#/definitions/SyncFullSchemaTableColumn"
        readOnly: true
        type: array
      errorId:
        description: Error id of the table.
        readOnly: true
        type: string
      hasError:
        description: If there is error in the table.
        readOnly: true
        type: boolean
      name:
        description: Name of the table.
        readOnly: true
        type: string
      quotedName:
        description: Quoted name of the table.
        readOnly: true
        type: string
    type: object
  SyncFullSchemaTableColumn:
    description: Properties of the column in the table of database full schema.
    properties:
      dataSize:
        description: Data size of the column.
        readOnly: true
        type: string
      dataType:
        description: Data type of the column.
        readOnly: true
        type: string
      errorId:
        description: Error id of the column.
        readOnly: true
        type: string
      hasError:
        description: If there is error in the table.
        readOnly: true
        type: boolean
      isPrimaryKey:
        description: If it is the primary key of the table.
        readOnly: true
        type: boolean
      name:
        description: Name of the column.
        readOnly: true
        type: string
      quotedName:
        description: Quoted name of the column.
        readOnly: true
        type: string
    type: object
  SyncMember:
    allOf:
      - allOf:
          - 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
        description: ARM proxy resource.
        properties: {}
        type: object
    description: An Azure SQL Database sync member.
    properties:
      properties:
        $ref: "#/definitions/SyncMemberProperties"
        description: Resource properties.
        x-ms-client-flatten: true
    type: object
  SyncMemberListResult:
    description: A list of Azure SQL Database sync members.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/SyncMember"
        readOnly: true
        type: array
    type: object
  SyncMemberProperties:
    description: Properties of a sync member.
    properties:
      databaseName:
        description: Database name of the member database in the sync member.
        type: string
      databaseType:
        description: Database type of the sync member.
        enum:
          - AzureSqlDatabase
          - SqlServerDatabase
        type: string
        x-ms-enum:
          modelAsString: true
          name: SyncMemberDbType
      password:
        description: Password of the member database in the sync member.
        type: string
        x-ms-mutability:
          - create
          - update
      serverName:
        description: Server name of the member database in the sync member
        type: string
      sqlServerDatabaseId:
        description: SQL Server database id of the sync member.
        format: uuid
        type: string
      syncAgentId:
        description: ARM resource id of the sync agent in the sync member.
        type: string
      syncDirection:
        description: Sync direction of the sync member.
        enum:
          - Bidirectional
          - OneWayMemberToHub
          - OneWayHubToMember
        type: string
        x-ms-enum:
          modelAsString: true
          name: SyncDirection
      syncState:
        description: Sync state of the sync member.
        enum:
          - SyncInProgress
          - SyncSucceeded
          - SyncFailed
          - DisabledTombstoneCleanup
          - DisabledBackupRestore
          - SyncSucceededWithWarnings
          - SyncCancelling
          - SyncCancelled
          - UnProvisioned
          - Provisioning
          - Provisioned
          - ProvisionFailed
          - DeProvisioning
          - DeProvisioned
          - DeProvisionFailed
          - Reprovisioning
          - ReprovisionFailed
          - UnReprovisioned
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: SyncMemberState
      userName:
        description: User name of the member database in the sync member.
        type: string
    type: object
