The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Paws::CloudFront::LambdaFunctionAssociation

USAGE

This class represents one of two things:

Arguments in a call to a service

Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object.

As an example, if Att1 is expected to be a Paws::CloudFront::LambdaFunctionAssociation object:

  $service_obj->Method(Att1 => { EventType => $value, ..., LambdaFunctionARN => $value  });

Results returned from an API call

Use accessors for each attribute. If Att1 is expected to be an Paws::CloudFront::LambdaFunctionAssociation object:

  $result = $service_obj->Method(...);
  $result->Att1->EventType

DESCRIPTION

A complex type that contains a Lambda function association.

ATTRIBUTES

REQUIRED EventType => Str

Specifies the event type that triggers a Lambda function invocation. You can specify the following values:

  • viewer-request: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache.

  • origin-request: The function executes only when CloudFront sends a request to your origin. When the requested object is in the edge cache, the function doesn't execute.

  • origin-response: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute.

  • viewer-response: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache.

    If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute.

IncludeBody => Bool

A flag that allows a Lambda function to have read access to the body content. For more information, see Accessing the Request Body by Choosing the Include Body Option (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) in the Amazon CloudFront Developer Guide.

REQUIRED LambdaFunctionARN => Str

The ARN of the Lambda function. You must specify the ARN of a function version; you can't specify a Lambda alias or $LATEST.

SEE ALSO

This class forms part of Paws, describing an object used in Paws::CloudFront

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues