PeerConnectionArgs

data class PeerConnectionArgs(val acceptingAliUid: Output<Int>? = null, val acceptingRegionId: Output<String>? = null, val acceptingVpcId: Output<String>? = null, val bandwidth: Output<Int>? = null, val description: Output<String>? = null, val dryRun: Output<Boolean>? = null, val peerConnectionName: Output<String>? = null, val status: Output<String>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<PeerConnectionArgs>

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

NOTE: Available in v1.186.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.PeerConnection;
import com.pulumi.alicloud.vpc.PeerConnectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var defaultAccount = AlicloudFunctions.getAccount();
final var defaultNetworks = VpcFunctions.getNetworks();
var defaultPeerConnection = new PeerConnection("defaultPeerConnection", PeerConnectionArgs.builder()
.peerConnectionName(var_.name())
.vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.acceptingAliUid(defaultAccount.applyValue(getAccountResult -> getAccountResult.id()))
.acceptingRegionId("cn-hangzhou")
.acceptingVpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[1]))
.description(var_.name())
.build());
}
}

Import

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

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

Constructors

Link copied to clipboard
fun PeerConnectionArgs(acceptingAliUid: Output<Int>? = null, acceptingRegionId: Output<String>? = null, acceptingVpcId: Output<String>? = null, bandwidth: Output<Int>? = null, description: Output<String>? = null, dryRun: Output<Boolean>? = null, peerConnectionName: Output<String>? = null, status: Output<String>? = null, vpcId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): PeerConnectionArgs

Properties

Link copied to clipboard
val acceptingAliUid: Output<Int>? = null

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

Link copied to clipboard
val acceptingRegionId: Output<String>? = null

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

Link copied to clipboard
val acceptingVpcId: Output<String>? = null

The VPC ID of the receiving end of the VPC peer connection.

Link copied to clipboard
val bandwidth: Output<Int>? = null

The bandwidth of the VPC peering connection to be modified. Unit: Mbps. The value range is an integer greater than 0.

Link copied to clipboard
val description: Output<String>? = null

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://.

Link copied to clipboard
val dryRun: Output<Boolean>? = null

The dry run.

Link copied to clipboard
val peerConnectionName: Output<String>? = null

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 (-).

Link copied to clipboard
val status: Output<String>? = null

The status of the resource.

Link copied to clipboard
val vpcId: Output<String>? = null

The ID of the requester VPC.