Class CfnListener.FixedResponseConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListener.FixedResponseConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnListener.FixedResponseConfigProperty>
- Enclosing interface:
CfnListener.FixedResponseConfigProperty
@Stability(Stable)
public static final class CfnListener.FixedResponseConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnListener.FixedResponseConfigProperty>
A builder for
CfnListener.FixedResponseConfigProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.contentType
(String contentType) Sets the value ofCfnListener.FixedResponseConfigProperty.getContentType()
messageBody
(String messageBody) Sets the value ofCfnListener.FixedResponseConfigProperty.getMessageBody()
statusCode
(String statusCode) Sets the value ofCfnListener.FixedResponseConfigProperty.getStatusCode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
statusCode
@Stability(Stable) public CfnListener.FixedResponseConfigProperty.Builder statusCode(String statusCode) Sets the value ofCfnListener.FixedResponseConfigProperty.getStatusCode()
- Parameters:
statusCode
- The HTTP response code (2XX, 4XX, or 5XX). This parameter is required.- Returns:
this
-
contentType
@Stability(Stable) public CfnListener.FixedResponseConfigProperty.Builder contentType(String contentType) Sets the value ofCfnListener.FixedResponseConfigProperty.getContentType()
- Parameters:
contentType
- The content type. Valid Values: text/plain | text/css | text/html | application/javascript | application/json- Returns:
this
-
messageBody
@Stability(Stable) public CfnListener.FixedResponseConfigProperty.Builder messageBody(String messageBody) Sets the value ofCfnListener.FixedResponseConfigProperty.getMessageBody()
- Parameters:
messageBody
- The message.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnListener.FixedResponseConfigProperty>
- Returns:
- a new instance of
CfnListener.FixedResponseConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-