Class Quota.Builder

  • Enclosing class:
    Quota

    public static class Quota.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • value

        public Quota.Builder value​(Integer value)
        The number of requests that can be made per time period.
        Parameters:
        value - the value to set
        Returns:
        this builder
      • unit

        public Quota.Builder unit​(Quota.Unit unit)
        The unit of time over which quotas are calculated.

        Example: MINUTE or MONTH

        Parameters:
        unit - the value to set
        Returns:
        this builder
      • resetPolicy

        public Quota.Builder resetPolicy​(Quota.ResetPolicy resetPolicy)
        The policy that controls when quotas will reset.

        Example: CALENDAR

        Parameters:
        resetPolicy - the value to set
        Returns:
        this builder
      • operationOnBreach

        public Quota.Builder operationOnBreach​(Quota.OperationOnBreach operationOnBreach)
        What the usage plan will do when a quota is breached: REJECT will allow no further requests ALLOW will continue to allow further requests
        Parameters:
        operationOnBreach - the value to set
        Returns:
        this builder
      • build

        public Quota build()