amazonka-iam-1.6.0: Amazon Identity and Access Management SDK.

Copyright(c) 2013-2018 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.GetPolicy

Contents

Description

Retrieves information about the specified managed policy, including the policy's default version and the total number of IAM users, groups, and roles to which the policy is attached. To retrieve the list of the specific users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API. This API returns metadata about the policy. To retrieve the actual policy document for a specific version of the policy, use GetPolicyVersion .

This API retrieves information about managed policies. To retrieve information about an inline policy that is embedded with an IAM user, group, or role, use the GetUserPolicy , GetGroupPolicy , or GetRolePolicy API.

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

Synopsis

Creating a Request

getPolicy #

Arguments

:: Text

gpPolicyARN

-> GetPolicy 

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

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

data GetPolicy #

See: getPolicy smart constructor.

Instances
Eq GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Data GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Methods

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

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

toConstr :: GetPolicy -> Constr #

dataTypeOf :: GetPolicy -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Show GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Generic GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Associated Types

type Rep GetPolicy :: * -> * #

Hashable GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

AWSRequest GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Associated Types

type Rs GetPolicy :: * #

ToHeaders GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Methods

toHeaders :: GetPolicy -> [Header] #

ToPath GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

ToQuery GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

NFData GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Methods

rnf :: GetPolicy -> () #

type Rep GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

type Rep GetPolicy = D1 (MetaData "GetPolicy" "Network.AWS.IAM.GetPolicy" "amazonka-iam-1.6.0-KLHg33OPBsA2oss7MTCyZq" True) (C1 (MetaCons "GetPolicy'" PrefixI True) (S1 (MetaSel (Just "_gpPolicyARN") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))
type Rs GetPolicy # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Request Lenses

gpPolicyARN :: Lens' GetPolicy Text #

The Amazon Resource Name (ARN) of the managed policy that you want information about. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

Destructuring the Response

getPolicyResponse #

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

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

data GetPolicyResponse #

Contains the response to a successful GetPolicy request.

See: getPolicyResponse smart constructor.

Instances
Eq GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Data GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Methods

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

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

toConstr :: GetPolicyResponse -> Constr #

dataTypeOf :: GetPolicyResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Show GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Generic GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Associated Types

type Rep GetPolicyResponse :: * -> * #

NFData GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

Methods

rnf :: GetPolicyResponse -> () #

type Rep GetPolicyResponse # 
Instance details

Defined in Network.AWS.IAM.GetPolicy

type Rep GetPolicyResponse = D1 (MetaData "GetPolicyResponse" "Network.AWS.IAM.GetPolicy" "amazonka-iam-1.6.0-KLHg33OPBsA2oss7MTCyZq" False) (C1 (MetaCons "GetPolicyResponse'" PrefixI True) (S1 (MetaSel (Just "_gprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Policy)) :*: S1 (MetaSel (Just "_gprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

gprsPolicy :: Lens' GetPolicyResponse (Maybe Policy) #

A structure containing details about the policy.

gprsResponseStatus :: Lens' GetPolicyResponse Int #

  • - | The response status code.