Class CfnListenerRule.RedirectConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListenerRule.RedirectConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnListenerRule.RedirectConfigProperty>
- Enclosing interface:
CfnListenerRule.RedirectConfigProperty
@Stability(Stable)
public static final class CfnListenerRule.RedirectConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnListenerRule.RedirectConfigProperty>
A builder for
CfnListenerRule.RedirectConfigProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnListenerRule.RedirectConfigProperty.getHost()
Sets the value ofCfnListenerRule.RedirectConfigProperty.getPath()
Sets the value ofCfnListenerRule.RedirectConfigProperty.getPort()
Sets the value ofCfnListenerRule.RedirectConfigProperty.getProtocol()
Sets the value ofCfnListenerRule.RedirectConfigProperty.getQuery()
statusCode
(String statusCode) Sets the value ofCfnListenerRule.RedirectConfigProperty.getStatusCode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
statusCode
@Stability(Stable) public CfnListenerRule.RedirectConfigProperty.Builder statusCode(String statusCode) Sets the value ofCfnListenerRule.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 ofCfnListenerRule.RedirectConfigProperty.getHost()
- Parameters:
host
- The hostname. This component is not percent-encoded. The hostname can contain #{host}.- Returns:
this
-
path
Sets the value ofCfnListenerRule.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 ofCfnListenerRule.RedirectConfigProperty.getPort()
- Parameters:
port
- The port. You can specify a value from 1 to 65535 or #{port}.- Returns:
this
-
protocol
Sets the value ofCfnListenerRule.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 cannot redirect HTTPS to HTTP.- Returns:
this
-
query
Sets the value ofCfnListenerRule.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:
build
in interfacesoftware.amazon.jsii.Builder<CfnListenerRule.RedirectConfigProperty>
- Returns:
- a new instance of
CfnListenerRule.RedirectConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-