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

com.pulumi.aws.lightsail.LbArgs Maven / Gradle / Ivy

// *** 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.aws.lightsail;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class LbArgs extends com.pulumi.resources.ResourceArgs {

    public static final LbArgs Empty = new LbArgs();

    /**
     * The health check path of the load balancer. Default value "/".
     * 
     */
    @Import(name="healthCheckPath")
    private @Nullable Output healthCheckPath;

    /**
     * @return The health check path of the load balancer. Default value "/".
     * 
     */
    public Optional> healthCheckPath() {
        return Optional.ofNullable(this.healthCheckPath);
    }

    /**
     * The instance port the load balancer will connect.
     * 
     */
    @Import(name="instancePort", required=true)
    private Output instancePort;

    /**
     * @return The instance port the load balancer will connect.
     * 
     */
    public Output instancePort() {
        return this.instancePort;
    }

    @Import(name="ipAddressType")
    private @Nullable Output ipAddressType;

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

    /**
     * The name of the Lightsail load balancer.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the Lightsail load balancer.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private LbArgs() {}

    private LbArgs(LbArgs $) {
        this.healthCheckPath = $.healthCheckPath;
        this.instancePort = $.instancePort;
        this.ipAddressType = $.ipAddressType;
        this.name = $.name;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private LbArgs $;

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

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

        /**
         * @param healthCheckPath The health check path of the load balancer. Default value "/".
         * 
         * @return builder
         * 
         */
        public Builder healthCheckPath(@Nullable Output healthCheckPath) {
            $.healthCheckPath = healthCheckPath;
            return this;
        }

        /**
         * @param healthCheckPath The health check path of the load balancer. Default value "/".
         * 
         * @return builder
         * 
         */
        public Builder healthCheckPath(String healthCheckPath) {
            return healthCheckPath(Output.of(healthCheckPath));
        }

        /**
         * @param instancePort The instance port the load balancer will connect.
         * 
         * @return builder
         * 
         */
        public Builder instancePort(Output instancePort) {
            $.instancePort = instancePort;
            return this;
        }

        /**
         * @param instancePort The instance port the load balancer will connect.
         * 
         * @return builder
         * 
         */
        public Builder instancePort(Integer instancePort) {
            return instancePort(Output.of(instancePort));
        }

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

        public Builder ipAddressType(String ipAddressType) {
            return ipAddressType(Output.of(ipAddressType));
        }

        /**
         * @param name The name of the Lightsail load balancer.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the Lightsail load balancer.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param tags A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public LbArgs build() {
            if ($.instancePort == null) {
                throw new MissingRequiredPropertyException("LbArgs", "instancePort");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy