InstanceAttachmentArgs

data class InstanceAttachmentArgs(val cenOwnerId: Output<Int>? = null, val childInstanceId: Output<String>? = null, val childInstanceOwnerId: Output<Int>? = null, val childInstanceRegionId: Output<String>? = null, val childInstanceType: Output<String>? = null, val instanceId: Output<String>? = null) : ConvertibleToJava<InstanceAttachmentArgs>

Provides a CEN child instance attachment resource that associate the network(VPC, CCN, VBR) with the CEN instance.

NOTE: Available since v1.42.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.inputs.GetRegionsArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.cen.Instance;
import com.pulumi.alicloud.cen.InstanceArgs;
import com.pulumi.alicloud.cen.InstanceAttachment;
import com.pulumi.alicloud.cen.InstanceAttachmentArgs;
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 default = AlicloudFunctions.getRegions(GetRegionsArgs.builder()
.current(true)
.build());
var exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
.vpcName("tf_example")
.cidrBlock("172.17.3.0/24")
.build());
var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
.cenInstanceName("tf_example")
.description("an example for cen")
.build());
var exampleInstanceAttachment = new InstanceAttachment("exampleInstanceAttachment", InstanceAttachmentArgs.builder()
.instanceId(exampleInstance.id())
.childInstanceId(exampleNetwork.id())
.childInstanceType("VPC")
.childInstanceRegionId(default_.regions()[0].id())
.build());
}
}

Import

CEN instance can be imported using the id, e.g.

$ pulumi import alicloud:cen/instanceAttachment:InstanceAttachment example cen-m7i7pjmkon********:vpc-2ze2w07mcy9nz********:VPC:cn-beijing

Constructors

Link copied to clipboard
fun InstanceAttachmentArgs(cenOwnerId: Output<Int>? = null, childInstanceId: Output<String>? = null, childInstanceOwnerId: Output<Int>? = null, childInstanceRegionId: Output<String>? = null, childInstanceType: Output<String>? = null, instanceId: Output<String>? = null)

Functions

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

Properties

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

The account ID to which the CEN instance belongs. ->NOTE: Ensure that the child instance is not used in Express Connect.

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

The ID of the child instance to attach.

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

The uid of the child instance. Only used when attach a child instance of other account.

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

The region ID of the child instance to attach.

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

The type of the associated network. Valid values: VPC, VBR and CCN.

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

The ID of the CEN.