amazonka-iam-1.4.5: Amazon Identity and Access Management 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.IAM.CreateAccessKey

Contents

Description

Creates a new AWS secret access key and corresponding AWS access key ID for the specified user. The default status for new keys is Active .

If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users.

For information about limits on the number of keys you can create, see Limitations on IAM Entities in the IAM User Guide .

Important: To ensure the security of your AWS account, the secret access key is accessible only during key and user creation. You must save the key (for example, in a text file) if you want to be able to access it again. If a secret key is lost, you can delete the access keys for the associated user and then create new keys.

Synopsis

Creating a Request

createAccessKey :: CreateAccessKey #

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

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

  • cakUserName - The name of the IAM user that the new key will belong to. The regex pattern for this parameter is a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-

data CreateAccessKey #

See: createAccessKey smart constructor.

Instances

Eq CreateAccessKey # 
Data CreateAccessKey # 

Methods

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

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

toConstr :: CreateAccessKey -> Constr #

dataTypeOf :: CreateAccessKey -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateAccessKey # 
Show CreateAccessKey # 
Generic CreateAccessKey # 
Hashable CreateAccessKey # 
NFData CreateAccessKey # 

Methods

rnf :: CreateAccessKey -> () #

AWSRequest CreateAccessKey # 
ToQuery CreateAccessKey # 
ToPath CreateAccessKey # 
ToHeaders CreateAccessKey # 
type Rep CreateAccessKey # 
type Rep CreateAccessKey = D1 (MetaData "CreateAccessKey" "Network.AWS.IAM.CreateAccessKey" "amazonka-iam-1.4.5-1ijrgQyRuWgA7Tx0390Dx2" True) (C1 (MetaCons "CreateAccessKey'" PrefixI True) (S1 (MetaSel (Just Symbol "_cakUserName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Text))))
type Rs CreateAccessKey # 

Request Lenses

cakUserName :: Lens' CreateAccessKey (Maybe Text) #

The name of the IAM user that the new key will belong to. The regex pattern for this parameter is a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-

Destructuring the Response

createAccessKeyResponse #

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

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

data CreateAccessKeyResponse #

Contains the response to a successful CreateAccessKey request.

See: createAccessKeyResponse smart constructor.

Instances

Eq CreateAccessKeyResponse # 
Data CreateAccessKeyResponse # 

Methods

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

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

toConstr :: CreateAccessKeyResponse -> Constr #

dataTypeOf :: CreateAccessKeyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateAccessKeyResponse # 
Show CreateAccessKeyResponse # 
Generic CreateAccessKeyResponse # 
NFData CreateAccessKeyResponse # 

Methods

rnf :: CreateAccessKeyResponse -> () #

type Rep CreateAccessKeyResponse # 
type Rep CreateAccessKeyResponse = D1 (MetaData "CreateAccessKeyResponse" "Network.AWS.IAM.CreateAccessKey" "amazonka-iam-1.4.5-1ijrgQyRuWgA7Tx0390Dx2" False) (C1 (MetaCons "CreateAccessKeyResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cakrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)) (S1 (MetaSel (Just Symbol "_cakrsAccessKey") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 AccessKey))))

Response Lenses

cakrsResponseStatus :: Lens' CreateAccessKeyResponse Int #

  • - | The response status code.

cakrsAccessKey :: Lens' CreateAccessKeyResponse AccessKey #

A structure with details about the access key.