Class CfnListenerRule.RuleConditionProperty.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.CfnListenerRule.RuleConditionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnListenerRule.RuleConditionProperty>
- Enclosing interface:
CfnListenerRule.RuleConditionProperty
@Stability(Stable)
public static final class CfnListenerRule.RuleConditionProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnListenerRule.RuleConditionProperty>
A builder for
CfnListenerRule.RuleConditionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnListenerRule.RuleConditionProperty.getField()
hostHeaderConfig
(IResolvable hostHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHostHeaderConfig()
hostHeaderConfig
(CfnListenerRule.HostHeaderConfigProperty hostHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHostHeaderConfig()
httpHeaderConfig
(IResolvable httpHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpHeaderConfig()
httpHeaderConfig
(CfnListenerRule.HttpHeaderConfigProperty httpHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpHeaderConfig()
httpRequestMethodConfig
(IResolvable httpRequestMethodConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpRequestMethodConfig()
httpRequestMethodConfig
(CfnListenerRule.HttpRequestMethodConfigProperty httpRequestMethodConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpRequestMethodConfig()
pathPatternConfig
(IResolvable pathPatternConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getPathPatternConfig()
pathPatternConfig
(CfnListenerRule.PathPatternConfigProperty pathPatternConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getPathPatternConfig()
queryStringConfig
(IResolvable queryStringConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getQueryStringConfig()
queryStringConfig
(CfnListenerRule.QueryStringConfigProperty queryStringConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getQueryStringConfig()
sourceIpConfig
(IResolvable sourceIpConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getSourceIpConfig()
sourceIpConfig
(CfnListenerRule.SourceIpConfigProperty sourceIpConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getSourceIpConfig()
Sets the value ofCfnListenerRule.RuleConditionProperty.getValues()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
field
Sets the value ofCfnListenerRule.RuleConditionProperty.getField()
- Parameters:
field
- The field in the HTTP request. The following are the possible values:.http-header
http-request-method
host-header
path-pattern
query-string
source-ip
- Returns:
this
-
hostHeaderConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder hostHeaderConfig(IResolvable hostHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHostHeaderConfig()
- Parameters:
hostHeaderConfig
- Information for a host header condition. Specify only whenField
ishost-header
.- Returns:
this
-
hostHeaderConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder hostHeaderConfig(CfnListenerRule.HostHeaderConfigProperty hostHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHostHeaderConfig()
- Parameters:
hostHeaderConfig
- Information for a host header condition. Specify only whenField
ishost-header
.- Returns:
this
-
httpHeaderConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder httpHeaderConfig(IResolvable httpHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpHeaderConfig()
- Parameters:
httpHeaderConfig
- Information for an HTTP header condition. Specify only whenField
ishttp-header
.- Returns:
this
-
httpHeaderConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder httpHeaderConfig(CfnListenerRule.HttpHeaderConfigProperty httpHeaderConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpHeaderConfig()
- Parameters:
httpHeaderConfig
- Information for an HTTP header condition. Specify only whenField
ishttp-header
.- Returns:
this
-
httpRequestMethodConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder httpRequestMethodConfig(IResolvable httpRequestMethodConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpRequestMethodConfig()
- Parameters:
httpRequestMethodConfig
- Information for an HTTP method condition. Specify only whenField
ishttp-request-method
.- Returns:
this
-
httpRequestMethodConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder httpRequestMethodConfig(CfnListenerRule.HttpRequestMethodConfigProperty httpRequestMethodConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getHttpRequestMethodConfig()
- Parameters:
httpRequestMethodConfig
- Information for an HTTP method condition. Specify only whenField
ishttp-request-method
.- Returns:
this
-
pathPatternConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder pathPatternConfig(IResolvable pathPatternConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getPathPatternConfig()
- Parameters:
pathPatternConfig
- Information for a path pattern condition. Specify only whenField
ispath-pattern
.- Returns:
this
-
pathPatternConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder pathPatternConfig(CfnListenerRule.PathPatternConfigProperty pathPatternConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getPathPatternConfig()
- Parameters:
pathPatternConfig
- Information for a path pattern condition. Specify only whenField
ispath-pattern
.- Returns:
this
-
queryStringConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder queryStringConfig(IResolvable queryStringConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getQueryStringConfig()
- Parameters:
queryStringConfig
- Information for a query string condition. Specify only whenField
isquery-string
.- Returns:
this
-
queryStringConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder queryStringConfig(CfnListenerRule.QueryStringConfigProperty queryStringConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getQueryStringConfig()
- Parameters:
queryStringConfig
- Information for a query string condition. Specify only whenField
isquery-string
.- Returns:
this
-
sourceIpConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder sourceIpConfig(IResolvable sourceIpConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getSourceIpConfig()
- Parameters:
sourceIpConfig
- Information for a source IP condition. Specify only whenField
issource-ip
.- Returns:
this
-
sourceIpConfig
@Stability(Stable) public CfnListenerRule.RuleConditionProperty.Builder sourceIpConfig(CfnListenerRule.SourceIpConfigProperty sourceIpConfig) Sets the value ofCfnListenerRule.RuleConditionProperty.getSourceIpConfig()
- Parameters:
sourceIpConfig
- Information for a source IP condition. Specify only whenField
issource-ip
.- Returns:
this
-
values
Sets the value ofCfnListenerRule.RuleConditionProperty.getValues()
- Parameters:
values
- The condition value. Specify only whenField
ishost-header
orpath-pattern
. Alternatively, to specify multiple host names or multiple path patterns, useHostHeaderConfig
orPathPatternConfig
.If
Field
ishost-header
and you're not usingHostHeaderConfig
, you can specify a single host name (for example, my.example.com). A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.- A-Z, a-z, 0-9
- .
- (matches 0 or more characters)
- ? (matches exactly 1 character)
If
Field
ispath-pattern
and you're not usingPathPatternConfig
, you can specify a single path pattern (for example, /img/*). A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.- A-Z, a-z, 0-9
- _ - . $ / ~ " ' @ : +
- & (using &)
- (matches 0 or more characters)
- ? (matches exactly 1 character)
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnListenerRule.RuleConditionProperty>
- Returns:
- a new instance of
CfnListenerRule.RuleConditionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-