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

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@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#1 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. If you prefer, you can create your own key pair using a third-party tool and upload it to any region using ImportKeyPair .

For more information, 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:

  • ckpDryRun - 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 - A unique name for the key pair. Constraints: Up to 255 ASCII characters

data CreateKeyPair Source #

Contains the parameters for CreateKeyPair.

See: createKeyPair smart constructor.

Instances
Eq CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Data CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

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 # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Show CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Generic CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Associated Types

type Rep CreateKeyPair :: Type -> Type #

Hashable CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

AWSRequest CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Associated Types

type Rs CreateKeyPair :: Type #

ToHeaders CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

ToPath CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

ToQuery CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

NFData CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Methods

rnf :: CreateKeyPair -> () #

type Rep CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

type Rep CreateKeyPair = D1 (MetaData "CreateKeyPair" "Network.AWS.EC2.CreateKeyPair" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "CreateKeyPair'" PrefixI True) (S1 (MetaSel (Just "_ckpDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_ckpKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))
type Rs CreateKeyPair Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

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 # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Data CreateKeyPairResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

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 # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Show CreateKeyPairResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Generic CreateKeyPairResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Associated Types

type Rep CreateKeyPairResponse :: Type -> Type #

NFData CreateKeyPairResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

Methods

rnf :: CreateKeyPairResponse -> () #

type Rep CreateKeyPairResponse Source # 
Instance details

Defined in Network.AWS.EC2.CreateKeyPair

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

Response Lenses

ckprsResponseStatus :: Lens' CreateKeyPairResponse Int Source #

  • - | The response status code.

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.