@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class RuleCondition extends Object implements Serializable, Cloneable
Information about a condition for a rule.
Each rule can optionally include up to one of each of the following conditions: http-request-method,
host-header, path-pattern, and source-ip. Each rule can also optionally
include one or more of each of the following conditions: http-header and query-string. Note
that the value for a condition cannot be empty.
For more information, see Quotas for your Application Load Balancers.
| Constructor and Description |
|---|
RuleCondition() |
| Modifier and Type | Method and Description |
|---|---|
RuleCondition |
clone() |
boolean |
equals(Object obj) |
String |
getField()
The field in the HTTP request.
|
HostHeaderConditionConfig |
getHostHeaderConfig()
Information for a host header condition.
|
HttpHeaderConditionConfig |
getHttpHeaderConfig()
Information for an HTTP header condition.
|
HttpRequestMethodConditionConfig |
getHttpRequestMethodConfig()
Information for an HTTP method condition.
|
PathPatternConditionConfig |
getPathPatternConfig()
Information for a path pattern condition.
|
QueryStringConditionConfig |
getQueryStringConfig()
Information for a query string condition.
|
SourceIpConditionConfig |
getSourceIpConfig()
Information for a source IP condition.
|
List<String> |
getValues()
The condition value.
|
int |
hashCode() |
void |
setField(String field)
The field in the HTTP request.
|
void |
setHostHeaderConfig(HostHeaderConditionConfig hostHeaderConfig)
Information for a host header condition.
|
void |
setHttpHeaderConfig(HttpHeaderConditionConfig httpHeaderConfig)
Information for an HTTP header condition.
|
void |
setHttpRequestMethodConfig(HttpRequestMethodConditionConfig httpRequestMethodConfig)
Information for an HTTP method condition.
|
void |
setPathPatternConfig(PathPatternConditionConfig pathPatternConfig)
Information for a path pattern condition.
|
void |
setQueryStringConfig(QueryStringConditionConfig queryStringConfig)
Information for a query string condition.
|
void |
setSourceIpConfig(SourceIpConditionConfig sourceIpConfig)
Information for a source IP condition.
|
void |
setValues(Collection<String> values)
The condition value.
|
String |
toString()
Returns a string representation of this object.
|
RuleCondition |
withField(String field)
The field in the HTTP request.
|
RuleCondition |
withHostHeaderConfig(HostHeaderConditionConfig hostHeaderConfig)
Information for a host header condition.
|
RuleCondition |
withHttpHeaderConfig(HttpHeaderConditionConfig httpHeaderConfig)
Information for an HTTP header condition.
|
RuleCondition |
withHttpRequestMethodConfig(HttpRequestMethodConditionConfig httpRequestMethodConfig)
Information for an HTTP method condition.
|
RuleCondition |
withPathPatternConfig(PathPatternConditionConfig pathPatternConfig)
Information for a path pattern condition.
|
RuleCondition |
withQueryStringConfig(QueryStringConditionConfig queryStringConfig)
Information for a query string condition.
|
RuleCondition |
withSourceIpConfig(SourceIpConditionConfig sourceIpConfig)
Information for a source IP condition.
|
RuleCondition |
withValues(Collection<String> values)
The condition value.
|
RuleCondition |
withValues(String... values)
The condition value.
|
public void setField(String 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
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
public String getField()
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
http-header
http-request-method
host-header
path-pattern
query-string
source-ip
public RuleCondition withField(String 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
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
public List<String> getValues()
The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you can
specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig, you can
specify a single path pattern (for example, /img/*) in Values. 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)
Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig,
you can specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig,
you can specify a single path pattern (for example, /img/*) in Values. 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)
public void setValues(Collection<String> values)
The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you can
specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig, you can
specify a single path pattern (for example, /img/*) in Values. 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)
values - The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you
can specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig,
you can specify a single path pattern (for example, /img/*) in Values. 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)
public RuleCondition withValues(String... values)
The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you can
specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig, you can
specify a single path pattern (for example, /img/*) in Values. 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)
NOTE: This method appends the values to the existing list (if any). Use
setValues(java.util.Collection) or withValues(java.util.Collection) if you want to override the
existing values.
values - The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you
can specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig,
you can specify a single path pattern (for example, /img/*) in Values. 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)
public RuleCondition withValues(Collection<String> values)
The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you can
specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig, you can
specify a single path pattern (for example, /img/*) in Values. 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)
values - The condition value. Specify only when Field is host-header or
path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use
HostHeaderConfig or PathPatternConfig.
If Field is host-header and you are not using HostHeaderConfig, you
can specify a single host name (for example, my.example.com) in Values. 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 is path-pattern and you are not using PathPatternConfig,
you can specify a single path pattern (for example, /img/*) in Values. 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)
public void setHostHeaderConfig(HostHeaderConditionConfig hostHeaderConfig)
Information for a host header condition. Specify only when Field is host-header.
hostHeaderConfig - Information for a host header condition. Specify only when Field is host-header.public HostHeaderConditionConfig getHostHeaderConfig()
Information for a host header condition. Specify only when Field is host-header.
Field is host-header
.public RuleCondition withHostHeaderConfig(HostHeaderConditionConfig hostHeaderConfig)
Information for a host header condition. Specify only when Field is host-header.
hostHeaderConfig - Information for a host header condition. Specify only when Field is host-header.public void setPathPatternConfig(PathPatternConditionConfig pathPatternConfig)
Information for a path pattern condition. Specify only when Field is path-pattern.
pathPatternConfig - Information for a path pattern condition. Specify only when Field is
path-pattern.public PathPatternConditionConfig getPathPatternConfig()
Information for a path pattern condition. Specify only when Field is path-pattern.
Field is
path-pattern.public RuleCondition withPathPatternConfig(PathPatternConditionConfig pathPatternConfig)
Information for a path pattern condition. Specify only when Field is path-pattern.
pathPatternConfig - Information for a path pattern condition. Specify only when Field is
path-pattern.public void setHttpHeaderConfig(HttpHeaderConditionConfig httpHeaderConfig)
Information for an HTTP header condition. Specify only when Field is http-header.
httpHeaderConfig - Information for an HTTP header condition. Specify only when Field is http-header
.public HttpHeaderConditionConfig getHttpHeaderConfig()
Information for an HTTP header condition. Specify only when Field is http-header.
Field is
http-header.public RuleCondition withHttpHeaderConfig(HttpHeaderConditionConfig httpHeaderConfig)
Information for an HTTP header condition. Specify only when Field is http-header.
httpHeaderConfig - Information for an HTTP header condition. Specify only when Field is http-header
.public void setQueryStringConfig(QueryStringConditionConfig queryStringConfig)
Information for a query string condition. Specify only when Field is query-string.
queryStringConfig - Information for a query string condition. Specify only when Field is
query-string.public QueryStringConditionConfig getQueryStringConfig()
Information for a query string condition. Specify only when Field is query-string.
Field is
query-string.public RuleCondition withQueryStringConfig(QueryStringConditionConfig queryStringConfig)
Information for a query string condition. Specify only when Field is query-string.
queryStringConfig - Information for a query string condition. Specify only when Field is
query-string.public void setHttpRequestMethodConfig(HttpRequestMethodConditionConfig httpRequestMethodConfig)
Information for an HTTP method condition. Specify only when Field is
http-request-method.
httpRequestMethodConfig - Information for an HTTP method condition. Specify only when Field is
http-request-method.public HttpRequestMethodConditionConfig getHttpRequestMethodConfig()
Information for an HTTP method condition. Specify only when Field is
http-request-method.
Field is
http-request-method.public RuleCondition withHttpRequestMethodConfig(HttpRequestMethodConditionConfig httpRequestMethodConfig)
Information for an HTTP method condition. Specify only when Field is
http-request-method.
httpRequestMethodConfig - Information for an HTTP method condition. Specify only when Field is
http-request-method.public void setSourceIpConfig(SourceIpConditionConfig sourceIpConfig)
Information for a source IP condition. Specify only when Field is source-ip.
sourceIpConfig - Information for a source IP condition. Specify only when Field is source-ip.public SourceIpConditionConfig getSourceIpConfig()
Information for a source IP condition. Specify only when Field is source-ip.
Field is source-ip.public RuleCondition withSourceIpConfig(SourceIpConditionConfig sourceIpConfig)
Information for a source IP condition. Specify only when Field is source-ip.
sourceIpConfig - Information for a source IP condition. Specify only when Field is source-ip.public String toString()
toString in class ObjectObject.toString()public RuleCondition clone()