{
  "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": "2018-06-01",
    "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/stable/2018-06-01/PrivateEndpointConnections.json",
        "version": "2.0"
      }
    ],
    "x-preferred": false,
    "x-providerName": "azure.com",
    "x-serviceName": "postgresql-PrivateEndpointConnections",
    "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": {
    "ServerNameParameter": {
      "description": "The name of the server.",
      "in": "path",
      "name": "serverName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections": {
      "get": {
        "description": "Gets all private endpoint connections on a server.",
        "operationId": "PrivateEndpointConnections_ListByServer",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved private endpoint connections.",
            "schema": {
              "$ref": "#/definitions/PrivateEndpointConnectionListResult"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "x-ms-examples": {
          "Gets list of private endpoint connections on a server.": {
            "parameters": {
              "api-version": "2018-06-01",
              "resourceGroupName": "Default",
              "serverName": "test-svr",
              "subscriptionId": "00000000-1111-2222-3333-444444444444"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2",
                      "name": "private-endpoint-connection-name",
                      "properties": {
                        "privateEndpoint": {
                          "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
                        },
                        "privateLinkServiceConnectionState": {
                          "actionsRequired": "None",
                          "description": "Auto-approved",
                          "status": "Approved"
                        },
                        "provisioningState": "Ready"
                      },
                      "type": "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"
                    },
                    {
                      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name-2",
                      "name": "private-endpoint-connection-name-2",
                      "properties": {
                        "privateEndpoint": {
                          "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2"
                        },
                        "privateLinkServiceConnectionState": {
                          "actionsRequired": "None",
                          "description": "Auto-approved",
                          "status": "Approved"
                        },
                        "provisioningState": "Ready"
                      },
                      "type": "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}": {
      "delete": {
        "description": "Deletes a private endpoint connection with a given name.",
        "operationId": "PrivateEndpointConnections_Delete",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully deleted private endpoint connection."
          },
          "202": {
            "description": "Accepted"
          },
          "204": {
            "description": "Private endpoint connection does not exist."
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "x-ms-examples": {
          "Deletes a private endpoint connection with a given name.": {
            "parameters": {
              "api-version": "2018-06-01",
              "privateEndpointConnectionName": "private-endpoint-connection-name",
              "resourceGroupName": "Default",
              "serverName": "test-svr",
              "subscriptionId": "00000000-1111-2222-3333-444444444444"
            },
            "responses": {
              "200": {},
              "202": {},
              "204": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "get": {
        "description": "Gets a private endpoint connection.",
        "operationId": "PrivateEndpointConnections_Get",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "description": "The name of the private endpoint connection.",
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved a specified private endpoint connection.",
            "schema": {
              "$ref": "#/definitions/PrivateEndpointConnection"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "x-ms-examples": {
          "Gets private endpoint connection.": {
            "parameters": {
              "api-version": "2018-06-01",
              "privateEndpointConnectionName": "private-endpoint-connection-name",
              "resourceGroupName": "Default",
              "serverName": "test-svr",
              "subscriptionId": "00000000-1111-2222-3333-444444444444"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name",
                  "name": "private-endpoint-connection-name",
                  "properties": {
                    "privateEndpoint": {
                      "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
                    },
                    "privateLinkServiceConnectionState": {
                      "actionsRequired": "None",
                      "description": "Auto-approved",
                      "status": "Approved"
                    },
                    "provisioningState": "Ready"
                  },
                  "type": "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates private endpoint connection with the specified tags.",
        "operationId": "PrivateEndpointConnections_UpdateTags",
        "parameters": [
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "type": "string"
          },
          {
            "description": "Parameters supplied to the Update private endpoint connection Tags operation.",
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TagsObject"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/PrivateEndpointConnection"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "summary": "Updates tags on private endpoint connection.",
        "tags": [
          "PrivateEndpointConnections"
        ],
        "x-ms-examples": {
          "Update private endpoint connection Tags": {
            "parameters": {
              "api-version": "2018-06-01",
              "parameters": {
                "tags": {
                  "key1": "val1",
                  "key2": "val2",
                  "key3": "val3"
                }
              },
              "privateEndpointConnectionName": "private-endpoint-connection-name",
              "resourceGroupName": "Default",
              "serverName": "test-svr",
              "subscriptionId": "00000000-1111-2222-3333-444444444444"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name",
                  "name": "private-endpoint-connection-name",
                  "properties": {
                    "privateEndpoint": {
                      "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
                    },
                    "privateLinkServiceConnectionState": {
                      "actionsRequired": "None",
                      "description": "Approved by johndoe@contoso.com",
                      "status": "Approved"
                    },
                    "provisioningState": "Ready"
                  },
                  "type": "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"
                }
              }
            }
          }
        },
        "x-ms-long-running-operation": true
      },
      "put": {
        "description": "Approve or reject a private endpoint connection with a given name.",
        "operationId": "PrivateEndpointConnections_CreateOrUpdate",
        "parameters": [
          {
            "description": "The name of the resource group. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "$ref": "#/parameters/ServerNameParameter"
          },
          {
            "in": "path",
            "name": "privateEndpointConnectionName",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "parameters",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PrivateEndpointConnection"
            }
          },
          {
            "description": "The ID of the target subscription.",
            "in": "path",
            "minLength": 1,
            "name": "subscriptionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "The API version to use for this operation.",
            "in": "query",
            "minLength": 1,
            "name": "api-version",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully approved or rejected private endpoint connection.",
            "schema": {
              "$ref": "#/definitions/PrivateEndpointConnection"
            }
          },
          "202": {
            "description": "Accepted"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "$ref": "#/definitions/CloudError"
            }
          }
        },
        "tags": [
          "PrivateEndpointConnections"
        ],
        "x-ms-examples": {
          "Approve or reject a private endpoint connection with a given name.": {
            "parameters": {
              "api-version": "2018-06-01",
              "parameters": {
                "properties": {
                  "privateLinkServiceConnectionState": {
                    "description": "Approved by johndoe@contoso.com",
                    "status": "Approved"
                  }
                }
              },
              "privateEndpointConnectionName": "private-endpoint-connection-name",
              "resourceGroupName": "Default",
              "serverName": "test-svr",
              "subscriptionId": "00000000-1111-2222-3333-444444444444"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.DBforPostgreSQL/servers/test-svr/privateEndpointConnections/private-endpoint-connection-name",
                  "name": "private-endpoint-connection-name",
                  "properties": {
                    "privateEndpoint": {
                      "id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
                    },
                    "privateLinkServiceConnectionState": {
                      "actionsRequired": "None",
                      "description": "Approved by johndoe@contoso.com",
                      "status": "Approved"
                    },
                    "provisioningState": "Ready"
                  },
                  "type": "Microsoft.DBforPostgreSQL/servers/privateEndpointConnections"
                }
              },
              "202": {}
            }
          }
        },
        "x-ms-long-running-operation": true
      }
    }
  },
  "definitions": {
    "CloudError": {
      "description": "An error response from the Batch service.",
      "properties": {
        "error": {
          "description": "The resource management error response.",
          "properties": {
            "additionalInfo": {
              "description": "The error additional info.",
              "items": {
                "description": "The resource management error additional info.",
                "properties": {
                  "info": {
                    "description": "The additional info.",
                    "readOnly": true,
                    "type": "object"
                  },
                  "type": {
                    "description": "The additional info type.",
                    "readOnly": true,
                    "type": "string"
                  }
                }
              },
              "readOnly": true,
              "type": "array"
            },
            "code": {
              "description": "The error code.",
              "readOnly": true,
              "type": "string"
            },
            "details": {
              "description": "The error details.",
              "items": {
                "$ref": "#/definitions/ErrorResponse"
              },
              "readOnly": true,
              "type": "array"
            },
            "message": {
              "description": "The error message.",
              "readOnly": true,
              "type": "string"
            },
            "target": {
              "description": "The error target.",
              "readOnly": true,
              "type": "string"
            }
          }
        }
      },
      "x-ms-external": true
    },
    "ErrorResponse": {},
    "PrivateEndpointConnection": {
      "allOf": [
        {
          "allOf": [
            {
              "properties": {
                "id": {
                  "description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "The name of the resource",
                  "readOnly": true,
                  "type": "string"
                },
                "type": {
                  "description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.",
                  "readOnly": true,
                  "type": "string"
                }
              },
              "x-ms-azure-resource": true
            }
          ],
          "description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags"
        }
      ],
      "description": "A private endpoint connection",
      "properties": {
        "properties": {
          "$ref": "#/definitions/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": "#/definitions/PrivateEndpointConnection"
          },
          "readOnly": true,
          "type": "array"
        }
      },
      "type": "object"
    },
    "PrivateEndpointConnectionProperties": {
      "description": "Properties of a private endpoint connection.",
      "properties": {
        "privateEndpoint": {
          "$ref": "#/definitions/PrivateEndpointProperty",
          "description": "Private endpoint which the connection belongs to."
        },
        "privateLinkServiceConnectionState": {
          "$ref": "#/definitions/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"
        }
      }
    }
  }
}