swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.
  title: PostgreSQLManagementClient
  version: 2017-12-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/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2017-12-01-preview/postgresql.json
      version: "2.0"
  x-preferred: true
  x-providerName: azure.com
  x-serviceName: postgresql
  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
security:
  - azure_auth:
      - user_impersonation
parameters:
  ApiVersionParameter:
    description: The API version to use for the request.
    in: query
    name: api-version
    required: true
    type: string
  ConfigurationNameParameter:
    description: The name of the server configuration.
    in: path
    name: configurationName
    required: true
    type: string
    x-ms-parameter-location: method
  DatabaseNameParameter:
    description: The name of the database.
    in: path
    name: databaseName
    required: true
    type: string
    x-ms-parameter-location: method
  FirewallRuleNameParameter:
    description: The name of the server firewall rule.
    in: path
    name: firewallRuleName
    required: true
    type: string
    x-ms-parameter-location: method
  LocationNameParameter:
    description: The name of the location.
    in: path
    name: locationName
    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
  SecurityAlertPolicyNameParameter:
    description: The name of the security alert policy.
    enum:
      - default
    in: path
    name: securityAlertPolicyName
    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
  virtualNetworkRuleNameParameter:
    description: The name of the virtual network rule.
    in: path
    name: virtualNetworkRuleName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  /providers/Microsoft.DBforPostgreSQL/operations:
    get:
      description: Lists all of the available REST API operations.
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/OperationListResult"
      tags:
        - Operations
      x-ms-examples:
        OperationList:
          parameters:
            api-version: 2017-12-01-preview
          responses:
            "200":
              body:
                value:
                  - display:
                      description: Returns the list of Performance Tiers available.
                      operation: List Performance Tiers
                      provider: Microsoft DB for PostgreSQL
                      resource: Performance Tiers
                    name: Microsoft.DBforPostgreSQL/locations/performanceTiers/read
                  - display:
                      description: Return the list of servers or gets the properties for the specified server.
                      operation: List/Get PostgreSQL Servers
                      provider: Microsoft DB for PostgreSQL
                      resource: PostgreSQL Server
                    name: Microsoft.DBforPostgreSQL/servers/read
                  - display:
                      description: Creates a server with the specified parameters or update the properties or tags for the specified server.
                      operation: Create/Update PostgreSQL Server
                      provider: Microsoft DB for PostgreSQL
                      resource: PostgreSQL Server
                    name: Microsoft.DBforPostgreSQL/servers/write
                  - display:
                      description: Deletes an existing server.
                      operation: Delete PostgreSQL Server
                      provider: Microsoft DB for PostgreSQL
                      resource: PostgreSQL Server
                    name: Microsoft.DBforPostgreSQL/servers/delete
                  - display:
                      description: Returns the list of Performance Tiers available.
                      operation: List Performance Tiers
                      provider: Microsoft DB for PostgreSQL
                      resource: Performance Tiers
                    name: Microsoft.DBforPostgreSQL/performanceTiers/read
                  - display:
                      description: Return the list of firewall rules for a server or gets the properties for the specified firewall rule.
                      operation: List/Get Firewall Rules
                      provider: Microsoft DB for PostgreSQL
                      resource: Firewall Rules
                    name: Microsoft.DBforPostgreSQL/servers/firewallRules/read
                  - display:
                      description: Creates a firewall rule with the specified parameters or update an existing rule.
                      operation: Create/Update Firewall Rule
                      provider: Microsoft DB for PostgreSQL
                      resource: Firewall Rules
                    name: Microsoft.DBforPostgreSQL/servers/firewallRules/write
                  - display:
                      description: Deletes an existing firewall rule.
                      operation: Delete Firewall Rule
                      provider: Microsoft DB for PostgreSQL
                      resource: Firewall Rules
                    name: Microsoft.DBforPostgreSQL/servers/firewallRules/delete
                  - display:
                      description: Return types of metrics that are available for databases
                      operation: Get database metric definitions
                      provider: Microsoft DB for PostgreSQL
                      resource: Database Metric Definition
                    name: Microsoft.DBforPostgreSQL/servers/providers/Microsoft.Insights/metricDefinitions/read
                    properties:
                      serviceSpecification:
                        metricSpecifications:
                          - aggregationType: Average
                            displayDescription: CPU percent
                            displayName: CPU percent
                            fillGapWithZero: true
                            name: cpu_percent
                            unit: Percent
                          - aggregationType: Average
                            displayDescription: Compute Unit limit
                            displayName: Compute Unit limit
                            name: compute_limit
                            unit: Count
                          - aggregationType: Average
                            displayDescription: Compute Unit percentage
                            displayName: Compute Unit percentage
                            fillGapWithZero: true
                            name: compute_consumption_percent
                            unit: Percent
                          - aggregationType: Average
                            displayDescription: Memory percent
                            displayName: Memory percent
                            fillGapWithZero: true
                            name: memory_percent
                            unit: Percent
                          - aggregationType: Average
                            displayDescription: IO percent
                            displayName: IO percent
                            fillGapWithZero: true
                            name: io_consumption_percent
                            unit: Percent
                          - aggregationType: Average
                            displayDescription: Storage percentage
                            displayName: Storage percentage
                            name: storage_percent
                            unit: Percent
                          - aggregationType: Average
                            displayDescription: Storage used
                            displayName: Storage used
                            name: storage_used
                            unit: Bytes
                          - aggregationType: Average
                            displayDescription: Storage limit
                            displayName: Storage limit
                            name: storage_limit
                            unit: Bytes
                          - aggregationType: Average
                            displayDescription: Total active connections
                            displayName: Total active connections
                            fillGapWithZero: true
                            name: active_connections
                            unit: Count
                          - aggregationType: Average
                            displayDescription: Total failed connections
                            displayName: Total failed connections
                            fillGapWithZero: true
                            name: connections_failed
                            unit: Count
                  - display:
                      description: Gets the disagnostic setting for the resource
                      operation: Read diagnostic setting
                      provider: Microsoft DB for PostgreSQL
                      resource: Database Metric Definition
                    name: Microsoft.DBforPostgreSQL/servers/providers/Microsoft.Insights/diagnosticSettings/read
                  - display:
                      description: Creates or updates the diagnostic setting for the resource
                      operation: Write diagnostic setting
                      provider: Microsoft DB for PostgreSQL
                      resource: Database Metric Definition
                    name: Microsoft.DBforPostgreSQL/servers/providers/Microsoft.Insights/diagnosticSettings/write
  "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability":
    post:
      description: Check the availability of name for resource
      operationId: CheckNameAvailability_Execute
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: The required parameters for checking if resource name is available.
          in: body
          name: nameAvailabilityRequest
          required: true
          schema:
            $ref: "#/definitions/NameAvailabilityRequest"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/NameAvailability"
      tags:
        - CheckNameAvailability
      x-ms-examples:
        NameAvailability:
          parameters:
            api-version: 2017-12-01-preview
            nameAvailabilityRequest:
              name: name1
              type: Microsoft.DBforPostgreSQL
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                message: ""
                nameAvailable: true
                reason: ""
  "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/locations/{locationName}/performanceTiers":
    get:
      description: List all the performance tiers at specified location in a given subscription.
      operationId: LocationBasedPerformanceTier_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/LocationNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/PerformanceTierListResult"
      tags:
        - LocationBasedPerformanceTier
      x-ms-examples:
        PerformanceTiersList:
          parameters:
            api-version: 2017-12-01-preview
            locationName: WestUS
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: Basic
                    serviceLevelObjectives:
                      - edition: Basic
                        hardwareGeneration: Gen4
                        id: B_Gen4_1
                        maxBackupRetentionDays: 35
                        maxStorageMB: 1048576
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 1
                      - edition: Basic
                        hardwareGeneration: Gen4
                        id: B_Gen4_2
                        maxBackupRetentionDays: 35
                        maxStorageMB: 1048576
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 2
                  - id: GeneralPurpose
                    serviceLevelObjectives:
                      - edition: GeneralPurpose
                        hardwareGeneration: Gen4
                        id: GP_Gen4_2
                        maxBackupRetentionDays: 35
                        maxStorageMB: 2097152
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 2
                      - edition: GeneralPurpose
                        hardwareGeneration: Gen4
                        id: GP_Gen4_4
                        maxBackupRetentionDays: 35
                        maxStorageMB: 2097152
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 4
                      - edition: GeneralPurpose
                        hardwareGeneration: Gen4
                        id: GP_Gen4_8
                        maxBackupRetentionDays: 35
                        maxStorageMB: 2097152
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 8
                      - edition: GeneralPurpose
                        hardwareGeneration: Gen4
                        id: GP_Gen4_16
                        maxBackupRetentionDays: 35
                        maxStorageMB: 2097152
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 16
                      - edition: GeneralPurpose
                        hardwareGeneration: Gen4
                        id: GP_Gen4_32
                        maxBackupRetentionDays: 35
                        maxStorageMB: 2097152
                        minBackupRetentionDays: 7
                        minStorageMB: 5120
                        vCore: 32
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/servers":
    get:
      description: List all the servers in a given subscription.
      operationId: Servers_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerListResult"
      tags:
        - Servers
      x-ms-examples:
        ServerList:
          parameters:
            api-version: 2017-12-01-preview
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1
                    location: westus
                    name: pgtestsvc1
                    properties:
                      administratorLogin: testuser
                      earliestRestoreDate: 2018-03-04T21:01:55.1498475+00:00
                      fullyQualifiedDomainName: pgtestsvc1.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 10
                        geoRedundantBackup: Disabled
                        storageMB: 5120
                      userVisibleState: Ready
                      version: "9.5"
                    sku:
                      capacity: 1
                      family: Gen4
                      name: B_Gen4_1
                      tier: Basic
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc2
                    location: westus
                    name: pgtestsvc2
                    properties:
                      administratorLogin: testuser
                      earliestRestoreDate: 2018-03-07T21:01:55.1498475+00:00
                      fullyQualifiedDomainName: pgtestsvc2.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 5120
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 2
                      family: Gen4
                      name: GP_Gen4_2
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg1/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc3
                    location: westus
                    name: pgtestsvc3
                    properties:
                      administratorLogin: testuser
                      earliestRestoreDate: 2018-03-01T00:11:08.55+00:00
                      fullyQualifiedDomainName: pgtestsvc3.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 35
                        geoRedundantBackup: Enabled
                        storageMB: 204800
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 4
                      family: Gen4
                      name: GP_Gen4_4
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4
                    location: westus
                    name: pgtestsvc4
                    properties:
                      administratorLogin: cloudsa
                      earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                      fullyQualifiedDomainName: pgtestsvc4.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 128000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 2
                      family: Gen4
                      name: B_Gen4_2
                      tier: Basic
                    tags:
                      ElasticServer: "1"
                    type: Microsoft.DBforPostgreSQL/servers
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers":
    get:
      description: List all the servers in a given resource group.
      operationId: Servers_ListByResourceGroup
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerListResult"
      tags:
        - Servers
      x-ms-examples:
        ServerListByResourceGroup:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1
                    location: westus
                    name: pgtestsvc1
                    properties:
                      administratorLogin: testuser
                      earliestRestoreDate: 2018-03-04T21:01:55.1498475+00:00
                      fullyQualifiedDomainName: pgtestsvc1.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 10
                        geoRedundantBackup: Disabled
                        storageMB: 5120
                      userVisibleState: Ready
                      version: "9.5"
                    sku:
                      capacity: 1
                      family: Gen4
                      name: B_Gen4_1
                      tier: Basic
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc2
                    location: westus
                    name: pgtestsvc2
                    properties:
                      administratorLogin: testuser
                      earliestRestoreDate: 2018-03-07T21:01:55.1498475+00:00
                      fullyQualifiedDomainName: pgtestsvc2.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 5120
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 2
                      family: Gen4
                      name: GP_Gen4_2
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4
                    location: westus
                    name: pgtestsvc4
                    properties:
                      administratorLogin: cloudsa
                      earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                      fullyQualifiedDomainName: pgtestsvc4.postgres.database.azure.com
                      sslEnforcement: Enabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 128000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 2
                      family: Gen4
                      name: B_Gen4_2
                      tier: Basic
                    tags:
                      ElasticServer: "1"
                    type: Microsoft.DBforPostgreSQL/servers
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}":
    delete:
      description: Deletes a server.
      operationId: Servers_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
        "202":
          description: Accepted
        "204":
          description: NoContent
      tags:
        - Servers
      x-ms-examples:
        ServerDelete:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets information about a server.
      operationId: Servers_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Server"
      tags:
        - Servers
      x-ms-examples:
        ServerGet:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: testrg
            serverName: pgtestsvc1
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc1
                location: westus
                name: pgtestsvc1
                properties:
                  administratorLogin: testuser
                  earliestRestoreDate: 2018-03-04T21:00:58.9243541+00:00
                  fullyQualifiedDomainName: pgtestsvc1.postgres.database.azure.com
                  masterServerId: ""
                  replicationRole: ""
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 10
                    geoRedundantBackup: Disabled
                    storageMB: 5120
                  userVisibleState: Ready
                  version: "9.5"
                sku:
                  capacity: 1
                  family: Gen4
                  name: B_Gen4_1
                  tier: Basic
                type: Microsoft.DBforPostgreSQL/servers
    patch:
      description: Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
      operationId: Servers_Update
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The required parameters for updating a server.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ServerUpdateParameters"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Server"
        "202":
          description: Accepted
      tags:
        - Servers
      x-ms-examples:
        ServerUpdate:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              properties:
                administratorLoginPassword: newpassword
                sslEnforcement: Disabled
            resourceGroupName: testrg
            serverName: pgtestsvc4
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4
                location: westus
                name: pgtestsvc4
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: pgtestsvc4.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen4
                  name: B_Gen4_2
                  tier: Basic
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "202": {}
      x-ms-long-running-operation: true
    put:
      description: Creates a new server, or will overwrite an existing server.
      operationId: Servers_Create
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The required parameters for creating or updating a server.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ServerForCreate"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Server"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/Server"
        "202":
          description: Accepted
      tags:
        - Servers
      x-ms-examples:
        Create a database as a point in time restore:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              location: brazilsouth
              properties:
                createMode: PointInTimeRestore
                restorePointInTime: 2017-12-14T00:00:37.467Z
                sourceServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforPostgreSQL/servers/sourceserver
              sku:
                capacity: 2
                family: Gen4
                name: B_Gen4_2
                tier: Basic
              tags:
                ElasticServer: "1"
            resourceGroupName: TargetResourceGroup
            serverName: targetserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/targetserver
                location: brazilsouth
                name: targetserver
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2017-12-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: targetserver.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen4
                  name: B_Gen4_2
                  tier: Basic
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/targetserver
                location: brazilsouth
                name: targetserver
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2017-12-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: targetserver.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen4
                  name: B_Gen4_2
                  tier: Basic
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "202": {}
        Create a new server:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              location: westus
              properties:
                administratorLogin: cloudsa
                administratorLoginPassword: password
                createMode: Default
                sslEnforcement: Enabled
                storageProfile:
                  backupRetentionDays: 7
                  geoRedundantBackup: Enabled
                  storageMB: 128000
              sku:
                capacity: 2
                family: Gen5
                name: B_Gen5_2
                tier: Basic
              tags:
                ElasticServer: "1"
            resourceGroupName: TestGroup
            serverName: pgtestsvc4
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4
                location: westus
                name: pgtestsvc4
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: pgtestsvc4.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Enabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen5
                  name: B_Gen5_2
                  tier: Basic
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4
                location: westus
                name: pgtestsvc4
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: pgtestsvc4.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Enabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen5
                  name: B_Gen5_2
                  tier: Basic
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "202": {}
        Create a replica server:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              location: westcentralus
              properties:
                createMode: Replica
                sourceServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
              sku:
                capacity: 2
                family: Gen5
                name: GP_Gen5_2
                tier: GeneralPurpose
            resourceGroupName: TestGroup_WestCentralUS
            serverName: testserver-replica1
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica1
                location: westcentralus
                name: testserver-replica1
                properties:
                  administratorLogin: postgres
                  earliestRestoreDate: 2018-06-20T00:17:56.677+00:00
                  fullyQualifiedDomainName: testserver-replica1.postgres.database.azure.com
                  masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                  replicaCapacity: 0
                  replicationRole: Replica
                  sslEnforcement: Disabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 2048000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen4
                  name: GP_Gen5_2
                  tier: GeneralPurpose
                type: Microsoft.DBforPostgreSQL/servers
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica1
                location: westcentralus
                name: testserver-replica1
                properties:
                  administratorLogin: postgres
                  earliestRestoreDate: 2018-06-20T00:17:56.677+00:00
                  fullyQualifiedDomainName: testserver-replica1.postgres.database.azure.com
                  masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                  replicaCapacity: 0
                  replicationRole: Replica
                  sslEnforcement: Disabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 2048000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen5
                  name: GP_Gen5_2
                  tier: GeneralPurpose
                type: Microsoft.DBforPostgreSQL/servers
            "202": {}
        "Create a server as a geo restore ":
          parameters:
            api-version: 2017-12-01
            parameters:
              location: Japan West
              properties:
                createMode: GeoRestore
                sourceServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforPostgreSQL/servers/sourceserver
              sku:
                capacity: 2
                family: Gen4
                name: GP_Gen4_2
                tier: GeneralPurpose
              tags:
                ElasticServer: "1"
            resourceGroupName: TargetResourceGroup
            serverName: targetserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/targetserver
                location: westus
                name: targetserver
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: targetserver.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen4
                  name: GP_Gen4_2
                  tier: GeneralPurpose
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/targetserver
                location: westus
                name: targetserver
                properties:
                  administratorLogin: cloudsa
                  earliestRestoreDate: 2018-03-14T21:08:24.637+00:00
                  fullyQualifiedDomainName: targetserver.postgres.database.azure.com
                  sslEnforcement: Enabled
                  storageProfile:
                    backupRetentionDays: 7
                    geoRedundantBackup: Disabled
                    storageMB: 128000
                  userVisibleState: Ready
                  version: "9.6"
                sku:
                  capacity: 2
                  family: Gen4
                  name: GP_Gen4_2
                  tier: GeneralPurpose
                tags:
                  ElasticServer: "1"
                type: Microsoft.DBforPostgreSQL/servers
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/Administrators/activeDirectory":
    delete:
      description: Deletes AAD Administrator.
      operationId: ServerAdministrators_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
        "202":
          description: Accepted
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
        "204":
          description: NoContent
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ServerAdministrators
      x-ms-examples:
        ServerAdministratorsDelete:
          parameters:
            administratorName: activeDirectory
            api-version: 2017-12-01-preview
            resourceGroupName: testrg
            serverName: pgtestsvc4
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body: OK
            "202":
              body: Accepted
            "204":
              body: No Content
      x-ms-long-running-operation: true
    get:
      description: Gets information about a AAD server administrator.
      operationId: ServerAdministrators_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ServerAdministrators
      x-ms-examples:
        ServerAdministratorGet:
          parameters:
            administratorName: activeDirectory
            api-version: 2017-12-01-preview
            resourceGroupName: testrg
            serverName: pgtestsvc4
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory
                name: activeDirectory
                properties:
                  administratorType: ActiveDirectory
                  login: bob@contoso.com
                  sid: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                  tenantId: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                type: Microsoft.DBforPostgreSQL/servers/administrators
    put:
      description: Creates or update active directory administrator on an existing server. The update action will overwrite the existing administrator.
      operationId: ServerAdministrators_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The required parameters for creating or updating an AAD server administrator.
          in: body
          name: properties
          required: true
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
        "202":
          description: Accepted
          schema:
            $ref: "#/definitions/ServerAdministratorResource"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ServerAdministrators
      x-ms-examples:
        ServerAdministratorCreate:
          parameters:
            administratorName: activeDirectory
            api-version: 2017-12-01-preview
            properties:
              properties:
                administratorType: ActiveDirectory
                login: bob@contoso.com
                sid: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                tenantId: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
            resourceGroupName: testrg
            serverName: pgtestsvc4
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory
                name: activeDirectory
                properties:
                  administratorType: ActiveDirectory
                  login: bob@contoso.com
                  sid: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                  tenantId: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                type: Microsoft.DBforPostgreSQL/servers/administrators
            "202":
              body: Accepted
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/Replicas":
    get:
      description: List all the replicas for a given server.
      operationId: Replicas_ListByServer
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerListResult"
      tags:
        - Replicas
      x-ms-examples:
        ReplicasListByServer:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup_WestCentralUS
            serverName: testserver-master
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica1
                    location: westcentralus
                    name: testserver-replica1
                    properties:
                      administratorLogin: postgres
                      earliestRestoreDate: 2018-06-12T00:05:03.2695756+00:00
                      fullyQualifiedDomainName: testserver-replica1.postgres.database.azure.com
                      masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                      replicaCapacity: 0
                      replicationRole: Replica
                      sslEnforcement: Disabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 2048000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 16
                      family: Gen4
                      name: GP_Gen4_16
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica2
                    location: westcentralus
                    name: testserver-replica2
                    properties:
                      administratorLogin: postgres
                      earliestRestoreDate: 2018-06-12T00:05:03.2695756+00:00
                      fullyQualifiedDomainName: testserver-replica2.postgres.database.azure.com
                      masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                      replicaCapacity: 0
                      replicationRole: Replica
                      sslEnforcement: Disabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 2048000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 16
                      family: Gen4
                      name: GP_Gen4_16
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica3
                    location: westcentralus
                    name: testserver-replica3
                    properties:
                      administratorLogin: postgres
                      earliestRestoreDate: 2018-06-12T00:05:03.2695756+00:00
                      fullyQualifiedDomainName: testserver-replica3.postgres.database.azure.com
                      masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                      replicaCapacity: 0
                      replicationRole: Replica
                      sslEnforcement: Disabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 2048000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 16
                      family: Gen4
                      name: GP_Gen4_16
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica4
                    location: westcentralus
                    name: testserver-replica4
                    properties:
                      administratorLogin: postgres
                      earliestRestoreDate: 2018-06-12T00:05:03.2695756+00:00
                      fullyQualifiedDomainName: testserver-replica4.postgres.database.azure.com
                      masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                      replicaCapacity: 0
                      replicationRole: Replica
                      sslEnforcement: Disabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 2048000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 16
                      family: Gen4
                      name: GP_Gen4_16
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-replica5
                    location: westcentralus
                    name: testserver-replica5
                    properties:
                      administratorLogin: postgres
                      earliestRestoreDate: 2018-06-12T00:05:03.2695756+00:00
                      fullyQualifiedDomainName: testserver-replica5.postgres.database.azure.com
                      masterServerId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup_WestCentralUS/providers/Microsoft.DBforPostgreSQL/servers/testserver-master
                      replicaCapacity: 0
                      replicationRole: Replica
                      sslEnforcement: Disabled
                      storageProfile:
                        backupRetentionDays: 7
                        geoRedundantBackup: Disabled
                        storageMB: 2048000
                      userVisibleState: Ready
                      version: "9.6"
                    sku:
                      capacity: 16
                      family: Gen4
                      name: GP_Gen4_16
                      tier: GeneralPurpose
                    type: Microsoft.DBforPostgreSQL/servers
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/administrators":
    get:
      description: Returns a list of server Administrators.
      operationId: ServerAdministrators_ListByServer
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ServerAdministratorResourceListResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ServerAdministrators
      x-ms-examples:
        get a list of server administrators:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: testrg
            serverName: pgtestsvc4
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/servers/pgtestsvc4/administrators/activeDirectory
                    name: ActiveDirectory
                    properties:
                      administratorType: ActiveDirectory
                      login: bob@contoso.com
                      sid: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                      tenantId: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
                    type: Microsoft.DBforPostgreSQL/servers/administrators
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations":
    get:
      description: List all the configurations in a given server.
      operationId: Configurations_ListByServer
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ConfigurationListResult"
      tags:
        - Configurations
      x-ms-examples:
        ConfigurationList:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls
                    name: array_nulls
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enable input of NULL elements in arrays.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/backslash_quote
                    name: backslash_quote
                    properties:
                      allowedValues: safe_encoding,on,off
                      dataType: Enumeration
                      defaultValue: safe_encoding
                      description: Sets whether "\'" is allowed in string literals.
                      source: system-default
                      value: safe_encoding
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/bytea_output
                    name: bytea_output
                    properties:
                      allowedValues: escape,hex
                      dataType: Enumeration
                      defaultValue: hex
                      description: Sets the output format for bytea.
                      source: system-default
                      value: hex
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/check_function_bodies
                    name: check_function_bodies
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Check function bodies during CREATE FUNCTION.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/client_encoding
                    name: client_encoding
                    properties:
                      allowedValues: BIG5,EUC_CN,EUC_JP,EUC_JIS_2004,EUC_KR,EUC_TW,GB18030,GBK,ISO_8859_5,ISO_8859_6,ISO_8859_7,ISO_8859_8,JOHAB,KOI8R,KOI8U,LATIN1,LATIN2,LATIN3,LATIN4,LATIN5,LATIN6,LATIN7,LATIN8,LATIN9,LATIN10,MULE_INTERNAL,SJIS,SHIFT_JIS_2004,SQL_ASCII,UHC,UTF8,WIN866,WIN874,WIN1250,WIN1251,WIN1252,WIN1253,WIN1254,WIN1255,WIN1256,WIN1257,WIN1258
                      dataType: Enumeration
                      defaultValue: sql_ascii
                      description: Sets the client's character set encoding.
                      source: system-default
                      value: sql_ascii
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/client_min_messages
                    name: client_min_messages
                    properties:
                      allowedValues: debug5,debug4,debug3,debug2,debug1,log,notice,warning,error
                      dataType: Enumeration
                      defaultValue: notice
                      description: Sets the message levels that are sent to the client.
                      source: system-default
                      value: notice
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/constraint_exclusion
                    name: constraint_exclusion
                    properties:
                      allowedValues: partition,on,off
                      dataType: Enumeration
                      defaultValue: partition
                      description: Enables the planner to use constraints to optimize queries.
                      source: system-default
                      value: partition
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cpu_index_tuple_cost
                    name: cpu_index_tuple_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "0.005"
                      description: Sets the planner's estimate of the cost of processing each index entry during an index scan.
                      source: system-default
                      value: "0.005"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cpu_operator_cost
                    name: cpu_operator_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "0.0025"
                      description: Sets the planner's estimate of the cost of processing each operator or function call.
                      source: system-default
                      value: "0.0025"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cpu_tuple_cost
                    name: cpu_tuple_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "0.01"
                      description: Sets the planner's estimate of the cost of processing each tuple (row).
                      source: system-default
                      value: "0.01"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/cursor_tuple_fraction
                    name: cursor_tuple_fraction
                    properties:
                      allowedValues: 0-1
                      dataType: Numeric
                      defaultValue: "0.1"
                      description: Sets the planner's estimate of the fraction of a cursor's rows that will be retrieved.
                      source: system-default
                      value: "0.1"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/datestyle
                    name: datestyle
                    properties:
                      allowedValues: (iso|postgres|sql|german)\,\s(dmy|mdy|ymd)
                      dataType: String
                      defaultValue: iso, mdy
                      description: Sets the display format for date and time values.
                      source: system-default
                      value: iso, mdy
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/deadlock_timeout
                    name: deadlock_timeout
                    properties:
                      allowedValues: 1-2147483647
                      dataType: Integer
                      defaultValue: "1000"
                      description: Sets the amount of time, in milliseconds, to wait on a lock before checking for deadlock.
                      source: system-default
                      value: "1000"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/debug_print_parse
                    name: debug_print_parse
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs each query's parse tree.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/debug_print_plan
                    name: debug_print_plan
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs each query's execution plan.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/debug_print_rewritten
                    name: debug_print_rewritten
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs each query's rewritten parse tree.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_statistics_target
                    name: default_statistics_target
                    properties:
                      allowedValues: 1-10000
                      dataType: Integer
                      defaultValue: "100"
                      description: Sets the default statistics target.
                      source: system-default
                      value: "100"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_text_search_config
                    name: default_text_search_config
                    properties:
                      allowedValues: "[A-Za-z\\._]+"
                      dataType: String
                      defaultValue: pg_catalog.english
                      description: Sets default text search configuration.
                      source: system-default
                      value: pg_catalog.english
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_transaction_deferrable
                    name: default_transaction_deferrable
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Sets the default deferrable status of new transactions.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_transaction_isolation
                    name: default_transaction_isolation
                    properties:
                      allowedValues: serializable,repeatable read,read committed,read uncommitted
                      dataType: Enumeration
                      defaultValue: read committed
                      description: Sets the transaction isolation level of each new transaction.
                      source: system-default
                      value: read committed
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_transaction_read_only
                    name: default_transaction_read_only
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Sets the default read-only status of new transactions.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/default_with_oids
                    name: default_with_oids
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Create new tables with OIDs by default.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_bitmapscan
                    name: enable_bitmapscan
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of bitmap-scan plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_hashagg
                    name: enable_hashagg
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of hashed aggregation plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_hashjoin
                    name: enable_hashjoin
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of hash join plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_indexonlyscan
                    name: enable_indexonlyscan
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of index-only-scan plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_indexscan
                    name: enable_indexscan
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of index-scan plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_material
                    name: enable_material
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of materialization.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_mergejoin
                    name: enable_mergejoin
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of merge join plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_nestloop
                    name: enable_nestloop
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of nested-loop join plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_seqscan
                    name: enable_seqscan
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of sequential-scan plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_sort
                    name: enable_sort
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of explicit sort steps.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/enable_tidscan
                    name: enable_tidscan
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables the planner's use of TID scan plans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/escape_string_warning
                    name: escape_string_warning
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Warn about backslash escapes in ordinary string literals.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/exit_on_error
                    name: exit_on_error
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Terminate session on any error.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/extra_float_digits
                    name: extra_float_digits
                    properties:
                      allowedValues: -15-3
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the number of digits displayed for floating-point values.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/from_collapse_limit
                    name: from_collapse_limit
                    properties:
                      allowedValues: 1-2147483647
                      dataType: Integer
                      defaultValue: "8"
                      description: Sets the FROM-list size beyond which subqueries are not collapsed.
                      source: system-default
                      value: "8"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo
                    name: geqo
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enables genetic query optimization.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_effort
                    name: geqo_effort
                    properties:
                      allowedValues: 1-10
                      dataType: Integer
                      defaultValue: "5"
                      description: "GEQO: effort is used to set the default for other GEQO parameters."
                      source: system-default
                      value: "5"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_generations
                    name: geqo_generations
                    properties:
                      allowedValues: 0-2147483647
                      dataType: Integer
                      defaultValue: "0"
                      description: "GEQO: number of iterations of the algorithm."
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_pool_size
                    name: geqo_pool_size
                    properties:
                      allowedValues: 0-2147483647
                      dataType: Integer
                      defaultValue: "0"
                      description: "GEQO: number of individuals in the population."
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_seed
                    name: geqo_seed
                    properties:
                      allowedValues: 0-1
                      dataType: Numeric
                      defaultValue: "0.0"
                      description: "GEQO: seed for random path selection."
                      source: system-default
                      value: "0.0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_selection_bias
                    name: geqo_selection_bias
                    properties:
                      allowedValues: 1.5-2
                      dataType: Numeric
                      defaultValue: "2.0"
                      description: "GEQO: selective pressure within the population."
                      source: system-default
                      value: "2.0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/geqo_threshold
                    name: geqo_threshold
                    properties:
                      allowedValues: 2-2147483647
                      dataType: Integer
                      defaultValue: "12"
                      description: Sets the threshold of FROM items beyond which GEQO is used.
                      source: system-default
                      value: "12"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/gin_fuzzy_search_limit
                    name: gin_fuzzy_search_limit
                    properties:
                      allowedValues: 0-2147483647
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the maximum allowed result for exact search by GIN.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/intervalstyle
                    name: intervalstyle
                    properties:
                      allowedValues: postgres,postgres_verbose,sql_standard,iso_8601
                      dataType: Enumeration
                      defaultValue: postgres
                      description: Sets the display format for interval values.
                      source: system-default
                      value: postgres
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/join_collapse_limit
                    name: join_collapse_limit
                    properties:
                      allowedValues: 1-2147483647
                      dataType: Integer
                      defaultValue: "8"
                      description: Sets the FROM-list size beyond which JOIN constructs are not flattened.
                      source: system-default
                      value: "8"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/lock_timeout
                    name: lock_timeout
                    properties:
                      allowedValues: 0-2147483647
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the maximum allowed duration (in milliseconds) of any wait for a lock. 0 turns this off.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_checkpoints
                    name: log_checkpoints
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs each checkpoint.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_connections
                    name: log_connections
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs each successful connection.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_disconnections
                    name: log_disconnections
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs end of a session, including duration.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_duration
                    name: log_duration
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs the duration of each completed SQL statement.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_error_verbosity
                    name: log_error_verbosity
                    properties:
                      allowedValues: terse,default,verbose
                      dataType: Enumeration
                      defaultValue: default
                      description: Sets the verbosity of logged messages.
                      source: system-default
                      value: default
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_lock_waits
                    name: log_lock_waits
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Logs long lock waits.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_min_duration_statement
                    name: log_min_duration_statement
                    properties:
                      allowedValues: -1-2147483647
                      dataType: Integer
                      defaultValue: "-1"
                      description: Sets the minimum execution time (in milliseconds) above which statements will be logged. -1 disables logging statement durations.
                      source: system-default
                      value: "-1"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_min_error_statement
                    name: log_min_error_statement
                    properties:
                      allowedValues: debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal,panic
                      dataType: Enumeration
                      defaultValue: error
                      description: Causes all statements generating error at or above this level to be logged.
                      source: system-default
                      value: error
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_min_messages
                    name: log_min_messages
                    properties:
                      allowedValues: debug5,debug4,debug3,debug2,debug1,info,notice,warning,error,log,fatal,panic
                      dataType: Enumeration
                      defaultValue: warning
                      description: Sets the message levels that are logged.
                      source: system-default
                      value: warning
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_statement
                    name: log_statement
                    properties:
                      allowedValues: none,ddl,mod,all
                      dataType: Enumeration
                      defaultValue: none
                      description: Sets the type of statements logged.
                      source: system-default
                      value: none
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_locks_per_transaction
                    name: max_locks_per_transaction
                    properties:
                      allowedValues: 10-2147483647
                      dataType: Integer
                      defaultValue: "64"
                      description: Sets the maximum number of locks per transaction.
                      source: system-default
                      value: "64"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_pred_locks_per_transaction
                    name: max_pred_locks_per_transaction
                    properties:
                      allowedValues: 10-2147483647
                      dataType: Integer
                      defaultValue: "64"
                      description: Sets the maximum number of predicate locks per transaction.
                      source: system-default
                      value: "64"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_prepared_transactions
                    name: max_prepared_transactions
                    properties:
                      allowedValues: 0-8388607
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the maximum number of simultaneously prepared transactions.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/quote_all_identifiers
                    name: quote_all_identifiers
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: When generating SQL fragments, quote all identifiers.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/random_page_cost
                    name: random_page_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "4.0"
                      description: Sets the planner's estimate of the cost of a nonsequentially fetched disk page.
                      source: system-default
                      value: "4.0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/search_path
                    name: search_path
                    properties:
                      allowedValues: '[A-Za-z."$, ]+'
                      dataType: String
                      defaultValue: '"$user", public'
                      description: Sets the schema search order for names that are not schema-qualified.
                      source: system-default
                      value: '"$user", public'
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/seq_page_cost
                    name: seq_page_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "1.0"
                      description: Sets the planner's estimate of the cost of a sequentially fetched disk page.
                      source: system-default
                      value: "1.0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/sql_inheritance
                    name: sql_inheritance
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Causes subtables to be included by default in various commands.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/standard_conforming_strings
                    name: standard_conforming_strings
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Causes '...' strings to treat backslashes literally.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/statement_timeout
                    name: statement_timeout
                    properties:
                      allowedValues: 0-2147483647
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the maximum allowed duration (in milliseconds) of any statement. 0 turns this off.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/synchronize_seqscans
                    name: synchronize_seqscans
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: on
                      description: Enable synchronized sequential scans.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/synchronous_commit
                    name: synchronous_commit
                    properties:
                      allowedValues: local,remote_write,on,off
                      dataType: Enumeration
                      defaultValue: on
                      description: Sets the current transaction's synchronization level.
                      source: system-default
                      value: on
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/transform_null_equals
                    name: transform_null_equals
                    properties:
                      allowedValues: on,off
                      dataType: Boolean
                      defaultValue: off
                      description: Treats "expr=NULL" as "expr IS NULL".
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/xmlbinary
                    name: xmlbinary
                    properties:
                      allowedValues: base64,hex
                      dataType: Enumeration
                      defaultValue: base64
                      description: Sets how binary values are to be encoded in XML.
                      source: system-default
                      value: base64
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/xmloption
                    name: xmloption
                    properties:
                      allowedValues: content,document
                      dataType: Enumeration
                      defaultValue: content
                      description: Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.
                      source: system-default
                      value: content
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/force_parallel_mode
                    name: force_parallel_mode
                    properties:
                      allowedValues: off,on,regress
                      dataType: Enumeration
                      defaultValue: off
                      description: Forces use of parallel query facilities.
                      source: system-default
                      value: off
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/idle_in_transaction_session_timeout
                    name: idle_in_transaction_session_timeout
                    properties:
                      allowedValues: 0-2147483647
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the maximum allowed duration of any idling transaction.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/max_parallel_workers_per_gather
                    name: max_parallel_workers_per_gather
                    properties:
                      allowedValues: 0-1024
                      dataType: Integer
                      defaultValue: "0"
                      description: Sets the maximum number of parallel processes per executor node.
                      source: system-default
                      value: "0"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/min_parallel_relation_size
                    name: min_parallel_relation_size
                    properties:
                      allowedValues: 0-715827882
                      dataType: Integer
                      defaultValue: "8388608"
                      description: Sets the minimum size of relations to be considered for parallel scan.
                      source: system-default
                      value: "8388608"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/parallel_setup_cost
                    name: parallel_setup_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "1000"
                      description: Sets the planner's estimate of the cost of starting up worker processes for parallel query.
                      source: system-default
                      value: "1000"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/parallel_tuple_cost
                    name: parallel_tuple_cost
                    properties:
                      allowedValues: 0-1.79769e+308
                      dataType: Numeric
                      defaultValue: "0.1"
                      description: Sets the planner's estimate of the cost of passing each tuple (row) from worker to master backend.
                      source: system-default
                      value: "0.1"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/log_retention_days
                    name: log_retention_days
                    properties:
                      allowedValues: 1-7
                      dataType: Integer
                      defaultValue: "3"
                      description: Sets how many days a log file is saved for.
                      source: system-default
                      value: "3"
                    type: Microsoft.DBforPostgreSQL/servers/configurations
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/configurations/{configurationName}":
    get:
      description: Gets information about a configuration of server.
      operationId: Configurations_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/ConfigurationNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Configuration"
      tags:
        - Configurations
      x-ms-examples:
        ConfigurationGet:
          parameters:
            api-version: 2017-12-01-preview
            configurationName: array_nulls
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls
                name: array_nulls
                properties:
                  allowedValues: on,off
                  dataType: Boolean
                  defaultValue: on
                  description: Enable input of NULL elements in arrays.
                  source: system-default
                  value: on
                type: Microsoft.DBforPostgreSQL/servers/configurations
    put:
      description: Updates a configuration of a server.
      operationId: Configurations_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/ConfigurationNameParameter"
        - description: The required parameters for updating a server configuration.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Configuration"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Configuration"
        "202":
          description: Accepted
      tags:
        - Configurations
      x-ms-examples:
        ConfigurationCreateOrUpdate:
          parameters:
            api-version: 2017-12-01-preview
            configurationName: array_nulls
            parameters:
              properties:
                source: user-override
                value: off
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/configurations/array_nulls
                name: array_nulls
                properties:
                  allowedValues: on,off
                  dataType: Boolean
                  defaultValue: on
                  description: Enable input of NULL elements in arrays.
                  source: user-override
                  value: off
                type: Microsoft.DBforPostgreSQL/servers/configurations
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases":
    get:
      description: List all the databases in a given server.
      operationId: Databases_ListByServer
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/DatabaseListResult"
      tags:
        - Databases
      x-ms-examples:
        DatabaseList:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1
                    name: db1
                    properties:
                      charset: UTF8
                      collation: English_United States.1252
                    type: Microsoft.DBforPostgreSQL/servers/databases
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db2
                    name: db2
                    properties:
                      charset: UTF8
                      collation: English_United States.1252
                    type: Microsoft.DBforPostgreSQL/servers/databases
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/databases/{databaseName}":
    delete:
      description: Deletes a database.
      operationId: Databases_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
      responses:
        "200":
          description: OK
        "202":
          description: Accepted
        "204":
          description: NoContent
      tags:
        - Databases
      x-ms-examples:
        DatabaseDelete:
          parameters:
            api-version: 2017-12-01-preview
            databaseName: db1
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets information about a database.
      operationId: Databases_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Database"
      tags:
        - Databases
      x-ms-examples:
        DatabaseGet:
          parameters:
            api-version: 2017-12-01-preview
            databaseName: db1
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1
                name: db1
                properties:
                  charset: UTF8
                  collation: English_United States.1252
                type: Microsoft.DBforPostgreSQL/servers/databases
    put:
      description: Creates a new database or updates an existing database.
      operationId: Databases_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/DatabaseNameParameter"
        - description: The required parameters for creating or updating a database.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/Database"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Database"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/Database"
        "202":
          description: Accepted
      tags:
        - Databases
      x-ms-examples:
        DatabaseCreate:
          parameters:
            api-version: 2017-12-01-preview
            databaseName: db1
            parameters:
              properties:
                charset: UTF8
                collation: English_United States.1252
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1
                name: db1
                properties:
                  charset: UTF8
                  collation: English_United States.1252
                type: Microsoft.DBforPostgreSQL/servers/databases
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/databases/db1
                name: db1
                properties:
                  charset: UTF8
                  collation: English_United States.1252
                type: Microsoft.DBforPostgreSQL/servers/databases
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules":
    get:
      description: List all the firewall rules in a given server.
      operationId: FirewallRules_ListByServer
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/FirewallRuleListResult"
      tags:
        - FirewallRules
      x-ms-examples:
        FirewallRuleList:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1
                    name: rule1
                    properties:
                      endIpAddress: 255.255.255.255
                      startIpAddress: 0.0.0.0
                    type: Microsoft.DBforPostgreSQL/servers/firewallRules
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule2
                    name: rule2
                    properties:
                      endIpAddress: 255.0.0.0
                      startIpAddress: 1.0.0.0
                    type: Microsoft.DBforPostgreSQL/servers/firewallRules
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/firewallRules/{firewallRuleName}":
    delete:
      description: Deletes a server firewall rule.
      operationId: FirewallRules_Delete
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/FirewallRuleNameParameter"
      responses:
        "200":
          description: OK
        "202":
          description: Accepted
        "204":
          description: NoContent
      tags:
        - FirewallRules
      x-ms-examples:
        FirewallRuleDelete:
          parameters:
            api-version: 2017-12-01-preview
            firewallRuleName: rule1
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets information about a server firewall rule.
      operationId: FirewallRules_Get
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/FirewallRuleNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/FirewallRule"
      tags:
        - FirewallRules
      x-ms-examples:
        FirewallRuleGet:
          parameters:
            api-version: 2017-12-01-preview
            firewallRuleName: rule1
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1
                name: rule1
                properties:
                  endIpAddress: 255.255.255.255
                  startIpAddress: 0.0.0.0
                type: Microsoft.DBforPostgreSQL/servers/firewallRules
    put:
      description: Creates a new firewall rule or updates an existing firewall rule.
      operationId: FirewallRules_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/FirewallRuleNameParameter"
        - description: The required parameters for creating or updating a firewall rule.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/FirewallRule"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/FirewallRule"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/FirewallRule"
        "202":
          description: Accepted
      tags:
        - FirewallRules
      x-ms-examples:
        FirewallRuleCreate:
          parameters:
            api-version: 2017-12-01-preview
            firewallRuleName: rule1
            parameters:
              properties:
                endIpAddress: 255.255.255.255
                startIpAddress: 0.0.0.0
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1
                name: rule1
                properties:
                  endIpAddress: 255.255.255.255
                  startIpAddress: 0.0.0.0
                type: Microsoft.DBforPostgreSQL/servers/firewallRules
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/firewallRules/rule1
                name: rule1
                properties:
                  endIpAddress: 255.255.255.255
                  startIpAddress: 0.0.0.0
                type: Microsoft.DBforPostgreSQL/servers/firewallRules
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/logFiles":
    get:
      description: List all the log files in a given server.
      operationId: LogFiles_ListByServer
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/LogFileListResult"
      tags:
        - LogFiles
      x-ms-examples:
        LogFileList:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/logFiles/postgresql-2017-06-22_010000.log
                    name: postgresql-2017-06-22_010000.log
                    properties:
                      createdTime: 0001-01-01T00:00:00+00:00
                      lastModifiedTime: 2017-06-22T01:59:36+00:00
                      sizeInKB: 4
                      type: text
                      url: https://wasd2stageneu1btlm4.file.core.windows.net/42679871f6cc4302b39ab9c2e3044df3/pg_log/postgresql-2017-06-22_010000.log?sv=2015-04-05&sr=f&sig=gqIQsa6VyGyUNpzYYPWLP5gM%2BeF1so9GYbHKu6Zs0DM%3D&se=2017-06-22T03%3A21%3A09Z&sp=r
                    type: Microsoft.DBforPostgreSQL/servers/logFiles
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/testserver/logFiles/postgresql-2017-06-22_020000.log
                    name: postgresql-2017-06-22_020000.log
                    properties:
                      createdTime: 0001-01-01T00:00:00+00:00
                      lastModifiedTime: 2017-06-22T02:19:36+00:00
                      sizeInKB: 1
                      type: text
                      url: https://wasd2stageneu1btlm4.file.core.windows.net/42679871f6cc4302b39ab9c2e3044df3/pg_log/postgresql-2017-06-22_020000.log?sv=2015-04-05&sr=f&sig=i99UWBlYfR0tKaxix8yHAOnfym4HV9Auto6BbZogyRs%3D&se=2017-06-22T03%3A21%3A09Z&sp=r
                    type: Microsoft.DBforPostgreSQL/servers/logFiles
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/restart":
    post:
      description: Restarts a server.
      operationId: Servers_Restart
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
      responses:
        "200":
          description: OK
        "202":
          description: Accepted
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: "#/definitions/CloudError"
      tags:
        - ServerRestart
      x-ms-examples:
        ServerRestart:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: testserver
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
          responses:
            "200": {}
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}":
    get:
      description: Get a server's security alert policy.
      operationId: ServerSecurityAlertPolicies_Get
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the security alert policy.
          enum:
            - Default
          in: path
          name: securityAlertPolicyName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: SecurityAlertPolicyName
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the server threat detection policy.
          schema:
            $ref: "#/definitions/ServerSecurityAlertPolicy"
        default:
          description: Error response describing why the operation of getting security alert policies failed.
      tags:
        - ServerSecurityAlertPolicies
      x-ms-examples:
        Get a server's threat detection policy:
          parameters:
            api-version: 2017-03-01-preview
            resourceGroupName: securityalert-4799
            securityAlertPolicyName: Default
            serverName: securityalert-6440
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default
                name: Default
                properties:
                  disabledAlerts:
                    - Access_Anomaly
                  emailAccountAdmins: true
                  emailAddresses:
                    - test@microsoft.com;user@microsoft.com
                  retentionDays: 0
                  state: Disabled
                  storageEndpoint: https://mystorage.blob.core.windows.net
                type: Microsoft.DBforPostgreSQL/servers/securityAlertPolicies
    put:
      description: Creates or updates a threat detection policy.
      operationId: ServerSecurityAlertPolicies_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - description: The name of the threat detection policy.
          enum:
            - Default
          in: path
          name: securityAlertPolicyName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: SecurityAlertPolicyName
        - description: The server security alert policy.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/ServerSecurityAlertPolicy"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully updated the threat detection policy.
          schema:
            $ref: "#/definitions/ServerSecurityAlertPolicy"
        "202":
          description: Created request to set the server threat detection policy.
        default:
          description: Error response describing why the operation of setting security alert policies failed.
      tags:
        - ServerSecurityAlertPolicies
      x-ms-examples:
        Update a server's threat detection policy with all parameters:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              properties:
                disabledAlerts:
                  - Access_Anomaly
                  - Usage_Anomaly
                emailAccountAdmins: true
                emailAddresses:
                  - testSecurityAlert@microsoft.com
                retentionDays: 5
                state: Enabled
                storageAccountAccessKey: sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==
                storageEndpoint: https://mystorage.blob.core.windows.net
            resourceGroupName: securityalert-4799
            securityAlertPolicyName: Default
            serverName: securityalert-6440
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default
                name: Default
                properties:
                  disabledAlerts:
                    - Access_Anomaly
                    - Usage_Anomaly
                  emailAccountAdmins: true
                  emailAddresses:
                    - testSecurityAlert@microsoft.com
                  retentionDays: 5
                  state: Enabled
                  storageEndpoint: https://mystorage.blob.core.windows.net
                type: Microsoft.DBforPostgreSQL/servers/securityAlertPolicies
            "202": {}
        Update a server's threat detection policy with minimal parameters:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              properties:
                emailAccountAdmins: true
                state: Disabled
            resourceGroupName: securityalert-4799
            securityAlertPolicyName: Default
            serverName: securityalert-6440
            subscriptionId: 00000000-1111-2222-3333-444444444444
          responses:
            "200":
              body:
                id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforPostgreSQL/servers/securityalert-6440/securityAlertPolicies/default
                name: Default
                properties:
                  disabledAlerts:
                    - ""
                  emailAccountAdmins: true
                  emailAddresses:
                    - ""
                  retentionDays: 0
                  state: Enabled
                  storageEndpoint: ""
                type: Microsoft.DBforPostgreSQL/servers/securityAlertPolicies
            "202": {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules":
    get:
      description: Gets a list of virtual network rules in a server.
      operationId: VirtualNetworkRules_ListByServer
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully retrieved the list of virtual network rules.
          schema:
            $ref: "#/definitions/VirtualNetworkRuleListResult"
        default:
          description: |-
            *** Error Responses: ***

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ResourceNotFound - The requested resource was not found.
      tags:
        - VirtualNetworkRules
      x-ms-examples:
        List virtual network rules:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: vnet-test-svr
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
            virtualNetworkRuleName: vnet-firewall-rule
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule
                    name: vnet-firewall-rule
                    properties:
                      ignoreMissingVnetServiceEndpoint: false
                      state: Ready
                      virtualNetworkSubnetId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet
                    type: Microsoft.DBforPostgreSQL/servers/virtualNetworkRules
                  - id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule
                    name: vnet-firewall-rule
                    properties:
                      ignoreMissingVnetServiceEndpoint: false
                      state: Ready
                      virtualNetworkSubnetId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet
                    type: Microsoft.DBforPostgreSQL/servers/virtualNetworkRules
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}":
    delete:
      description: Deletes the virtual network rule with the given name.
      operationId: VirtualNetworkRules_Delete
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/virtualNetworkRuleNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: Successfully deleted the virtual network rule.
        "202":
          description: Accepted
        "204":
          description: The specified virtual network rule does not exist.
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidResourceId - Invalid resource identifier.

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

             * 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 NullVirtualNetworkRequest - Virtual Network Request is Null

             * 400 NullVirtualNetworkRequestParameters - Virtual Network Request Parameters are Null

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

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

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

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

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.
      tags:
        - VirtualNetworkRules
      x-ms-examples:
        Delete a virtual network rule:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: vnet-test-svr
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
            virtualNetworkRuleName: vnet-firewall-rule
          responses:
            "200": {}
            "202": {}
            "204": {}
      x-ms-long-running-operation: true
    get:
      description: Gets a virtual network rule.
      operationId: VirtualNetworkRules_Get
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/virtualNetworkRuleNameParameter"
      responses:
        "200":
          description: Successfully retrieved a specified virtual network rule.
          schema:
            $ref: "#/definitions/VirtualNetworkRule"
        default:
          description: |-
            *** Error Responses: ***

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 ResourceNotFound - The requested resource was not found.
      tags:
        - VirtualNetworkRules
      x-ms-examples:
        Gets a virtual network rule:
          parameters:
            api-version: 2017-12-01-preview
            resourceGroupName: TestGroup
            serverName: vnet-test-svr
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
            virtualNetworkRuleName: vnet-firewall-rule
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule
                name: vnet-firewall-rule
                properties:
                  ignoreMissingVnetServiceEndpoint: false
                  state: Ready
                  virtualNetworkSubnetId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet
                type: Microsoft.DBforPostgreSQL/servers/virtualNetworkRules
    put:
      description: Creates or updates an existing virtual network rule.
      operationId: VirtualNetworkRules_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/ResourceGroupParameter"
        - $ref: "#/parameters/ServerNameParameter"
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
        - $ref: "#/parameters/virtualNetworkRuleNameParameter"
        - description: The requested virtual Network Rule Resource state.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/VirtualNetworkRule"
      responses:
        "200":
          description: Successfully updated a virtual network rule.
          schema:
            $ref: "#/definitions/VirtualNetworkRule"
        "201":
          description: Successfully created a virtual network rule.
          schema:
            $ref: "#/definitions/VirtualNetworkRule"
        "202":
          description: Accepted
        default:
          description: |-
            *** Error Responses: ***

             * 400 InvalidResourceId - Invalid resource identifier.

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

             * 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 NullVirtualNetworkRequest - Virtual Network Request is Null

             * 400 NullVirtualNetworkRequestParameters - Virtual Network Request Parameters are Null

             * 400 NullVirtualNetworkSubnetId - The Virtual Network Subnet Id is null

             * 404 SubscriptionDoesNotHaveServer - The requested server was not found

             * 404 VirtualNetworkRuleNotEnabled - Azure SQL Server Virtual Network Rule feature is not enabled

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

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

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

             * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.
      tags:
        - VirtualNetworkRules
      x-ms-examples:
        Create or update a virtual network rule:
          parameters:
            api-version: 2017-12-01-preview
            parameters:
              properties:
                ignoreMissingVnetServiceEndpoint: false
                virtualNetworkSubnetId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet
            resourceGroupName: TestGroup
            serverName: vnet-test-svr
            subscriptionId: ffffffff-ffff-ffff-ffff-ffffffffffff
            virtualNetworkRuleName: vnet-firewall-rule
          responses:
            "200":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule
                name: vnet-firewall-rule
                properties:
                  ignoreMissingVnetServiceEndpoint: false
                  virtualNetworkSubnetId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet
                type: Microsoft.DBforPostgreSQL/servers/virtualNetworkRules
            "201":
              body:
                id: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/servers/vnet-test-svr/virtualNetworkRules/vnet-firewall-rule
                name: vnet-firewall-rule
                properties:
                  ignoreMissingVnetServiceEndpoint: false
                  virtualNetworkSubnetId: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet
                type: Microsoft.DBforPostgreSQL/servers/virtualNetworkRules
            "202": {}
      x-ms-long-running-operation: true
