> ## Documentation Index
> Fetch the complete documentation index at: https://ubicloud.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the private link service exposing a PostgreSQL database



## OpenAPI

````yaml /api-reference/openapi.yml get /project/{project_id}/location/{location}/postgres/{postgres_database_reference}/private-link-service
openapi: 3.0.3
info:
  description: API for managing resources on Ubicloud
  title: Clover API
  version: 0.1.0
  contact:
    url: https://www.ubicloud.com/
    email: support@ubicloud.com
  license:
    name: GNU Affero General Public License v3.0 (AGPL-3.0)
    url: https://www.gnu.org/licenses/agpl-3.0.en.html
servers:
  - url: https://api.ubicloud.com
security:
  - BearerAuth: []
tags:
  - description: Firewall Operations
    name: Firewall
  - description: Firewall Rule Operations
    name: Firewall Rule
  - description: Inference API Key Operations
    name: Inference Api Key
  - description: Inference Endpoint Operations
    name: Inference Endpoint
  - description: Load Balancer Operations
    name: Load Balancer
  - description: Login Operations
    name: Login
  - description: Machine Image Operations
    name: Machine Image
  - description: Postgres Database Operations
    name: Postgres Database
  - description: Postgres Firewall Rule Operations
    name: Postgres Firewall Rule
  - description: Postgres Metric Destination
    name: Postgres Metric Destination
  - description: Postgres Log Destination
    name: Postgres Log Destination
  - description: Private Link Service Operations
    name: Private Link Service
  - description: Private Subnet Operations
    name: Private Subnet
  - description: Project Operations
    name: Project
  - description: Virtual Machine Operations
    name: Virtual Machine
  - description: Private Location Operations
    name: Private Location
  - description: Kubernetes Cluster Operations
    name: Kubernetes Cluster
  - description: SSH Public Key Operations
    name: SSH Public Key
  - description: GitHub Operations
    name: GitHub
  - description: Audit Log Operations
    name: Audit Log
paths:
  /project/{project_id}/location/{location}/postgres/{postgres_database_reference}/private-link-service:
    parameters:
      - $ref: '#/components/parameters/project_id'
      - $ref: '#/components/parameters/location'
      - $ref: '#/components/parameters/postgres_database_reference'
    get:
      tags:
        - Private Link Service
      summary: Get the private link service exposing a PostgreSQL database
      operationId: getLocationPostgresPrivateLinkService
      responses:
        '200':
          $ref: '#/components/responses/PrivateLinkService'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    project_id:
      description: ID of the project
      in: path
      name: project_id
      required: true
      schema:
        type: string
        example: pjkkmx0f2vke4h36nk9cm8v8q0
        pattern: ^pj[0-9a-hj-km-np-tv-z]{24}$
    location:
      description: The Ubicloud location/region
      in: path
      name: location
      required: true
      schema:
        type: string
        example: eu-central-h1
    postgres_database_reference:
      description: Postgres database ID or name
      examples:
        id:
          value: pgn30gjk1d1e2jj34v9x0dq4rp
        name:
          value: postgres-database-name
      in: path
      name: postgres_database_reference
      required: true
      schema:
        $ref: '#/components/schemas/Reference'
  responses:
    PrivateLinkService:
      description: Details of a private link service
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PrivateLinkService'
    Error:
      description: An error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Reference:
      description: Resource ID or name
      type: string
      pattern: ^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$
    PrivateLinkService:
      type: object
      properties:
        id:
          type: string
          pattern: ^pn[0-9a-hj-km-np-tv-z]{24}$
        name:
          type: string
        location:
          type: string
        private_subnet:
          description: Name of the private subnet the service lives in
          type: string
        state:
          type: string
          enum:
            - creating
            - available
            - deleting
        postgres_resource:
          description: ID of the attached PostgreSQL database, whose primary is the target
          type: string
          nullable: true
        ports:
          type: array
          items:
            $ref: '#/components/schemas/PrivateLinkServicePort'
        allowed_principals:
          description: IAM ARNs allowed to connect, or "*" for anyone
          type: array
          items:
            type: string
        ip_address_type:
          type: string
          enum:
            - ipv4
            - ipv6
            - dual
        private_dns_name:
          description: >-
            Derived from the attached database's private hostname; never
            user-set
          type: string
          nullable: true
        private_hostname:
          description: >-
            The attached database's private hostname, the name its server
            certificate carries; consumers reach it through their endpoint once
            the private DNS name is verified. Null without an attached database
          type: string
          nullable: true
        aws:
          $ref: '#/components/schemas/PrivateLinkServiceAws'
      additionalProperties: false
      required:
        - id
        - name
        - location
        - private_subnet
        - state
        - postgres_resource
        - ports
        - allowed_principals
        - ip_address_type
        - private_dns_name
        - private_hostname
    Error:
      type: object
      properties:
        error:
          type: object
          additionalProperties: false
          properties:
            code:
              type: integer
              example: 401
            message:
              type: string
              example: There was an error logging in
            type:
              type: string
              example: InvalidCredentials
            details:
              type: object
              nullable: true
          required:
            - code
            - message
            - type
      additionalProperties: false
      required:
        - error
    PrivateLinkServicePort:
      type: object
      properties:
        port:
          description: Port consumers connect on
          type: integer
        target_port:
          description: Port the target listens on
          type: integer
      additionalProperties: false
      required:
        - port
        - target_port
    PrivateLinkServiceAws:
      description: AWS PrivateLink state of the service
      type: object
      properties:
        service_name:
          description: The com.amazonaws.vpce.<region>.vpce-svc-... name consumers use
          type: string
          nullable: true
        service_id:
          type: string
          nullable: true
        supported_regions:
          description: >-
            Additional regions consumers may connect from; the service's own
            region is implicit
          type: array
          items:
            type: string
        allowed_vpc_endpoints:
          description: >-
            Consumer VPC endpoints approved to connect; acceptance is always
            required, so waiting connections from these are accepted and
            established connections from any other endpoint are rejected on each
            connection reconcile
          type: array
          items:
            $ref: '#/components/schemas/PrivateLinkServiceAllowedEndpoint'
        registered_target_ips:
          type: array
          items:
            type: string
        private_dns_verification_state:
          type: string
          nullable: true
      additionalProperties: false
      nullable: true
      required:
        - service_name
        - service_id
        - supported_regions
        - allowed_vpc_endpoints
        - registered_target_ips
        - private_dns_verification_state
    PrivateLinkServiceAllowedEndpoint:
      description: A consumer VPC endpoint approved to connect, with the owner's note on it
      type: object
      properties:
        vpc_endpoint_id:
          description: VPC endpoint ID (vpce-...)
          type: string
        description:
          description: >-
            Free text for the owner, such as which team or VPC the endpoint
            belongs to; empty by default
          type: string
      additionalProperties: false
      required:
        - vpc_endpoint_id
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.