EcsKeyPairAttachmentArgs

data class EcsKeyPairAttachmentArgs(val force: Output<Boolean>? = null, val instanceIds: Output<List<String>>? = null, val keyName: Output<String>? = null, val keyPairName: Output<String>? = null) : ConvertibleToJava<EcsKeyPairAttachmentArgs>

Provides a ECS Key Pair Attachment resource. For information about ECS Key Pair Attachment and how to use it, see What is Key Pair Attachment.

NOTE: Available in v1.121.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.ecs.EcsKeyPairAttachment;
import com.pulumi.alicloud.ecs.EcsKeyPairAttachmentArgs;
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) {
var example = new EcsKeyPairAttachment("example", EcsKeyPairAttachmentArgs.builder()
.keyPairName("key_pair_name")
.instanceIds(i_gw80pxxxxxxxxxx)
.build());
}
}

Import

ECS Key Pair Attachment can be imported using the id, e.g.

$ pulumi import alicloud:ecs/ecsKeyPairAttachment:EcsKeyPairAttachment example <key_pair_name>:<instance_ids>

Constructors

Link copied to clipboard
fun EcsKeyPairAttachmentArgs(force: Output<Boolean>? = null, instanceIds: Output<List<String>>? = null, keyName: Output<String>? = null, keyPairName: Output<String>? = null)

Functions

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

Properties

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

Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.

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

The list of ECS instance's IDs.

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

The name of key pair used to bind.