definitions:
  CloudError:
    description: An error response from the Batch service.
    properties:
      error:
        $ref: "#/definitions/CloudErrorBody"
    x-ms-external: true
  CloudErrorBody:
    description: An error response from the Batch service.
    properties:
      code:
        description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
        type: string
      details:
        description: A list of additional details about the error.
        items:
          $ref: "#/definitions/CloudErrorBody"
        type: array
      message:
        description: A message describing the error, intended to be suitable for display in a user interface.
        type: string
      target:
        description: The target of the particular error. For example, the name of the property in error.
        type: string
    x-ms-external: true
  Configuration:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: Represents a Configuration.
    properties:
      properties:
        $ref: "#/definitions/ConfigurationProperties"
        description: The properties of a configuration.
        x-ms-client-flatten: true
  ConfigurationListResult:
    description: A list of server configurations.
    properties:
      value:
        description: The list of server configurations.
        items:
          $ref: "#/definitions/Configuration"
        type: array
  ConfigurationProperties:
    description: The properties of a configuration.
    properties:
      allowedValues:
        description: Allowed values of the configuration.
        readOnly: true
        type: string
      dataType:
        description: Data type of the configuration.
        readOnly: true
        type: string
      defaultValue:
        description: Default value of the configuration.
        readOnly: true
        type: string
      description:
        description: Description of the configuration.
        readOnly: true
        type: string
      source:
        description: Source of the configuration.
        type: string
      value:
        description: Value of the configuration.
        type: string
  Database:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: Represents a Database.
    properties:
      properties:
        $ref: "#/definitions/DatabaseProperties"
        description: The properties of a database.
        x-ms-client-flatten: true
  DatabaseListResult:
    description: A List of databases.
    properties:
      value:
        description: The list of databases housed in a server
        items:
          $ref: "#/definitions/Database"
        type: array
  DatabaseProperties:
    description: The properties of a database.
    properties:
      charset:
        description: The charset of the database.
        type: string
      collation:
        description: The collation of the database.
        type: string
  FirewallRule:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: Represents a server firewall rule.
    properties:
      properties:
        $ref: "#/definitions/FirewallRuleProperties"
        description: The properties of a firewall rule.
        x-ms-client-flatten: true
    required:
      - properties
  FirewallRuleListResult:
    description: A list of firewall rules.
    properties:
      value:
        description: The list of firewall rules in a server.
        items:
          $ref: "#/definitions/FirewallRule"
        type: array
  FirewallRuleProperties:
    description: The properties of a server firewall rule.
    properties:
      endIpAddress:
        description: The end IP address of the server firewall rule. Must be IPv4 format.
        pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
        type: string
      startIpAddress:
        description: The start IP address of the server firewall rule. Must be IPv4 format.
        pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
        type: string
    required:
      - startIpAddress
      - endIpAddress
  LogFile:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: Represents a log file.
    properties:
      name:
        description: The name of the log file.
        type: string
      properties:
        $ref: "#/definitions/LogFileProperties"
        description: The properties of the log file.
        x-ms-client-flatten: true
  LogFileListResult:
    description: A list of log files.
    properties:
      value:
        description: The list of log files.
        items:
          $ref: "#/definitions/LogFile"
        type: array
  LogFileProperties:
    description: The properties of a log file.
    properties:
      createdTime:
        description: Creation timestamp of the log file.
        format: date-time
        readOnly: true
        type: string
      lastModifiedTime:
        description: Last modified timestamp of the log file.
        format: date-time
        readOnly: true
        type: string
      sizeInKB:
        description: Size of the log file.
        format: int64
        type: integer
      type:
        description: Type of the log file.
        type: string
      url:
        description: The url to download the log file from.
        type: string
  NameAvailability:
    description: Represents a resource name availability.
    properties:
      message:
        description: Error Message.
        type: string
      nameAvailable:
        description: Indicates whether the resource name is available.
        type: boolean
      reason:
        description: Reason for name being unavailable.
        type: string
  NameAvailabilityRequest:
    description: Request from client to check resource name availability.
    properties:
      name:
        description: Resource name to verify.
        type: string
      type:
        description: Resource type used for verification.
        type: string
    required:
      - name
  Operation:
    description: REST API operation definition.
    properties:
      display:
        $ref: "#/definitions/OperationDisplay"
        description: The localized display information for this particular operation or 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:
          - NotSpecified
          - 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
  OperationDisplay:
    description: Display metadata associated with the operation.
    properties:
      description:
        description: Operation description.
        readOnly: true
        type: string
      operation:
        description: Localized friendly name for the operation.
        readOnly: true
        type: string
      provider:
        description: Operation resource provider name.
        readOnly: true
        type: string
      resource:
        description: Resource on which the operation is performed.
        readOnly: true
        type: string
  OperationListResult:
    description: A list of resource provider operations.
    properties:
      value:
        description: The list of resource provider operations.
        items:
          $ref: "#/definitions/Operation"
        type: array
  PerformanceTierListResult:
    description: A list of performance tiers.
    properties:
      value:
        description: The list of performance tiers
        items:
          $ref: "#/definitions/PerformanceTierProperties"
        type: array
  PerformanceTierProperties:
    description: Performance tier properties
    properties:
      id:
        description: ID of the performance tier.
        type: string
      serviceLevelObjectives:
        description: Service level objectives associated with the performance tier
        items:
          $ref: "#/definitions/PerformanceTierServiceLevelObjectives"
        type: array
  PerformanceTierServiceLevelObjectives:
    description: Service level objectives for performance tier.
    properties:
      edition:
        description: Edition of the performance tier.
        type: string
      hardwareGeneration:
        description: Hardware generation associated with the service level objective
        type: string
      id:
        description: ID for the service level objective.
        type: string
      maxBackupRetentionDays:
        description: Maximum Backup retention in days for the performance tier edition
        type: integer
      maxStorageMB:
        description: Max storage allowed for a server.
        format: int32
        type: integer
      minBackupRetentionDays:
        description: Minimum Backup retention in days for the performance tier edition
        type: integer
      minStorageMB:
        description: Max storage allowed for a server.
        format: int32
        type: integer
      vCore:
        description: vCore associated with the service level objective
        type: integer
  ProxyResource:
    description: Resource properties.
    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
    x-ms-azure-resource: true
  ResourceIdentity:
    description: Azure Active Directory identity configuration for a resource.
    properties:
      principalId:
        description: The Azure Active Directory principal id.
        format: uuid
        readOnly: true
        type: string
      tenantId:
        description: The Azure Active Directory tenant id.
        format: uuid
        readOnly: true
        type: string
      type:
        description: The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.
        enum:
          - SystemAssigned
        type: string
        x-ms-enum:
          modelAsString: true
          name: IdentityType
    type: object
  SecurityAlertPolicyProperties:
    description: Properties of a security alert policy.
    properties:
      disabledAlerts:
        description: "Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly"
        items:
          type: string
        type: array
      emailAccountAdmins:
        description: Specifies that the alert is sent to the account administrators.
        type: boolean
      emailAddresses:
        description: Specifies an array of e-mail addresses to which the alert is sent.
        items:
          type: string
        type: array
      retentionDays:
        description: Specifies the number of days to keep in the Threat Detection audit logs.
        format: int32
        type: integer
      state:
        description: Specifies the state of the policy, whether it is enabled or disabled.
        enum:
          - Enabled
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: false
          name: ServerSecurityAlertPolicyState
      storageAccountAccessKey:
        description: Specifies the identifier key of the Threat Detection audit storage account.
        type: string
      storageEndpoint:
        description: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
        type: string
    required:
      - state
    type: object
  Server:
    allOf:
      - $ref: "#/definitions/TrackedResource"
    description: Represents a server.
    properties:
      identity:
        $ref: "#/definitions/ResourceIdentity"
        description: The Azure Active Directory identity of the server.
      properties:
        $ref: "#/definitions/ServerProperties"
        description: Properties of the server.
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/Sku"
        description: The SKU (pricing tier) of the server.
  ServerAdministratorProperties:
    description: The properties of an server Administrator.
    properties:
      administratorType:
        description: The type of administrator.
        enum:
          - ActiveDirectory
        type: string
        x-ms-enum:
          name: AdministratorType
      login:
        description: The server administrator login value.
        type: string
      sid:
        description: The server administrator Sid (Secure ID).
        format: uuid
        type: string
      tenantId:
        description: The server Active Directory Administrator tenant id.
        format: uuid
        type: string
    required:
      - tenantId
      - administratorType
      - login
      - sid
  ServerAdministratorResource:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: Represents a and external administrator to be created.
    properties:
      properties:
        $ref: "#/definitions/ServerAdministratorProperties"
        description: Properties of the server AAD administrator.
        x-ms-client-flatten: true
  ServerAdministratorResourceListResult:
    description: The response to a list Active Directory Administrators request.
    properties:
      value:
        description: The list of server Active Directory Administrators for the server.
        items:
          $ref: "#/definitions/ServerAdministratorResource"
        type: array
  ServerForCreate:
    description: Represents a server to be created.
    properties:
      location:
        description: The location the resource resides in.
        type: string
      properties:
        $ref: "#/definitions/ServerPropertiesForCreate"
        description: Properties of the server.
        x-ms-client-flatten: false
      sku:
        $ref: "#/definitions/Sku"
        description: The SKU (pricing tier) of the server.
      tags:
        additionalProperties:
          type: string
        description: Application-specific metadata in the form of key-value pairs.
        type: object
    required:
      - properties
      - location
  ServerListResult:
    description: A list of servers.
    properties:
      value:
        description: The list of servers
        items:
          $ref: "#/definitions/Server"
        type: array
  ServerProperties:
    description: The properties of a server.
    properties:
      administratorLogin:
        description: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
        type: string
      earliestRestoreDate:
        description: Earliest restore point creation time (ISO8601 format)
        format: date-time
        type: string
      fullyQualifiedDomainName:
        description: The fully qualified domain name of a server.
        type: string
      masterServerId:
        description: The master server id of a replica server.
        type: string
      replicaCapacity:
        description: The maximum number of replicas that a master server can have.
        format: int32
        minimum: 0
        type: integer
      replicationRole:
        description: The replication role of the server.
        type: string
      sslEnforcement:
        $ref: "#/definitions/SslEnforcement"
        description: Enable ssl enforcement or not when connect to server.
      storageProfile:
        $ref: "#/definitions/StorageProfile"
        description: Storage profile of a server.
      userVisibleState:
        description: A state of a server that is visible to user.
        enum:
          - Ready
          - Dropping
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: true
          name: ServerState
      version:
        $ref: "#/definitions/ServerVersion"
        description: Server version.
  ServerPropertiesForCreate:
    description: The properties used to create a new server.
    discriminator: createMode
    properties:
      createMode:
        description: The mode to create a new server.
        enum:
          - Default
          - PointInTimeRestore
          - GeoRestore
          - Replica
        type: string
        x-ms-enum:
          modelAsString: true
          name: CreateMode
      sslEnforcement:
        $ref: "#/definitions/SslEnforcement"
        description: Enable ssl enforcement or not when connect to server.
      storageProfile:
        $ref: "#/definitions/StorageProfile"
        description: Storage profile of a server.
      version:
        $ref: "#/definitions/ServerVersion"
        description: Server version.
    required:
      - createMode
  ServerPropertiesForDefaultCreate:
    allOf:
      - $ref: "#/definitions/ServerPropertiesForCreate"
    description: The properties used to create a new server.
    properties:
      administratorLogin:
        description: The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
        type: string
      administratorLoginPassword:
        description: The password of the administrator login.
        format: password
        type: string
    required:
      - administratorLogin
      - administratorLoginPassword
    x-ms-discriminator-value: Default
  ServerPropertiesForGeoRestore:
    allOf:
      - $ref: "#/definitions/ServerPropertiesForCreate"
    description: The properties used to create a new server by restoring to a different region from a geo replicated backup.
    properties:
      sourceServerId:
        description: The source server id to restore from.
        type: string
    required:
      - sourceServerId
    x-ms-discriminator-value: GeoRestore
  ServerPropertiesForReplica:
    allOf:
      - $ref: "#/definitions/ServerPropertiesForCreate"
    description: The properties to create a new replica.
    properties:
      sourceServerId:
        description: The master server id to create replica from.
        type: string
    required:
      - sourceServerId
    x-ms-discriminator-value: Replica
  ServerPropertiesForRestore:
    allOf:
      - $ref: "#/definitions/ServerPropertiesForCreate"
    description: The properties used to create a new server by restoring from a backup.
    properties:
      restorePointInTime:
        description: Restore point creation time (ISO8601 format), specifying the time to restore from.
        format: date-time
        type: string
      sourceServerId:
        description: The source server id to restore from.
        type: string
    required:
      - sourceServerId
      - restorePointInTime
    x-ms-discriminator-value: PointInTimeRestore
  ServerSecurityAlertPolicy:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: A server security alert policy.
    properties:
      properties:
        $ref: "#/definitions/SecurityAlertPolicyProperties"
        description: Resource properties.
        x-ms-client-flatten: true
    type: object
  ServerUpdateParameters:
    description: Parameters allowed to update for a server.
    properties:
      properties:
        description: The properties that can be updated for a server.
        properties:
          administratorLoginPassword:
            description: The password of the administrator login.
            format: password
            type: string
          replicationRole:
            description: The replication role of the server.
            type: string
          sslEnforcement:
            $ref: "#/definitions/SslEnforcement"
            description: Enable ssl enforcement or not when connect to server.
          storageProfile:
            $ref: "#/definitions/StorageProfile"
            description: Storage profile of a server.
          version:
            $ref: "#/definitions/ServerVersion"
            description: The version of a server.
        x-ms-client-flatten: true
      sku:
        $ref: "#/definitions/Sku"
        description: The SKU (pricing tier) of the server.
      tags:
        additionalProperties:
          type: string
        description: Application-specific metadata in the form of key-value pairs.
        type: object
  ServerVersion:
    description: The version of a server.
    enum:
      - "9.5"
      - "9.6"
      - "10"
      - "10.0"
      - "10.2"
      - "11"
    type: string
    x-ms-enum:
      modelAsString: true
      name: ServerVersion
  Sku:
    description: Billing information related properties of a server.
    properties:
      capacity:
        description: The scale up/out capacity, representing server's compute units.
        format: int32
        minimum: 0
        type: integer
      family:
        description: The family of hardware.
        type: string
      name:
        description: The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
        type: string
      size:
        description: The size code, to be interpreted by resource as appropriate.
        type: string
      tier:
        description: The tier of the particular SKU, e.g. Basic.
        enum:
          - Basic
          - GeneralPurpose
          - MemoryOptimized
        type: string
        x-ms-enum:
          modelAsString: true
          name: SkuTier
  SslEnforcement:
    description: Enable ssl enforcement or not when connect to server.
    enum:
      - Enabled
      - Disabled
    type: string
    x-ms-enum:
      modelAsString: false
      name: SslEnforcementEnum
  StorageProfile:
    description: Storage Profile properties of a server
    properties:
      backupRetentionDays:
        description: Backup retention days for the server.
        type: integer
      geoRedundantBackup:
        description: Enable Geo-redundant or not for server backup.
        enum:
          - Enabled
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: true
          name: GeoRedundantBackup
      storageAutogrow:
        description: Enable Storage Auto Grow.
        enum:
          - Enabled
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: true
          name: StorageAutogrow
      storageMB:
        description: Max storage allowed for a server.
        format: int32
        type: integer
  TrackedResource:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: Resource properties including location and tags for track resources.
    properties:
      location:
        description: The location the resource resides in.
        type: string
      tags:
        additionalProperties:
          type: string
        description: Application-specific metadata in the form of key-value pairs.
        type: object
    required:
      - location
  VirtualNetworkRule:
    allOf:
      - $ref: "#/definitions/ProxyResource"
    description: A virtual network rule.
    properties:
      properties:
        $ref: "#/definitions/VirtualNetworkRuleProperties"
        description: Resource properties.
        x-ms-client-flatten: true
    type: object
  VirtualNetworkRuleListResult:
    description: A list of virtual network rules.
    properties:
      nextLink:
        description: Link to retrieve next page of results.
        readOnly: true
        type: string
      value:
        description: Array of results.
        items:
          $ref: "#/definitions/VirtualNetworkRule"
        readOnly: true
        type: array
    type: object
  VirtualNetworkRuleProperties:
    description: Properties of a virtual network rule.
    properties:
      ignoreMissingVnetServiceEndpoint:
        description: Create firewall rule before the virtual network has vnet service endpoint enabled.
        type: boolean
      state:
        description: Virtual Network Rule State
        enum:
          - Initializing
          - InProgress
          - Ready
          - Deleting
          - Unknown
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: VirtualNetworkRuleState
      virtualNetworkSubnetId:
        description: The ARM resource id of the virtual network subnet.
        type: string
    required:
      - virtualNetworkSubnetId
    type: object
