AWS SDK for .NET Documentation
CreateKeyPairRequest Class
AmazonAmazon.EC2.ModelCreateKeyPairRequest Did this page help you?   Yes   No    Tell us about it...
Creates a new 2048-bit RSA key pair with the specified name. The public key is stored by Amazon EC2 and the private key is returned to you.
Declaration Syntax
C#
public class CreateKeyPairRequest : EC2Request
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
CreateKeyPairRequest()()()()
Initializes a new instance of the CreateKeyPairRequest class

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
IsSetKeyName()()()()
Checks if KeyName property is set

KeyName
A unique name for the key pair.

ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
WithKeyName(String) Obsolete.
Sets the unique name for the key pair.

Remarks
The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error. The key pair returned to you works only in the Region you're using when you create the key pair. To create a key pair that works in all Regions, use ImportKeyPair.
Inheritance Hierarchy
Object
EC2Request
 CreateKeyPairRequest

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)