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

Copyright(c) 2013-2017 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.ImportKeyPair

Contents

Description

Imports the public key from an RSA key pair that you created with a third-party tool. Compare this with CreateKeyPair , in which AWS creates the key pair and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, you create the key pair and give AWS just the public key. The private key is never transferred between you and AWS.

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

Synopsis

Creating a Request

importKeyPair Source #

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

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

  • ikpDryRun - 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 .
  • ikpKeyName - A unique name for the key pair.
  • ikpPublicKeyMaterial - The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

data ImportKeyPair Source #

Contains the parameters for ImportKeyPair.

See: importKeyPair smart constructor.

Instances

Eq ImportKeyPair Source # 
Data ImportKeyPair Source # 

Methods

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

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

toConstr :: ImportKeyPair -> Constr #

dataTypeOf :: ImportKeyPair -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImportKeyPair Source # 
Show ImportKeyPair Source # 
Generic ImportKeyPair Source # 

Associated Types

type Rep ImportKeyPair :: * -> * #

Hashable ImportKeyPair Source # 
NFData ImportKeyPair Source # 

Methods

rnf :: ImportKeyPair -> () #

AWSRequest ImportKeyPair Source # 
ToQuery ImportKeyPair Source # 
ToPath ImportKeyPair Source # 
ToHeaders ImportKeyPair Source # 
type Rep ImportKeyPair Source # 
type Rep ImportKeyPair = D1 (MetaData "ImportKeyPair" "Network.AWS.EC2.ImportKeyPair" "amazonka-ec2-1.5.0-8IdXK3SzsETDMW2aFpANS9" False) (C1 (MetaCons "ImportKeyPair'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ikpDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) ((:*:) (S1 (MetaSel (Just Symbol "_ikpKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_ikpPublicKeyMaterial") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Base64)))))
type Rs ImportKeyPair Source # 

Request Lenses

ikpDryRun :: Lens' ImportKeyPair (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 .

ikpKeyName :: Lens' ImportKeyPair Text Source #

A unique name for the key pair.

ikpPublicKeyMaterial :: Lens' ImportKeyPair ByteString Source #

The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.-- Note: This Lens automatically encodes and decodes Base64 data. The underlying isomorphism will encode to Base64 representation during serialisation, and decode from Base64 representation during deserialisation. This Lens accepts and returns only raw unencoded data.

Destructuring the Response

importKeyPairResponse Source #

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

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

data ImportKeyPairResponse Source #

Contains the output of ImportKeyPair.

See: importKeyPairResponse smart constructor.

Instances

Eq ImportKeyPairResponse Source # 
Data ImportKeyPairResponse Source # 

Methods

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

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

toConstr :: ImportKeyPairResponse -> Constr #

dataTypeOf :: ImportKeyPairResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImportKeyPairResponse Source # 
Show ImportKeyPairResponse Source # 
Generic ImportKeyPairResponse Source # 
NFData ImportKeyPairResponse Source # 

Methods

rnf :: ImportKeyPairResponse -> () #

type Rep ImportKeyPairResponse Source # 
type Rep ImportKeyPairResponse = D1 (MetaData "ImportKeyPairResponse" "Network.AWS.EC2.ImportKeyPair" "amazonka-ec2-1.5.0-8IdXK3SzsETDMW2aFpANS9" False) (C1 (MetaCons "ImportKeyPairResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ikprsKeyFingerprint") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_ikprsKeyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_ikprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

ikprsKeyFingerprint :: Lens' ImportKeyPairResponse (Maybe Text) Source #

The MD5 public key fingerprint as specified in section 4 of RFC 4716.

ikprsKeyName :: Lens' ImportKeyPairResponse (Maybe Text) Source #

The key pair name you provided.

ikprsResponseStatus :: Lens' ImportKeyPairResponse Int Source #

  • - | The response status code.