Class Toleration.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Toleration>
    Enclosing interface:
    Toleration

    @Stability(Stable)
    public static final class Toleration.Builder
    extends Object
    implements software.amazon.jsii.Builder<Toleration>
    A builder for Toleration
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • effect

        @Stability(Stable)
        public Toleration.Builder effect​(String effect)
        Sets the value of Toleration.getEffect()
        Parameters:
        effect - Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
        Returns:
        this
      • key

        @Stability(Stable)
        public Toleration.Builder key​(String key)
        Sets the value of Toleration.getKey()
        Parameters:
        key - Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
        Returns:
        this
      • operator

        @Stability(Stable)
        public Toleration.Builder operator​(String operator)
        Sets the value of Toleration.getOperator()
        Parameters:
        operator - Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
        Returns:
        this
      • tolerationSeconds

        @Stability(Stable)
        public Toleration.Builder tolerationSeconds​(Number tolerationSeconds)
        Parameters:
        tolerationSeconds - TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
        Returns:
        this
      • value

        @Stability(Stable)
        public Toleration.Builder value​(String value)
        Sets the value of Toleration.getValue()
        Parameters:
        value - Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
        Returns:
        this
      • build

        @Stability(Stable)
        public Toleration build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<Toleration>
        Returns:
        a new instance of Toleration
        Throws:
        NullPointerException - if any required attribute was not provided