
com.pulumi.aws.wafv2.outputs.WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.wafv2.outputs;
import com.pulumi.aws.wafv2.outputs.WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatementFieldToMatch;
import com.pulumi.aws.wafv2.outputs.WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatementTextTransformation;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement {
/**
* @return Part of a web request that you want AWS WAF to inspect. See `field_to_match` below for details.
*
*/
private @Nullable WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatementFieldToMatch fieldToMatch;
/**
* @return Area within the portion of a web request that you want AWS WAF to search for `search_string`. Valid values include the following: `EXACTLY`, `STARTS_WITH`, `ENDS_WITH`, `CONTAINS`, `CONTAINS_WORD`. See the AWS [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchStatement.html) for more information.
*
*/
private String positionalConstraint;
/**
* @return String value that you want AWS WAF to search for. AWS WAF searches only in the part of web requests that you designate for inspection in `field_to_match`. The maximum length of the value is 50 bytes.
*
*/
private String searchString;
/**
* @return Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. At least one transformation is required. See `text_transformation` below for details.
*
*/
private List textTransformations;
private WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement() {}
/**
* @return Part of a web request that you want AWS WAF to inspect. See `field_to_match` below for details.
*
*/
public Optional fieldToMatch() {
return Optional.ofNullable(this.fieldToMatch);
}
/**
* @return Area within the portion of a web request that you want AWS WAF to search for `search_string`. Valid values include the following: `EXACTLY`, `STARTS_WITH`, `ENDS_WITH`, `CONTAINS`, `CONTAINS_WORD`. See the AWS [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchStatement.html) for more information.
*
*/
public String positionalConstraint() {
return this.positionalConstraint;
}
/**
* @return String value that you want AWS WAF to search for. AWS WAF searches only in the part of web requests that you designate for inspection in `field_to_match`. The maximum length of the value is 50 bytes.
*
*/
public String searchString() {
return this.searchString;
}
/**
* @return Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. At least one transformation is required. See `text_transformation` below for details.
*
*/
public List textTransformations() {
return this.textTransformations;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatementFieldToMatch fieldToMatch;
private String positionalConstraint;
private String searchString;
private List textTransformations;
public Builder() {}
public Builder(WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement defaults) {
Objects.requireNonNull(defaults);
this.fieldToMatch = defaults.fieldToMatch;
this.positionalConstraint = defaults.positionalConstraint;
this.searchString = defaults.searchString;
this.textTransformations = defaults.textTransformations;
}
@CustomType.Setter
public Builder fieldToMatch(@Nullable WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatementFieldToMatch fieldToMatch) {
this.fieldToMatch = fieldToMatch;
return this;
}
@CustomType.Setter
public Builder positionalConstraint(String positionalConstraint) {
if (positionalConstraint == null) {
throw new MissingRequiredPropertyException("WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement", "positionalConstraint");
}
this.positionalConstraint = positionalConstraint;
return this;
}
@CustomType.Setter
public Builder searchString(String searchString) {
if (searchString == null) {
throw new MissingRequiredPropertyException("WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement", "searchString");
}
this.searchString = searchString;
return this;
}
@CustomType.Setter
public Builder textTransformations(List textTransformations) {
if (textTransformations == null) {
throw new MissingRequiredPropertyException("WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement", "textTransformations");
}
this.textTransformations = textTransformations;
return this;
}
public Builder textTransformations(WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatementTextTransformation... textTransformations) {
return textTransformations(List.of(textTransformations));
}
public WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement build() {
final var _resultValue = new WebAclRuleStatementRateBasedStatementScopeDownStatementByteMatchStatement();
_resultValue.fieldToMatch = fieldToMatch;
_resultValue.positionalConstraint = positionalConstraint;
_resultValue.searchString = searchString;
_resultValue.textTransformations = textTransformations;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy