alicloud.vpc.PeerConnection
Explore with Pulumi AI
Provides a VPC Peer Connection resource. Vpc peer connection.
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
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 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
})
}
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());
}
}
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"]))
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,
});
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:
- Accepting
Region stringId 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 stringId The VPC ID of the receiving end of the VPC peer connection.
- Vpc
Id string You must create a VPC ID on the initiator of a VPC peer connection.
- Accepting
Ali intUid 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://
orhttps://
.- Dry
Run bool Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- Peer
Connection stringName The name of the resource. 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 stringId The ID of the resource group.
- Status string
The status of the resource.
- Dictionary<string, object>
The tags of PrefixList.
- Accepting
Region stringId 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 stringId The VPC ID of the receiving end of the VPC peer connection.
- Vpc
Id string You must create a VPC ID on the initiator of a VPC peer connection.
- Accepting
Ali intUid 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://
orhttps://
.- Dry
Run bool Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- Peer
Connection stringName The name of the resource. 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 stringId The ID of the resource group.
- Status string
The status of the resource.
- map[string]interface{}
The tags of PrefixList.
- accepting
Region StringId 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 StringId The VPC ID of the receiving end of the VPC peer connection.
- vpc
Id String You must create a VPC ID on the initiator of a VPC peer connection.
- accepting
Ali IntegerUid 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://
orhttps://
.- dry
Run Boolean Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer
Connection StringName The name of the resource. 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 StringId The ID of the resource group.
- status String
The status of the resource.
- Map<String,Object>
The tags of PrefixList.
- accepting
Region stringId 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 stringId The VPC ID of the receiving end of the VPC peer connection.
- vpc
Id string You must create a VPC ID on the initiator of a VPC peer connection.
- accepting
Ali numberUid 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://
orhttps://
.- dry
Run boolean Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer
Connection stringName The name of the resource. 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 stringId The ID of the resource group.
- status string
The status of the resource.
- {[key: string]: any}
The tags of PrefixList.
- accepting_
region_ strid 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_ strid The VPC ID of the receiving end of the VPC peer connection.
- vpc_
id str You must create a VPC ID on the initiator of a VPC peer connection.
- accepting_
ali_ intuid 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://
orhttps://
.- dry_
run bool Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer_
connection_ strname The name of the resource. 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_ strid The ID of the resource group.
- status str
The status of the resource.
- Mapping[str, Any]
The tags of PrefixList.
- accepting
Region StringId 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 StringId The VPC ID of the receiving end of the VPC peer connection.
- vpc
Id String You must create a VPC ID on the initiator of a VPC peer connection.
- accepting
Ali NumberUid 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://
orhttps://
.- dry
Run Boolean Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer
Connection StringName The name of the resource. 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 StringId The ID of the resource group.
- status String
The status of the resource.
- Map<Any>
The tags of PrefixList.
Outputs
All input properties are implicitly available as output properties. Additionally, the PeerConnection resource produces the following output properties:
- Create
Time 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 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 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 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.
- create
Time 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.
- Accepting
Ali intUid 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 stringId 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 stringId 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 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://
orhttps://
.- Dry
Run bool Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- Peer
Connection stringName The name of the resource. 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 stringId The ID of the resource group.
- Status string
The status of the resource.
- Dictionary<string, object>
The tags of PrefixList.
- Vpc
Id string You must create a VPC ID on the initiator of a VPC peer connection.
- Accepting
Ali intUid 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 stringId 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 stringId 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 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://
orhttps://
.- Dry
Run bool Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- Peer
Connection stringName The name of the resource. 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 stringId The ID of the resource group.
- Status string
The status of the resource.
- map[string]interface{}
The tags of PrefixList.
- Vpc
Id string You must create a VPC ID on the initiator of a VPC peer connection.
- accepting
Ali IntegerUid 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 StringId 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 StringId 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.
- create
Time 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://
orhttps://
.- dry
Run Boolean Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer
Connection StringName The name of the resource. 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 StringId The ID of the resource group.
- status String
The status of the resource.
- Map<String,Object>
The tags of PrefixList.
- vpc
Id String You must create a VPC ID on the initiator of a VPC peer connection.
- accepting
Ali numberUid 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 stringId 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 stringId 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.
- create
Time 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://
orhttps://
.- dry
Run boolean Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer
Connection stringName The name of the resource. 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 stringId The ID of the resource group.
- status string
The status of the resource.
- {[key: string]: any}
The tags of PrefixList.
- vpc
Id string You must create a VPC ID on the initiator of a VPC peer connection.
- accepting_
ali_ intuid 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_ strid 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_ strid 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://
orhttps://
.- dry_
run bool Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer_
connection_ strname The name of the resource. 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_ strid The ID of the resource group.
- status str
The status of the resource.
- Mapping[str, Any]
The tags of PrefixList.
- vpc_
id str You must create a VPC ID on the initiator of a VPC peer connection.
- accepting
Ali NumberUid 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 StringId 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 StringId 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.
- create
Time 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://
orhttps://
.- dry
Run Boolean Whether to PreCheck only this request. Value:
- true: The check request is sent without creating a VPC peer-to-peer connection. Check items include whether required parameters, request format, and business restrictions are filled in. If the check does not pass, the corresponding error is returned. If the check passes, the error code 'DryRunOperation' is returned '.
- false (default): A normal request is sent. After checking, the HTTP 2xx status code is returned and the operation is performed directly.
- peer
Connection StringName The name of the resource. 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 StringId The ID of the resource group.
- status String
The status of the resource.
- Map<Any>
The tags of PrefixList.
- vpc
Id String You must create a VPC ID on the initiator of a VPC peer connection.
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.