Module Values.CreateRuleResponseSource

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and other predicates that identify the requests that you want to block. If you add more than one predicate to a Rule, a request must match all of the specifications to be allowed or blocked. For example, suppose that you add the following to a Rule: An IPSet that matches the IP address 192.0.2.44/32 A ByteMatchSet that matches BadBot in the User-Agent header You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. For a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request must contain the value BadBot. To create and configure a Rule, perform the following steps: Create and update the predicates that you want to include in the Rule. For more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateRule request. Submit a CreateRule request. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRule request. Submit an UpdateRule request to specify the predicates that you want to include in the Rule. Create and update a WebACL that contains the Rule. For more information, see CreateWebACL. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

Sourcetype nonrec t = {
  1. rule : Rule.t option;
    (*

    The Rule returned in the CreateRule response.

    *)
  2. changeToken : ChangeToken.t option;
    (*

    The ChangeToken that you used to submit the CreateRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.

    *)
}
Sourcetype nonrec error = [
  1. | `WAFBadRequestException of WAFBadRequestException.t
  2. | `WAFDisallowedNameException of WAFDisallowedNameException.t
  3. | `WAFInternalErrorException of WAFInternalErrorException.t
  4. | `WAFInvalidParameterException of WAFInvalidParameterException.t
  5. | `WAFLimitsExceededException of WAFLimitsExceededException.t
  6. | `WAFStaleDataException of WAFStaleDataException.t
  7. | `WAFTagOperationException of WAFTagOperationException.t
  8. | `WAFTagOperationInternalErrorException of WAFTagOperationInternalErrorException.t
  9. | `Unknown_operation_error of string * string option
]
Sourceval make : ?rule:??? -> ?changeToken:??? -> unit -> t
Sourceval error_of_json : string -> Yojson.Safe.t -> [> `Unknown_operation_error of string * string option | `WAFBadRequestException of WAFBadRequestException.t | `WAFDisallowedNameException of WAFDisallowedNameException.t | `WAFInternalErrorException of WAFInternalErrorException.t | `WAFInvalidParameterException of WAFInvalidParameterException.t | `WAFLimitsExceededException of WAFLimitsExceededException.t | `WAFStaleDataException of WAFStaleDataException.t | `WAFTagOperationException of WAFTagOperationException.t | `WAFTagOperationInternalErrorException of WAFTagOperationInternalErrorException.t ]
Sourceval error_of_xml : string -> Awso.Xml.t -> [> `Unknown_operation_error of string * string option | `WAFBadRequestException of WAFBadRequestException.t | `WAFDisallowedNameException of WAFDisallowedNameException.t | `WAFInternalErrorException of WAFInternalErrorException.t | `WAFInvalidParameterException of WAFInvalidParameterException.t | `WAFLimitsExceededException of WAFLimitsExceededException.t | `WAFStaleDataException of WAFStaleDataException.t | `WAFTagOperationException of WAFTagOperationException.t | `WAFTagOperationInternalErrorException of WAFTagOperationInternalErrorException.t ]
Sourceval error_to_json : error -> Yojson.Safe.t
Sourceval to_value : t -> [> `Structure of (string * [> `String of ChangeToken.t | `Structure of (string * [> `List of [> `Structure of (string * [> `Boolean of Negated.t | `Enum of string | `String of ResourceId.t ]) list ] list | `String of ResourceId.t ]) list ]) list ]
Sourceval to_query : t -> Awso.Client.Query.t
Sourceval of_xml : Awso.Xml.t -> t
Sourceval of_string : string -> t
Sourceval of_json : Yojson.Safe.t -> t
Sourceval to_json : t -> Yojson.Safe.t