amazonka-lambda-1.6.0: Amazon Lambda 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.Lambda.GetPolicy

Contents

Description

Returns the resource policy associated with the specified Lambda function.

If you are using the versioning feature, you can get the resource policy associated with the specific Lambda function version or alias by specifying the version or alias name using the Qualifier parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases .

You need permission for the lambda:GetPolicy action.

Synopsis

Creating a Request

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:

  • gpQualifier - You can specify this optional query parameter to specify a function version or an alias name in which case this API will return all permissions associated with the specific qualified ARN. If you don't provide this parameter, the API will return permissions that apply to the unqualified function ARN.
  • gpFunctionName - Function name whose resource policy you want to retrieve. You can specify the function name (for example, Thumbnail ) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail ). If you are using versioning, you can also provide a qualified function ARN (ARN that is qualified with function version or alias name as suffix). AWS Lambda also allows you to specify only the function name with the account ID qualifier (for example, account-id:Thumbnail ). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.

data GetPolicy #

See: getPolicy smart constructor.

Instances
Eq GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Data GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.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.Lambda.GetPolicy

Show GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Generic GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Associated Types

type Rep GetPolicy :: * -> * #

Hashable GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

AWSRequest GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Associated Types

type Rs GetPolicy :: * #

ToHeaders GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Methods

toHeaders :: GetPolicy -> [Header] #

ToPath GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

ToQuery GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

NFData GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Methods

rnf :: GetPolicy -> () #

type Rep GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

type Rep GetPolicy = D1 (MetaData "GetPolicy" "Network.AWS.Lambda.GetPolicy" "amazonka-lambda-1.6.0-I1aObtlwuUAs80dunSvhq" False) (C1 (MetaCons "GetPolicy'" PrefixI True) (S1 (MetaSel (Just "_gpQualifier") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_gpFunctionName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))
type Rs GetPolicy # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Request Lenses

gpQualifier :: Lens' GetPolicy (Maybe Text) #

You can specify this optional query parameter to specify a function version or an alias name in which case this API will return all permissions associated with the specific qualified ARN. If you don't provide this parameter, the API will return permissions that apply to the unqualified function ARN.

gpFunctionName :: Lens' GetPolicy Text #

Function name whose resource policy you want to retrieve. You can specify the function name (for example, Thumbnail ) or you can specify Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail ). If you are using versioning, you can also provide a qualified function ARN (ARN that is qualified with function version or alias name as suffix). AWS Lambda also allows you to specify only the function name with the account ID qualifier (for example, account-id:Thumbnail ). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 characters in length.

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:

  • gprsPolicy - The resource policy associated with the specified function. The response returns the same as a string using a backslash ("") as an escape character in the JSON.
  • gprsRevisionId - Represents the latest updated revision of the function or alias.
  • gprsResponseStatus - -- | The response status code.

data GetPolicyResponse #

See: getPolicyResponse smart constructor.

Instances
Eq GetPolicyResponse # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Data GetPolicyResponse # 
Instance details

Defined in Network.AWS.Lambda.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.Lambda.GetPolicy

Show GetPolicyResponse # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Generic GetPolicyResponse # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Associated Types

type Rep GetPolicyResponse :: * -> * #

NFData GetPolicyResponse # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

Methods

rnf :: GetPolicyResponse -> () #

type Rep GetPolicyResponse # 
Instance details

Defined in Network.AWS.Lambda.GetPolicy

type Rep GetPolicyResponse = D1 (MetaData "GetPolicyResponse" "Network.AWS.Lambda.GetPolicy" "amazonka-lambda-1.6.0-I1aObtlwuUAs80dunSvhq" False) (C1 (MetaCons "GetPolicyResponse'" PrefixI True) (S1 (MetaSel (Just "_gprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_gprsRevisionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_gprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

gprsPolicy :: Lens' GetPolicyResponse (Maybe Text) #

The resource policy associated with the specified function. The response returns the same as a string using a backslash ("") as an escape character in the JSON.

gprsRevisionId :: Lens' GetPolicyResponse (Maybe Text) #

Represents the latest updated revision of the function or alias.

gprsResponseStatus :: Lens' GetPolicyResponse Int #

  • - | The response status code.