AWS WAF Waf Size Constraint Set API

The Waf Size Constraint Set API from AWS WAF — 5 operation(s) for waf size constraint set.

GitHub OpenAPI

Operations 5

POST /#CreateSizeConstraintSet Create Size Constraint Set #
POST /#DeleteSizeConstraintSet Delete Size Constraint Set #
POST /#GetSizeConstraintSet Get Size Constraint Set #
POST /#ListSizeConstraintSets List Size Constraint Sets #
POST /#UpdateSizeConstraintSet Update Size Constraint Set #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aws-waf:aws-waf-size-constraint-set-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aws-waf-size-constraint-set-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS WAFV2 Size Constraint Set API
  version: '2019-07-29'
  description: Generated from AWS's published Smithy model for AWS WAFV2. 5 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://waf.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#CreateSizeConstraintSet:
    post:
      operationId: CreateSizeConstraintSet
      summary: Create Size Constraint Set
      description: '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 SizeConstraintSet. You then use UpdateSizeConstraintSet
        to identify the part of a web request that you want AWS WAF to check for length, such as the length of the User-Agent
        header or the length of the query string. For example, you can create a SizeConstraintSet that matches any requests
        that have a query string that is longer than 100 bytes. You can then configure AWS WAF to reject those requests. To
        create and configure a SizeConstraintSet, perform the following steps: Use GetChangeToken to get the change token
        that you provide in the ChangeToken parameter of a CreateSizeConstraintSet request. Submit a CreateSizeConstraintSet
        request. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateSizeConstraintSet
        request. Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect
        (for example, t'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/CreateSizeConstraintSetResponse'
              example:
                SizeConstraintSet:
                  Name: MySampleSizeConstraintSet
                  SizeConstraints:
                  - ComparisonOperator: GT
                    FieldToMatch:
                      Type: QUERY_STRING
                    Size: 0
                    TextTransformation: NONE
                  SizeConstraintSetId: example1ds3t-46da-4fdb-b8d5-abc321j569j5
                ChangeToken: abcd12f2-46da-4fdb-b8d5-fbd4c466928f
        '400':
          description: WAFDisallowedNameException; WAFInvalidAccountException; WAFInvalidParameterException; WAFLimitsExceededException;
            WAFStaleDataException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WAFDisallowedNameException'
        '500':
          description: WAFInternalErrorException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WafWAFInternalErrorException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSWAF_20150824.CreateSizeConstraintSet
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/CreateSizeConstraintSetRequest'
            example:
              Name: MySampleSizeConstraintSet
              ChangeToken: abcd12f2-46da-4fdb-b8d5-fbd4c466928f
      tags:
      - Size Constraint Set
  /#DeleteSizeConstraintSet:
    post:
      operationId: DeleteSizeConstraintSet
      summary: Delete Size Constraint Set
      description: '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. Permanently deletes a SizeConstraintSet. You can''t
        delete a SizeConstraintSet if it''s still used in any Rules or if it still includes any SizeConstraint objects (any
        filters). If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule. To permanently delete a SizeConstraintSet,
        perform the following steps: Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet.
        Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteSizeConstraintSet
        request. Submit a DeleteSizeConstraintSet request.'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DeleteSizeConstraintSetResponse'
              example:
                ChangeToken: abcd12f2-46da-4fdb-b8d5-fbd4c466928f
        '500':
          description: WAFInternalErrorException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WafWAFInternalErrorException'
        '400':
          description: WAFInvalidAccountException; WAFNonEmptyEntityException; WAFNonexistentItemException; WAFReferencedItemException;
            WAFStaleDataException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WAFInvalidAccountException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSWAF_20150824.DeleteSizeConstraintSet
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DeleteSizeConstraintSetRequest'
            example:
              SizeConstraintSetId: example1ds3t-46da-4fdb-b8d5-abc321j569j5
              ChangeToken: abcd12f2-46da-4fdb-b8d5-fbd4c466928f
      tags:
      - Size Constraint Set
  /#GetSizeConstraintSet:
    post:
      operationId: GetSizeConstraintSet
      summary: Get Size Constraint Set
      description: 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. Returns the SizeConstraintSet specified by SizeConstraintSetId.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetSizeConstraintSetResponse'
              example:
                SizeConstraintSet:
                  Name: MySampleSizeConstraintSet
                  SizeConstraints:
                  - ComparisonOperator: GT
                    FieldToMatch:
                      Type: QUERY_STRING
                    Size: 0
                    TextTransformation: NONE
                  SizeConstraintSetId: example1ds3t-46da-4fdb-b8d5-abc321j569j5
        '500':
          description: WAFInternalErrorException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WafWAFInternalErrorException'
        '400':
          description: WAFInvalidAccountException; WAFNonexistentItemException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WAFInvalidAccountException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSWAF_20150824.GetSizeConstraintSet
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetSizeConstraintSetRequest'
            example:
              SizeConstraintSetId: example1ds3t-46da-4fdb-b8d5-abc321j569j5
      tags:
      - Size Constraint Set
  /#ListSizeConstraintSets:
    post:
      operationId: ListSizeConstraintSets
      summary: List Size Constraint Sets
      description: 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. Returns an array of SizeConstraintSetSummary objects.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListSizeConstraintSetsResponse'
              example:
                SizeConstraintSets:
                - Name: MySampleSizeConstraintSet
                  SizeConstraintSetId: example1ds3t-46da-4fdb-b8d5-abc321j569j5
        '500':
          description: WAFInternalErrorException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WafWAFInternalErrorException'
        '400':
          description: WAFInvalidAccountException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WAFInvalidAccountException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSWAF_20150824.ListSizeConstraintSets
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListSizeConstraintSetsRequest'
            example:
              Limit: 100
      tags:
      - Size Constraint Set
  /#UpdateSizeConstraintSet:
    post:
      operationId: UpdateSizeConstraintSet
      summary: Update Size Constraint Set
      description: '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. Inserts or deletes SizeConstraint objects (filters)
        in a SizeConstraintSet. For each SizeConstraint object, you specify the following values: Whether to insert or delete
        the object from the array. If you want to change a SizeConstraintSetUpdate object, you delete the existing object
        and add a new one. The part of a web request that you want AWS WAF to evaluate, such as the length of a query string
        or the length of the User-Agent header. Whether to perform any transformations on the request, such as converting
        it to lowercase, before checking its length. Note that transformations of the request body are not supported because
        the AWS resource forwards only the first 8192 bytes of your request to AWS WAF. You can only specify a single type
        of TextTransformation. A ComparisonOperator used for evaluating the selected part of the request against the specified
        Size, such as equals, greater than, less th'
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/UpdateSizeConstraintSetResponse'
              example:
                ChangeToken: abcd12f2-46da-4fdb-b8d5-fbd4c466928f
        '500':
          description: WAFInternalErrorException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WafWAFInternalErrorException'
        '400':
          description: WAFInvalidAccountException; WAFInvalidOperationException; WAFInvalidParameterException; WAFLimitsExceededException;
            WAFNonexistentContainerException; WAFNonexistentItemException; WAFReferencedItemException; WAFStaleDataException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/WAFInvalidAccountException'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - AWSWAF_20150824.UpdateSizeConstraintSet
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/UpdateSizeConstraintSetRequest'
            example:
              SizeConstraintSetId: example1ds3t-46da-4fdb-b8d5-abc321j569j5
              ChangeToken: abcd12f2-46da-4fdb-b8d5-fbd4c466928f
              Updates:
              - Action: DELETE
                SizeConstraint:
                  ComparisonOperator: GT
                  FieldToMatch:
                    Type: QUERY_STRING
                  Size: 0
                  TextTransformation: NONE
      tags:
      - Size Constraint Set
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: waf
  schemas:
    CreateSizeConstraintSetRequest:
      type: object
      properties:
        Name:
          type: string
          description: A friendly name or description of the SizeConstraintSet. You can't change Name after you create a SizeConstraintSet.
        ChangeToken:
          type: string
          description: The value returned by the most recent call to GetChangeToken.
      required:
      - Name
      - ChangeToken
    CreateSizeConstraintSetResponse:
      type: object
      properties:
        SizeConstraintSet:
          $ref: '#/components/schemas/SizeConstraintSet'
        ChangeToken:
          type: string
          description: The ChangeToken that you used to submit the CreateSizeConstraintSet request. You can also use this
            value to query the status of the request. For more information, see GetChangeTokenStatus.
    DeleteSizeConstraintSetRequest:
      type: object
      properties:
        SizeConstraintSetId:
          type: string
          description: The SizeConstraintSetId of the SizeConstraintSet that you want to delete. SizeConstraintSetId is returned
            by CreateSizeConstraintSet and by ListSizeConstraintSets.
        ChangeToken:
          type: string
          description: The value returned by the most recent call to GetChangeToken.
      required:
      - SizeConstraintSetId
      - ChangeToken
    DeleteSizeConstraintSetResponse:
      type: object
      properties:
        ChangeToken:
          type: string
          description: The ChangeToken that you used to submit the DeleteSizeConstraintSet request. You can also use this
            value to query the status of the request. For more information, see GetChangeTokenStatus.
    GetSizeConstraintSetRequest:
      type: object
      properties:
        SizeConstraintSetId:
          type: string
          description: The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId is returned
            by CreateSizeConstraintSet and by ListSizeConstraintSets.
      required:
      - SizeConstraintSetId
    GetSizeConstraintSetResponse:
      type: object
      properties:
        SizeConstraintSet:
          $ref: '#/components/schemas/SizeConstraintSet'
    ListSizeConstraintSetsRequest:
      type: object
      properties:
        NextMarker:
          type: string
          description: If you specify a value for Limit and you have more SizeConstraintSets than the value of Limit, AWS
            WAF returns a NextMarker value in the response that allows you to list another group of SizeConstraintSets. For
            the second and subsequent ListSizeConstraintSets requests, specify the value of NextMarker from the previous response
            to get information about another batch of SizeConstraintSets.
        Limit:
          type: integer
          description: Specifies the number of SizeConstraintSet objects that you want AWS WAF to return for this request.
            If you have more SizeConstraintSets objects than the number you specify for Limit, the response includes a NextMarker
            value that you can use to get another batch of SizeConstraintSet objects.
    ListSizeConstraintSetsResponse:
      type: object
      properties:
        NextMarker:
          type: string
          description: If you have more SizeConstraintSet objects than the number that you specified for Limit in the request,
            the response includes a NextMarker value. To list more SizeConstraintSet objects, submit another ListSizeConstraintSets
            request, and specify the NextMarker value from the response in the NextMarker value in the next request.
        SizeConstraintSets:
          type: array
          items:
            $ref: '#/components/schemas/SizeConstraintSetSummary'
          description: An array of SizeConstraintSetSummary objects.
    SizeConstraint:
      type: object
      properties:
        FieldToMatch:
          $ref: '#/components/schemas/WafFieldToMatch'
        TextTransformation:
          type: string
          enum:
          - NONE
          - COMPRESS_WHITE_SPACE
          - HTML_ENTITY_DECODE
          - LOWERCASE
          - CMD_LINE
          - URL_DECODE
          description: Text transformations eliminate some of the unusual formatting that attackers use in web requests in
            an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on FieldToMatch
            before inspecting it for a match. You can only specify a single type of TextTransformation. Note that if you choose
            BODY for the value of Type, you must choose NONE for TextTransformation because CloudFront forwards only the first
            8192 bytes for inspection. NONE Specify NONE if you don't want to perform any text transformations. CMD_LINE When
            you're concerned that attackers are injec
        ComparisonOperator:
          type: string
          enum:
          - EQ
          - NE
          - LE
          - LT
          - GE
          - GT
          description: 'The type of comparison you want AWS WAF to perform. AWS WAF uses this in combination with the provided
            Size and FieldToMatch to build an expression in the form of "Size ComparisonOperator size in bytes of FieldToMatch".
            If that expression is true, the SizeConstraint is considered to match. EQ: Used to test if the Size is equal to
            the size of the FieldToMatch NE: Used to test if the Size is not equal to the size of the FieldToMatch LE: Used
            to test if the Size is less than or equal to the size of the FieldToMatch LT: Used to test if the Size is strictly
            less than the size of the FieldToMatch GE'
        Size:
          type: integer
          description: The size in bytes that you want AWS WAF to compare against the size of the specified FieldToMatch.
            AWS WAF uses this in combination with ComparisonOperator and FieldToMatch to build an expression in the form of
            "Size ComparisonOperator size in bytes of FieldToMatch". If that expression is true, the SizeConstraint is considered
            to match. Valid values for size are 0 - 21474836480 bytes (0 - 20 GB). If you specify URI for the value of Type,
            the / in the URI counts as one character. For example, the URI /logo.jpg is nine characters long.
      required:
      - FieldToMatch
      - TextTransformation
      - ComparisonOperator
      - Size
    SizeConstraintSet:
      type: object
      properties:
        SizeConstraintSetId:
          type: string
          description: A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId to get information about a
            SizeConstraintSet (see GetSizeConstraintSet), update a SizeConstraintSet (see UpdateSizeConstraintSet), insert
            a SizeConstraintSet into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet from
            AWS WAF (see DeleteSizeConstraintSet). SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
        Name:
          type: string
          description: The name, if any, of the SizeConstraintSet.
        SizeConstraints:
          type: array
          items:
            $ref: '#/components/schemas/SizeConstraint'
          description: Specifies the parts of web requests that you want to inspect the size of.
      required:
      - SizeConstraintSetId
      - SizeConstraints
    SizeConstraintSetSummary:
      type: object
      properties:
        SizeConstraintSetId:
          type: string
          description: A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId to get information about a
            SizeConstraintSet (see GetSizeConstraintSet), update a SizeConstraintSet (see UpdateSizeConstraintSet), insert
            a SizeConstraintSet into a Rule or delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet from
            AWS WAF (see DeleteSizeConstraintSet). SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.
        Name:
          type: string
          description: The name of the SizeConstraintSet, if any.
      required:
      - SizeConstraintSetId
      - Name
    SizeConstraintSetUpdate:
      type: object
      properties:
        Action:
          type: string
          enum:
          - INSERT
          - DELETE
          description: Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet. Use DELETE to remove a SizeConstraintSetUpdate
            from a SizeConstraintSet.
        SizeConstraint:
          $ref: '#/components/schemas/SizeConstraint'
      required:
      - Action
      - SizeConstraint
    UpdateSizeConstraintSetRequest:
      type: object
      properties:
        SizeConstraintSetId:
          type: string
          description: The SizeConstraintSetId of the SizeConstraintSet that you want to update. SizeConstraintSetId is returned
            by CreateSizeConstraintSet and by ListSizeConstraintSets.
        ChangeToken:
          type: string
          description: The value returned by the most recent call to GetChangeToken.
        Updates:
          type: array
          items:
            $ref: '#/components/schemas/SizeConstraintSetUpdate'
          description: 'An array of SizeConstraintSetUpdate objects that you want to insert into or delete from a SizeConstraintSet.
            For more information, see the applicable data types: SizeConstraintSetUpdate: Contains Action and SizeConstraint
            SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator, and Size FieldToMatch: Contains
            Data and Type'
      required:
      - SizeConstraintSetId
      - ChangeToken
      - Updates
    UpdateSizeConstraintSetResponse:
      type: object
      properties:
        ChangeToken:
          type: string
          description: The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this
            value to query the status of the request. For more information, see GetChangeTokenStatus.
    WAFDisallowedNameException:
      type: object
      properties:
        message:
          type: string
    WAFInvalidAccountException:
      type: object
      properties: {}
    WafFieldToMatch:
      type: object
      properties:
        Type:
          type: string
          enum:
          - URI
          - QUERY_STRING
          - HEADER
          - METHOD
          - BODY
          - SINGLE_QUERY_ARG
          - ALL_QUERY_ARGS
          description: 'The part of the web request that you want AWS WAF to search for a specified string. Parts of a request
            that you can search include the following: HEADER: A specified request header, for example, the value of the User-Agent
            or Referer header. If you choose HEADER for the type, specify the name of the header in Data. METHOD: The HTTP
            method, which indicated the type of operation that the request is asking the origin to perform. Amazon CloudFront
            supports the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, POST, and PUT. QUERY_STRING: A query string,
            which is the part of a URL that appears '
        Data:
          type: string
          description: When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, for
            example, User-Agent or Referer. The name of the header is not case sensitive. When the value of Type is SINGLE_QUERY_ARG,
            enter the name of the parameter that you want AWS WAF to search, for example, UserName or SalesRegion. The parameter
            name is not case sensitive. If the value of Type is any other value, omit Data.
      required:
      - Type
    WafWAFInternalErrorException:
      type: object
      properties:
        message:
          type: string
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/waf/service/2015-08-24/waf-2015-08-24.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)