Class KeyPairFormat
The format of the Key Pair.
Inheritance
System.Object
KeyPairFormat
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public sealed class KeyPairFormat : Enum
Syntax (vb)
Public NotInheritable Class KeyPairFormat
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
PEM | A PEM file. |
PPK | A PPK file, typically used with PuTTY. |
value__ |
Fields
PEM
PPK
A PPK file, typically used with PuTTY.
public const KeyPairFormat PPK
Field Value
Type | Description |
---|---|
KeyPairFormat |
value__
public int value__
Field Value
Type | Description |
---|---|
System.Int32 |