Lambda / Client / get_resource_policy
get_resource_policy#
- Lambda.Client.get_resource_policy(**kwargs)#
Note
The option to create and modify full JSON resource-based policies, and to use the PutResourcePolicy, GetResourcePolicy, and DeleteResourcePolicy APIs, won’t be available in all Amazon Web Services Regions until September 30, 2024.
Retrieves the resource-based policy attached to a function.
See also: AWS API Documentation
Request Syntax
response = client.get_resource_policy( ResourceArn='string' )
- Parameters:
ResourceArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the function you want to retrieve the policy for. You can use either a qualified or an unqualified ARN, but the value you specify must be a complete ARN and wildcard characters are not accepted.
- Return type:
dict
- Returns:
Response Syntax
{ 'Policy': 'string', 'RevisionId': 'string' }
Response Structure
(dict) –
Policy (string) –
The resource-based policy attached to the function you specified.
RevisionId (string) –
The revision ID of the policy.
Exceptions
Lambda.Client.exceptions.ServiceException
Lambda.Client.exceptions.ResourceNotFoundException
Lambda.Client.exceptions.TooManyRequestsException
Lambda.Client.exceptions.InvalidParameterValueException