amazonka-ec2-1.4.4: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.EC2.CreateKeyPair

Contents

Description

Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. 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.

You can have up to five thousand key pairs per region.

The key pair returned to you is available only in the region in which you create it. To create a key pair that is available in all regions, use ImportKeyPair.

For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

createKeyPair Source #

Creates a value of CreateKeyPair with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateKeyPair Source #

Contains the parameters for CreateKeyPair.

See: createKeyPair smart constructor.

Instances

Eq CreateKeyPair Source # 
Data CreateKeyPair Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateKeyPair -> c CreateKeyPair #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateKeyPair #

toConstr :: CreateKeyPair -> Constr #

dataTypeOf :: CreateKeyPair -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateKeyPair) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateKeyPair) #

gmapT :: (forall b. Data b => b -> b) -> CreateKeyPair -> CreateKeyPair #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateKeyPair -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateKeyPair -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateKeyPair -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateKeyPair -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateKeyPair -> m CreateKeyPair #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateKeyPair -> m CreateKeyPair #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateKeyPair -> m CreateKeyPair #

Read CreateKeyPair Source # 
Show CreateKeyPair Source # 
Generic CreateKeyPair Source # 

Associated Types

type Rep CreateKeyPair :: * -> * #

Hashable CreateKeyPair Source # 
NFData CreateKeyPair Source # 

Methods

rnf :: CreateKeyPair -> () #

AWSRequest CreateKeyPair Source # 
ToPath CreateKeyPair Source # 
ToHeaders CreateKeyPair Source # 
ToQuery CreateKeyPair Source # 
type Rep CreateKeyPair Source # 
type Rep CreateKeyPair = D1 (MetaData "CreateKeyPair" "Network.AWS.EC2.CreateKeyPair" "amazonka-ec2-1.4.4-4aYNmHv73MpJXVQjlVKYjQ" False) (C1 (MetaCons "CreateKeyPair'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ckpDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_ckpKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs CreateKeyPair Source # 

Request Lenses

ckpDryRun :: Lens' CreateKeyPair (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

ckpKeyName :: Lens' CreateKeyPair Text Source #

A unique name for the key pair.

Constraints: Up to 255 ASCII characters

Destructuring the Response

createKeyPairResponse Source #

Creates a value of CreateKeyPairResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateKeyPairResponse Source #

Describes a key pair.

See: createKeyPairResponse smart constructor.

Instances

Eq CreateKeyPairResponse Source # 
Data CreateKeyPairResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateKeyPairResponse -> c CreateKeyPairResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateKeyPairResponse #

toConstr :: CreateKeyPairResponse -> Constr #

dataTypeOf :: CreateKeyPairResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateKeyPairResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateKeyPairResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateKeyPairResponse -> CreateKeyPairResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateKeyPairResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateKeyPairResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateKeyPairResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateKeyPairResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateKeyPairResponse -> m CreateKeyPairResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateKeyPairResponse -> m CreateKeyPairResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateKeyPairResponse -> m CreateKeyPairResponse #

Read CreateKeyPairResponse Source # 
Show CreateKeyPairResponse Source # 
Generic CreateKeyPairResponse Source # 
NFData CreateKeyPairResponse Source # 

Methods

rnf :: CreateKeyPairResponse -> () #

type Rep CreateKeyPairResponse Source # 
type Rep CreateKeyPairResponse = D1 (MetaData "CreateKeyPairResponse" "Network.AWS.EC2.CreateKeyPair" "amazonka-ec2-1.4.4-4aYNmHv73MpJXVQjlVKYjQ" False) (C1 (MetaCons "CreateKeyPairResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_ckprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)) (S1 (MetaSel (Just Symbol "_ckprsKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_ckprsKeyFingerprint") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_ckprsKeyMaterial") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))

Response Lenses

ckprsKeyName :: Lens' CreateKeyPairResponse Text Source #

The name of the key pair.

ckprsKeyFingerprint :: Lens' CreateKeyPairResponse Text Source #

The SHA-1 digest of the DER encoded private key.

ckprsKeyMaterial :: Lens' CreateKeyPairResponse Text Source #

An unencrypted PEM encoded RSA private key.