1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. PeerConnection
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.vpc.PeerConnection

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 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 defaultAccount = alicloud.getAccount({});
    const config = new pulumi.Config();
    const acceptingRegion = config.get("acceptingRegion") || "cn-beijing";
    const local = new alicloud.Provider("local", {region: "cn-hangzhou"});
    const accepting = new alicloud.Provider("accepting", {region: acceptingRegion});
    const localVpc = new alicloud.vpc.Network("localVpc", {
        vpcName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
    }, {
        provider: alicloud.local,
    });
    const acceptingVpc = new alicloud.vpc.Network("acceptingVpc", {
        vpcName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
    }, {
        provider: alicloud.accepting,
    });
    const defaultPeerConnection = new alicloud.vpc.PeerConnection("defaultPeerConnection", {
        peerConnectionName: "terraform-example",
        vpcId: localVpc.id,
        acceptingAliUid: defaultAccount.then(defaultAccount => defaultAccount.id),
        acceptingRegionId: acceptingRegion,
        acceptingVpcId: acceptingVpc.id,
        description: "terraform-example",
    }, {
        provider: alicloud.local,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_account = alicloud.get_account()
    config = pulumi.Config()
    accepting_region = config.get("acceptingRegion")
    if accepting_region is None:
        accepting_region = "cn-beijing"
    local = alicloud.Provider("local", region="cn-hangzhou")
    accepting = alicloud.Provider("accepting", region=accepting_region)
    local_vpc = alicloud.vpc.Network("localVpc",
        vpc_name="terraform-example",
        cidr_block="172.17.3.0/24",
        opts=pulumi.ResourceOptions(provider=alicloud["local"]))
    accepting_vpc = alicloud.vpc.Network("acceptingVpc",
        vpc_name="terraform-example",
        cidr_block="172.17.3.0/24",
        opts=pulumi.ResourceOptions(provider=alicloud["accepting"]))
    default_peer_connection = alicloud.vpc.PeerConnection("defaultPeerConnection",
        peer_connection_name="terraform-example",
        vpc_id=local_vpc.id,
        accepting_ali_uid=default_account.id,
        accepting_region_id=accepting_region,
        accepting_vpc_id=accepting_vpc.id,
        description="terraform-example",
        opts=pulumi.ResourceOptions(provider=alicloud["local"]))
    
    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 {
    		defaultAccount, 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
    		}
    		_, err = alicloud.NewProvider(ctx, "local", &alicloud.ProviderArgs{
    			Region: pulumi.String("cn-hangzhou"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = alicloud.NewProvider(ctx, "accepting", &alicloud.ProviderArgs{
    			Region: pulumi.String(acceptingRegion),
    		})
    		if err != nil {
    			return err
    		}
    		localVpc, err := vpc.NewNetwork(ctx, "localVpc", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.17.3.0/24"),
    		}, pulumi.Provider(alicloud.Local))
    		if err != nil {
    			return err
    		}
    		acceptingVpc, err := vpc.NewNetwork(ctx, "acceptingVpc", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.17.3.0/24"),
    		}, pulumi.Provider(alicloud.Accepting))
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewPeerConnection(ctx, "defaultPeerConnection", &vpc.PeerConnectionArgs{
    			PeerConnectionName: pulumi.String("terraform-example"),
    			VpcId:              localVpc.ID(),
    			AcceptingAliUid:    pulumi.String(defaultAccount.Id),
    			AcceptingRegionId:  pulumi.String(acceptingRegion),
    			AcceptingVpcId:     acceptingVpc.ID(),
    			Description:        pulumi.String("terraform-example"),
    		}, pulumi.Provider(alicloud.Local))
    		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 defaultAccount = AliCloud.GetAccount.Invoke();
    
        var config = new Config();
        var acceptingRegion = config.Get("acceptingRegion") ?? "cn-beijing";
        var local = new AliCloud.Provider("local", new()
        {
            Region = "cn-hangzhou",
        });
    
        var accepting = new AliCloud.Provider("accepting", new()
        {
            Region = acceptingRegion,
        });
    
        var localVpc = new AliCloud.Vpc.Network("localVpc", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
        }, new CustomResourceOptions
        {
            Provider = alicloud.Local,
        });
    
        var acceptingVpc = new AliCloud.Vpc.Network("acceptingVpc", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
        }, new CustomResourceOptions
        {
            Provider = alicloud.Accepting,
        });
    
        var defaultPeerConnection = new AliCloud.Vpc.PeerConnection("defaultPeerConnection", new()
        {
            PeerConnectionName = "terraform-example",
            VpcId = localVpc.Id,
            AcceptingAliUid = defaultAccount.Apply(getAccountResult => getAccountResult.Id),
            AcceptingRegionId = acceptingRegion,
            AcceptingVpcId = acceptingVpc.Id,
            Description = "terraform-example",
        }, new CustomResourceOptions
        {
            Provider = alicloud.Local,
        });
    
    });
    
    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.Provider;
    import com.pulumi.alicloud.ProviderArgs;
    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 com.pulumi.resources.CustomResourceOptions;
    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 defaultAccount = AlicloudFunctions.getAccount();
    
            final var acceptingRegion = config.get("acceptingRegion").orElse("cn-beijing");
            var local = new Provider("local", ProviderArgs.builder()        
                .region("cn-hangzhou")
                .build());
    
            var accepting = new Provider("accepting", ProviderArgs.builder()        
                .region(acceptingRegion)
                .build());
    
            var localVpc = new Network("localVpc", NetworkArgs.builder()        
                .vpcName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.local())
                    .build());
    
            var acceptingVpc = new Network("acceptingVpc", NetworkArgs.builder()        
                .vpcName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.accepting())
                    .build());
    
            var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()        
                .peerConnectionName("terraform-example")
                .vpcId(localVpc.id())
                .acceptingAliUid(defaultAccount.applyValue(getAccountResult -> getAccountResult.id()))
                .acceptingRegionId(acceptingRegion)
                .acceptingVpcId(acceptingVpc.id())
                .description("terraform-example")
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.local())
                    .build());
    
        }
    }
    
    configuration:
      acceptingRegion:
        type: string
        default: cn-beijing
    resources:
      local:
        type: pulumi:providers:alicloud
        properties:
          region: cn-hangzhou
      accepting:
        type: pulumi:providers:alicloud
        properties:
          region: ${acceptingRegion}
      localVpc:
        type: alicloud:vpc:Network
        properties:
          vpcName: terraform-example
          cidrBlock: 172.17.3.0/24
        options:
          provider: ${alicloud.local}
      acceptingVpc:
        type: alicloud:vpc:Network
        properties:
          vpcName: terraform-example
          cidrBlock: 172.17.3.0/24
        options:
          provider: ${alicloud.accepting}
      defaultPeerConnection:
        type: alicloud:vpc:PeerConnection
        properties:
          peerConnectionName: terraform-example
          vpcId: ${localVpc.id}
          acceptingAliUid: ${defaultAccount.id}
          acceptingRegionId: ${acceptingRegion}
          acceptingVpcId: ${acceptingVpc.id}
          description: terraform-example
        options:
          provider: ${alicloud.local}
    variables:
      defaultAccount:
        fn::invoke:
          Function: alicloud:getAccount
          Arguments: {}
    

    Create PeerConnection Resource

    new PeerConnection(name: string, args: PeerConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def PeerConnection(resource_name: 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,
                       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, Any]] = None,
                       vpc_id: Optional[str] = None)
    @overload
    def PeerConnection(resource_name: str,
                       args: PeerConnectionArgs,
                       opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>
    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, Any]] = 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, object>
    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]interface{}
    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,Object>
    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]: any}
    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, Any]
    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<Any>
    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>
    

    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.51.0 published on Saturday, Mar 23, 2024 by Pulumi