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

com.pulumi.aws.cloudfront.OriginRequestPolicyArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
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.aws.cloudfront;

import com.pulumi.aws.cloudfront.inputs.OriginRequestPolicyCookiesConfigArgs;
import com.pulumi.aws.cloudfront.inputs.OriginRequestPolicyHeadersConfigArgs;
import com.pulumi.aws.cloudfront.inputs.OriginRequestPolicyQueryStringsConfigArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class OriginRequestPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final OriginRequestPolicyArgs Empty = new OriginRequestPolicyArgs();

    /**
     * Comment to describe the origin request policy.
     * 
     */
    @Import(name="comment")
    private @Nullable Output comment;

    /**
     * @return Comment to describe the origin request policy.
     * 
     */
    public Optional> comment() {
        return Optional.ofNullable(this.comment);
    }

    /**
     * Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     * 
     */
    @Import(name="cookiesConfig", required=true)
    private Output cookiesConfig;

    /**
     * @return Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     * 
     */
    public Output cookiesConfig() {
        return this.cookiesConfig;
    }

    /**
     * Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     * 
     */
    @Import(name="headersConfig", required=true)
    private Output headersConfig;

    /**
     * @return Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     * 
     */
    public Output headersConfig() {
        return this.headersConfig;
    }

    /**
     * Unique name to identify the origin request policy.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Unique name to identify the origin request policy.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
     * 
     */
    @Import(name="queryStringsConfig", required=true)
    private Output queryStringsConfig;

    /**
     * @return Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
     * 
     */
    public Output queryStringsConfig() {
        return this.queryStringsConfig;
    }

    private OriginRequestPolicyArgs() {}

    private OriginRequestPolicyArgs(OriginRequestPolicyArgs $) {
        this.comment = $.comment;
        this.cookiesConfig = $.cookiesConfig;
        this.headersConfig = $.headersConfig;
        this.name = $.name;
        this.queryStringsConfig = $.queryStringsConfig;
    }

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

    public static final class Builder {
        private OriginRequestPolicyArgs $;

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

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

        /**
         * @param comment Comment to describe the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder comment(@Nullable Output comment) {
            $.comment = comment;
            return this;
        }

        /**
         * @param comment Comment to describe the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder comment(String comment) {
            return comment(Output.of(comment));
        }

        /**
         * @param cookiesConfig Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder cookiesConfig(Output cookiesConfig) {
            $.cookiesConfig = cookiesConfig;
            return this;
        }

        /**
         * @param cookiesConfig Object that determines whether any cookies in viewer requests (and if so, which cookies) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder cookiesConfig(OriginRequestPolicyCookiesConfigArgs cookiesConfig) {
            return cookiesConfig(Output.of(cookiesConfig));
        }

        /**
         * @param headersConfig Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder headersConfig(Output headersConfig) {
            $.headersConfig = headersConfig;
            return this;
        }

        /**
         * @param headersConfig Object that determines whether any HTTP headers (and if so, which headers) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder headersConfig(OriginRequestPolicyHeadersConfigArgs headersConfig) {
            return headersConfig(Output.of(headersConfig));
        }

        /**
         * @param name Unique name to identify the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Unique name to identify the origin request policy.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param queryStringsConfig Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder queryStringsConfig(Output queryStringsConfig) {
            $.queryStringsConfig = queryStringsConfig;
            return this;
        }

        /**
         * @param queryStringsConfig Object that determines whether any URL query strings in viewer requests (and if so, which query strings) are included in the origin request key and automatically included in requests that CloudFront sends to the origin. See Query String Config for more information.
         * 
         * @return builder
         * 
         */
        public Builder queryStringsConfig(OriginRequestPolicyQueryStringsConfigArgs queryStringsConfig) {
            return queryStringsConfig(Output.of(queryStringsConfig));
        }

        public OriginRequestPolicyArgs build() {
            if ($.cookiesConfig == null) {
                throw new MissingRequiredPropertyException("OriginRequestPolicyArgs", "cookiesConfig");
            }
            if ($.headersConfig == null) {
                throw new MissingRequiredPropertyException("OriginRequestPolicyArgs", "headersConfig");
            }
            if ($.queryStringsConfig == null) {
                throw new MissingRequiredPropertyException("OriginRequestPolicyArgs", "queryStringsConfig");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy