All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.awsconnector.inputs.LambdaFunctionAssociationArgs Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.awsconnector.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Definition of LambdaFunctionAssociation
 * 
 */
public final class LambdaFunctionAssociationArgs extends com.pulumi.resources.ResourceArgs {

    public static final LambdaFunctionAssociationArgs Empty = new LambdaFunctionAssociationArgs();

    /**
     * Specifies the event type that triggers a Lambda{@literal @}Edge 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.
     * 
     */
    @Import(name="eventType")
    private @Nullable Output eventType;

    /**
     * @return Specifies the event type that triggers a Lambda{@literal @}Edge 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.
     * 
     */
    public Optional> eventType() {
        return Optional.ofNullable(this.eventType);
    }

    /**
     * A flag that allows a Lambda{@literal @}Edge 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.
     * 
     */
    @Import(name="includeBody")
    private @Nullable Output includeBody;

    /**
     * @return A flag that allows a Lambda{@literal @}Edge 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.
     * 
     */
    public Optional> includeBody() {
        return Optional.ofNullable(this.includeBody);
    }

    /**
     * The ARN of the Lambda{@literal @}Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST.
     * 
     */
    @Import(name="lambdaFunctionARN")
    private @Nullable Output lambdaFunctionARN;

    /**
     * @return The ARN of the Lambda{@literal @}Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST.
     * 
     */
    public Optional> lambdaFunctionARN() {
        return Optional.ofNullable(this.lambdaFunctionARN);
    }

    private LambdaFunctionAssociationArgs() {}

    private LambdaFunctionAssociationArgs(LambdaFunctionAssociationArgs $) {
        this.eventType = $.eventType;
        this.includeBody = $.includeBody;
        this.lambdaFunctionARN = $.lambdaFunctionARN;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(LambdaFunctionAssociationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private LambdaFunctionAssociationArgs $;

        public Builder() {
            $ = new LambdaFunctionAssociationArgs();
        }

        public Builder(LambdaFunctionAssociationArgs defaults) {
            $ = new LambdaFunctionAssociationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param eventType Specifies the event type that triggers a Lambda{@literal @}Edge 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.
         * 
         * @return builder
         * 
         */
        public Builder eventType(@Nullable Output eventType) {
            $.eventType = eventType;
            return this;
        }

        /**
         * @param eventType Specifies the event type that triggers a Lambda{@literal @}Edge 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.
         * 
         * @return builder
         * 
         */
        public Builder eventType(String eventType) {
            return eventType(Output.of(eventType));
        }

        /**
         * @param includeBody A flag that allows a Lambda{@literal @}Edge 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.
         * 
         * @return builder
         * 
         */
        public Builder includeBody(@Nullable Output includeBody) {
            $.includeBody = includeBody;
            return this;
        }

        /**
         * @param includeBody A flag that allows a Lambda{@literal @}Edge 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.
         * 
         * @return builder
         * 
         */
        public Builder includeBody(Boolean includeBody) {
            return includeBody(Output.of(includeBody));
        }

        /**
         * @param lambdaFunctionARN The ARN of the Lambda{@literal @}Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST.
         * 
         * @return builder
         * 
         */
        public Builder lambdaFunctionARN(@Nullable Output lambdaFunctionARN) {
            $.lambdaFunctionARN = lambdaFunctionARN;
            return this;
        }

        /**
         * @param lambdaFunctionARN The ARN of the Lambda{@literal @}Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST.
         * 
         * @return builder
         * 
         */
        public Builder lambdaFunctionARN(String lambdaFunctionARN) {
            return lambdaFunctionARN(Output.of(lambdaFunctionARN));
        }

        public LambdaFunctionAssociationArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy