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

com.pulumi.cloudflare.LoadBalancerPoolArgs 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.cloudflare;

import com.pulumi.cloudflare.inputs.LoadBalancerPoolLoadSheddingArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerPoolOriginArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerPoolOriginSteeringArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final LoadBalancerPoolArgs Empty = new LoadBalancerPoolArgs();

    /**
     * The account identifier to target for the resource.
     * 
     */
    @Import(name="accountId", required=true)
    private Output accountId;

    /**
     * @return The account identifier to target for the resource.
     * 
     */
    public Output accountId() {
        return this.accountId;
    }

    /**
     * A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
     * 
     */
    @Import(name="checkRegions")
    private @Nullable Output> checkRegions;

    /**
     * @return A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
     * 
     */
    public Optional>> checkRegions() {
        return Optional.ofNullable(this.checkRegions);
    }

    /**
     * Free text description.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Free text description.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The latitude this pool is physically located at; used for proximity steering.
     * 
     */
    @Import(name="latitude")
    private @Nullable Output latitude;

    /**
     * @return The latitude this pool is physically located at; used for proximity steering.
     * 
     */
    public Optional> latitude() {
        return Optional.ofNullable(this.latitude);
    }

    /**
     * Setting for controlling load shedding for this pool.
     * 
     */
    @Import(name="loadSheddings")
    private @Nullable Output> loadSheddings;

    /**
     * @return Setting for controlling load shedding for this pool.
     * 
     */
    public Optional>> loadSheddings() {
        return Optional.ofNullable(this.loadSheddings);
    }

    /**
     * The longitude this pool is physically located at; used for proximity steering.
     * 
     */
    @Import(name="longitude")
    private @Nullable Output longitude;

    /**
     * @return The longitude this pool is physically located at; used for proximity steering.
     * 
     */
    public Optional> longitude() {
        return Optional.ofNullable(this.longitude);
    }

    /**
     * The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
     * 
     */
    @Import(name="minimumOrigins")
    private @Nullable Output minimumOrigins;

    /**
     * @return The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
     * 
     */
    public Optional> minimumOrigins() {
        return Optional.ofNullable(this.minimumOrigins);
    }

    /**
     * The ID of the Monitor to use for health checking origins within this pool.
     * 
     */
    @Import(name="monitor")
    private @Nullable Output monitor;

    /**
     * @return The ID of the Monitor to use for health checking origins within this pool.
     * 
     */
    public Optional> monitor() {
        return Optional.ofNullable(this.monitor);
    }

    /**
     * A short name (tag) for the pool.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return A short name (tag) for the pool.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
     * 
     */
    @Import(name="notificationEmail")
    private @Nullable Output notificationEmail;

    /**
     * @return The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
     * 
     */
    public Optional> notificationEmail() {
        return Optional.ofNullable(this.notificationEmail);
    }

    /**
     * Set an origin steering policy to control origin selection within a pool.
     * 
     */
    @Import(name="originSteerings")
    private @Nullable Output> originSteerings;

    /**
     * @return Set an origin steering policy to control origin selection within a pool.
     * 
     */
    public Optional>> originSteerings() {
        return Optional.ofNullable(this.originSteerings);
    }

    /**
     * The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     * 
     */
    @Import(name="origins", required=true)
    private Output> origins;

    /**
     * @return The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     * 
     */
    public Output> origins() {
        return this.origins;
    }

    private LoadBalancerPoolArgs() {}

    private LoadBalancerPoolArgs(LoadBalancerPoolArgs $) {
        this.accountId = $.accountId;
        this.checkRegions = $.checkRegions;
        this.description = $.description;
        this.enabled = $.enabled;
        this.latitude = $.latitude;
        this.loadSheddings = $.loadSheddings;
        this.longitude = $.longitude;
        this.minimumOrigins = $.minimumOrigins;
        this.monitor = $.monitor;
        this.name = $.name;
        this.notificationEmail = $.notificationEmail;
        this.originSteerings = $.originSteerings;
        this.origins = $.origins;
    }

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

    public static final class Builder {
        private LoadBalancerPoolArgs $;

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

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

        /**
         * @param accountId The account identifier to target for the resource.
         * 
         * @return builder
         * 
         */
        public Builder accountId(Output accountId) {
            $.accountId = accountId;
            return this;
        }

        /**
         * @param accountId The account identifier to target for the resource.
         * 
         * @return builder
         * 
         */
        public Builder accountId(String accountId) {
            return accountId(Output.of(accountId));
        }

        /**
         * @param checkRegions A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
         * 
         * @return builder
         * 
         */
        public Builder checkRegions(@Nullable Output> checkRegions) {
            $.checkRegions = checkRegions;
            return this;
        }

        /**
         * @param checkRegions A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
         * 
         * @return builder
         * 
         */
        public Builder checkRegions(List checkRegions) {
            return checkRegions(Output.of(checkRegions));
        }

        /**
         * @param checkRegions A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
         * 
         * @return builder
         * 
         */
        public Builder checkRegions(String... checkRegions) {
            return checkRegions(List.of(checkRegions));
        }

        /**
         * @param description Free text description.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Free text description.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param enabled Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param latitude The latitude this pool is physically located at; used for proximity steering.
         * 
         * @return builder
         * 
         */
        public Builder latitude(@Nullable Output latitude) {
            $.latitude = latitude;
            return this;
        }

        /**
         * @param latitude The latitude this pool is physically located at; used for proximity steering.
         * 
         * @return builder
         * 
         */
        public Builder latitude(Double latitude) {
            return latitude(Output.of(latitude));
        }

        /**
         * @param loadSheddings Setting for controlling load shedding for this pool.
         * 
         * @return builder
         * 
         */
        public Builder loadSheddings(@Nullable Output> loadSheddings) {
            $.loadSheddings = loadSheddings;
            return this;
        }

        /**
         * @param loadSheddings Setting for controlling load shedding for this pool.
         * 
         * @return builder
         * 
         */
        public Builder loadSheddings(List loadSheddings) {
            return loadSheddings(Output.of(loadSheddings));
        }

        /**
         * @param loadSheddings Setting for controlling load shedding for this pool.
         * 
         * @return builder
         * 
         */
        public Builder loadSheddings(LoadBalancerPoolLoadSheddingArgs... loadSheddings) {
            return loadSheddings(List.of(loadSheddings));
        }

        /**
         * @param longitude The longitude this pool is physically located at; used for proximity steering.
         * 
         * @return builder
         * 
         */
        public Builder longitude(@Nullable Output longitude) {
            $.longitude = longitude;
            return this;
        }

        /**
         * @param longitude The longitude this pool is physically located at; used for proximity steering.
         * 
         * @return builder
         * 
         */
        public Builder longitude(Double longitude) {
            return longitude(Output.of(longitude));
        }

        /**
         * @param minimumOrigins The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
         * 
         * @return builder
         * 
         */
        public Builder minimumOrigins(@Nullable Output minimumOrigins) {
            $.minimumOrigins = minimumOrigins;
            return this;
        }

        /**
         * @param minimumOrigins The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
         * 
         * @return builder
         * 
         */
        public Builder minimumOrigins(Integer minimumOrigins) {
            return minimumOrigins(Output.of(minimumOrigins));
        }

        /**
         * @param monitor The ID of the Monitor to use for health checking origins within this pool.
         * 
         * @return builder
         * 
         */
        public Builder monitor(@Nullable Output monitor) {
            $.monitor = monitor;
            return this;
        }

        /**
         * @param monitor The ID of the Monitor to use for health checking origins within this pool.
         * 
         * @return builder
         * 
         */
        public Builder monitor(String monitor) {
            return monitor(Output.of(monitor));
        }

        /**
         * @param name A short name (tag) for the pool.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A short name (tag) for the pool.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param notificationEmail The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
         * 
         * @return builder
         * 
         */
        public Builder notificationEmail(@Nullable Output notificationEmail) {
            $.notificationEmail = notificationEmail;
            return this;
        }

        /**
         * @param notificationEmail The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
         * 
         * @return builder
         * 
         */
        public Builder notificationEmail(String notificationEmail) {
            return notificationEmail(Output.of(notificationEmail));
        }

        /**
         * @param originSteerings Set an origin steering policy to control origin selection within a pool.
         * 
         * @return builder
         * 
         */
        public Builder originSteerings(@Nullable Output> originSteerings) {
            $.originSteerings = originSteerings;
            return this;
        }

        /**
         * @param originSteerings Set an origin steering policy to control origin selection within a pool.
         * 
         * @return builder
         * 
         */
        public Builder originSteerings(List originSteerings) {
            return originSteerings(Output.of(originSteerings));
        }

        /**
         * @param originSteerings Set an origin steering policy to control origin selection within a pool.
         * 
         * @return builder
         * 
         */
        public Builder originSteerings(LoadBalancerPoolOriginSteeringArgs... originSteerings) {
            return originSteerings(List.of(originSteerings));
        }

        /**
         * @param origins The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
         * 
         * @return builder
         * 
         */
        public Builder origins(Output> origins) {
            $.origins = origins;
            return this;
        }

        /**
         * @param origins The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
         * 
         * @return builder
         * 
         */
        public Builder origins(List origins) {
            return origins(Output.of(origins));
        }

        /**
         * @param origins The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
         * 
         * @return builder
         * 
         */
        public Builder origins(LoadBalancerPoolOriginArgs... origins) {
            return origins(List.of(origins));
        }

        public LoadBalancerPoolArgs build() {
            $.accountId = Objects.requireNonNull($.accountId, "expected parameter 'accountId' to be non-null");
            $.name = Objects.requireNonNull($.name, "expected parameter 'name' to be non-null");
            $.origins = Objects.requireNonNull($.origins, "expected parameter 'origins' to be non-null");
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy