Lambda / Client / get_resource_policy

get_resource_policy

Lambda.Client.get_resource_policy(**kwargs)

Retrieves the resource-based policy attached to a Lambda resource.

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 Lambda resource you want to retrieve the policy for. You can use a qualified or an unqualified ARN. The value must be a complete ARN, and the operation does not accept wildcard characters.

Return type:

dict

Returns:

Response Syntax

{
    'Policy': 'string',
    'RevisionId': 'string'
}

Response Structure

  • (dict) –

    • Policy (string) –

      The resource-based policy attached to the Lambda resource you specified.

    • RevisionId (string) –

      The revision ID of the policy. Pass this value as the RevisionId in a PutResourcePolicy or DeleteResourcePolicy request. Doing so ensures the operation acts on the expected version of the policy.

Exceptions

  • Lambda.Client.exceptions.InvalidParameterValueException

  • Lambda.Client.exceptions.ServiceException

  • Lambda.Client.exceptions.TooManyRequestsException

  • Lambda.Client.exceptions.ResourceNotFoundException