Class CfnListenerRule.FixedResponseConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListenerRule.FixedResponseConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnListenerRule.FixedResponseConfigProperty>
- Enclosing interface:
CfnListenerRule.FixedResponseConfigProperty
@Stability(Stable)
public static final class CfnListenerRule.FixedResponseConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnListenerRule.FixedResponseConfigProperty>
A builder for
CfnListenerRule.FixedResponseConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.contentType(String contentType) Sets the value ofCfnListenerRule.FixedResponseConfigProperty.getContentType()messageBody(String messageBody) Sets the value ofCfnListenerRule.FixedResponseConfigProperty.getMessageBody()statusCode(String statusCode) Sets the value ofCfnListenerRule.FixedResponseConfigProperty.getStatusCode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
statusCode
@Stability(Stable) public CfnListenerRule.FixedResponseConfigProperty.Builder statusCode(String statusCode) Sets the value ofCfnListenerRule.FixedResponseConfigProperty.getStatusCode()- Parameters:
statusCode- The HTTP response code (2XX, 4XX, or 5XX). This parameter is required.- Returns:
this
-
contentType
@Stability(Stable) public CfnListenerRule.FixedResponseConfigProperty.Builder contentType(String contentType) Sets the value ofCfnListenerRule.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 CfnListenerRule.FixedResponseConfigProperty.Builder messageBody(String messageBody) Sets the value ofCfnListenerRule.FixedResponseConfigProperty.getMessageBody()- Parameters:
messageBody- The message.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnListenerRule.FixedResponseConfigProperty>- Returns:
- a new instance of
CfnListenerRule.FixedResponseConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-