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

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. 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: =,.@-
  • grpPolicyName - The name of the policy document to get. 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 GetRolePolicy #

See: getRolePolicy smart constructor.

Instances

Eq GetRolePolicy # 
Data GetRolePolicy # 

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 # 
Show GetRolePolicy # 
Generic GetRolePolicy # 

Associated Types

type Rep GetRolePolicy :: * -> * #

Hashable GetRolePolicy # 
NFData GetRolePolicy # 

Methods

rnf :: GetRolePolicy -> () #

AWSRequest GetRolePolicy # 
ToQuery GetRolePolicy # 
ToPath GetRolePolicy # 
ToHeaders GetRolePolicy # 
type Rep GetRolePolicy # 
type Rep GetRolePolicy = D1 (MetaData "GetRolePolicy" "Network.AWS.IAM.GetRolePolicy" "amazonka-iam-1.4.5-1ijrgQyRuWgA7Tx0390Dx2" 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 # 

Request Lenses

grpRoleName :: Lens' GetRolePolicy Text #

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

grpPolicyName :: Lens' GetRolePolicy Text #

The name of the policy document to get. 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

getRolePolicyResponse #

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 #

Contains the response to a successful GetRolePolicy request.

See: getRolePolicyResponse smart constructor.

Instances

Eq GetRolePolicyResponse # 
Data GetRolePolicyResponse # 

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 # 
Show GetRolePolicyResponse # 
Generic GetRolePolicyResponse # 
NFData GetRolePolicyResponse # 

Methods

rnf :: GetRolePolicyResponse -> () #

type Rep GetRolePolicyResponse # 
type Rep GetRolePolicyResponse = D1 (MetaData "GetRolePolicyResponse" "Network.AWS.IAM.GetRolePolicy" "amazonka-iam-1.4.5-1ijrgQyRuWgA7Tx0390Dx2" False) (C1 (MetaCons "GetRolePolicyResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_grprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (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 #

  • - | The response status code.

grprsRoleName :: Lens' GetRolePolicyResponse Text #

The role the policy is associated with.