1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. vpc
  5. PeerConnectionAccepter
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.vpc.PeerConnectionAccepter

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Vpc Peer Connection Accepter resource.

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

    NOTE: Available since v1.196.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const acceptingRegion = config.get("acceptingRegion") || "cn-beijing";
    const acceptUid = config.get("acceptUid") || "xxxx";
    // Method 1: Use assume_role to operate resources in the target account, detail see https://registry.terraform.io/providers/aliyun/alicloud/latest/docs#assume-role
    const accepting = new alicloud.Provider("accepting", {
        region: acceptingRegion,
        assumeRole: {
            roleArn: `acs:ram::${acceptUid}:role/terraform-example-assume-role`,
        },
    });
    // Method 2: Use the target account's access_key, secret_key
    // provider "alicloud" {
    //   region     = "cn-hangzhou"
    //   access_key = "access_key"
    //   secret_key = "secret_key"
    //   alias      = "accepting"
    // }
    const local = new alicloud.Provider("local", {region: "cn-hangzhou"});
    const localNetwork = new alicloud.vpc.Network("localNetwork", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    }, {
        provider: alicloud.local,
    });
    const acceptingNetwork = new alicloud.vpc.Network("acceptingNetwork", {
        vpcName: name,
        cidrBlock: "192.168.0.0/16",
    }, {
        provider: alicloud.accepting,
    });
    const acceptingAccount = alicloud.getAccount({});
    const defaultPeerConnection = new alicloud.vpc.PeerConnection("defaultPeerConnection", {
        peerConnectionName: name,
        vpcId: localNetwork.id,
        acceptingAliUid: acceptingAccount.then(acceptingAccount => acceptingAccount.id),
        acceptingRegionId: acceptingRegion,
        acceptingVpcId: acceptingNetwork.id,
        description: name,
    }, {
        provider: alicloud.local,
    });
    const defaultPeerConnectionAccepter = new alicloud.vpc.PeerConnectionAccepter("defaultPeerConnectionAccepter", {instanceId: defaultPeerConnection.id}, {
        provider: alicloud.accepting,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    accepting_region = config.get("acceptingRegion")
    if accepting_region is None:
        accepting_region = "cn-beijing"
    accept_uid = config.get("acceptUid")
    if accept_uid is None:
        accept_uid = "xxxx"
    # Method 1: Use assume_role to operate resources in the target account, detail see https://registry.terraform.io/providers/aliyun/alicloud/latest/docs#assume-role
    accepting = alicloud.Provider("accepting",
        region=accepting_region,
        assume_role=alicloud.ProviderAssumeRoleArgs(
            role_arn=f"acs:ram::{accept_uid}:role/terraform-example-assume-role",
        ))
    # Method 2: Use the target account's access_key, secret_key
    # provider "alicloud" {
    #   region     = "cn-hangzhou"
    #   access_key = "access_key"
    #   secret_key = "secret_key"
    #   alias      = "accepting"
    # }
    local = alicloud.Provider("local", region="cn-hangzhou")
    local_network = alicloud.vpc.Network("localNetwork",
        vpc_name=name,
        cidr_block="10.4.0.0/16",
        opts=pulumi.ResourceOptions(provider=alicloud["local"]))
    accepting_network = alicloud.vpc.Network("acceptingNetwork",
        vpc_name=name,
        cidr_block="192.168.0.0/16",
        opts=pulumi.ResourceOptions(provider=alicloud["accepting"]))
    accepting_account = alicloud.get_account()
    default_peer_connection = alicloud.vpc.PeerConnection("defaultPeerConnection",
        peer_connection_name=name,
        vpc_id=local_network.id,
        accepting_ali_uid=accepting_account.id,
        accepting_region_id=accepting_region,
        accepting_vpc_id=accepting_network.id,
        description=name,
        opts=pulumi.ResourceOptions(provider=alicloud["local"]))
    default_peer_connection_accepter = alicloud.vpc.PeerConnectionAccepter("defaultPeerConnectionAccepter", instance_id=default_peer_connection.id,
    opts=pulumi.ResourceOptions(provider=alicloud["accepting"]))
    
    package main
    
    import (
    	"fmt"
    
    	"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 {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		acceptingRegion := "cn-beijing"
    		if param := cfg.Get("acceptingRegion"); param != "" {
    			acceptingRegion = param
    		}
    		acceptUid := "xxxx"
    		if param := cfg.Get("acceptUid"); param != "" {
    			acceptUid = param
    		}
    		// Method 1: Use assume_role to operate resources in the target account, detail see https://registry.terraform.io/providers/aliyun/alicloud/latest/docs#assume-role
    		_, err := alicloud.NewProvider(ctx, "accepting", &alicloud.ProviderArgs{
    			Region: pulumi.String(acceptingRegion),
    			AssumeRole: &alicloud.ProviderAssumeRoleArgs{
    				RoleArn: pulumi.String(fmt.Sprintf("acs:ram::%v:role/terraform-example-assume-role", acceptUid)),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = alicloud.NewProvider(ctx, "local", &alicloud.ProviderArgs{
    			Region: pulumi.String("cn-hangzhou"),
    		})
    		if err != nil {
    			return err
    		}
    		localNetwork, err := vpc.NewNetwork(ctx, "localNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		}, pulumi.Provider(alicloud.Local))
    		if err != nil {
    			return err
    		}
    		acceptingNetwork, err := vpc.NewNetwork(ctx, "acceptingNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("192.168.0.0/16"),
    		}, pulumi.Provider(alicloud.Accepting))
    		if err != nil {
    			return err
    		}
    		acceptingAccount, err := alicloud.GetAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultPeerConnection, err := vpc.NewPeerConnection(ctx, "defaultPeerConnection", &vpc.PeerConnectionArgs{
    			PeerConnectionName: pulumi.String(name),
    			VpcId:              localNetwork.ID(),
    			AcceptingAliUid:    pulumi.String(acceptingAccount.Id),
    			AcceptingRegionId:  pulumi.String(acceptingRegion),
    			AcceptingVpcId:     acceptingNetwork.ID(),
    			Description:        pulumi.String(name),
    		}, pulumi.Provider(alicloud.Local))
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewPeerConnectionAccepter(ctx, "defaultPeerConnectionAccepter", &vpc.PeerConnectionAccepterArgs{
    			InstanceId: defaultPeerConnection.ID(),
    		}, pulumi.Provider(alicloud.Accepting))
    		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 config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var acceptingRegion = config.Get("acceptingRegion") ?? "cn-beijing";
        var acceptUid = config.Get("acceptUid") ?? "xxxx";
        // Method 1: Use assume_role to operate resources in the target account, detail see https://registry.terraform.io/providers/aliyun/alicloud/latest/docs#assume-role
        var accepting = new AliCloud.Provider("accepting", new()
        {
            Region = acceptingRegion,
            AssumeRole = new AliCloud.Inputs.ProviderAssumeRoleArgs
            {
                RoleArn = $"acs:ram::{acceptUid}:role/terraform-example-assume-role",
            },
        });
    
        // Method 2: Use the target account's access_key, secret_key
        // provider "alicloud" {
        //   region     = "cn-hangzhou"
        //   access_key = "access_key"
        //   secret_key = "secret_key"
        //   alias      = "accepting"
        // }
        var local = new AliCloud.Provider("local", new()
        {
            Region = "cn-hangzhou",
        });
    
        var localNetwork = new AliCloud.Vpc.Network("localNetwork", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        }, new CustomResourceOptions
        {
            Provider = alicloud.Local,
        });
    
        var acceptingNetwork = new AliCloud.Vpc.Network("acceptingNetwork", new()
        {
            VpcName = name,
            CidrBlock = "192.168.0.0/16",
        }, new CustomResourceOptions
        {
            Provider = alicloud.Accepting,
        });
    
        var acceptingAccount = AliCloud.GetAccount.Invoke();
    
        var defaultPeerConnection = new AliCloud.Vpc.PeerConnection("defaultPeerConnection", new()
        {
            PeerConnectionName = name,
            VpcId = localNetwork.Id,
            AcceptingAliUid = acceptingAccount.Apply(getAccountResult => getAccountResult.Id),
            AcceptingRegionId = acceptingRegion,
            AcceptingVpcId = acceptingNetwork.Id,
            Description = name,
        }, new CustomResourceOptions
        {
            Provider = alicloud.Local,
        });
    
        var defaultPeerConnectionAccepter = new AliCloud.Vpc.PeerConnectionAccepter("defaultPeerConnectionAccepter", new()
        {
            InstanceId = defaultPeerConnection.Id,
        }, new CustomResourceOptions
        {
            Provider = alicloud.Accepting,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.Provider;
    import com.pulumi.alicloud.ProviderArgs;
    import com.pulumi.alicloud.inputs.ProviderAssumeRoleArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.vpc.PeerConnection;
    import com.pulumi.alicloud.vpc.PeerConnectionArgs;
    import com.pulumi.alicloud.vpc.PeerConnectionAccepter;
    import com.pulumi.alicloud.vpc.PeerConnectionAccepterArgs;
    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 name = config.get("name").orElse("tf-example");
            final var acceptingRegion = config.get("acceptingRegion").orElse("cn-beijing");
            final var acceptUid = config.get("acceptUid").orElse("xxxx");
            // Method 1: Use assume_role to operate resources in the target account, detail see https://registry.terraform.io/providers/aliyun/alicloud/latest/docs#assume-role
            var accepting = new Provider("accepting", ProviderArgs.builder()        
                .region(acceptingRegion)
                .assumeRole(ProviderAssumeRoleArgs.builder()
                    .roleArn(String.format("acs:ram::%s:role/terraform-example-assume-role", acceptUid))
                    .build())
                .build());
    
            // Method 2: Use the target account's access_key, secret_key
            // provider "alicloud" {
            //   region     = "cn-hangzhou"
            //   access_key = "access_key"
            //   secret_key = "secret_key"
            //   alias      = "accepting"
            // }
            var local = new Provider("local", ProviderArgs.builder()        
                .region("cn-hangzhou")
                .build());
    
            var localNetwork = new Network("localNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.local())
                    .build());
    
            var acceptingNetwork = new Network("acceptingNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .cidrBlock("192.168.0.0/16")
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.accepting())
                    .build());
    
            final var acceptingAccount = AlicloudFunctions.getAccount();
    
            var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()        
                .peerConnectionName(name)
                .vpcId(localNetwork.id())
                .acceptingAliUid(acceptingAccount.applyValue(getAccountResult -> getAccountResult.id()))
                .acceptingRegionId(acceptingRegion)
                .acceptingVpcId(acceptingNetwork.id())
                .description(name)
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.local())
                    .build());
    
            var defaultPeerConnectionAccepter = new PeerConnectionAccepter("defaultPeerConnectionAccepter", PeerConnectionAccepterArgs.builder()        
                .instanceId(defaultPeerConnection.id())
                .build(), CustomResourceOptions.builder()
                    .provider(alicloud.accepting())
                    .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
      acceptingRegion:
        type: string
        default: cn-beijing
      acceptUid:
        type: string
        default: xxxx
    resources:
      # Method 1: Use assume_role to operate resources in the target account, detail see https://registry.terraform.io/providers/aliyun/alicloud/latest/docs#assume-role
      accepting: # Method 2: Use the target account's access_key, secret_key
      # provider "alicloud" {
      #   region     = "cn-hangzhou"
      #   access_key = "access_key"
      #   secret_key = "secret_key"
      #   alias      = "accepting"
      # }
        type: pulumi:providers:alicloud
        properties:
          region: ${acceptingRegion}
          assumeRole:
            roleArn: acs:ram::${acceptUid}:role/terraform-example-assume-role
      local:
        type: pulumi:providers:alicloud
        properties:
          region: cn-hangzhou
      localNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
        options:
          provider: ${alicloud.local}
      acceptingNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 192.168.0.0/16
        options:
          provider: ${alicloud.accepting}
      defaultPeerConnection:
        type: alicloud:vpc:PeerConnection
        properties:
          peerConnectionName: ${name}
          vpcId: ${localNetwork.id}
          acceptingAliUid: ${acceptingAccount.id}
          acceptingRegionId: ${acceptingRegion}
          acceptingVpcId: ${acceptingNetwork.id}
          description: ${name}
        options:
          provider: ${alicloud.local}
      defaultPeerConnectionAccepter:
        type: alicloud:vpc:PeerConnectionAccepter
        properties:
          instanceId: ${defaultPeerConnection.id}
        options:
          provider: ${alicloud.accepting}
    variables:
      acceptingAccount:
        fn::invoke:
          Function: alicloud:getAccount
          Arguments: {}
    

    Create PeerConnectionAccepter Resource

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

    Constructor syntax

    new PeerConnectionAccepter(name: string, args: PeerConnectionAccepterArgs, opts?: CustomResourceOptions);
    @overload
    def PeerConnectionAccepter(resource_name: str,
                               args: PeerConnectionAccepterArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def PeerConnectionAccepter(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               instance_id: Optional[str] = None,
                               dry_run: Optional[bool] = None)
    func NewPeerConnectionAccepter(ctx *Context, name string, args PeerConnectionAccepterArgs, opts ...ResourceOption) (*PeerConnectionAccepter, error)
    public PeerConnectionAccepter(string name, PeerConnectionAccepterArgs args, CustomResourceOptions? opts = null)
    public PeerConnectionAccepter(String name, PeerConnectionAccepterArgs args)
    public PeerConnectionAccepter(String name, PeerConnectionAccepterArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:PeerConnectionAccepter
    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 PeerConnectionAccepterArgs
    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 PeerConnectionAccepterArgs
    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 PeerConnectionAccepterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PeerConnectionAccepterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PeerConnectionAccepterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var peerConnectionAccepterResource = new AliCloud.Vpc.PeerConnectionAccepter("peerConnectionAccepterResource", new()
    {
        InstanceId = "string",
        DryRun = false,
    });
    
    example, err := vpc.NewPeerConnectionAccepter(ctx, "peerConnectionAccepterResource", &vpc.PeerConnectionAccepterArgs{
    	InstanceId: pulumi.String("string"),
    	DryRun:     pulumi.Bool(false),
    })
    
    var peerConnectionAccepterResource = new PeerConnectionAccepter("peerConnectionAccepterResource", PeerConnectionAccepterArgs.builder()        
        .instanceId("string")
        .dryRun(false)
        .build());
    
    peer_connection_accepter_resource = alicloud.vpc.PeerConnectionAccepter("peerConnectionAccepterResource",
        instance_id="string",
        dry_run=False)
    
    const peerConnectionAccepterResource = new alicloud.vpc.PeerConnectionAccepter("peerConnectionAccepterResource", {
        instanceId: "string",
        dryRun: false,
    });
    
    type: alicloud:vpc:PeerConnectionAccepter
    properties:
        dryRun: false
        instanceId: string
    

    PeerConnectionAccepter 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 PeerConnectionAccepter resource accepts the following input properties:

    InstanceId string
    The ID of the instance of the created VPC peer connection.
    DryRun bool
    The dry run.
    InstanceId string
    The ID of the instance of the created VPC peer connection.
    DryRun bool
    The dry run.
    instanceId String
    The ID of the instance of the created VPC peer connection.
    dryRun Boolean
    The dry run.
    instanceId string
    The ID of the instance of the created VPC peer connection.
    dryRun boolean
    The dry run.
    instance_id str
    The ID of the instance of the created VPC peer connection.
    dry_run bool
    The dry run.
    instanceId String
    The ID of the instance of the created VPC peer connection.
    dryRun Boolean
    The dry run.

    Outputs

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

    AcceptingOwnerUid 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.> 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.
    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerConnectionAccepterName string
    The name of the resource
    Status string
    The status of the resource
    VpcId string
    You must create a VPC ID on the initiator of a VPC peer connection.
    AcceptingOwnerUid 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.> 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.
    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    PeerConnectionAccepterName string
    The name of the resource
    Status string
    The status of the resource
    VpcId string
    You must create a VPC ID on the initiator of a VPC peer connection.
    acceptingOwnerUid 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.> 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.
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    peerConnectionAccepterName String
    The name of the resource
    status String
    The status of the resource
    vpcId String
    You must create a VPC ID on the initiator of a VPC peer connection.
    acceptingOwnerUid 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.> 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.
    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.
    id string
    The provider-assigned unique ID for this managed resource.
    peerConnectionAccepterName string
    The name of the resource
    status string
    The status of the resource
    vpcId string
    You must create a VPC ID on the initiator of a VPC peer connection.
    accepting_owner_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.> 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.
    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.
    id str
    The provider-assigned unique ID for this managed resource.
    peer_connection_accepter_name str
    The name of the resource
    status str
    The status of the resource
    vpc_id str
    You must create a VPC ID on the initiator of a VPC peer connection.
    acceptingOwnerUid 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.> 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.
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    peerConnectionAccepterName String
    The name of the resource
    status String
    The status of the resource
    vpcId String
    You must create a VPC ID on the initiator of a VPC peer connection.

    Look up Existing PeerConnectionAccepter Resource

    Get an existing PeerConnectionAccepter 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?: PeerConnectionAccepterState, opts?: CustomResourceOptions): PeerConnectionAccepter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            accepting_owner_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,
            instance_id: Optional[str] = None,
            peer_connection_accepter_name: Optional[str] = None,
            status: Optional[str] = None,
            vpc_id: Optional[str] = None) -> PeerConnectionAccepter
    func GetPeerConnectionAccepter(ctx *Context, name string, id IDInput, state *PeerConnectionAccepterState, opts ...ResourceOption) (*PeerConnectionAccepter, error)
    public static PeerConnectionAccepter Get(string name, Input<string> id, PeerConnectionAccepterState? state, CustomResourceOptions? opts = null)
    public static PeerConnectionAccepter get(String name, Output<String> id, PeerConnectionAccepterState 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:
    AcceptingOwnerUid 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.> 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.
    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
    The dry run.
    InstanceId string
    The ID of the instance of the created VPC peer connection.
    PeerConnectionAccepterName string
    The name of the resource
    Status string
    The status of the resource
    VpcId string
    You must create a VPC ID on the initiator of a VPC peer connection.
    AcceptingOwnerUid 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.> 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.
    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
    The dry run.
    InstanceId string
    The ID of the instance of the created VPC peer connection.
    PeerConnectionAccepterName string
    The name of the resource
    Status string
    The status of the resource
    VpcId string
    You must create a VPC ID on the initiator of a VPC peer connection.
    acceptingOwnerUid 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.> 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.
    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
    The dry run.
    instanceId String
    The ID of the instance of the created VPC peer connection.
    peerConnectionAccepterName String
    The name of the resource
    status String
    The status of the resource
    vpcId String
    You must create a VPC ID on the initiator of a VPC peer connection.
    acceptingOwnerUid 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.> 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.
    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
    The dry run.
    instanceId string
    The ID of the instance of the created VPC peer connection.
    peerConnectionAccepterName string
    The name of the resource
    status string
    The status of the resource
    vpcId string
    You must create a VPC ID on the initiator of a VPC peer connection.
    accepting_owner_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.> 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.
    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
    The dry run.
    instance_id str
    The ID of the instance of the created VPC peer connection.
    peer_connection_accepter_name str
    The name of the resource
    status str
    The status of the resource
    vpc_id str
    You must create a VPC ID on the initiator of a VPC peer connection.
    acceptingOwnerUid 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.> 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.
    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
    The dry run.
    instanceId String
    The ID of the instance of the created VPC peer connection.
    peerConnectionAccepterName String
    The name of the resource
    status String
    The status of the resource
    vpcId String
    You must create a VPC ID on the initiator of a VPC peer connection.

    Import

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

    $ pulumi import alicloud:vpc/peerConnectionAccepter:PeerConnectionAccepter 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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi