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

com.pulumi.azurenative.web.inputs.IngressArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
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.azurenative.web.inputs;

import com.pulumi.azurenative.web.enums.IngressTransportMethod;
import com.pulumi.azurenative.web.inputs.TrafficWeightArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Container App Ingress configuration.
 * 
 */
public final class IngressArgs extends com.pulumi.resources.ResourceArgs {

    public static final IngressArgs Empty = new IngressArgs();

    /**
     * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
     * 
     */
    @Import(name="allowInsecure")
    private @Nullable Output allowInsecure;

    /**
     * @return Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
     * 
     */
    public Optional> allowInsecure() {
        return Optional.ofNullable(this.allowInsecure);
    }

    /**
     * Bool indicating if app exposes an external http endpoint
     * 
     */
    @Import(name="external")
    private @Nullable Output external;

    /**
     * @return Bool indicating if app exposes an external http endpoint
     * 
     */
    public Optional> external() {
        return Optional.ofNullable(this.external);
    }

    /**
     * Target Port in containers for traffic from ingress
     * 
     */
    @Import(name="targetPort")
    private @Nullable Output targetPort;

    /**
     * @return Target Port in containers for traffic from ingress
     * 
     */
    public Optional> targetPort() {
        return Optional.ofNullable(this.targetPort);
    }

    @Import(name="traffic")
    private @Nullable Output> traffic;

    public Optional>> traffic() {
        return Optional.ofNullable(this.traffic);
    }

    /**
     * Ingress transport protocol
     * 
     */
    @Import(name="transport")
    private @Nullable Output> transport;

    /**
     * @return Ingress transport protocol
     * 
     */
    public Optional>> transport() {
        return Optional.ofNullable(this.transport);
    }

    private IngressArgs() {}

    private IngressArgs(IngressArgs $) {
        this.allowInsecure = $.allowInsecure;
        this.external = $.external;
        this.targetPort = $.targetPort;
        this.traffic = $.traffic;
        this.transport = $.transport;
    }

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

    public static final class Builder {
        private IngressArgs $;

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

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

        /**
         * @param allowInsecure Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
         * 
         * @return builder
         * 
         */
        public Builder allowInsecure(@Nullable Output allowInsecure) {
            $.allowInsecure = allowInsecure;
            return this;
        }

        /**
         * @param allowInsecure Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
         * 
         * @return builder
         * 
         */
        public Builder allowInsecure(Boolean allowInsecure) {
            return allowInsecure(Output.of(allowInsecure));
        }

        /**
         * @param external Bool indicating if app exposes an external http endpoint
         * 
         * @return builder
         * 
         */
        public Builder external(@Nullable Output external) {
            $.external = external;
            return this;
        }

        /**
         * @param external Bool indicating if app exposes an external http endpoint
         * 
         * @return builder
         * 
         */
        public Builder external(Boolean external) {
            return external(Output.of(external));
        }

        /**
         * @param targetPort Target Port in containers for traffic from ingress
         * 
         * @return builder
         * 
         */
        public Builder targetPort(@Nullable Output targetPort) {
            $.targetPort = targetPort;
            return this;
        }

        /**
         * @param targetPort Target Port in containers for traffic from ingress
         * 
         * @return builder
         * 
         */
        public Builder targetPort(Integer targetPort) {
            return targetPort(Output.of(targetPort));
        }

        public Builder traffic(@Nullable Output> traffic) {
            $.traffic = traffic;
            return this;
        }

        public Builder traffic(List traffic) {
            return traffic(Output.of(traffic));
        }

        public Builder traffic(TrafficWeightArgs... traffic) {
            return traffic(List.of(traffic));
        }

        /**
         * @param transport Ingress transport protocol
         * 
         * @return builder
         * 
         */
        public Builder transport(@Nullable Output> transport) {
            $.transport = transport;
            return this;
        }

        /**
         * @param transport Ingress transport protocol
         * 
         * @return builder
         * 
         */
        public Builder transport(Either transport) {
            return transport(Output.of(transport));
        }

        /**
         * @param transport Ingress transport protocol
         * 
         * @return builder
         * 
         */
        public Builder transport(String transport) {
            return transport(Either.ofLeft(transport));
        }

        /**
         * @param transport Ingress transport protocol
         * 
         * @return builder
         * 
         */
        public Builder transport(IngressTransportMethod transport) {
            return transport(Either.ofRight(transport));
        }

        public IngressArgs build() {
            $.external = Codegen.booleanProp("external").output().arg($.external).def(false).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy