1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getVpcPeeringConnectionsV2
Viewing docs for opentelekomcloud 1.36.61
published on Thursday, Mar 12, 2026 by opentelekomcloud
opentelekomcloud logo
Viewing docs for opentelekomcloud 1.36.61
published on Thursday, Mar 12, 2026 by opentelekomcloud

    Up-to-date reference of API arguments for VPC peering connections you can get at documentation portal

    Use this data source to list VPC peering connections matching the specified criteria.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const peerings = opentelekomcloud.getVpcPeeringConnectionsV2({
        vpcId: vpc.id,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    peerings = opentelekomcloud.get_vpc_peering_connections_v2(vpc_id=vpc["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.GetVpcPeeringConnectionsV2(ctx, &opentelekomcloud.GetVpcPeeringConnectionsV2Args{
    			VpcId: pulumi.StringRef(vpc.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var peerings = Opentelekomcloud.GetVpcPeeringConnectionsV2.Invoke(new()
        {
            VpcId = vpc.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetVpcPeeringConnectionsV2Args;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var peerings = OpentelekomcloudFunctions.getVpcPeeringConnectionsV2(GetVpcPeeringConnectionsV2Args.builder()
                .vpcId(vpc.id())
                .build());
    
        }
    }
    
    variables:
      peerings:
        fn::invoke:
          function: opentelekomcloud:getVpcPeeringConnectionsV2
          arguments:
            vpcId: ${vpc.id}
    

    Using getVpcPeeringConnectionsV2

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVpcPeeringConnectionsV2(args: GetVpcPeeringConnectionsV2Args, opts?: InvokeOptions): Promise<GetVpcPeeringConnectionsV2Result>
    function getVpcPeeringConnectionsV2Output(args: GetVpcPeeringConnectionsV2OutputArgs, opts?: InvokeOptions): Output<GetVpcPeeringConnectionsV2Result>
    def get_vpc_peering_connections_v2(id: Optional[str] = None,
                                       name: Optional[str] = None,
                                       peer_tenant_id: Optional[str] = None,
                                       peer_vpc_id: Optional[str] = None,
                                       status: Optional[str] = None,
                                       vpc_id: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetVpcPeeringConnectionsV2Result
    def get_vpc_peering_connections_v2_output(id: Optional[pulumi.Input[str]] = None,
                                       name: Optional[pulumi.Input[str]] = None,
                                       peer_tenant_id: Optional[pulumi.Input[str]] = None,
                                       peer_vpc_id: Optional[pulumi.Input[str]] = None,
                                       status: Optional[pulumi.Input[str]] = None,
                                       vpc_id: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetVpcPeeringConnectionsV2Result]
    func GetVpcPeeringConnectionsV2(ctx *Context, args *GetVpcPeeringConnectionsV2Args, opts ...InvokeOption) (*GetVpcPeeringConnectionsV2Result, error)
    func GetVpcPeeringConnectionsV2Output(ctx *Context, args *GetVpcPeeringConnectionsV2OutputArgs, opts ...InvokeOption) GetVpcPeeringConnectionsV2ResultOutput

    > Note: This function is named GetVpcPeeringConnectionsV2 in the Go SDK.

    public static class GetVpcPeeringConnectionsV2 
    {
        public static Task<GetVpcPeeringConnectionsV2Result> InvokeAsync(GetVpcPeeringConnectionsV2Args args, InvokeOptions? opts = null)
        public static Output<GetVpcPeeringConnectionsV2Result> Invoke(GetVpcPeeringConnectionsV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcPeeringConnectionsV2Result> getVpcPeeringConnectionsV2(GetVpcPeeringConnectionsV2Args args, InvokeOptions options)
    public static Output<GetVpcPeeringConnectionsV2Result> getVpcPeeringConnectionsV2(GetVpcPeeringConnectionsV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getVpcPeeringConnectionsV2:getVpcPeeringConnectionsV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the VPC peering connection.
    Name string
    The name of the VPC peering connection to filter by.
    PeerTenantId string
    The tenant ID of the accepter/peer VPC to filter by.
    PeerVpcId string
    The ID of the accepter/peer VPC to filter by.
    Status string
    The status of the VPC peering connection to filter by.
    VpcId string
    The ID of the requester VPC to filter by.
    Id string
    The ID of the VPC peering connection.
    Name string
    The name of the VPC peering connection to filter by.
    PeerTenantId string
    The tenant ID of the accepter/peer VPC to filter by.
    PeerVpcId string
    The ID of the accepter/peer VPC to filter by.
    Status string
    The status of the VPC peering connection to filter by.
    VpcId string
    The ID of the requester VPC to filter by.
    id String
    The ID of the VPC peering connection.
    name String
    The name of the VPC peering connection to filter by.
    peerTenantId String
    The tenant ID of the accepter/peer VPC to filter by.
    peerVpcId String
    The ID of the accepter/peer VPC to filter by.
    status String
    The status of the VPC peering connection to filter by.
    vpcId String
    The ID of the requester VPC to filter by.
    id string
    The ID of the VPC peering connection.
    name string
    The name of the VPC peering connection to filter by.
    peerTenantId string
    The tenant ID of the accepter/peer VPC to filter by.
    peerVpcId string
    The ID of the accepter/peer VPC to filter by.
    status string
    The status of the VPC peering connection to filter by.
    vpcId string
    The ID of the requester VPC to filter by.
    id str
    The ID of the VPC peering connection.
    name str
    The name of the VPC peering connection to filter by.
    peer_tenant_id str
    The tenant ID of the accepter/peer VPC to filter by.
    peer_vpc_id str
    The ID of the accepter/peer VPC to filter by.
    status str
    The status of the VPC peering connection to filter by.
    vpc_id str
    The ID of the requester VPC to filter by.
    id String
    The ID of the VPC peering connection.
    name String
    The name of the VPC peering connection to filter by.
    peerTenantId String
    The tenant ID of the accepter/peer VPC to filter by.
    peerVpcId String
    The ID of the accepter/peer VPC to filter by.
    status String
    The status of the VPC peering connection to filter by.
    vpcId String
    The ID of the requester VPC to filter by.

    getVpcPeeringConnectionsV2 Result

    The following output properties are available:

    Id string
    The ID of the VPC peering connection.
    PeeringConnections List<GetVpcPeeringConnectionsV2PeeringConnection>
    A list of VPC peering connections. Each element contains the following attributes:
    Region string
    The region of the VPC peering connections.
    Name string
    The name of the VPC peering connection.
    PeerTenantId string
    The tenant ID of the accepter/peer VPC.
    PeerVpcId string
    The ID of the accepter/peer VPC.
    Status string
    The status of the VPC peering connection.
    VpcId string
    The ID of the requester VPC.
    Id string
    The ID of the VPC peering connection.
    PeeringConnections []GetVpcPeeringConnectionsV2PeeringConnection
    A list of VPC peering connections. Each element contains the following attributes:
    Region string
    The region of the VPC peering connections.
    Name string
    The name of the VPC peering connection.
    PeerTenantId string
    The tenant ID of the accepter/peer VPC.
    PeerVpcId string
    The ID of the accepter/peer VPC.
    Status string
    The status of the VPC peering connection.
    VpcId string
    The ID of the requester VPC.
    id String
    The ID of the VPC peering connection.
    peeringConnections List<GetVpcPeeringConnectionsV2PeeringConnection>
    A list of VPC peering connections. Each element contains the following attributes:
    region String
    The region of the VPC peering connections.
    name String
    The name of the VPC peering connection.
    peerTenantId String
    The tenant ID of the accepter/peer VPC.
    peerVpcId String
    The ID of the accepter/peer VPC.
    status String
    The status of the VPC peering connection.
    vpcId String
    The ID of the requester VPC.
    id string
    The ID of the VPC peering connection.
    peeringConnections GetVpcPeeringConnectionsV2PeeringConnection[]
    A list of VPC peering connections. Each element contains the following attributes:
    region string
    The region of the VPC peering connections.
    name string
    The name of the VPC peering connection.
    peerTenantId string
    The tenant ID of the accepter/peer VPC.
    peerVpcId string
    The ID of the accepter/peer VPC.
    status string
    The status of the VPC peering connection.
    vpcId string
    The ID of the requester VPC.
    id str
    The ID of the VPC peering connection.
    peering_connections Sequence[GetVpcPeeringConnectionsV2PeeringConnection]
    A list of VPC peering connections. Each element contains the following attributes:
    region str
    The region of the VPC peering connections.
    name str
    The name of the VPC peering connection.
    peer_tenant_id str
    The tenant ID of the accepter/peer VPC.
    peer_vpc_id str
    The ID of the accepter/peer VPC.
    status str
    The status of the VPC peering connection.
    vpc_id str
    The ID of the requester VPC.
    id String
    The ID of the VPC peering connection.
    peeringConnections List<Property Map>
    A list of VPC peering connections. Each element contains the following attributes:
    region String
    The region of the VPC peering connections.
    name String
    The name of the VPC peering connection.
    peerTenantId String
    The tenant ID of the accepter/peer VPC.
    peerVpcId String
    The ID of the accepter/peer VPC.
    status String
    The status of the VPC peering connection.
    vpcId String
    The ID of the requester VPC.

    Supporting Types

    GetVpcPeeringConnectionsV2PeeringConnection

    Description string
    The description of the VPC peering connection.
    Id string
    The ID of the VPC peering connection.
    Name string
    The name of the VPC peering connection to filter by.
    PeerTenantId string
    The tenant ID of the accepter/peer VPC to filter by.
    PeerVpcId string
    The ID of the accepter/peer VPC to filter by.
    Status string
    The status of the VPC peering connection to filter by.
    VpcId string
    The ID of the requester VPC to filter by.
    Description string
    The description of the VPC peering connection.
    Id string
    The ID of the VPC peering connection.
    Name string
    The name of the VPC peering connection to filter by.
    PeerTenantId string
    The tenant ID of the accepter/peer VPC to filter by.
    PeerVpcId string
    The ID of the accepter/peer VPC to filter by.
    Status string
    The status of the VPC peering connection to filter by.
    VpcId string
    The ID of the requester VPC to filter by.
    description String
    The description of the VPC peering connection.
    id String
    The ID of the VPC peering connection.
    name String
    The name of the VPC peering connection to filter by.
    peerTenantId String
    The tenant ID of the accepter/peer VPC to filter by.
    peerVpcId String
    The ID of the accepter/peer VPC to filter by.
    status String
    The status of the VPC peering connection to filter by.
    vpcId String
    The ID of the requester VPC to filter by.
    description string
    The description of the VPC peering connection.
    id string
    The ID of the VPC peering connection.
    name string
    The name of the VPC peering connection to filter by.
    peerTenantId string
    The tenant ID of the accepter/peer VPC to filter by.
    peerVpcId string
    The ID of the accepter/peer VPC to filter by.
    status string
    The status of the VPC peering connection to filter by.
    vpcId string
    The ID of the requester VPC to filter by.
    description str
    The description of the VPC peering connection.
    id str
    The ID of the VPC peering connection.
    name str
    The name of the VPC peering connection to filter by.
    peer_tenant_id str
    The tenant ID of the accepter/peer VPC to filter by.
    peer_vpc_id str
    The ID of the accepter/peer VPC to filter by.
    status str
    The status of the VPC peering connection to filter by.
    vpc_id str
    The ID of the requester VPC to filter by.
    description String
    The description of the VPC peering connection.
    id String
    The ID of the VPC peering connection.
    name String
    The name of the VPC peering connection to filter by.
    peerTenantId String
    The tenant ID of the accepter/peer VPC to filter by.
    peerVpcId String
    The ID of the accepter/peer VPC to filter by.
    status String
    The status of the VPC peering connection to filter by.
    vpcId String
    The ID of the requester VPC to filter by.

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    Viewing docs for opentelekomcloud 1.36.61
    published on Thursday, Mar 12, 2026 by opentelekomcloud
      Try Pulumi Cloud free. Your team will thank you.