All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.networking.v1beta1.inputs.IngressSpecArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes.networking.v1beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.kubernetes.networking.v1beta1.inputs.IngressBackendArgs;
import com.pulumi.kubernetes.networking.v1beta1.inputs.IngressRuleArgs;
import com.pulumi.kubernetes.networking.v1beta1.inputs.IngressTLSArgs;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * IngressSpec describes the Ingress the user wishes to exist.
 * 
 */
public final class IngressSpecArgs extends com.pulumi.resources.ResourceArgs {

    public static final IngressSpecArgs Empty = new IngressSpecArgs();

    /**
     * A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
     * 
     */
    @Import(name="backend")
    private @Nullable Output backend;

    /**
     * @return A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
     * 
     */
    public Optional> backend() {
        return Optional.ofNullable(this.backend);
    }

    /**
     * IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
     * 
     */
    @Import(name="ingressClassName")
    private @Nullable Output ingressClassName;

    /**
     * @return IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
     * 
     */
    public Optional> ingressClassName() {
        return Optional.ofNullable(this.ingressClassName);
    }

    /**
     * A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     * 
     */
    @Import(name="rules")
    private @Nullable Output> rules;

    /**
     * @return A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
     * 
     */
    public Optional>> rules() {
        return Optional.ofNullable(this.rules);
    }

    /**
     * TLS configuration. 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.
     * 
     */
    @Import(name="tls")
    private @Nullable Output> tls;

    /**
     * @return TLS configuration. 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.
     * 
     */
    public Optional>> tls() {
        return Optional.ofNullable(this.tls);
    }

    private IngressSpecArgs() {}

    private IngressSpecArgs(IngressSpecArgs $) {
        this.backend = $.backend;
        this.ingressClassName = $.ingressClassName;
        this.rules = $.rules;
        this.tls = $.tls;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(IngressSpecArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private IngressSpecArgs $;

        public Builder() {
            $ = new IngressSpecArgs();
        }

        public Builder(IngressSpecArgs defaults) {
            $ = new IngressSpecArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param backend A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
         * 
         * @return builder
         * 
         */
        public Builder backend(@Nullable Output backend) {
            $.backend = backend;
            return this;
        }

        /**
         * @param backend A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.
         * 
         * @return builder
         * 
         */
        public Builder backend(IngressBackendArgs backend) {
            return backend(Output.of(backend));
        }

        /**
         * @param ingressClassName IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
         * 
         * @return builder
         * 
         */
        public Builder ingressClassName(@Nullable Output ingressClassName) {
            $.ingressClassName = ingressClassName;
            return this;
        }

        /**
         * @param ingressClassName IngressClassName is the name of the IngressClass cluster resource. The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation.
         * 
         * @return builder
         * 
         */
        public Builder ingressClassName(String ingressClassName) {
            return ingressClassName(Output.of(ingressClassName));
        }

        /**
         * @param rules A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
         * 
         * @return builder
         * 
         */
        public Builder rules(@Nullable Output> rules) {
            $.rules = rules;
            return this;
        }

        /**
         * @param rules A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
         * 
         * @return builder
         * 
         */
        public Builder rules(List rules) {
            return rules(Output.of(rules));
        }

        /**
         * @param rules A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.
         * 
         * @return builder
         * 
         */
        public Builder rules(IngressRuleArgs... rules) {
            return rules(List.of(rules));
        }

        /**
         * @param tls TLS configuration. 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.
         * 
         * @return builder
         * 
         */
        public Builder tls(@Nullable Output> tls) {
            $.tls = tls;
            return this;
        }

        /**
         * @param tls TLS configuration. 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.
         * 
         * @return builder
         * 
         */
        public Builder tls(List tls) {
            return tls(Output.of(tls));
        }

        /**
         * @param tls TLS configuration. 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.
         * 
         * @return builder
         * 
         */
        public Builder tls(IngressTLSArgs... tls) {
            return tls(List.of(tls));
        }

        public IngressSpecArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy