EcsKeyPairAttachment

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>

Properties

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

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 id: Output<String>
Link copied to clipboard
val instanceIds: Output<List<String>>

The list of ECS instance's IDs.

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

The name of key pair used to bind.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>