Class CfnKeyPairProps
Properties for defining a CfnKeyPair
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnKeyPairProps : Object, ICfnKeyPairProps
Syntax (vb)
Public Class CfnKeyPairProps
Inherits Object
Implements ICfnKeyPairProps
Remarks
Link: 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
KeyType = "keyType",
PublicKeyMaterial = "publicKeyMaterial",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Constructors
CfnKeyPairProps() |
Properties
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. |
Constructors
CfnKeyPairProps()
public CfnKeyPairProps()
Properties
KeyName
A unique name for the key pair.
public string KeyName { get; set; }
Property Value
System.String
Remarks
Constraints: Up to 255 ASCII characters
KeyType
The type of key pair. Note that ED25519 keys are not supported for Windows instances.
public string KeyType { get; set; }
Property Value
System.String
Remarks
If the PublicKeyMaterial
property is specified, the KeyType
property is ignored, and the key type is inferred from the PublicKeyMaterial
value.
Default: rsa
PublicKeyMaterial
The public key material.
public string PublicKeyMaterial { get; set; }
Property Value
System.String
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.
Tags
The tags to apply to the key pair.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]