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

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

See: getPolicy smart constructor.

Instances

Eq GetPolicy Source # 
Data GetPolicy Source # 

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 Source # 
Show GetPolicy Source # 
Generic GetPolicy Source # 

Associated Types

type Rep GetPolicy :: * -> * #

Hashable GetPolicy Source # 
NFData GetPolicy Source # 

Methods

rnf :: GetPolicy -> () #

AWSRequest GetPolicy Source # 
ToHeaders GetPolicy Source # 

Methods

toHeaders :: GetPolicy -> [Header] #

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

Request Lenses

gpQualifier :: Lens' GetPolicy (Maybe Text) Source #

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

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

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

See: getPolicyResponse smart constructor.

Instances

Eq GetPolicyResponse Source # 
Data GetPolicyResponse Source # 

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

Methods

rnf :: GetPolicyResponse -> () #

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

Response Lenses

gprsPolicy :: Lens' GetPolicyResponse (Maybe Text) Source #

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) Source #

Represents the latest updated revision of the function or alias.

gprsResponseStatus :: Lens' GetPolicyResponse Int Source #

  • - | The response status code.