Interface ICfnKeyPairProps
Properties for defining a CfnKeyPair.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnKeyPairProps
Syntax (vb)
Public Interface ICfnKeyPairProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-keypair.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var cfnKeyPairProps = new CfnKeyPairProps {
KeyName = "keyName",
// the properties below are optional
KeyFormat = "keyFormat",
KeyType = "keyType",
PublicKeyMaterial = "publicKeyMaterial",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
| KeyFormat | The format of the key pair. |
| KeyName | A unique name for the key pair. |
| KeyType | The type of key pair. Note that ED25519 keys are not supported for Windows instances. |
| PublicKeyMaterial | The public key material. |
| Tags | The tags to apply to the key pair. |
Properties
KeyFormat
The format of the key pair.
string? KeyFormat { get; }
Property Value
Remarks
Default: pem
Default: - "pem"
KeyName
A unique name for the key pair.
string KeyName { get; }
Property Value
Remarks
Constraints: Up to 255 ASCII characters
KeyType
The type of key pair. Note that ED25519 keys are not supported for Windows instances.
string? KeyType { get; }
Property Value
Remarks
If the PublicKeyMaterial property is specified, the KeyType property is ignored, and the key type is inferred from the PublicKeyMaterial value.
Default: rsa
Default: - "rsa"
PublicKeyMaterial
The public key material.
string? PublicKeyMaterial { get; }
Property Value
Remarks
The PublicKeyMaterial property is used to import a key pair. If this property is not specified, then a new key pair will be created.