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

com.pulumi.azurenative.app.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.app.inputs;

import com.pulumi.azurenative.app.enums.IngressClientCertificateMode;
import com.pulumi.azurenative.app.enums.IngressTransportMethod;
import com.pulumi.azurenative.app.inputs.CorsPolicyArgs;
import com.pulumi.azurenative.app.inputs.CustomDomainArgs;
import com.pulumi.azurenative.app.inputs.IpSecurityRestrictionRuleArgs;
import com.pulumi.azurenative.app.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);
    }

    /**
     * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
     * 
     */
    @Import(name="clientCertificateMode")
    private @Nullable Output> clientCertificateMode;

    /**
     * @return Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
     * 
     */
    public Optional>> clientCertificateMode() {
        return Optional.ofNullable(this.clientCertificateMode);
    }

    /**
     * CORS policy for container app
     * 
     */
    @Import(name="corsPolicy")
    private @Nullable Output corsPolicy;

    /**
     * @return CORS policy for container app
     * 
     */
    public Optional> corsPolicy() {
        return Optional.ofNullable(this.corsPolicy);
    }

    /**
     * custom domain bindings for Container Apps' hostnames.
     * 
     */
    @Import(name="customDomains")
    private @Nullable Output> customDomains;

    /**
     * @return custom domain bindings for Container Apps' hostnames.
     * 
     */
    public Optional>> customDomains() {
        return Optional.ofNullable(this.customDomains);
    }

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

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

    /**
     * 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);
    }

    /**
     * Rules to restrict incoming IP address.
     * 
     */
    @Import(name="ipSecurityRestrictions")
    private @Nullable Output> ipSecurityRestrictions;

    /**
     * @return Rules to restrict incoming IP address.
     * 
     */
    public Optional>> ipSecurityRestrictions() {
        return Optional.ofNullable(this.ipSecurityRestrictions);
    }

    /**
     * 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);
    }

    /**
     * Traffic weights for app's revisions
     * 
     */
    @Import(name="traffic")
    private @Nullable Output> traffic;

    /**
     * @return Traffic weights for app's revisions
     * 
     */
    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.clientCertificateMode = $.clientCertificateMode;
        this.corsPolicy = $.corsPolicy;
        this.customDomains = $.customDomains;
        this.exposedPort = $.exposedPort;
        this.external = $.external;
        this.ipSecurityRestrictions = $.ipSecurityRestrictions;
        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 clientCertificateMode Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
         * 
         * @return builder
         * 
         */
        public Builder clientCertificateMode(@Nullable Output> clientCertificateMode) {
            $.clientCertificateMode = clientCertificateMode;
            return this;
        }

        /**
         * @param clientCertificateMode Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
         * 
         * @return builder
         * 
         */
        public Builder clientCertificateMode(Either clientCertificateMode) {
            return clientCertificateMode(Output.of(clientCertificateMode));
        }

        /**
         * @param clientCertificateMode Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
         * 
         * @return builder
         * 
         */
        public Builder clientCertificateMode(String clientCertificateMode) {
            return clientCertificateMode(Either.ofLeft(clientCertificateMode));
        }

        /**
         * @param clientCertificateMode Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate.
         * 
         * @return builder
         * 
         */
        public Builder clientCertificateMode(IngressClientCertificateMode clientCertificateMode) {
            return clientCertificateMode(Either.ofRight(clientCertificateMode));
        }

        /**
         * @param corsPolicy CORS policy for container app
         * 
         * @return builder
         * 
         */
        public Builder corsPolicy(@Nullable Output corsPolicy) {
            $.corsPolicy = corsPolicy;
            return this;
        }

        /**
         * @param corsPolicy CORS policy for container app
         * 
         * @return builder
         * 
         */
        public Builder corsPolicy(CorsPolicyArgs corsPolicy) {
            return corsPolicy(Output.of(corsPolicy));
        }

        /**
         * @param customDomains custom domain bindings for Container Apps' hostnames.
         * 
         * @return builder
         * 
         */
        public Builder customDomains(@Nullable Output> customDomains) {
            $.customDomains = customDomains;
            return this;
        }

        /**
         * @param customDomains custom domain bindings for Container Apps' hostnames.
         * 
         * @return builder
         * 
         */
        public Builder customDomains(List customDomains) {
            return customDomains(Output.of(customDomains));
        }

        /**
         * @param customDomains custom domain bindings for Container Apps' hostnames.
         * 
         * @return builder
         * 
         */
        public Builder customDomains(CustomDomainArgs... customDomains) {
            return customDomains(List.of(customDomains));
        }

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

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

        /**
         * @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 ipSecurityRestrictions Rules to restrict incoming IP address.
         * 
         * @return builder
         * 
         */
        public Builder ipSecurityRestrictions(@Nullable Output> ipSecurityRestrictions) {
            $.ipSecurityRestrictions = ipSecurityRestrictions;
            return this;
        }

        /**
         * @param ipSecurityRestrictions Rules to restrict incoming IP address.
         * 
         * @return builder
         * 
         */
        public Builder ipSecurityRestrictions(List ipSecurityRestrictions) {
            return ipSecurityRestrictions(Output.of(ipSecurityRestrictions));
        }

        /**
         * @param ipSecurityRestrictions Rules to restrict incoming IP address.
         * 
         * @return builder
         * 
         */
        public Builder ipSecurityRestrictions(IpSecurityRestrictionRuleArgs... ipSecurityRestrictions) {
            return ipSecurityRestrictions(List.of(ipSecurityRestrictions));
        }

        /**
         * @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));
        }

        /**
         * @param traffic Traffic weights for app's revisions
         * 
         * @return builder
         * 
         */
        public Builder traffic(@Nullable Output> traffic) {
            $.traffic = traffic;
            return this;
        }

        /**
         * @param traffic Traffic weights for app's revisions
         * 
         * @return builder
         * 
         */
        public Builder traffic(List traffic) {
            return traffic(Output.of(traffic));
        }

        /**
         * @param traffic Traffic weights for app's revisions
         * 
         * @return builder
         * 
         */
        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() {
            $.allowInsecure = Codegen.booleanProp("allowInsecure").output().arg($.allowInsecure).def(false).getNullable();
            $.external = Codegen.booleanProp("external").output().arg($.external).def(false).getNullable();
            $.transport = Codegen.stringProp("transport").left(IngressTransportMethod.class).output().arg($.transport).def("auto").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy