Class KeyPairType
The type of the key pair.
Inheritance
System.Object
KeyPairType
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class KeyPairType : Enum
Syntax (vb)
Public NotInheritable Class KeyPairType
Inherits
Enum
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
InstanceType instanceType;
var keyPair = new KeyPair(this, "KeyPair", new KeyPairProps {
Type = KeyPairType.ED25519,
Format = KeyPairFormat.PEM
});
var instance = new Instance(this, "Instance", new InstanceProps {
Vpc = vpc,
InstanceType = instanceType,
MachineImage = MachineImage.LatestAmazonLinux2023(),
// Use the custom key pair
KeyPair = keyPair
});
Synopsis
Fields
ED25519 | An ED25519 key. |
RSA | An RSA key. |
value__ |
Fields
ED25519
An ED25519 key.
public const KeyPairType ED25519
Field Value
Type | Description |
---|---|
KeyPairType |
Remarks
Note that ED25519 keys are not supported for Windows instances.
RSA
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |