Class CfnListener.RedirectConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListener.RedirectConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnListener.RedirectConfigProperty>
- Enclosing interface:
CfnListener.RedirectConfigProperty
@Stability(Stable)
public static final class CfnListener.RedirectConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnListener.RedirectConfigProperty>
A builder for
CfnListener.RedirectConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnListener.RedirectConfigProperty.getHost()Sets the value ofCfnListener.RedirectConfigProperty.getPath()Sets the value ofCfnListener.RedirectConfigProperty.getPort()Sets the value ofCfnListener.RedirectConfigProperty.getProtocol()Sets the value ofCfnListener.RedirectConfigProperty.getQuery()statusCode(String statusCode) Sets the value ofCfnListener.RedirectConfigProperty.getStatusCode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
statusCode
Sets the value ofCfnListener.RedirectConfigProperty.getStatusCode()- Parameters:
statusCode- The HTTP redirect code. This parameter is required. The redirect is either permanent (HTTP 301) or temporary (HTTP 302).- Returns:
this
-
host
Sets the value ofCfnListener.RedirectConfigProperty.getHost()- Parameters:
host- The hostname. This component is not percent-encoded. The hostname can contain #{host}.- Returns:
this
-
path
Sets the value ofCfnListener.RedirectConfigProperty.getPath()- Parameters:
path- The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.- Returns:
this
-
port
Sets the value ofCfnListener.RedirectConfigProperty.getPort()- Parameters:
port- The port. You can specify a value from 1 to 65535 or #{port}.- Returns:
this
-
protocol
Sets the value ofCfnListener.RedirectConfigProperty.getProtocol()- Parameters:
protocol- The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You can't redirect HTTPS to HTTP.- Returns:
this
-
query
Sets the value ofCfnListener.RedirectConfigProperty.getQuery()- Parameters:
query- The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading "?", as it is automatically added. You can specify any of the reserved keywords.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnListener.RedirectConfigProperty>- Returns:
- a new instance of
CfnListener.RedirectConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-