KeyPairArgs

data class KeyPairArgs(val keyFormat: Output<KeyPairKeyFormat>? = null, val keyName: Output<String>? = null, val keyType: Output<KeyPairKeyType>? = null, val publicKeyMaterial: Output<String>? = null, val tags: Output<List<CreateOnlyTagArgs>>? = null) : ConvertibleToJava<KeyPairArgs>

Specifies a key pair for use with an EC2long instance as follows:

  • To import an existing key pair, include the `PublicKeyMaterial` property.

  • To create a new key pair, omit the `PublicKeyMaterial` property. When you import an existing key pair, you specify the public key material for the key. We assume that you have the private key material for the key. CFNlong does not create or return the private key material when you import a key pair. When you create a new key pair, the private key is saved to SYSlong Parameter Store, using a parameter with the following name: `/ec2/keypair/{key_pair_id}`. For more information about retrieving private key, and the required permissions, see Create a key pair using in the User Guide. When CFN deletes a key pair that was created or imported by a stack, it also deletes the parameter that was used to store the private key material in Parameter Store.

Example Usage

Example

No Java example available.

Example

No Java example available.

Example

No Java example available.

Example

No Java example available.

Constructors

Link copied to clipboard
constructor(keyFormat: Output<KeyPairKeyFormat>? = null, keyName: Output<String>? = null, keyType: Output<KeyPairKeyType>? = null, publicKeyMaterial: Output<String>? = null, tags: Output<List<CreateOnlyTagArgs>>? = null)

Properties

Link copied to clipboard
val keyFormat: Output<KeyPairKeyFormat>? = null

The format of the key pair. Default: `pem`

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

A unique name for the key pair. Constraints: Up to 255 ASCII characters

Link copied to clipboard
val keyType: Output<KeyPairKeyType>? = null

The type of key pair. Note that ED25519 keys are not supported for Windows instances. If the `PublicKeyMaterial` property is specified, the `KeyType` property is ignored, and the key type is inferred from the `PublicKeyMaterial` value. Default: `rsa`

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

The public key material. The `PublicKeyMaterial` property is used to import a key pair. If this property is not specified, then a new key pair will be created.

Link copied to clipboard
val tags: Output<List<CreateOnlyTagArgs>>? = null

The tags to apply to the key pair.

Functions

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