amazonka-lambda-1.6.1: 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.RemovePermission

Contents

Description

You can remove individual permissions from an resource policy associated with a Lambda function by providing a statement ID that you provided when you added the permission.

If you are using versioning, the permissions you remove are specific to the Lambda function version or alias you specify in the AddPermission request via the Qualifier parameter. For more information about versioning, see AWS Lambda Function Versioning and Aliases .

Note that removal of a permission will cause an active event source to lose permission to the function.

You need permission for the lambda:RemovePermission action.

Synopsis

Creating a Request

removePermission Source #

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

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

  • rpQualifier - You can specify this optional parameter to remove permission associated with a specific function version or function alias. If you don't specify this parameter, the API removes permission associated with the unqualified function ARN.
  • rpRevisionId - An optional value you can use to ensure you are updating the latest update of the function version or alias. If the RevisionID you pass doesn't match the latest RevisionId of the function or alias, it will fail with an error message, advising you to retrieve the latest function version or alias RevisionID using either or .
  • rpFunctionName - Lambda function whose resource policy you want to remove a permission from. You can specify a 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 ). AWS Lambda also allows you to specify a partial ARN (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.
  • rpStatementId - Statement ID of the permission to remove.

data RemovePermission Source #

See: removePermission smart constructor.

Instances
Eq RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Data RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Methods

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

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

toConstr :: RemovePermission -> Constr #

dataTypeOf :: RemovePermission -> DataType #

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

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

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

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

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

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

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

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

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

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

Read RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Show RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Generic RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Associated Types

type Rep RemovePermission :: Type -> Type #

Hashable RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

AWSRequest RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Associated Types

type Rs RemovePermission :: Type #

ToHeaders RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

ToPath RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

ToQuery RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

NFData RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Methods

rnf :: RemovePermission -> () #

type Rep RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

type Rep RemovePermission = D1 (MetaData "RemovePermission" "Network.AWS.Lambda.RemovePermission" "amazonka-lambda-1.6.1-KQvkrTCQjBWL6Bwjq8xw0f" False) (C1 (MetaCons "RemovePermission'" PrefixI True) ((S1 (MetaSel (Just "_rpQualifier") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_rpRevisionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_rpFunctionName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_rpStatementId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs RemovePermission Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Request Lenses

rpQualifier :: Lens' RemovePermission (Maybe Text) Source #

You can specify this optional parameter to remove permission associated with a specific function version or function alias. If you don't specify this parameter, the API removes permission associated with the unqualified function ARN.

rpRevisionId :: Lens' RemovePermission (Maybe Text) Source #

An optional value you can use to ensure you are updating the latest update of the function version or alias. If the RevisionID you pass doesn't match the latest RevisionId of the function or alias, it will fail with an error message, advising you to retrieve the latest function version or alias RevisionID using either or .

rpFunctionName :: Lens' RemovePermission Text Source #

Lambda function whose resource policy you want to remove a permission from. You can specify a 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 ). AWS Lambda also allows you to specify a partial ARN (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.

rpStatementId :: Lens' RemovePermission Text Source #

Statement ID of the permission to remove.

Destructuring the Response

removePermissionResponse :: RemovePermissionResponse Source #

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

data RemovePermissionResponse Source #

See: removePermissionResponse smart constructor.

Instances
Eq RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Data RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Methods

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

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

toConstr :: RemovePermissionResponse -> Constr #

dataTypeOf :: RemovePermissionResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Show RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Generic RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

Associated Types

type Rep RemovePermissionResponse :: Type -> Type #

NFData RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

type Rep RemovePermissionResponse Source # 
Instance details

Defined in Network.AWS.Lambda.RemovePermission

type Rep RemovePermissionResponse = D1 (MetaData "RemovePermissionResponse" "Network.AWS.Lambda.RemovePermission" "amazonka-lambda-1.6.1-KQvkrTCQjBWL6Bwjq8xw0f" False) (C1 (MetaCons "RemovePermissionResponse'" PrefixI False) (U1 :: Type -> Type))