KeyPair

class KeyPair : KotlinCustomResource

DEPRECATED: This resource has been renamed to alicloud.ecs.EcsKeyPair from version 1.121.0. Provides a key pair resource.

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.KeyPair;
import com.pulumi.alicloud.ecs.KeyPairArgs;
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 basic = new KeyPair("basic", KeyPairArgs.builder()
.keyName("terraform-test-key-pair")
.build());
var prefix = new KeyPair("prefix", KeyPairArgs.builder()
.keyNamePrefix("terraform-test-key-pair-prefix")
.build());
var publickey = new KeyPair("publickey", KeyPairArgs.builder()
.keyName("my_public_key")
.publicKey("ssh-rsa AAAAB3Nza12345678qwertyuudsfsg")
.build());
}
}

Import

Key pair can be imported using the name, e.g.

$ pulumi import alicloud:ecs/keyPair:KeyPair example my_public_key

Properties

Link copied to clipboard
val fingerPrint: Output<String>
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val keyFile: Output<String>?

The name of file to save your new key pair's private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn't get its private key ever.

Link copied to clipboard
val keyName: Output<String>

The key pair's name. It is the only in one Alicloud account.

Link copied to clipboard
val keyNamePrefix: Output<String>?
Link copied to clipboard
val keyPairName: Output<String>
Link copied to clipboard
val publicKey: Output<String>?

You can import an existing public key and using Alicloud key pair to manage it. If this parameter is specified, resource_group_id is the key pair belongs.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>?

The Id of resource group which the key pair belongs.

Link copied to clipboard
val tags: Output<Map<String, Any>>?
Link copied to clipboard
val urn: Output<String>