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

com.pulumi.azurenative.containerservice.LoadBalancerArgs 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.containerservice;

import com.pulumi.azurenative.containerservice.inputs.LabelSelectorArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final LoadBalancerArgs Empty = new LoadBalancerArgs();

    /**
     * Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
     * 
     */
    @Import(name="allowServicePlacement")
    private @Nullable Output allowServicePlacement;

    /**
     * @return Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
     * 
     */
    public Optional> allowServicePlacement() {
        return Optional.ofNullable(this.allowServicePlacement);
    }

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

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

    /**
     * Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * Nodes that match this selector will be possible members of this load balancer.
     * 
     */
    @Import(name="nodeSelector")
    private @Nullable Output nodeSelector;

    /**
     * @return Nodes that match this selector will be possible members of this load balancer.
     * 
     */
    public Optional> nodeSelector() {
        return Optional.ofNullable(this.nodeSelector);
    }

    /**
     * Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
     * 
     */
    @Import(name="primaryAgentPoolName", required=true)
    private Output primaryAgentPoolName;

    /**
     * @return Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
     * 
     */
    public Output primaryAgentPoolName() {
        return this.primaryAgentPoolName;
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The name of the managed cluster resource.
     * 
     */
    @Import(name="resourceName", required=true)
    private Output resourceName;

    /**
     * @return The name of the managed cluster resource.
     * 
     */
    public Output resourceName() {
        return this.resourceName;
    }

    /**
     * Only services that must match this selector can be placed on this load balancer.
     * 
     */
    @Import(name="serviceLabelSelector")
    private @Nullable Output serviceLabelSelector;

    /**
     * @return Only services that must match this selector can be placed on this load balancer.
     * 
     */
    public Optional> serviceLabelSelector() {
        return Optional.ofNullable(this.serviceLabelSelector);
    }

    /**
     * Services created in namespaces that match the selector can be placed on this load balancer.
     * 
     */
    @Import(name="serviceNamespaceSelector")
    private @Nullable Output serviceNamespaceSelector;

    /**
     * @return Services created in namespaces that match the selector can be placed on this load balancer.
     * 
     */
    public Optional> serviceNamespaceSelector() {
        return Optional.ofNullable(this.serviceNamespaceSelector);
    }

    private LoadBalancerArgs() {}

    private LoadBalancerArgs(LoadBalancerArgs $) {
        this.allowServicePlacement = $.allowServicePlacement;
        this.loadBalancerName = $.loadBalancerName;
        this.name = $.name;
        this.nodeSelector = $.nodeSelector;
        this.primaryAgentPoolName = $.primaryAgentPoolName;
        this.resourceGroupName = $.resourceGroupName;
        this.resourceName = $.resourceName;
        this.serviceLabelSelector = $.serviceLabelSelector;
        this.serviceNamespaceSelector = $.serviceNamespaceSelector;
    }

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

    public static final class Builder {
        private LoadBalancerArgs $;

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

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

        /**
         * @param allowServicePlacement Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
         * 
         * @return builder
         * 
         */
        public Builder allowServicePlacement(@Nullable Output allowServicePlacement) {
            $.allowServicePlacement = allowServicePlacement;
            return this;
        }

        /**
         * @param allowServicePlacement Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
         * 
         * @return builder
         * 
         */
        public Builder allowServicePlacement(Boolean allowServicePlacement) {
            return allowServicePlacement(Output.of(allowServicePlacement));
        }

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

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

        /**
         * @param name Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param nodeSelector Nodes that match this selector will be possible members of this load balancer.
         * 
         * @return builder
         * 
         */
        public Builder nodeSelector(@Nullable Output nodeSelector) {
            $.nodeSelector = nodeSelector;
            return this;
        }

        /**
         * @param nodeSelector Nodes that match this selector will be possible members of this load balancer.
         * 
         * @return builder
         * 
         */
        public Builder nodeSelector(LabelSelectorArgs nodeSelector) {
            return nodeSelector(Output.of(nodeSelector));
        }

        /**
         * @param primaryAgentPoolName Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
         * 
         * @return builder
         * 
         */
        public Builder primaryAgentPoolName(Output primaryAgentPoolName) {
            $.primaryAgentPoolName = primaryAgentPoolName;
            return this;
        }

        /**
         * @param primaryAgentPoolName Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
         * 
         * @return builder
         * 
         */
        public Builder primaryAgentPoolName(String primaryAgentPoolName) {
            return primaryAgentPoolName(Output.of(primaryAgentPoolName));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param resourceName The name of the managed cluster resource.
         * 
         * @return builder
         * 
         */
        public Builder resourceName(Output resourceName) {
            $.resourceName = resourceName;
            return this;
        }

        /**
         * @param resourceName The name of the managed cluster resource.
         * 
         * @return builder
         * 
         */
        public Builder resourceName(String resourceName) {
            return resourceName(Output.of(resourceName));
        }

        /**
         * @param serviceLabelSelector Only services that must match this selector can be placed on this load balancer.
         * 
         * @return builder
         * 
         */
        public Builder serviceLabelSelector(@Nullable Output serviceLabelSelector) {
            $.serviceLabelSelector = serviceLabelSelector;
            return this;
        }

        /**
         * @param serviceLabelSelector Only services that must match this selector can be placed on this load balancer.
         * 
         * @return builder
         * 
         */
        public Builder serviceLabelSelector(LabelSelectorArgs serviceLabelSelector) {
            return serviceLabelSelector(Output.of(serviceLabelSelector));
        }

        /**
         * @param serviceNamespaceSelector Services created in namespaces that match the selector can be placed on this load balancer.
         * 
         * @return builder
         * 
         */
        public Builder serviceNamespaceSelector(@Nullable Output serviceNamespaceSelector) {
            $.serviceNamespaceSelector = serviceNamespaceSelector;
            return this;
        }

        /**
         * @param serviceNamespaceSelector Services created in namespaces that match the selector can be placed on this load balancer.
         * 
         * @return builder
         * 
         */
        public Builder serviceNamespaceSelector(LabelSelectorArgs serviceNamespaceSelector) {
            return serviceNamespaceSelector(Output.of(serviceNamespaceSelector));
        }

        public LoadBalancerArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("LoadBalancerArgs", "name");
            }
            if ($.primaryAgentPoolName == null) {
                throw new MissingRequiredPropertyException("LoadBalancerArgs", "primaryAgentPoolName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("LoadBalancerArgs", "resourceGroupName");
            }
            if ($.resourceName == null) {
                throw new MissingRequiredPropertyException("LoadBalancerArgs", "resourceName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy