1. Packages
  2. Alicloud Provider
  3. API Docs
  4. vpc
  5. PeerConnection
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.vpc.PeerConnection

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a VPC Peer Connection resource.

    For information about VPC Peer Connection and how to use it, see What is Peer Connection.

    NOTE: Available since v1.186.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.getAccount({});
    const config = new pulumi.Config();
    const acceptingRegion = config.get("acceptingRegion") || "cn-beijing";
    const localVpc = new alicloud.vpc.Network("local_vpc", {
        vpcName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
    });
    const acceptingVpc = new alicloud.vpc.Network("accepting_vpc", {
        vpcName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
    });
    const defaultPeerConnection = new alicloud.vpc.PeerConnection("default", {
        peerConnectionName: "terraform-example",
        vpcId: localVpc.id,
        acceptingAliUid: _default.then(_default => _default.id),
        acceptingRegionId: acceptingRegion,
        acceptingVpcId: acceptingVpc.id,
        description: "terraform-example",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.get_account()
    config = pulumi.Config()
    accepting_region = config.get("acceptingRegion")
    if accepting_region is None:
        accepting_region = "cn-beijing"
    local_vpc = alicloud.vpc.Network("local_vpc",
        vpc_name="terraform-example",
        cidr_block="172.17.3.0/24")
    accepting_vpc = alicloud.vpc.Network("accepting_vpc",
        vpc_name="terraform-example",
        cidr_block="172.17.3.0/24")
    default_peer_connection = alicloud.vpc.PeerConnection("default",
        peer_connection_name="terraform-example",
        vpc_id=local_vpc.id,
        accepting_ali_uid=default.id,
        accepting_region_id=accepting_region,
        accepting_vpc_id=accepting_vpc.id,
        description="terraform-example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := alicloud.GetAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		cfg := config.New(ctx, "")
    		acceptingRegion := "cn-beijing"
    		if param := cfg.Get("acceptingRegion"); param != "" {
    			acceptingRegion = param
    		}
    		localVpc, err := vpc.NewNetwork(ctx, "local_vpc", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.17.3.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		acceptingVpc, err := vpc.NewNetwork(ctx, "accepting_vpc", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.17.3.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewPeerConnection(ctx, "default", &vpc.PeerConnectionArgs{
    			PeerConnectionName: pulumi.String("terraform-example"),
    			VpcId:              localVpc.ID(),
    			AcceptingAliUid:    pulumi.String(_default.Id),
    			AcceptingRegionId:  pulumi.String(acceptingRegion),
    			AcceptingVpcId:     acceptingVpc.ID(),
    			Description:        pulumi.String("terraform-example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.GetAccount.Invoke();
    
        var config = new Config();
        var acceptingRegion = config.Get("acceptingRegion") ?? "cn-beijing";
        var localVpc = new AliCloud.Vpc.Network("local_vpc", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
        });
    
        var acceptingVpc = new AliCloud.Vpc.Network("accepting_vpc", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
        });
    
        var defaultPeerConnection = new AliCloud.Vpc.PeerConnection("default", new()
        {
            PeerConnectionName = "terraform-example",
            VpcId = localVpc.Id,
            AcceptingAliUid = @default.Apply(@default => @default.Apply(getAccountResult => getAccountResult.Id)),
            AcceptingRegionId = acceptingRegion,
            AcceptingVpcId = acceptingVpc.Id,
            Description = "terraform-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.PeerConnection;
    import com.pulumi.alicloud.vpc.PeerConnectionArgs;
    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 config = ctx.config();
            final var default = AlicloudFunctions.getAccount();
    
            final var acceptingRegion = config.get("acceptingRegion").orElse("cn-beijing");
            var localVpc = new Network("localVpc", NetworkArgs.builder()
                .vpcName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .build());
    
            var acceptingVpc = new Network("acceptingVpc", NetworkArgs.builder()
                .vpcName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .build());
    
            var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()
                .peerConnectionName("terraform-example")
                .vpcId(localVpc.id())
                .acceptingAliUid(default_.id())
                .acceptingRegionId(acceptingRegion)
                .acceptingVpcId(acceptingVpc.id())
                .description("terraform-example")
                .build());
    
        }
    }
    
    configuration:
      acceptingRegion:
        type: string
        default: cn-beijing
    resources:
      localVpc:
        type: alicloud:vpc:Network
        name: local_vpc
        properties:
          vpcName: terraform-example
          cidrBlock: 172.17.3.0/24
      acceptingVpc:
        type: alicloud:vpc:Network
        name: accepting_vpc
        properties:
          vpcName: terraform-example
          cidrBlock: 172.17.3.0/24
      defaultPeerConnection:
        type: alicloud:vpc:PeerConnection
        name: default
        properties:
          peerConnectionName: terraform-example
          vpcId: ${localVpc.id}
          acceptingAliUid: ${default.id}
          acceptingRegionId: ${acceptingRegion}
          acceptingVpcId: ${acceptingVpc.id}
          description: terraform-example
    variables:
      default:
        fn::invoke:
          Function: alicloud:getAccount
          Arguments: {}
    

    Create PeerConnection Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PeerConnection(name: string, args: PeerConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def PeerConnection(resource_name: str,
                       args: PeerConnectionArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PeerConnection(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       accepting_region_id: Optional[str] = None,
                       accepting_vpc_id: Optional[str] = None,
                       vpc_id: Optional[str] = None,
                       accepting_ali_uid: Optional[int] = None,
                       bandwidth: Optional[int] = None,
                       description: Optional[str] = None,
                       dry_run: Optional[bool] = None,
                       peer_connection_name: Optional[str] = None,
                       resource_group_id: Optional[str] = None,
                       status: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
    func NewPeerConnection(ctx *Context, name string, args PeerConnectionArgs, opts ...ResourceOption) (*PeerConnection, error)
    public PeerConnection(string name, PeerConnectionArgs args, CustomResourceOptions? opts = null)
    public PeerConnection(String name, PeerConnectionArgs args)
    public PeerConnection(String name, PeerConnectionArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:PeerConnection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PeerConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PeerConnectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PeerConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PeerConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PeerConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var peerConnectionResource = new AliCloud.Vpc.PeerConnection("peerConnectionResource", new()
    {
        AcceptingRegionId = "string",
        AcceptingVpcId = "string",
        VpcId = "string",
        AcceptingAliUid = 0,
        Bandwidth = 0,
        Description = "string",
        DryRun = false,
        PeerConnectionName = "string",
        ResourceGroupId = "string",
        Status = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpc.NewPeerConnection(ctx, "peerConnectionResource", &vpc.PeerConnectionArgs{
    	AcceptingRegionId:  pulumi.String("string"),
    	AcceptingVpcId:     pulumi.String("string"),
    	VpcId:              pulumi.String("string"),
    	AcceptingAliUid:    pulumi.Int(0),
    	Bandwidth:          pulumi.Int(0),
    	Description:        pulumi.String("string"),
    	DryRun:             pulumi.Bool(false),
    	PeerConnectionName: pulumi.String("string"),
    	ResourceGroupId:    pulumi.String("string"),
    	Status:             pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var peerConnectionResource = new PeerConnection("peerConnectionResource", PeerConnectionArgs.builder()
        .acceptingRegionId("string")
        .acceptingVpcId("string")
        .vpcId("string")
        .acceptingAliUid(0)
        .bandwidth(0)
        .description("string")
        .dryRun(false)
        .peerConnectionName("string")
        .resourceGroupId("string")
        .status("string")
        .tags(Map.of("string", "string"))
        .build());
    
    peer_connection_resource = alicloud.vpc.PeerConnection("peerConnectionResource",
        accepting_region_id="string",
        accepting_vpc_id="string",
        vpc_id="string",
        accepting_ali_uid=0,
        bandwidth=0,
        description="string",
        dry_run=False,
        peer_connection_name="string",
        resource_group_id="string",
        status="string",
        tags={
            "string": "string",
        })
    
    const peerConnectionResource = new alicloud.vpc.PeerConnection("peerConnectionResource", {
        acceptingRegionId: "string",
        acceptingVpcId: "string",
        vpcId: "string",
        acceptingAliUid: 0,
        bandwidth: 0,
        description: "string",
        dryRun: false,
        peerConnectionName: "string",
        resourceGroupId: "string",
        status: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:vpc:PeerConnection
    properties:
        acceptingAliUid: 0
        acceptingRegionId: string
        acceptingVpcId: string
        bandwidth: 0
        description: string
        dryRun: false
        peerConnectionName: string
        resourceGroupId: string
        status: string
        tags:
            string: string
        vpcId: string
    

    PeerConnection Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PeerConnection resource accepts the following input properties:

    AcceptingRegionId string
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    AcceptingVpcId string
    The VPC ID of the receiving end of the VPC peer connection.
    VpcId string
    The ID of the requester VPC.
    AcceptingAliUid int

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    Bandwidth int
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    Description string
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    DryRun bool
    Whether to PreCheck only this request. Default value: false. Valid values:
    PeerConnectionName string
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the VPC peer connection.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    AcceptingRegionId string
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    AcceptingVpcId string
    The VPC ID of the receiving end of the VPC peer connection.
    VpcId string
    The ID of the requester VPC.
    AcceptingAliUid int

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    Bandwidth int
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    Description string
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    DryRun bool
    Whether to PreCheck only this request. Default value: false. Valid values:
    PeerConnectionName string
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the VPC peer connection.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    acceptingRegionId String
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    acceptingVpcId String
    The VPC ID of the receiving end of the VPC peer connection.
    vpcId String
    The ID of the requester VPC.
    acceptingAliUid Integer

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    bandwidth Integer
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    description String
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dryRun Boolean
    Whether to PreCheck only this request. Default value: false. Valid values:
    peerConnectionName String
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the VPC peer connection.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    acceptingRegionId string
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    acceptingVpcId string
    The VPC ID of the receiving end of the VPC peer connection.
    vpcId string
    The ID of the requester VPC.
    acceptingAliUid number

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    bandwidth number
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    description string
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dryRun boolean
    Whether to PreCheck only this request. Default value: false. Valid values:
    peerConnectionName string
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resourceGroupId string
    The ID of the resource group.
    status string
    The status of the VPC peer connection.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    accepting_region_id str
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    accepting_vpc_id str
    The VPC ID of the receiving end of the VPC peer connection.
    vpc_id str
    The ID of the requester VPC.
    accepting_ali_uid int

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    bandwidth int
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    description str
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dry_run bool
    Whether to PreCheck only this request. Default value: false. Valid values:
    peer_connection_name str
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resource_group_id str
    The ID of the resource group.
    status str
    The status of the VPC peer connection.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    acceptingRegionId String
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    acceptingVpcId String
    The VPC ID of the receiving end of the VPC peer connection.
    vpcId String
    The ID of the requester VPC.
    acceptingAliUid Number

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    bandwidth Number
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    description String
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dryRun Boolean
    Whether to PreCheck only this request. Default value: false. Valid values:
    peerConnectionName String
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the VPC peer connection.
    tags Map<String>
    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PeerConnection resource produces the following output properties:

    CreateTime string
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime string
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time str
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PeerConnection Resource

    Get an existing PeerConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PeerConnectionState, opts?: CustomResourceOptions): PeerConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accepting_ali_uid: Optional[int] = None,
            accepting_region_id: Optional[str] = None,
            accepting_vpc_id: Optional[str] = None,
            bandwidth: Optional[int] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            dry_run: Optional[bool] = None,
            peer_connection_name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            vpc_id: Optional[str] = None) -> PeerConnection
    func GetPeerConnection(ctx *Context, name string, id IDInput, state *PeerConnectionState, opts ...ResourceOption) (*PeerConnection, error)
    public static PeerConnection Get(string name, Input<string> id, PeerConnectionState? state, CustomResourceOptions? opts = null)
    public static PeerConnection get(String name, Output<String> id, PeerConnectionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AcceptingAliUid int

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    AcceptingRegionId string
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    AcceptingVpcId string
    The VPC ID of the receiving end of the VPC peer connection.
    Bandwidth int
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    CreateTime string
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    Description string
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    DryRun bool
    Whether to PreCheck only this request. Default value: false. Valid values:
    PeerConnectionName string
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the VPC peer connection.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    VpcId string
    The ID of the requester VPC.
    AcceptingAliUid int

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    AcceptingRegionId string
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    AcceptingVpcId string
    The VPC ID of the receiving end of the VPC peer connection.
    Bandwidth int
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    CreateTime string
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    Description string
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    DryRun bool
    Whether to PreCheck only this request. Default value: false. Valid values:
    PeerConnectionName string
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the VPC peer connection.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    VpcId string
    The ID of the requester VPC.
    acceptingAliUid Integer

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    acceptingRegionId String
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    acceptingVpcId String
    The VPC ID of the receiving end of the VPC peer connection.
    bandwidth Integer
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    createTime String
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    description String
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dryRun Boolean
    Whether to PreCheck only this request. Default value: false. Valid values:
    peerConnectionName String
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the VPC peer connection.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    vpcId String
    The ID of the requester VPC.
    acceptingAliUid number

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    acceptingRegionId string
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    acceptingVpcId string
    The VPC ID of the receiving end of the VPC peer connection.
    bandwidth number
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    createTime string
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    description string
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dryRun boolean
    Whether to PreCheck only this request. Default value: false. Valid values:
    peerConnectionName string
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resourceGroupId string
    The ID of the resource group.
    status string
    The status of the VPC peer connection.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    vpcId string
    The ID of the requester VPC.
    accepting_ali_uid int

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    accepting_region_id str
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    accepting_vpc_id str
    The VPC ID of the receiving end of the VPC peer connection.
    bandwidth int
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    create_time str
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    description str
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dry_run bool
    Whether to PreCheck only this request. Default value: false. Valid values:
    peer_connection_name str
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resource_group_id str
    The ID of the resource group.
    status str
    The status of the VPC peer connection.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    vpc_id str
    The ID of the requester VPC.
    acceptingAliUid Number

    The ID of the Alibaba Cloud account (primary account) of the receiving end of the VPC peering connection to be created.

    • Enter the ID of your Alibaba Cloud account to create a peer-to-peer connection to the VPC account.
    • Enter the ID of another Alibaba Cloud account to create a cross-account VPC peer-to-peer connection.

    NOTE: If the recipient account is a RAM user (sub-account), enter the ID of the Alibaba Cloud account corresponding to the RAM user.

    acceptingRegionId String
    The region ID of the recipient of the VPC peering connection to be created.

    • When creating a VPC peer-to-peer connection in the same region, enter the same region ID as the region ID of the initiator.
    • When creating a cross-region VPC peer-to-peer connection, enter a region ID that is different from the region ID of the initiator.
    acceptingVpcId String
    The VPC ID of the receiving end of the VPC peer connection.
    bandwidth Number
    The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.
    createTime String
    The creation time of the VPC peer connection. Use UTC time in the format YYYY-MM-DDThh:mm:ssZ.
    description String
    The description of the VPC peer connection to be created.It must be 2 to 256 characters in length and must start with a letter or Chinese, but cannot start with http:// or https://.
    dryRun Boolean
    Whether to PreCheck only this request. Default value: false. Valid values:
    peerConnectionName String
    The name of the VPC peer connection. The name of the resource. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the VPC peer connection.
    tags Map<String>
    A mapping of tags to assign to the resource.
    vpcId String
    The ID of the requester VPC.

    Import

    VPC Peer Connection can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/peerConnection:PeerConnection example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi