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

Contents

Description

Retrieves the specified inline policy document that is embedded in the specified IAM user.

An IAM user can also have managed policies attached to it. To retrieve a managed policy document that is attached to a user, use GetPolicy to determine the policy's default version, then use GetPolicyVersion to retrieve the policy document.

For more information about policies, see Managed Policies and Inline Policies in the IAM User Guide .

Synopsis

Creating a Request

getUserPolicy Source #

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

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

  • gupUserName - The name of the user who the policy is associated with. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-
  • gupPolicyName - The name of the policy document to get. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-+

data GetUserPolicy Source #

See: getUserPolicy smart constructor.

Instances

Eq GetUserPolicy Source # 
Data GetUserPolicy Source # 

Methods

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

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

toConstr :: GetUserPolicy -> Constr #

dataTypeOf :: GetUserPolicy -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetUserPolicy Source # 
Show GetUserPolicy Source # 
Generic GetUserPolicy Source # 

Associated Types

type Rep GetUserPolicy :: * -> * #

Hashable GetUserPolicy Source # 
NFData GetUserPolicy Source # 

Methods

rnf :: GetUserPolicy -> () #

AWSRequest GetUserPolicy Source # 
ToQuery GetUserPolicy Source # 
ToPath GetUserPolicy Source # 
ToHeaders GetUserPolicy Source # 
type Rep GetUserPolicy Source # 
type Rep GetUserPolicy = D1 (MetaData "GetUserPolicy" "Network.AWS.IAM.GetUserPolicy" "amazonka-iam-1.5.0-2w4nVHAOrDgI2P1QVLKd9e" False) (C1 (MetaCons "GetUserPolicy'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_gupUserName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_gupPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs GetUserPolicy Source # 

Request Lenses

gupUserName :: Lens' GetUserPolicy Text Source #

The name of the user who the policy is associated with. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-

gupPolicyName :: Lens' GetUserPolicy Text Source #

The name of the policy document to get. This parameter allows (per its regex pattern ) 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

getUserPolicyResponse Source #

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

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

data GetUserPolicyResponse Source #

Contains the response to a successful GetUserPolicy request.

See: getUserPolicyResponse smart constructor.

Instances

Eq GetUserPolicyResponse Source # 
Data GetUserPolicyResponse Source # 

Methods

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

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

toConstr :: GetUserPolicyResponse -> Constr #

dataTypeOf :: GetUserPolicyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetUserPolicyResponse Source # 
Show GetUserPolicyResponse Source # 
Generic GetUserPolicyResponse Source # 
NFData GetUserPolicyResponse Source # 

Methods

rnf :: GetUserPolicyResponse -> () #

type Rep GetUserPolicyResponse Source # 
type Rep GetUserPolicyResponse = D1 (MetaData "GetUserPolicyResponse" "Network.AWS.IAM.GetUserPolicy" "amazonka-iam-1.5.0-2w4nVHAOrDgI2P1QVLKd9e" False) (C1 (MetaCons "GetUserPolicyResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_guprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)) (S1 (MetaSel (Just Symbol "_guprsUserName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_guprsPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_guprsPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))

Response Lenses

guprsResponseStatus :: Lens' GetUserPolicyResponse Int Source #

  • - | The response status code.

guprsUserName :: Lens' GetUserPolicyResponse Text Source #

The user the policy is associated with.