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.GetRolePolicy

Contents

Description

Retrieves the specified inline policy document that is embedded with the specified IAM role.

An IAM role can also have managed policies attached to it. To retrieve a managed policy document that is attached to a role, 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 .

For more information about roles, see Using Roles to Delegate Permissions and Federate Identities .

Synopsis

Creating a Request

getRolePolicy Source #

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

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

  • grpRoleName - The name of the role associated with the policy. 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: _+=,.@-
  • grpPolicyName - 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 GetRolePolicy Source #

See: getRolePolicy smart constructor.

Instances

Eq GetRolePolicy Source # 
Data GetRolePolicy Source # 

Methods

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

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

toConstr :: GetRolePolicy -> Constr #

dataTypeOf :: GetRolePolicy -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetRolePolicy Source # 
Show GetRolePolicy Source # 
Generic GetRolePolicy Source # 

Associated Types

type Rep GetRolePolicy :: * -> * #

Hashable GetRolePolicy Source # 
NFData GetRolePolicy Source # 

Methods

rnf :: GetRolePolicy -> () #

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

Request Lenses

grpRoleName :: Lens' GetRolePolicy Text Source #

The name of the role associated with the policy. 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: _+=,.@-

grpPolicyName :: Lens' GetRolePolicy 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

getRolePolicyResponse Source #

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

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

data GetRolePolicyResponse Source #

Contains the response to a successful GetRolePolicy request.

See: getRolePolicyResponse smart constructor.

Instances

Eq GetRolePolicyResponse Source # 
Data GetRolePolicyResponse Source # 

Methods

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

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

toConstr :: GetRolePolicyResponse -> Constr #

dataTypeOf :: GetRolePolicyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetRolePolicyResponse Source # 
Show GetRolePolicyResponse Source # 
Generic GetRolePolicyResponse Source # 
NFData GetRolePolicyResponse Source # 

Methods

rnf :: GetRolePolicyResponse -> () #

type Rep GetRolePolicyResponse Source # 
type Rep GetRolePolicyResponse = D1 (MetaData "GetRolePolicyResponse" "Network.AWS.IAM.GetRolePolicy" "amazonka-iam-1.5.0-2w4nVHAOrDgI2P1QVLKd9e" False) (C1 (MetaCons "GetRolePolicyResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_grprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)) (S1 (MetaSel (Just Symbol "_grprsRoleName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_grprsPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_grprsPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))

Response Lenses

grprsResponseStatus :: Lens' GetRolePolicyResponse Int Source #

  • - | The response status code.

grprsRoleName :: Lens' GetRolePolicyResponse Text Source #

The role the policy is associated with.