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

com.pulumi.aws.alb.inputs.TargetGroupStickinessArgs Maven / Gradle / Ivy

// *** 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.alb.inputs;

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


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

    public static final TargetGroupStickinessArgs Empty = new TargetGroupStickinessArgs();

    /**
     * Only used when the type is `lb_cookie`. The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).
     * 
     */
    @Import(name="cookieDuration")
    private @Nullable Output cookieDuration;

    /**
     * @return Only used when the type is `lb_cookie`. The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).
     * 
     */
    public Optional> cookieDuration() {
        return Optional.ofNullable(this.cookieDuration);
    }

    /**
     * Name of the application based cookie. AWSALB, AWSALBAPP, and AWSALBTG prefixes are reserved and cannot be used. Only needed when type is `app_cookie`.
     * 
     */
    @Import(name="cookieName")
    private @Nullable Output cookieName;

    /**
     * @return Name of the application based cookie. AWSALB, AWSALBAPP, and AWSALBTG prefixes are reserved and cannot be used. Only needed when type is `app_cookie`.
     * 
     */
    public Optional> cookieName() {
        return Optional.ofNullable(this.cookieName);
    }

    /**
     * Boolean to enable / disable `stickiness`. Default is `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Boolean to enable / disable `stickiness`. Default is `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The type of sticky sessions. The only current possible values are `lb_cookie`, `app_cookie` for ALBs, `source_ip` for NLBs, and `source_ip_dest_ip`, `source_ip_dest_ip_proto` for GWLBs.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of sticky sessions. The only current possible values are `lb_cookie`, `app_cookie` for ALBs, `source_ip` for NLBs, and `source_ip_dest_ip`, `source_ip_dest_ip_proto` for GWLBs.
     * 
     */
    public Output type() {
        return this.type;
    }

    private TargetGroupStickinessArgs() {}

    private TargetGroupStickinessArgs(TargetGroupStickinessArgs $) {
        this.cookieDuration = $.cookieDuration;
        this.cookieName = $.cookieName;
        this.enabled = $.enabled;
        this.type = $.type;
    }

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

    public static final class Builder {
        private TargetGroupStickinessArgs $;

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

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

        /**
         * @param cookieDuration Only used when the type is `lb_cookie`. The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).
         * 
         * @return builder
         * 
         */
        public Builder cookieDuration(@Nullable Output cookieDuration) {
            $.cookieDuration = cookieDuration;
            return this;
        }

        /**
         * @param cookieDuration Only used when the type is `lb_cookie`. The time period, in seconds, during which requests from a client should be routed to the same target. After this time period expires, the load balancer-generated cookie is considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).
         * 
         * @return builder
         * 
         */
        public Builder cookieDuration(Integer cookieDuration) {
            return cookieDuration(Output.of(cookieDuration));
        }

        /**
         * @param cookieName Name of the application based cookie. AWSALB, AWSALBAPP, and AWSALBTG prefixes are reserved and cannot be used. Only needed when type is `app_cookie`.
         * 
         * @return builder
         * 
         */
        public Builder cookieName(@Nullable Output cookieName) {
            $.cookieName = cookieName;
            return this;
        }

        /**
         * @param cookieName Name of the application based cookie. AWSALB, AWSALBAPP, and AWSALBTG prefixes are reserved and cannot be used. Only needed when type is `app_cookie`.
         * 
         * @return builder
         * 
         */
        public Builder cookieName(String cookieName) {
            return cookieName(Output.of(cookieName));
        }

        /**
         * @param enabled Boolean to enable / disable `stickiness`. Default is `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Boolean to enable / disable `stickiness`. Default is `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param type The type of sticky sessions. The only current possible values are `lb_cookie`, `app_cookie` for ALBs, `source_ip` for NLBs, and `source_ip_dest_ip`, `source_ip_dest_ip_proto` for GWLBs.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of sticky sessions. The only current possible values are `lb_cookie`, `app_cookie` for ALBs, `source_ip` for NLBs, and `source_ip_dest_ip`, `source_ip_dest_ip_proto` for GWLBs.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public TargetGroupStickinessArgs build() {
            if ($.type == null) {
                throw new MissingRequiredPropertyException("TargetGroupStickinessArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy