You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CloudFront::Types::LambdaFunctionAssociations

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb

Overview

Note:

When making an API call, you may pass LambdaFunctionAssociations data as a hash:

{
  quantity: 1, # required
  items: [
    {
      lambda_function_arn: "string",
      event_type: "viewer-request", # accepts viewer-request, viewer-response, origin-request, origin-response
    },
  ],
}

A complex type that specifies a list of Lambda functions associations for a cache behavior.

If you want to invoke one or more Lambda functions triggered by requests that match the PathPattern of the cache behavior, specify the applicable values for Quantity and Items. Note that there can be up to 4 LambdaFunctionAssociation items in this list (one for each possible value of EventType) and each EventType can be associated with the Lambda function only once.

If you don't want to invoke any Lambda functions for the requests that match PathPattern, specify 0 for Quantity and omit Items.

Instance Attribute Summary collapse

Instance Attribute Details

#itemsArray<Types::LambdaFunctionAssociation>

Optional: A complex type that contains LambdaFunctionAssociation items for this cache behavior. If Quantity is 0, you can omit Items.



3815
3816
3817
3818
3819
# File 'gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb', line 3815

class LambdaFunctionAssociations < Struct.new(
  :quantity,
  :items)
  include Aws::Structure
end

#quantityInteger

The number of Lambda function associations for this cache behavior.

Returns:

  • (Integer)


3815
3816
3817
3818
3819
# File 'gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb', line 3815

class LambdaFunctionAssociations < Struct.new(
  :quantity,
  :items)
  include Aws::Structure
end