{
  "openapi": "3.0.0",
  "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": "2018-06-01",
    "x-jentic-source-url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2018-06-01/PrivateEndpointConnections.json"
  },
  "servers": [
    {
      "url": "https://management.azure.com/"
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections": {
      "get": {
        "parameters": [
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateEndpointConnectionListResult"
                }
              }
            },
            "description": "Successfully retrieved private endpoint connections."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudError"
                }
              }
            },
            "description": "Error response describing why the operation failed."
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "description": "Gets all private endpoint connections on a server.",
        "operationId": "PrivateEndpointConnections_ListByServer",
        "x-ms-examples": {
          "Gets list of private endpoint connections on a server.": {
            "$ref": "./examples/PrivateEndpointConnectionList.json"
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": {
      "delete": {
        "parameters": [
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted private endpoint connection."
          },
          "202": {
            "description": "Accepted"
          },
          "204": {
            "description": "Private endpoint connection does not exist."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudError"
                }
              }
            },
            "description": "Error response describing why the operation failed."
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "description": "Deletes a private endpoint connection with a given name.",
        "operationId": "PrivateEndpointConnections_Delete",
        "x-ms-examples": {
          "Deletes a private endpoint connection with a given name.": {
            "$ref": "./examples/PrivateEndpointConnectionDelete.json"
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "parameters": [
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the private endpoint connection.",
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateEndpointConnection"
                }
              }
            },
            "description": "Successfully retrieved a specified private endpoint connection."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudError"
                }
              }
            },
            "description": "Error response describing why the operation failed."
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "description": "Gets a private endpoint connection.",
        "operationId": "PrivateEndpointConnections_Get",
        "x-ms-examples": {
          "Gets private endpoint connection.": {
            "$ref": "./examples/PrivateEndpointConnectionGet.json"
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ApiVersionParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateEndpointConnection"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudError"
                }
              }
            },
            "description": "Error response describing why the operation failed."
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "description": "Updates private endpoint connection with the specified tags.",
        "operationId": "PrivateEndpointConnections_UpdateTags",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagsObject"
              }
            }
          },
          "description": "Parameters supplied to the Update private endpoint connection Tags operation.",
          "required": true
        },
        "summary": "Updates tags on private endpoint connection.",
        "x-ms-examples": {
          "Update private endpoint connection Tags": {
            "$ref": "./examples/PrivateEndpointConnectionUpdateTags.json"
          }
        },
        "x-ms-long-running-operation": true
      },
      "put": {
        "parameters": [
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "#/components/parameters/ServerNameParameter"
          },
          {
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrivateEndpointConnection"
                }
              }
            },
            "description": "Successfully approved or rejected private endpoint connection."
          },
          "202": {
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CloudError"
                }
              }
            },
            "description": "Error response describing why the operation failed."
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "description": "Approve or reject a private endpoint connection with a given name.",
        "operationId": "PrivateEndpointConnections_CreateOrUpdate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrivateEndpointConnection"
              }
            }
          },
          "required": true
        },
        "x-ms-examples": {
          "Approve or reject a private endpoint connection with a given name.": {
            "$ref": "./examples/PrivateEndpointConnectionUpdate.json"
          }
        },
        "x-ms-long-running-operation": true
      }
    }
  },
  "components": {
    "parameters": {
      "ServerNameParameter": {
        "description": "The name of the server.",
        "in": "path",
        "name": "serverName",
        "required": true,
        "schema": {
          "type": "string"
        },
        "x-ms-parameter-location": "method"
      }
    },
    "schemas": {
      "CloudError": {
        "description": "An error response from the Batch service.",
        "properties": {
          "error": {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
          }
        },
        "type": "object",
        "x-ms-external": true
      },
      "PrivateEndpointConnection": {
        "allOf": [
          {
            "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
          }
        ],
        "description": "A private endpoint connection",
        "properties": {
          "properties": {
            "$ref": "#/components/schemas/PrivateEndpointConnectionProperties",
            "description": "Resource properties.",
            "x-ms-client-flatten": true
          }
        },
        "type": "object"
      },
      "PrivateEndpointConnectionListResult": {
        "description": "A list of private endpoint connections.",
        "properties": {
          "nextLink": {
            "description": "Link to retrieve next page of results.",
            "readOnly": true,
            "type": "string"
          },
          "value": {
            "description": "Array of results.",
            "items": {
              "$ref": "#/components/schemas/PrivateEndpointConnection"
            },
            "readOnly": true,
            "type": "array"
          }
        },
        "type": "object"
      },
      "PrivateEndpointConnectionProperties": {
        "description": "Properties of a private endpoint connection.",
        "properties": {
          "privateEndpoint": {
            "$ref": "#/components/schemas/PrivateEndpointProperty",
            "description": "Private endpoint which the connection belongs to."
          },
          "privateLinkServiceConnectionState": {
            "$ref": "#/components/schemas/PrivateLinkServiceConnectionStateProperty",
            "description": "Connection state of the private endpoint connection."
          },
          "provisioningState": {
            "description": "State of the private endpoint connection.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PrivateEndpointProperty": {
        "properties": {
          "id": {
            "description": "Resource id of the private endpoint.",
            "type": "string"
          }
        },
        "type": "object",
        "x-ms-azure-resource": true
      },
      "PrivateLinkServiceConnectionStateProperty": {
        "properties": {
          "actionsRequired": {
            "description": "The actions required for private link service connection.",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "description": "The private link service connection description.",
            "type": "string"
          },
          "status": {
            "description": "The private link service connection status.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "description"
        ],
        "type": "object"
      },
      "TagsObject": {
        "description": "Tags object for patch operations.",
        "properties": {
          "tags": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Resource tags.",
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "azure_auth": {
        "description": "Azure Active Directory OAuth2 Flow",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
            "scopes": {
              "user_impersonation": "impersonate your user account"
            }
          }
        },
        "type": "oauth2"
      }
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ]
}