Class Ingress.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Ingress>
    Enclosing class:
    Ingress

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

      • create

        @Stability(Stable)
        public static Ingress.Builder create​(software.constructs.Construct scope,
                                             String id)
        Parameters:
        scope - This parameter is required.
        id - This parameter is required.
        Returns:
        a new instance of Ingress.Builder.
      • metadata

        @Stability(Stable)
        public Ingress.Builder metadata​(org.cdk8s.ApiObjectMetadata metadata)
        Metadata that all persisted resources must have, which includes all objects users must create.

        Parameters:
        metadata - Metadata that all persisted resources must have, which includes all objects users must create. This parameter is required.
        Returns:
        this
      • defaultBackend

        @Stability(Stable)
        public Ingress.Builder defaultBackend​(IngressBackend defaultBackend)
        The default backend services requests that do not match any rule.

        Using this option or the addDefaultBackend() method is equivalent to adding a rule with both path and host undefined.

        Parameters:
        defaultBackend - The default backend services requests that do not match any rule. This parameter is required.
        Returns:
        this
      • rules

        @Stability(Stable)
        public Ingress.Builder rules​(List<? extends IngressRule> rules)
        Routing rules for this ingress.

        Each rule must define an IngressBackend that will receive the requests that match this rule. If both host and path are not specifiec, this backend will be used as the default backend of the ingress.

        You can also add rules later using addRule(), addHostRule(), addDefaultBackend() and addHostDefaultBackend().

        Parameters:
        rules - Routing rules for this ingress. This parameter is required.
        Returns:
        this
      • tls

        @Stability(Stable)
        public Ingress.Builder tls​(List<? extends IngressTls> tls)
        TLS settings for this ingress.

        Using this option tells the ingress controller to expose a TLS endpoint. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.

        Parameters:
        tls - TLS settings for this ingress. This parameter is required.
        Returns:
        this
      • build

        @Stability(Stable)
        public Ingress build()
        Specified by:
        build in interface software.amazon.jsii.Builder<Ingress>