> ## 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 VPC peering details



## OpenAPI

````yaml /api-reference/openapi.yml get /project/{project_id}/location/{location}/private-subnet/{private_subnet_reference}/vpc-peering/{vpc_peering_id}
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: VPC Peering Operations
    name: VPC Peering
  - 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}/private-subnet/{private_subnet_reference}/vpc-peering/{vpc_peering_id}:
    parameters:
      - $ref: '#/components/parameters/project_id'
      - $ref: '#/components/parameters/location'
      - $ref: '#/components/parameters/private_subnet_reference'
      - $ref: '#/components/parameters/vpc_peering_id'
    get:
      tags:
        - VPC Peering
      summary: Get VPC peering details
      operationId: getPrivateSubnetVpcPeering
      responses:
        '200':
          $ref: '#/components/responses/VpcPeering'
        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
    private_subnet_reference:
      description: Private subnet ID or name
      examples:
        id:
          value: psn30gjk1d1e2jj34v9x0dq4rp
        name:
          value: private-subnet-name
      in: path
      name: private_subnet_reference
      required: true
      schema:
        $ref: '#/components/schemas/Reference'
    vpc_peering_id:
      description: ID of the VPC peering
      in: path
      name: vpc_peering_id
      required: true
      schema:
        type: string
        example: px3dngttwvje2kmr2sn8x12x4r
        pattern: ^px[0-9a-hj-km-np-tv-z]{24}$
  responses:
    VpcPeering:
      description: A VPC peering
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VpcPeering'
    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])?$
    VpcPeering:
      type: object
      properties:
        aws:
          $ref: '#/components/schemas/VpcPeeringAws'
        created_at:
          description: Time the VPC peering was created
          type: string
          format: date-time
        gcp:
          $ref: '#/components/schemas/VpcPeeringGcp'
        id:
          description: ID of the VPC peering
          type: string
          example: px3dngttwvje2kmr2sn8x12x4r
          pattern: ^px[0-9a-hj-km-np-tv-z]{24}$
        local_cidr:
          description: IPv4 CIDR of the private subnet
          type: string
        location:
          description: Location of the private subnet
          type: string
        peer_account_id:
          description: >-
            Account that owns the peer VPC: the AWS account ID, or the GCP
            project ID
          type: string
        peer_cidrs:
          description: >-
            CIDR blocks of the peer VPC that are routed over the peering; for
            GCP, the subnet ranges imported from the peer network
          type: array
          items:
            type: string
        peer_vpc_id:
          description: >-
            ID of the peer VPC: for AWS the VPC ID, for GCP the network path
            projects/PROJECT/global/networks/NETWORK
          type: string
        private_subnet_id:
          description: ID of the private subnet
          type: string
        state:
          description: >-
            State of the VPC peering: creating, waiting_for_peer, configuring
            (AWS only), active, failed or deleting
          type: string
        state_message:
          description: >-
            Failure reason, a notice while the peering request is delayed, or
            warnings about the VPC peering
          type: string
          nullable: true
      additionalProperties: false
      required:
        - created_at
        - id
        - local_cidr
        - location
        - peer_account_id
        - peer_cidrs
        - peer_vpc_id
        - private_subnet_id
        - state
        - state_message
      x-go-name: VpcPeeringSchema
    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
    VpcPeeringAws:
      type: object
      properties:
        expires_at:
          description: Time the peering request expires unless it is accepted
          type: string
          format: date-time
          nullable: true
        peer_region:
          description: Region of the peer VPC
          type: string
        peering_connection_id:
          description: ID of the AWS VPC peering connection to accept
          type: string
          nullable: true
        requester_account_id:
          description: AWS account that sends the peering request
          type: string
          nullable: true
        requester_vpc_id:
          description: ID of the VPC of the private subnet
          type: string
          nullable: true
      additionalProperties: false
      required:
        - expires_at
        - peer_region
        - peering_connection_id
        - requester_account_id
        - requester_vpc_id
    VpcPeeringGcp:
      type: object
      properties:
        local_network_name:
          description: Name of the Ubicloud VPC network; use it as --peer-network
          type: string
        local_project_id:
          description: ID of the Ubicloud GCP project; use it as --peer-project
          type: string
        peering_name:
          description: Name of Ubicloud's side of the peering
          type: string
      additionalProperties: false
      required:
        - local_network_name
        - local_project_id
        - peering_name
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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