com.pulumi.aws.alb.outputs.TargetGroupStickiness Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
The 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.alb.outputs;
import com.pulumi.core.annotations.CustomType;
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;
@CustomType
public final class TargetGroupStickiness {
/**
* @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).
*
*/
private @Nullable Integer cookieDuration;
/**
* @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`.
*
*/
private @Nullable String cookieName;
/**
* @return Boolean to enable / disable `stickiness`. Default is `true`.
*
*/
private @Nullable Boolean enabled;
/**
* @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.
*
*/
private String type;
private TargetGroupStickiness() {}
/**
* @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);
}
/**
* @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);
}
/**
* @return Boolean to enable / disable `stickiness`. Default is `true`.
*
*/
public Optional enabled() {
return Optional.ofNullable(this.enabled);
}
/**
* @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 String type() {
return this.type;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(TargetGroupStickiness defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer cookieDuration;
private @Nullable String cookieName;
private @Nullable Boolean enabled;
private String type;
public Builder() {}
public Builder(TargetGroupStickiness defaults) {
Objects.requireNonNull(defaults);
this.cookieDuration = defaults.cookieDuration;
this.cookieName = defaults.cookieName;
this.enabled = defaults.enabled;
this.type = defaults.type;
}
@CustomType.Setter
public Builder cookieDuration(@Nullable Integer cookieDuration) {
this.cookieDuration = cookieDuration;
return this;
}
@CustomType.Setter
public Builder cookieName(@Nullable String cookieName) {
this.cookieName = cookieName;
return this;
}
@CustomType.Setter
public Builder enabled(@Nullable Boolean enabled) {
this.enabled = enabled;
return this;
}
@CustomType.Setter
public Builder type(String type) {
if (type == null) {
throw new MissingRequiredPropertyException("TargetGroupStickiness", "type");
}
this.type = type;
return this;
}
public TargetGroupStickiness build() {
final var _resultValue = new TargetGroupStickiness();
_resultValue.cookieDuration = cookieDuration;
_resultValue.cookieName = cookieName;
_resultValue.enabled = enabled;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy